Inside Ocado: Discover The Hidden Robotic Intelligence Behind Your Online Shopping

By James O Malley on at

When it comes to future technologies, the place you might assume to look is from the big players that we write about every day: Google, Apple, and Amazon. These are the companies that routinely blow our minds by showing us what the future looks like.

So I was slightly surprised when I was invited to travel up to Hatfield to take a look around a warehouse operated by Ocado, the online supermarket. Sure, they offer a convenient service, and their colourful delivery vans are an increasingly ubiquitous part of the urban landscape. But does this company really do something that would get technology nerds like us excited? Is it even possible for a supermarket to be a tech company? Can our shopping really be made smarter?

Amazingly, it appears that the answer is a resounding yes. What I saw was a vision of the future - with all of the promise and challenges that entails. The Hatfield warehouse is enormous and is one of the two where Ocado assembles shopping orders. The other even larger warehouse is in Tamworth, which together with Hatfield enables the company’s delivery network to cover 70% of the country. Hatfield apparently processes 1.5 million items every day - and it was all being operated by what felt like a tiny number of people.

The challenge of online grocery shopping is slightly different to, say, buying a new laptop from Apple’s online store, as groceries are both high volume and have low profit margins on each product. To make money, grocers need to sell a wide range of products, and needs to get them to customers en masse, which means there’s a huge logistical challenge. Each Ocado customer isn’t buying a single thing each time - they’re ordering maybe 10-15 bags of shopping, which are delivered three at a time in large red tote boxes. So for Ocado’s technology team the challenge can be stated quite simply: How can Ocado get all of the shopping into all of the right bags, and then get the vans to deliver them as efficiently as possible?

Other supermarkets online offerings have attempted to solve this problem with so-called “dark supermarkets” - hidden warehouses that are laid out like supermarkets, and where employees will trundle around with a trolley, just like you would in a branch of Tescos. But this isn’t a particularly smart solution, as it replicates many of the inefficiencies of a regular supermarket, but with someone who isn’t you or me doing the picking. In a high-volume, low-margin industry, every efficiency counts. And my tour guides, Technology Communications Manager Alex Voica and Matt Soane, the General Manager of Ocado’s Tech division, were keen to point out Ocado has turned to technology to transform how these optimisations are made.

Spaghetti Junction

The main feature of the warehouse is a 25km long network of conveyors which are used to transport different coloured tote boxes around the building. Green boxes contain stock - and red boxes contain people’s shopping. And they share tracks - and it is by using barcodes and some complex software, they can be directed to wherever they need to be.

The "road network".

But a linear production line this isn’t - this is more like a road network. Totes will shuttle back and forth around the building in order to collect or deliver new items, and at any one time there can be somewhere between 8000 and 10000 totes on the move.

Keeping track of all of the totes and what’s contained within is a hard problem, but Ocado does have one huge advantage over traditional supermarkets: stock control. Because there are no pesky customers there to pick stuff off of shelves, move things around, or generally act like a nuisance, the company can be confident that it knows exactly how much stuff it has - and what it will have in the future. And it can use this data to its advantage. For example - at any one time the system will know how many cans of Coke are left in the green totes, so it will be able to ensure that a new fully stocked tote will on the conveyor network the moment the old one runs out, so there’s no waiting around.

The big optimisation challenge for Ocado is making sure that the right boxes arrive in the right places at the right time. And this is the question that Ocado’s army of 1000 people on the technology team are working to squeeze ever more efficiency out of.

So how is the road network kept moving? In the control room was a real time visualisation of the entire conveyor network. “It’s like the warehouse with the walls removed”, says Matt. Controlled with an Xbox controller, the operator is above to spin and zoom around the entire network to monitor what’s going on. Each tote on the system is coloured depending on status - not reflecting the colour of the physical tote, but on whether, for example, it is completed and is on its way to the delivery vans, or whether it still needs filling up.

The warehouse in recreated in a real-time simulation.

What happens on the conveyor system is all logged - which is great news for the engineers when they are working to improve algorithms and refine optimisations, as it means simulations can be run on actual live data. It’s all astonishingly clever - but how does this work in practice?

The Pick Face

One of the first things you see upon entering the warehouse are enormous shelves, stacked high with green totes full of products. This is all of the stock in its rawest form - having just arrived in the warehouse. Between the aisles is a human-operated crane tasked with retrieving pallets of boxes when they are required - but this human operator is also informed by Ocado’s system. The challenge is for it to predict what stock will be needed when - so the orders on what to lift next are driven entirely by computers figuring out what is needed. Matt likened it to a giant Tetris-style puzzle, which the software has to solve for maximum efficiency.

