News Archive 2009-2018

With Sugar and Algorithms, C.S. Students Make Fantabulous Cookies Archives

 

It actually might be true that computers really can do it all: they can even come up with inspired and delicious cookie recipes.

People got a chance to sample what an algorithm-generated cookie tastes like last week at a bake sale in Smith Union put on by students in the course Computational Creativity.

The students, however, weren’t just demonstrating their skillful programming and baking talents, they were also raising money for the local food pantry and soup kitchen. (Though the cookies were free, students asked for donations).

“It’s to show that computer science can be used for good!” said Assistant Professor of Computer Science Sarah Harmon, who teaches the class and organized the charity event. “This is about sharing with the community, and making a difference.”

To complete Harmon’s cookie assignment, students split into teams to devise novel algorithms that would spit out cookie recipes. But the cookies couldn’t just be humdrum—they had to be irresistible. “They had to use their knowledge and skills about artificial intelligence and machine learning, as well as think about creativity,” Harmon said. “The broad challenge was to develop an algorithm that would produce delicious, yet surprising, cookie recipes.”

The teams each ended up with a unique solution. Some of their algorithms scoured recipes from the internet, compiled ingredients, and analyzed which items go well with another, or which ingredients “had higher fitness scores,” as Drew MacDonald ’20 put it.

Despite MacDonald’s cookies coming out looking a bit like charcoal lumps, people nearby were munching them and making happy faces. The final ingredients in his team’s cookie were peppermint patties, lemon zest, orange zest, chocolate, and maple syrup. That was after they had programmed their algorithm to mutate to add or remove ingredients, so that “ideally by the end we have the best recipe,” he said.

Emme McCabe ’20’s cookie recipe also incorporated “wild cards,” so her team’s algorithms might recommend Cool Ranch Doritos or bacon bits, “things that you wouldn’t typically put in a cookie but you have lying around in your pantry,” she said.

Baharat cookie recipe

Concocted from a unique algorithm by Ezra Sunshine ’19, Andrew Phillips ’19, Mackenzie Schafer ’19, and Becca Vanneman ’19

Mix-in ingredients: 5.11 ounces of zucchini, 6.3 ounces of raisins. 5.78 ounces of apricots, .25 ounces of baharat spice, and 1.75 ounces of cinnamon.

Dough ingredients: 2.25 cups of all-purpose flour, 1 teaspoon baking soda, 1 teaspoon salt, 1 cup butter, .75 cup packed brown sugar, .5 cup granulated sugar, 2 eggs, 1 teaspoon vanilla

Cooking instructions: Preheat Oven to 375 degrees F. Combine flour, baking soda, and salt in a small bowl. Beat butter, sugar and vanilla extract in a larger mixer bowl until creamy. Add eggs, one at a time, beating well after each addition. Gradually beat in flour mixture. Stir in mix-ins. Drop by rounded tablespoon into ungreased baking sheets. Bake for 9-11 minutes or until golden brown. Cool on baking sheets for two minutes. Remove to wire racks to cool completely.

thumb: