Magical Cookie Creator

Creative Cookies through Evolution

By Christina Irakleous, Nikki Rademaker, and Yanna Smid

Overview

This project was part of the MSc Media Technology course Computational Creativity. The assignment was to create a system that could generate new cookie or cake recipes based on an inspiring set, using a genetic algorithm. In the end, we had to create a small cookbook presenting several of the recipes made by our system. Generative AI could be used to illustrate and expand the recipes, but the generator itself had to be our own.

The project taught us how to use a genetic algorithm in a creative context. We also learned how AI can support but not replace human creativity when it comes to presentation and communication.

The Recipe Generator

We created a Python-based generator called the Magical Cookie Creator. It uses a genetic algorithm to evolve new cookie recipes by combining ingredients from 43 real-world cookie and cupcake recipes. The system rewards variety and encourages the use of flour. It selects and mutates recipes over generations to create more original combinations.

Technical Development

We collected a mix of cookie and cake recipes from online sources. These were manually cleaned and structured into a JSON file. Each recipe included its name, list of ingredients, and ingredient categories. The ingredients were grouped into types like flour, sugar, fat, leavening, and flavorings. This helped the genetic algorithm make more meaningful combinations later. By tagging ingredients with these categories, the system could keep recipes balanced and make sure key components like flour weren't left out.

In short:

The Cookbook

To present the output, we selected 7 recipes that stood out and used ChatGPT to generate clear baking instructions. DALL·E was used to visualize what each cookie might look like. We collected everything into a mini digital cookbook, which we designed ourselves using Canva. Each recipe comes with a title, ingredients, baking steps, and a generated image.

You can flip through our cookie recipe cookbook here. It includes cookies like "Rainbow Muffin Unicorn Dip" and "Velvet Apple Pretzel Mints". These are the kind of strange and surprising recipes our algorithm would dream up.

Next Project Previous Project