ShareThis Page

How Google's artificial intelligence is baking chocolate chip cookies

Aaron Aupperlee
| Monday, Dec. 4, 2017, 4:57 p.m.

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.

Aaron Aupperlee is a Tribune-Review staff writer. Reach him at aaupperlee@tribweb.com, 412-336-8448 or via Twitter @tinynotebook.

TribLIVE commenting policy

You are solely responsible for your comments and by using TribLive.com you agree to our Terms of Service.

We moderate comments. Our goal is to provide substantive commentary for a general readership. By screening submissions, we provide a space where readers can share intelligent and informed commentary that enhances the quality of our news and information.

While most comments will be posted if they are on-topic and not abusive, moderating decisions are subjective. We will make them as carefully and consistently as we can. Because of the volume of reader comments, we cannot review individual moderation decisions with readers.

We value thoughtful comments representing a range of views that make their point quickly and politely. We make an effort to protect discussions from repeated comments either by the same reader or different readers

We follow the same standards for taste as the daily newspaper. A few things we won't tolerate: personal attacks, obscenity, vulgarity, profanity (including expletives and letters followed by dashes), commercial promotion, impersonations, incoherence, proselytizing and SHOUTING. Don't include URLs to Web sites.

We do not edit comments. They are either approved or deleted. We reserve the right to edit a comment that is quoted or excerpted in an article. In this case, we may fix spelling and punctuation.

We welcome strong opinions and criticism of our work, but we don't want comments to become bogged down with discussions of our policies and we will moderate accordingly.

We appreciate it when readers and people quoted in articles or blog posts point out errors of fact or emphasis and will investigate all assertions. But these suggestions should be sent via e-mail. To avoid distracting other readers, we won't publish comments that suggest a correction. Instead, corrections will be made in a blog post or in an article.