Loads of green storage totes waiting to be added to the "road network".

The green storage totes are then loaded onto the conveyor system, and they enter the “road network”. The next stop on my tour was what is known as the “pick face”. This is where actual humans transfer products from greet totes into shopping bags, which are stretched open inside red totes. And even though this involves humans - there’s clearly a lot of intelligence at work.

For the pick face, imagine the aisles of a supermarket, but instead of fixed shelves containing fixed products, what’s on the shelves is constantly changing as they conveyor system constantly re-orders what’s there for maximum efficiency.

Without wanting to oversell it, for the picker it’s a bit like a game (albeit one they’re compelled to play for several hours at a time, in exchange for money). They login to a “pick station”, and a red customer tote slides in beneath the screen. An overhead camera uses machine learning-driven computer vision to verify that the three plastic shopping bags are hanging correctly inside. And then the screen tells the picker what to grab from the shelves next. An on-screen arrow points at where the product should be. And once the item is retrieved, scanned and bagged, the process starts all over again.

In order to keep the whole system moving, sometimes the pick station will instruct the picker to move to a different station - so they can grab something while the green and red totes are in the right place. But this is something that Ocado tries to avoid, as it creates inefficiencies: Every second the picker is walking between stations, they are making the process less efficient.

So in a bid to improve this, Ocado has turned to a neural network in order to decide what goes on the shelves and where. Alex told me that originally the company had attempted to write its own algorithms to solve this problem, but discovered that there were too many factors at play, as any positioning algorithm would have to take into account the frequency of how often an item is picked (you want the most common stuff nearest to the pickers), the weight of items (don’t put the heavy stuff on high shelves), and once again, the timing: The system needs to make sure that the right items are available for the customer totes that are currently there.

Even which bag to put items is decided intelligently - as obviously Ocado wants to avoid, say, putting bleach next to meat. So to solve this, the company has instead used machine learning to train the system to make these decisions for it. The humans are, essentially, just cogs in the machine, trained for maximising efficiency.

These optimisations really add up too. Each aisle has around 10 pick stations, and Ocado claims that one individual aisle has the same output equivalent to a “large supermarket”. In the Hatfield warehouse, There are probably around 10-12 aisles all working to assemble customer orders. In other words, the one warehouse is probably doing the same amount of work as perhaps a dozen massive ASDAs - but with no need for shopping trolleys, rows of check outs - or the humans who use them.

Tricky Picks

The system of robotically organised aisles with pickers running up and down works great for the goods that people buy at high volume - think tins of beans and pints of milk and so on. A different challenge though is the stuff that is only seldom bought by customers, but that which must be stocked in order for Ocado to offer the full range of goods customers expect at a supermarket. At the moment the company stocks around 48,000 different items. Matt likens to this a Pareto distribution in mathematics, but Alex put it much more simply: It’s the 80/20 problem - in that a mere 20% of Ocado’s products account for 80% of customers’ shopping baskets. This means that if the pick face had to have everything - even the obscure stuff - floating around near it, it would introduce new inefficiencies because pickers would have to walk further to reach what they really need.

Ocado's Goods-to-Man system, that would probably be more accurately described as a Goods-to-Person machine.

So how to solve this? This uses a different set of machines - what are called in the industry “Goods to Man” systems - though as with all of the hardware and software in the warehouse, it too has been built in-house by Ocado engineers. What this machines does is bring the correct green storage tote and the correct red shopping tote to the operator at the same time. So all the picker has to do is lift the item from one box, and scan it, and drop it into another. This again is a tricky optimisation problem - as given the miles of conveyors, and the traffic system, the challenge for engineers is making sure the correct two totes appear at the right times, otherwise there is a massive traffic jam.

I actually got to see two versions of this machine, as Ocado are clearly keen to demonstrate how it keeps iterating its hardware to squeeze out greater and greater efficiencies. To my lay person’s eyes, they appeared pretty similar - but even just eliminating the need to take one step, to shave off a few precious fractions of a second for each pick, adds up to a great productivity gain. Comparing the two iterations, Matt says that a picker on the newer version can pick 50% more than someone on the older machine.

The Bagging Machine

After seeing all of this gear, Matt and Alex took me to see their secret new project. Photography was not allowed in any of the warehouse (all of the images in this piece are supplied by Ocado), but they wouldn’t even send me an image of this. What was this secret new machine? It was, umm, designed to blow open the bags.

