In a warehouse the size of three football fields, 3,000 robots move at 13 feet per second, swerving to avoid each other in a complex dance choreographed by artificial intelligence. What do they want to achieve? The objective is to obtain your groceries as quickly as possible. The warehouse in southeast London, which is equipped with the most advanced automated systems, is run by the British online retailer Ocado. The Ocado Smart Platform (OSP) was created initially for the company’s use, but it has now been licensed to other supermarkets.

The bots, which resemble washing machines on wheels, move across a grid like chess pieces. Each square has a stack of up to 21 containers hidden beneath it. The containers contain some of Ocado’s 50,000 goods, which are stored according to an algorithm that predicts when they will be needed. When the warehouse receives an order, the bots wake up and sprint to the container they need, passing within five millimeters of each other. “We basically play chicken with them: they go on a collision course only to divert at the last moment,” says Alex Harvey, chief of advanced technology at Ocado Technology. The bots are not self-autonomous; instead, they are guided by a system that organizes their pathways for them, akin to air traffic control. Each of the bots has a gripping mechanism and can hold one container. If a product is stored five containers down, for example, four bots will remove the containers above it first, creating room for a “hero” bot who is fulfilling an order.

When the “hero” bot has a container in its grasp, it transfers it to a picking station, where it is selected and added to an order by a person (or another robot, depending on the technology used in each warehouse). Following that, the completed order is transferred to a van for final delivery. “Labor costs are one of the key driving factors in the cost of groceries,” says Harvey, “and our goal is to try to automate these very repetitive, not particularly exciting human operations in the warehouse.”