Two cookies made from the same recipe app/Photo by Donna Turner Ruhlman

Last week I asked what makes a great app?  Andrew Schloss, a cook, teacher and author of numerous books, offers his answer below. Andrew has created a truly innovative cooking app, called Cookulus.  His plans are to create a series of interactive recipes that can be used by Cookulus but for now, he and his collaborators have started smart and small, applying the Cookulus algorithm to the chocolate chip cookie.

I recommend this app even if you don’t actually bake a cookie from it, just for the fascination of watching the recipe adjust itself as you slide your fingers along the bars (I bought it for $2.99, but he and his collaborator, Max Minkoff, reduced the price to a ridiculous $.99; they also offer a “lite” version for free to give you a better sense of the app). If you do cook from it, know this: it works.  See photo above. Innovative and truly unique. Here’s Andrew on it’s genesis.


Teaching a Recipe To Think For Itself

by Andrew Schloss

I have been a cookbook writer for 20 years, and I have been making cookies for more than 50, but I don’t think I really understood what I was doing until I had to teach an algorithm how to bake a batch of chocolate chips.

About a year ago, when the iPad was announced, my friend Max Minkoff and his app development partner Bruce Zenel got psyched by its possibilities in the kitchen.  Max came over to see if he could hook me in to working on a cooking app.  There were already several dozen out there, but no machine that made it easy to use electronic recipes without printing them out.  I’m a cookbook writer who’s geekily attached to the intricacies of recipes, so while Max and Bruce were panting at iPad’s interface possibilities, I just wanted to rewrite the book on recipe writing.

The restrictive thing about writing recipes is that unless home cooks have a lot of cooking knowledge to manipulate what’s on the written page they are stuck with what I write.  But on a tablet or smart phone (or anything with a touch screen) the user should be able to change what is happening in the recipe at will.  Through sliders or pull downs these machines could allow anybody to interact with a recipe the way that I do, altering it to make exactly what they want to eat.  All I had to do was write a recipe that knew how to think, and to do that all I had to do was teach an algorithm how to cook. This was going to be fun.

Algorithms (basically a list of instructions that calculate a function) are linear and relentless. They can only calculate a single set of actions but they do it without a hitch until you force them to stop.  The possibilities of cooking with one were decidedly cool and potentially expansive to a nonlinear mathematically-challenged thinker like me.  Initially I was convinced it couldn’t possibly work. Baking was too idiosyncratic.  Ratios worked in general, but they couldn’t be relied on to make something delicious every time without significant tweaking.  Max listened to my rant patiently and then he brought up the game changer, “Wouldn’t you rather try to create an elegant mathematical solution?” Not being one to turn my back on elegance I acquiesced and we decided to start with something manageable and small, like a chocolate chip cookie.

The first thing was to decide what decisions we wanted the algorithm to make.  With cookies that was fairly simple.  Other than flavoring and what kind of chips, there is a defined set of criteria that differentiate one chocolate chip cookie from another:

1. How thick or thin?

2. How soft or crispy?

3. How chewy or crumbly?

And a set number of ingredients that influence those criteria: fat, sugar, flour and egg, plus two baking factors that play against one another: oven temperature and baking time.

Here’s how it works: if you want to make a cookie crisper you increase the ratios of sugar, flour, and butter to egg, you increase baking time and decrease the oven temperature.  Thicker?  Go for more flour, less butter, hotter temp, and shorter baking time. Chewier? Lower everything against the proportion of egg.  Here’s a table that lays it all out:

Useful info but fraught with pitfalls. Too much butter (especially when teamed with a reduction in flour) and the cookie could disintegrate into mulch. Overdo the brown sugar and your cookie will never get crisp; too much white sugar and you’re stuck with shrapnel. In order to put all this knowledge to work we needed a base recipe so resilient and sure footed that no amount of manipulation would make it crumble.

I have never been a fan of mean recipes (those averaged from a group of recipes, not recipes with a grudge). Modified by mathematics and polished to remove any perceivable personality, they are formulas without authorship. But what they lack in soul they make up for in strength.

We collected more than two dozen chocolate chip cookie recipes from cookbooks, websites, and package backs, and laid them out on a spreadsheet, lining up the ingredients, tossing outliers, and standardizing measurement.  We decided that regardless how the ratios of ingredients came out the resulting recipes could only call for whole eggs – no fractions.  This meant that a large egg (52 grams) became our unit of measure.

With everything standardized and some simple arithmetic (add all the flour and divide by 27), we got our mean.  I had to make a batch right away, and within 30 minutes we had two dozen perfectly delicious undistinguished cookies – exactly what we wanted – neither thick nor thin, soft nor crisp, chewy nor crumbly.

I can’t tell you the exact algorithm that turned that single bland base cookie recipe into 1500 truly unique variations (Max and Bruce would fillet me), but I can tell you that it worked without a hitch.  I was floored.  Everything I tested came out as the algorithm predicted, until a day about 6 weeks in when everything threatened to blow up.

I had dialed a formula into the system that was ultimately thin, ultimately crisp, and moderately chewy.  I had already mixed up the batter before I noticed the baking time and temp – 45 minutes at 260 degrees F.  (What the?) No cookie bakes for 3/4 of an hour.  But I already had the cookies on the sheet pan so I stuck them in the oven and called Max to try to figure out what went wrong with the algorithm.  Forty-five minutes later the cookies emerged buttery crisp, tuile-thin, with the barest hint of chew. “(Expletive!), the thing worked.”  Not only did it work, but in it’s own relentlessly single-minded algorithmic way it had figured out a formula for the ultimate crisp thin cookie that in 40 years of professional culinary experience I had never come across. Completely awesome!

Turning all of this into an app, coming up with a name (we settled on Cookulus—for it’s similarity to calculus—after Cookini got taken), designing graphics and an interface, and going through the months of debugging that turn a cool idea into something useful and salable is another story, but in the meantime Cookulus is up and running—the first interactive recipe out there. I’ve had my butt kicked by an algorithm and I’m a better cook for it.

If you liked this post on Cookulus, check out these other links:

© 2011 Michael Ruhlman. Photo © 2011 Donna Turner-Ruhlman. All rights reserved