In order for the massive system to function correctly, bags must be hung on the totes on specific notches on either side - three bags to a box. The trouble is that previously this has been a very hard thing for machines to do and has relied on humans to flick open and hang thousands upon thousands of bags. If you’ve ever worked as a cashier in a shop like I have, you’ll know how annoying this is.

They wouldn’t disclose exactly how the new machine works, presumably just in case the Tesco equivalent of the CIA used the details and images to reverse-engineer it (a bit like American intelligence did from photos of Iranian nuclear centrifuges). But essentially, the prototype (“it’s a bit Wallace and Gromit”, Alex joked) appears to involve puffs of air being blown into each bag to inflate it. Apparently one of the big problems was the material that bags were originally made from would break to easily, but now Ocado has come up with a new formula which works more successfully with the new machines.

Delivery

Finally then… what about delivery? The intelligence doesn’t stop as soon as your shopping is loaded into an Ocado van.

Ocado vans in a warehouse we assume is nowhere near as clean and shiny in real life.

Once your shopping has been assembled in either Hatfield or Ocado second (even larger) warehouse in Tamworth, it is taken by lorry to a smaller warehouse where it is decanted into one of the smaller vans to make the actual deliveries.

Yep - this means if you live in Liverpool, your shopping is actually being assembled near Birmingham. But according to Matt, this is still narrowly better for the environment than if you’d walked to the shop yourself. He says the company got an eco-consultancy to do a study on Ocado’s carbon footprint - and Ocado works out marginally better, because even if you walk to the supermarket there are still many inefficiencies involved, all of which cost carbon.

Planning a delivery is tricky because of the so-called “travelling sales person” problem: If a delivery person has to make many stops, how can they figure out the optimal route? To help figure this out, Ocado not only tracks vans using GPS, but also takes other analytics data, such as fuel usage and acceleration, and braking, and all of this data is fed back so that future deliveries would take these factors into account. Variations are also made for the date and time, given that road conditions are going to be very different on a Monday morning and a Sunday afternoon.

What I thought was particularly smart was that when a van pulls up outside of your house, Ocado records the dwell time. If the delivery takes ages, Ocado’s system makes the assumption that you live somewhere hard to reach. Next time you order, this is taken into account so Ocado’s scheduling software will budget more time for your delivery - ultimately making the whole delivery system more accurate.

Intelligence and Cogs in the Machine

As the tour was winding down, Alex told me that they see Ocado not as a grocery store, but as a technology company which happens to sell groceries. And on the evidence of what I’ve seen, it strikes me as exactly the right approach to take. It seems that every aspect of Ocado’s work - from taking orders, to picking goods, to delivering them, is infused with a culture of testing and evaluation, all to find ever greater efficiencies and optimisations that can be made.

What’s clever isn’t just how Ocado tracks every tote every step of the way, but the way that the data is fed back into its development: Real data from the warehouse is used to build digital simulations of how changes could affect output. This ranges from small changes - like seeing what would happen if tweaks were made to one of the junctions on the tote “road network”, to much bigger ones, such as simulating increased demand over the Christmas period. Before any code is deployed - and apparently new code is deployed every day - it also must pass a test in Ocado’s simulator.

Perhaps it is unsurprising then that Ocado’s technology division currently has 1000 engineers working in it - and this, at a guess, this is surely more than the number of people who are needed in the surprisingly un-labour intensive warehouse.

In fact, it was this catching a glimpse of the human side of the operation - or the lack thereof - which is what caused me to reflect a little and make an unoriginal observation about the promise of technology writ large: The technology at work is astonishing, and the optimisations are ingenious but one side effect it that it reduces many humans to being just cogs in the machine. This isn’t a new phenomenon (thanks, Henry Ford) - but seeing it up close made the theoretical arguments about automation much more vivid.

Eventually, the humans will be replaced all together - not just at Ocado but across industry too. I don’t think Ocado should be prevented from pursuing its technological ambitions (in fact, completely the opposite, as more stuff delivered more cheaply makes everyone materially better off) - but seeing how far the technology has already come makes the debate about how the labour market will work in the future feels all the more urgent.

As Ocado demonstrates, the future of shopping is definitely smarter - but we should make sure to wise-up to all of the implications too.

Next week: We discover how this is only incremental - and how Ocado has astonishing plans for swarming robots to organise its warehouses.