How Google's artificial intelligence is baking chocolate chip cookies
Jeanette Harris would have never put two teaspoons of cardamom in a recipe for a dozen cookies.
The spice is strong, polarizing and typically associated with India and Asian cooking, not gluten-free chocolate chip cookies.
“Humans have internal biases about these sorts things, especially cooks and bakers — we have these ideas that these are the tried and true ways,” Harris said while she combined ingredients for her cookies during a cooking demo Monday at her bakery in Garfield.
Two teaspoons of cardamom is not one of those tried and true ways.
But when an artificial intelligence designed to optimize parts for airplanes and spaceships told her two teaspoons of cardamom was the right amount, she listened.
“And it tasted delicious.”
Harris, who founded the Gluten Free Goat Bakery, worked with Google's AI research team at the company's Pittsburgh office and its chef to develop a cookie recipe using machine learning and artificial intelligence. It was arguably one of the tastier applications for Google's Hypertune project, said Daniel Golovin, one of the engineers on the project.
The thought to apply Google's AI technology to baking cookies started one day as employees at Google's Pittsburgh office sat around talking at lunch. Greg Kochanski, a member of the team working on AI, worried that the technology would develop with only applications for large corporations and leave behind small businesses. He proposed finding a real-world, small use for it, and the Google cookie experiment was born.
The team first worked with John Karbowski, a chef at Google who teaches cooking classes to employees. Karbowski and the team began baking chocolate chip cookies using recipes devised by the AI.
The artificial intelligence works by using a relatively small data set to create the optimal conditions based on any number of parameters.
For the chocolate chip cookies, the AI could determine the amount of specified ingredients, the temperature and time in the oven or other factors in the baking process. The AI takes data from test batches of cookies and uses it to design the best batch.
“You're not going to do this billions of times,” Golovin said of baking batches of cookies.
“The trick is to do this as few times as possible,” Kochanski added.
Some cookies concocted by the AI were terrible — not enough butter, too much chocolate. Some had orange extract and cayenne pepper.
Some were good.
Google employees taste-tested the cookies, and their feedback was fed into the AI to help it make better decisions about the next batch. After many batches of cookies — Google's kitchen has five ovens — the team landed on the optimal, basic, chocolate chip cookie recipe.
But they weren't done there. To challenge the AI, the team went to Harris, whose bakery specializes in gluten-free, vegan and soy-free treats. Harris gave the team an unfinished, chocolate chip cookie recipe that she was developing. The AI took control over four or five ingredients, including cardamom and Szechuan pepper, the latter of which it decided does not belong in chocolate chip cookies and zeroed out of the recipe. The rest of the recipe was left to Harris' expertise.
It took the AI about 60 batches of cookies to nail the recipe, not bad for a computer starting from scratch, Harris said.
Both Harris and Karbowski said it was a bit unnerving to give the AI control over some of the baking process and decision making.
“You have to kind of surrender to how you as a baker or chef instictually react when we look at ingredients and just trust in the recipe in the recipe that the machine puts out,” Karbowski said.
Neither Harris nor Karbowski actively uses Google's AI in the kitchen, and they both said that the technology may not be the most beneficial to their small-scale operations, where test batches and tastings are possible. Both could see artificial intelligence and machine learning benefiting larger baking and cooking operations.
And neither is worried that artificial intelligence is coming for their jobs. Instead, the technology will help them do their jobs better, they said.
“AI brought into a kitchen — it's a little scary at first,” Karbowski said. “But it really expands your mind.”
Or at least, it can help you find the perfect amount of cardamom for your cookies.