Google Uses Bayesian Optimisation to Produce the Perfect Cookie


Now that Christmas is just round the corner, you will probably have been gorging on cookies. You may have a favourite recipe, but this year, Google has decided to work with a local bakery in Pittsburgh to create a new cookie using Google AI technology.

Over the past year, the team at Google has been experimenting with a new technology for an experimental design. In order to demonstrate what this technology can do, the team at Google came up with a real world challenge: to design the best possible chocolate chip cookie, given a set of ingredients. The icing on the cake is that the team based in Pittsburgh, operates out of an office, which used to be a Nabisco factory.

The team used a technique called “Bayesian Optimisation”, stepping away from their desks and rolling up their sleeves in the kitchen. They first set a bunch of metaphorical knobs – in this case, the ingredients in the cookie recipe that included type of chocolate, quantity of sugar, flour, vanilla etc. The ingredients provide the right amount of variables to manipulate and measure, which makes the recipe easy to copy. The system guessed at the first attempt. The team then baked it and shared the results with Googlers ready to put science to the test by eating the cookies. The group tasted them and gave a numerical score relative to purchased cookies. The results were then fed back into the system, which learned from the rating and adjusted the ingredients to create a new recipe. The end result was that the system got much better at creating tasty recipes.

After coming up with a really good recipe, Google wanted to see what an expert could do with the smart cookie. So chef John, the lead chef in the office teaching kitchen, introduced the team to Jeanette Harris of the Gluten Free Goat Bakery and Cafe. Jeanette was diagnosed with Celiac over a decade ago, and she turned her passion for baking into an opportunity to offer treats to people who wouldn’t usually be able to enjoy them. “When John came to me with the idea of creating an AI generated cookie, I didn’t know what to expect. I run a small local bakery and take great care to ensure I’m providing safe, quality ingredients to my customers, but once the team took the time to explain what they were trying to do. I was all in!”

Working from the Goat Bakery Kitchen, Chef John and Jeanette tried some unusual ingredients like cardamom and szechuan pepper, using the measurements provided by Google’s method. 8 weeks and 59 test batches later, the team came up with an all new chocolate chip and cardamom cookie.

The smart cookie experiment is a taste of what’s possible with AI. Google hopes it will get you thinking about what kinds of things you can bake up with it.

Robotics News, December 4