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.
-
02
A weight is a multiplier
Explain that the connection's weight multiplies the input, and that a bigger weight makes a bigger output.
-
03
Tune the network
Change a weight until the network's outputs match the real answers.
Prerequisite knowledge
Before starting, students should be comfortable with:
- Multiplying a two-digit number by a one-digit number, such as 6 × 25.
- Knowing that a prediction is a guess about something we don't know yet, made from something we do.
- Clicking, and typing a number, on a computer or tablet. Students can share one device between two.
Opening up a prediction · 45–60 minutes
Class Activity
Introduction for students
Ask the class for times a computer has made a prediction for them: the weather app saying it will rain, a video site picking the next video, a phone guessing the next word. Each of these is made by AI, and today the class will open one up and see what is inside.
Then make a prediction together, without a computer. "A zoo gets more visitors when it's sunny. Yesterday had 1 hour of sun and 200 visitors. Tomorrow will have 3 hours of sun. How many visitors should the zoo expect?" Most students will say 600. Ask how they knew: they multiplied the hours by 200. That is exactly what a neural network does.
Open The Zoo Visitors Predictor on the board and step through the first input together. Point out the three parts: the input value on the left (hours of sun), the output value on the right (visitors), and the connection's weight in between (200). The input travels along the connection, gets multiplied by the weight, and becomes the output.
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.
- Target output
- The real answer, what actually happened. The network's output should match it.
Guiding the activity
Predict the cricket chirps
Pairs open The Cricket Chirp Predictor. Crickets chirp about 6 more times a minute for every degree of warmth, so the weight is 6. Before each output appears, the app asks for a prediction: students work it out on paper, type it in, then step on to check. Encourage them to say their multiplication out loud to each other.
Fix the phone battery
Next, pairs open The Phone Battery Predictor. This time the weight is wrong: it starts at 5, so a 1-hour video uses 5% of the battery when the real answer, the target output, is 12%. Students click the weight, change it, and step through again. When an output matches its target, the double lines between them turn green. The answer is 12, and it has to work for all four inputs.
Coach with questions
Walk around and ask, rather than tell: "Is your output too big or too small? So should the weight go up or down?" Students who guess and check are doing the right thing. Some will notice they can divide the target by the input, 12 ÷ 1, and that is worth sharing with the class.
For early finishers
Pairs who finish early can try The Smoothie Stand Predictor, where one input feeds two outputs and so needs two weights (4 for smoothies, 2 for popsicles).
-
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 -
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
-
What does the weight do?
Listen for It multiplies the input. Every input goes through the same weight.
-
What happened to the outputs when you made the weight bigger?
Listen for They all got bigger. A smaller weight made them all smaller.
-
How did you find the right weight for the phone battery?
Listen for Guessing and checking, getting closer each time, or dividing a target by its input. Both work.
-
Real AI has millions of weights. Who do you think sets them all?
Listen for The computer does, by doing what the class just did: checking its output against the right answer and nudging each weight to make the mistake smaller, over and over.
Wrap up
Finish with a two-question exit ticket. First: "A network has a weight of 3. The input is 5. What is the output?" (15). Second: "In one sentence, what does a weight do?"
Close by connecting back to the start: the weather app and the next-word guesser are made of the same pieces the class used today, with many more inputs and many more weights. Students can keep exploring at iinnoo.app, where every lesson is free and needs no account.
Ready to bring iiNNoo to your classroom?
Questions or ideas? Email us at support@iinnoo.app.
Start Learning How AI Learns