Predict a Pie with AI

Learn to use AI to make a pie recipes! What makes a pie taste the best? What if you had a kitchen full of ingredients and you want to try all the combinations to come up with the perfect pie? In this workshop, you will wire up a neural network to do just that! You will then use your new knowledge to test a larger neural network that has used “machine learning” to analyze thousands of recipes to come up with new, creative combinations.

Predict a Pie with AI

Program Details

In this workshop, we are introducing the concept of Artificial Intelligence (AI) and how it is able to make predictions using a neural network. Similar to how the human brain makes decisions using the neural network process, AI uses neural networks to predict things such as the weather, climate change effects, the stock market, etc.

Wire up a neural network to predict which combinations of ingredients result in a delicious pie!

Wire up a neural network to predict which combinations of ingredients result in a delicious pie!


In this workshop, we will take a look at the basic building blocks of neural networks and build our own neural network using pie ingredients!

The activity begins with you becoming a baker and you want to become the best baker in town. But you have way too many ingredients and coming up with combinations with each ingredient will just be too time-consuming. We can use AI neural networks to help us come up with delicious recipes!

First, you will learn how a neural network works by building a simple network with ingredients of your choice. You will start by having two simple outputs such as “delicious pie” and “other”. Then you will learn how to connect different nodes together to get the output you want with your chosen ingredients. You will also see how not every combination of ingredients actually would be delicious and how some unexpected combinations can turn out to be delicious. You will learn to do exactly what a neural network AI does and how it makes predictions based on random ingredients.

Toggle the ingredients in our pre-trained neural network to create your own recipe

Toggle the ingredients in our pre-trained neural network to create your own recipe


Then you can test out our pre-trained neural network to get any random pie recipes or choose to get a sweet, quiche, pizza, savory or weird pie. You can also play around with the ingredients we have in our pre-trained neural network and come up with recipe combinations on your own and see what our AI thinks it will taste like!



What's included

Workshop Elements

Pie Activity


Technical Concepts

  • Introduction into AI & examples 
  • Neural Networks 
  • How NN are trained 
  • How AI uses NN to make predictions

Ethical Concepts

  • What consequences result from the source of training data?
  • Who does the AI represent with the predictions it makes?
  • How can we check if the predictions made by AI are ethical and appropriate?
  • Consequences of incorrect training data

Upcoming dates

Program Name Ages Location Date Time Price All taxes included  
No Program Date Found

Frequently Asked Questions

Predict a Pie - Pretrained Model

What is the difference between a neuron and a node?

This one’s an easy one, there is no difference! In an actual brain, they are called neurons, and traditionally when it comes to Machine Learning they are called nodes, but nowadays you can use them interchangeably in the AI field and everyone will understand what you mean.

Is each ingredient is a “neuron” in the network?

No, each neuron does not represent an ingredient. The AI neural network is based on a neural network that actually exists in the brain. These nodes or “neurons” represent the decision-making process of the AI. For a more technical explanation, each node calculates the numerical sum of input weights and executes an activation function. To learn more about these topics, visit:

How do you train something after you set it up?

We used 2000 artificial pie recipes as training data for the pre-trained neural network. This was trained by setting up a Tensorflow neural network in Python. In regards to our personal neural network, this is a mockup to show how neural networks function. This network itself cannot be trained with a training data set.

Did you have to specifically find those 2000 recipes that all had the same set of ingredients? Or did you choose 2000 recipes and then identify the common ingredients?

Finding a dataset like that would be really convenient! Sadly we could not get our hands on a data set like that, so instead, we created a list of ingredients and set requirements for each category of pie. For example, a pizza pie requires crust, cheese, and a sauce (tomato or pesto) at the bare minimum, it can then have combinations of 1 or 2 meats and vegetables as toppings. For quiche it must have crust and egg at the bare minimum, then 1 or 2 meats and vegetables to enhance it. Savoury pies always must contain crust and a meat ingredient. Sweet pies must have a crust, a sweetener (honey or sugar), and1 or 2 fruits, nuts, or chocolate. ‘Other’ is the category of random pies that may not adhere to the rules of the other 4 categories or just an unpleasant mix of ingredients.

What are the layers in the pretrain neural network? Do you know what they are or does the network generate them?

Every neural network has multiple layers. At the bare minimum you will need 2 layers. An input layer and an output layer. An input layer has as many nodes as there are inputs. When it comes to the output layer, if you are predicting a value (otherwise known as “regression”), the output layer will have one node. If you are predicting a category that your output will fall in (otherwise known as “classification”), the nodes will be equivalent to the number of categories (for example the Predict a Pie pre-trained neural network has 5 nodes in the output layer representing our categories: sweet, pizza, quiche, savoury, other). After the input & output layers have been established, there can be any number of layers in between. These layers are referred to as “hidden layers”. In essence, the more hidden layers in the neural network the more complex problems it can solve. Although the drawback is that the more layers you add the longer it takes to make a prediction as well. The art of constructing neural networks comes in finding the sweet spot of layers and nodes for your problem. For Predict a Pie the sweet spot we found was 2 hidden layers with 8 nodes in the first one, and 4 nodes in the second.

Can you have a relationship link between the first and last layer, skipping the middle layer?

Yes, you can! If the neural network you are building does not require more advanced logic, your input and output layers can connect to each other directly.

Does the system have any metadata about the ingredients? Like categorized as veggie, fruit, etc?

In a sense yes! The system does not explicitly have metadata about the ingredients stored. The neural network for Predict a Pie was trained on artificial pie recipe data and through that, the AI formed an understanding of the “metadata” (Which ingredients are fruit, meat, veggies, etc.)

Predict a Pie - Building your own network

How do you delete a node?

Drag the node to the bottom of the layer and a trash bin will appear. While holding the node, hover your mouse over the trash bin and release!

How do you delete hidden layers?

There is a “delete layer” button at the bottom of the hidden layer you have created.

I have another question that isn't here, who should I contact?

We'd love to hear your questions! Contact us at and we will answer your questions and add them here for everyone to learn!