Learning objectives
Students will be able to:
-
01
Inputs become outputs
Describe a neural network as a machine that turns an input number into an output number, one step at a time.
-
02
A weight is a multiplier
Explain that each connection multiplies the number passing along it, and that a bigger weight makes a bigger output.
-
03
Predict, then check
Work out what the network will say before it says it, then step through the calculation to check.
-
04
Tune the network
Change a weight until the network's predictions match what really happened.
Prerequisite knowledge
Before starting, students should be comfortable with:
- Multiplying a two-digit number by a one-digit number, such as 6 × 25.
- Adding two numbers to make a total.
- For Day 3: knowing that 0.5 is a half and 0.25 is a quarter. With third graders, do The Tomato Harvest Predictor together on the board.
- Clicking, and typing a number, on a computer or tablet. Students can share one device between two.
Inputs, weights and outputs · 45 minutes
Class Activity: Day 1
Introduction for students
Ask the class for times a computer has made a prediction for them: the weather app, a video site picking the next video, a phone guessing the next word. Explain that these are made by AI, and that for three days the class will open one up to see what is inside. Spoiler: it is mostly multiplication.
Make a prediction together, without a computer. "A zoo gets about 200 visitors for every hour of sunshine. How many visitors on a day with 3 hours of sun?" Ask how students got 600, and write it on the board as 3 × 200 = 600.
Key Vocabulary
- AI
- Short for artificial intelligence: computer programs that do things that usually take human thinking, such as making predictions.
- Prediction
- A guess about something we don't know yet, made from something we do know.
- Neural network
- A kind of AI that makes predictions by passing numbers along connections and multiplying them.
- Input value
- The number that goes into the network, such as the hours of sun.
- Weight
- The number on a connection. The input is multiplied by it.
- Output value
- The number that comes out of the network: its prediction.
Guiding the activity
Step through the zoo together
Open The Zoo Visitors Predictor on the board and step through the first input as a class. Label its parts on the board as they appear: the input value (hours of sun), the weight (200), and the output value (visitors). Then let pairs step through the other three inputs on their own devices.
Predict the cricket chirps
Pairs open The Cricket Chirp Predictor, where the weight is 6 chirps a minute for every degree. Before each output, the app asks students to predict it. They work it out on paper first, then type it in. Ask partners to take turns: one predicts, the other checks.
Spot the pattern
Listen for students who stop multiplying and start adding 30 each time (90, 120, 150, 180). Ask them why that works: each input is 5 degrees warmer, and 5 × 6 = 30.
-
The Zoo Visitors Predictor 01
This network predicts how many people visit a zoo based on the amount of sunshine. The input value is the hours of sunshine. The output value is the number of visitors. Step through the calculation for the first input. Observe how the weight affects the visitors, then repeat with the other input values.
Open lesson -
The Cricket Chirp Predictor
This network predicts how fast crickets chirp based on the temperature. The input value is the temperature. The output value is the chirps per minute. Crickets chirp about 6 times a minute for each degree, so the connection weight is 6. Before each output value is calculated, predict what it will be. Type your answer when asked.
Open lesson
Post-activity discussion
-
What are the three parts of the network we used today?
Listen for The input value, the weight on the connection, and the output value.
-
What would the cricket network say at 10 degrees?
Listen for 60 chirps a minute. Students can predict inputs the network was never shown.
-
What would change if crickets chirped 7 times a minute for each degree?
Listen for Only the weight. The network is the same shape; the weight holds what it knows.
Fixing a network that's wrong · 45 minutes
Class Activity: Day 2
Introduction for students
Recall Day 1 in one sentence from a student: the input gets multiplied by the weight to make the output. Today the weights are wrong, and the class's job is to fix them.
Introduce the target output: the real answer, what actually happened. The network's output is its guess. When the guess and the real answer match, the network is right.
Key Vocabulary
- Target output
- The real answer, what actually happened. The network's output should match it.
- Tuning
- Changing a weight, a little at a time, until the outputs match the targets.
Guiding the activity
Model the first fix
Open The Phone Battery Predictor on the board. Step through the first input: the network says a 1-hour video uses 5% of the battery, but the target is 12%. Ask the class: is 5 too big or too small? So should the weight go up or down? Then hand it over to pairs.
Find the weight
Students click the weight and type a new value. When an output matches its target, the double lines between them turn green. The answer is 12, and students should step through all four inputs to show it works for each one.
Two outputs, two weights
Pairs move on to The Smoothie Stand Predictor: one input, the temperature, now feeds two outputs, smoothies and popsicles, and each has its own weight. The answers are 4 for smoothies and 2 for popsicles. Ask what it means that the smoothie weight is twice the popsicle weight: a warm day sells twice as many smoothies.
Share the shortcut
Some students will find a shortcut: divide the target by the input. Let them explain it to the class, then ask whether it would still work if the network had two inputs. That question sets up Day 3.
-
The Phone Battery Predictor
This network predicts phone battery usage when playing a video. The input value is the video length in hours. The output value is the percent of battery used. Edit the connection's weight so that the output values match the target outputs. When the numbers are close, the double lines will turn green. Test with all 4 inputs.
Open lesson -
The Smoothie Stand Predictor
This network predicts a stand's sales based on the temperature. The input value is the temperature. The output values are the smoothies and popsicles sold. Edit both connection weights so that the output values match the target values. It takes 2 steps to calculate both outputs. Confirm your solution works for all inputs.
Open lesson
Post-activity discussion
-
How did you know which way to change the weight?
Listen for If the output was too small, the weight went up; too big, it went down.
-
Why test all four inputs, not just one?
Listen for A weight has to work for every input. One right answer could be luck.
-
What did you do each time you got it wrong?
Listen for Looked at how far off the output was and adjusted. This is how real AI learns: it measures its mistake and nudges each weight to shrink it.
Two inputs at once · 45 minutes
Class Activity: Day 3
Introduction for students
Ask: "What decides how many butterflies visit a garden?" Collect answers. Real predictions usually depend on more than one thing, so a network can have more than one input, each with its own connection and its own weight.
Show how the output is worked out with two inputs, using the board: multiply each input by its weight, then add the two together. For a garden with 3 flower beds and 4 bushes, with weights 1 and 2: 3 × 1 + 4 × 2 = 11 butterflies.
Key Vocabulary
- Input values
- The numbers that go into the network. A network can have more than one, such as flower beds and bushes.
- Connection
- The line that carries a number from an input to an output. Each connection has its own weight.
- Total
- With two inputs, the output is each input times its weight, added together.
Guiding the activity
One weight to change
Pairs open The Butterfly Count Predictor. The task is to make each bush count twice as much as each flower bed. The flower bed weight is already 1, so the bush weight needs to be 2. Students change the second weight and confirm it works for all four gardens.
Both weights to find
Next comes The Tomato Harvest Predictor, which asks for both weights, and both are between 0 and 1. The answers are 0.5 for each hour of sun and 0.25 for each liter of water. Encourage students to change one weight at a time, and remind them that 0.5 is a half and 0.25 a quarter.
For early finishers
Pairs who finish can explore The Honey Harvest Predictor, an example with no task to finish. Ask them to figure out what each weight means: 0.28 kilograms of honey for each flower nearby, and 0.45 for each day in the month.
-
The Butterfly Count Predictor
This network predicts the butterflies in a garden based on the number of flower beds and bushes. The input values are the flower beds and the bushes. The output value is the butterflies. Try to make each bush count twice as much as each flower bed. Edit the second weight to make this happen. Confirm your solution works for all inputs.
Open lesson -
The Tomato Harvest Predictor
This network predicts a garden's tomato harvest. The input values are the daily hours of sun and liters of water. The output value is the kilograms picked. Edit both connection weights so the output values match the target outputs. Hint: both weights are between 0 and 1.
Open lesson -
The Honey Harvest Predictor
This network predicts how much honey a hive makes. The input values are the flowers growing nearby and the days in the month. The output value is the kilograms of honey. One weight is what each flower is worth, and the other is what each day of the month adds.
Open lesson
Post-activity discussion
-
In the tomato garden, which matters more: an hour of sun or a liter of water?
Listen for An hour of sun: its weight, 0.5, is twice the water's, 0.25.
-
What does a bigger weight tell us about an input?
Listen for That the input matters more to the prediction.
-
Why was this harder than one input?
Listen for Changing one weight changes every output, so the two weights have to be found together.
Wrap up
On a half sheet of paper, each student designs a network of their own. They pick something to predict from their own life and the input it depends on, such as minutes of reading and pages read, choose a weight, and work out the output for two different inputs. Volunteers share theirs with the class.
Close the unit by returning to the first day's question: how does a computer make a prediction? Students should now be able to answer that it multiplies each input by a weight and adds them up, and that it gets better by checking its answers and adjusting its weights.
Ready to bring iiNNoo to your classroom?
Questions or ideas? Email us at support@iinnoo.app.
Start Learning How AI Learns