Graze anatomy: the tech behind Graze.com's ultra-customised snacks

All products featured on WIRED are independently selected by our editors. However, we may receive compensation from retailers and/or from purchases of products through these links.

This article was taken from the June 2012 issue of Wired magazine. Be the first to read Wired's articles in print before they're posted online, and get your hands on loads of additional content by subscribing online. "Everyone said it was impossible," says Ben Jones, cofounder of food-delivery company Graze. "We went to Berlin, we spoke to scientists in New Zealand... Everyone said, 'No, no, no.'

But we did it: we built a successful company that sends fresh fruit through the post."

The west London-based business delivers small boxes of healthy snacks -- such as breads, dips and dried fruit -- across the UK by first-class post. But what's unusual about Graze is its factory's reliance on an artificial-intelligence algorithm, developed in-house, that customises each customer's portions and optimises the freshness of each ingredient used.

The algorithm, called Darwin (that's Decision Algorithm Rating What Ingredient's Next), determines how snack portions are sorted into punnets, how customised Graze boxes are labelled, and how they are packed directly into Royal Mail vans. It also records the customer's order history and preferences, monitors stock levels and tracks the location of workers on the factory floor (stock replenishers wear wireless devices on their wrists). "It's possible to get 4.9 million different combinations of snacks in a Graze box," says Jones. So the 250-person company uses data -- including over 50 million snack ratings -- to personalise each customer's snack selection. "If you bin all the things unsuitable for vegans, we'll learn that," explains cofounder Edd Read, 26, the AI specialist who developed Darwin. "Then, if we launch a product that's unsuitable for vegans, Darwin knows not to send it to you."

Investors DJF Esprit and Octopus Ventures have backed the company, which Ben Jones says has raised £6 million. It was founded in 2007 but its feedback loop, coupled with custom-built robotics, keeps the algorithm constantly learning. "We always spoke about the process of natural selection," says Jones, 30, "and it's always evolving."

Data-backed snack-packing

Step 1 - Preferences are recorded: On the graze.com website, customers select types of snacks to try -- olives and rice crackers, perhaps. Darwin, the firm's AI algorithm, looks at how customer choices relate to their past orders and feedback ratings.

Step 2 - Snacks are chosen: To decide which four snacks make it into a box, Darwin studies stock levels, a customer's past orders and ratings, nutritional value, new test products, and even the colour and texture of snacks (to ensure variety).

Step 3 - Robots sort and pack: Off-the-shelf machinery is no good when you're sorting strawberries, so Graze designed its own robots. They sort small amounts of fresh food very fast. If they fail to pick a portion correctly, the punnet is scrapped.

Step 4 - Food is boxed: It's not all robots in the factory: Darwin instructs human pickers on which snacks go into a given box. If a picker's stock runs low, Darwin sends an alert to the devices worn on a replenisher's wrist that a refill is needed.

Step 5 - Boxes are mailed: Darwin does some of Royal Mail's postal sorting itself. For instance, a box going to Scotland from the London factory takes the longest, so Darwin makes sure those are packed first in the day for sending first class.

Step 6 - Feedback comes back: Once the Graze box reaches its customer, the system solicits data: post-nibbling, the customer is asked to tell the Graze website -- and thus Darwin -- which snacks they liked. And the cycle goes on.

This article was originally published by WIRED UK