· 4 Min read

Neural Cookies

Update March 2019: While the generative adversarial network from before I have kept up for comedic purposes, I have worked on refining this a bit. Effectively, the challenge is with the limited data set (of under 200 data points), the GAN tended to collapse. As IBM found with Watson, it's hard to make a network creative in the same way as a chef. I did find however, that with more data, an quite good food embedding layer can be developed. This then pairs much better with active learning and results in relatively normal recipes.

I've decided to train a generative adversarial neural network to develop cookie recipes.

To begin, I need to establish a baseline, what a random recipe would look like. This is it, the random baseline, the recipe I'll try to improve on as I go.

First, I've used what the neural network generated randomly draft the recipe ingredient list. Based on this, I've attempted to develop the best step-by-step recipe I could.

Later, I've tried to use the same ingredients, but vary the amounts to a degree that might make this edible. I still don't recommend it, but it might vaguely resemble a flourless chocolate cake.

The first recipe was run through the first adversary: a pre-trained neural network that predicts recipe reviews based on the ingredient list, trained on a private database of cookies and reviews. (Note that brownies, blondies, and assorted bars were not considered cookies, following a poll of 120 of my Facebook friends).

Disclaimer

Please do not use this recipe, either by making it or consuming it.

Step by step

Preheat an oven to 325 degrees.

First, in a large bowl cream the butter and shortening with the brown sugar, honey, and corn syrup. Then slowly add in the ricotta while mixing vigorously. Zest a lemon into the bowl, and set aside both the bowl and any hope you had.

For the dry ingredients, equip your respiratory gear, and sift together the nutmeg, cayenne pepper, and ginger, being careful not to inhale. Add in the baking powder, corn starch, wheat germ and cocoa powder and whisk together.

To combine, slowly mix the dry ingredient mixture to the butter mixture, adding in the milk as you go.

Lastly, finely dice the apple and fold it into your mixture alongside the blueberries and peanuts. Scoop into vaguely cookie shaped scoops, if possible. If not, any method of putting batter / dough onto sheet will do. They may not look nice, but I guarantee they'll taste worse.

Bake for as long as is humanly possible to kill the flavor of cayenne pepper as much as possible.

Once the cookies are baked and are cooling, in a double boiler melt the white chocolate with the chocolate covered candies. Remove from heat, and drizzle both the raspberry jam and the chocolate mixture over the candies, in a last ditch attempt to mask any underlying flavors of either charcoal or cayenne pepper.

The recipe

This recipe was rated by the rating network 0 of 5 stars

  • 1 tsp cocoa powder
  • 1/2 cup butter
  • 1/4 cup shortening
  • 1/4 cup brown sugar
  • 1/4 cup milk
  • 1 tbsp baking powder
  • 1/4 cup nutmeg
  • 1/4 cup cayenne pepper
  • 1/4 cup ginger
  • 1/2 cup corn syrup
  • 1 tsp of an apple
  • 2 tbsp ricotta cheese
  • 2 tbsp corn starch
  • 1 large lemon, zested
  • 1/4 cup honey
  • 1/4 cup peanuts
  • pinch wheat germ
  • 4 chocolate caramel candies
  • 1 tbsp white chocolate
  • 1/4 cup raspberry jam
  • 1/2 cup blueberries

My attempt of improving it

For the cookies

  • 1 cup cocoa powder
  • 3/4 cup butter
  • 1/4 cup shortening
  • 2 tsp baking powder
  • 3/4 cup brown sugar
  • 3/4 cup honey
  • 1 cup corn starch
  • 2 tbsp milk, warmed
  • 1/4 cup peanuts
  • 2 tbsp corn syrup
  • pinch nutmeg
  • pinch ginger
  • pinch cayenne
  • 1 tsp ricotta cheese
  • pinch wheat germ
  • 1/8 cup chocolate caramel candies, finely chopped

For the topping:

  • 1 tsp apple, finely minced
  • 1/2 cup raspberry jam
  • 1/2 cup white chocolate, melted
  • 1 blueberry

My instructions

Preheat an oven to 350 degrees.

Sift together the cocoa powder, baking powder, nutmeg, cayenne, ginger, wheat germ, and corn starch in a small bowl an set aside.

In a large bowl, beat the butter and shortening with the brown sugar, and slowly add the honey, corn syrup, and ricotta.

Slowly add the cocoa mixture to the butter, slowly adding milk and mixing until incorporated. Fold in the peanuts and caramel candies, and scoop onto a lined baking sheet. Bake for 10-12 minutes, or until there appears to be a skin forming on top and the cookies are drier.

Let cool completely.

To top, mix the apple and lone blueberry with the raspberry jam and fold through the melted white chocolate. Drizzle decoratively over the tops of the cookies.