Course 4, lesson 37 of 100, Ages 10+
Learning from mistakes
Getting warmer, step by step
Like I’m 5
It’s like playing hot and cold. The AI guesses, hears ‘warmer’ or ‘colder’, and moves a tiny step closer each time.
The big idea
During training, a model makes a guess, compares it with the right answer and measures how wrong it was. That measure is called the loss.
Then it nudges its numbers slightly in the direction that would make the loss smaller, like walking downhill in the fog one small step at a time. Thousands of tiny steps later, the guesses are much better.
Examples
- Hot and cold: 'Warmer, warmer, colder!' guides you towards a hidden toy.
- Archery: Each arrow tells you whether to aim higher or lower.
- Loss going down: Builders watch the loss shrink as training goes on.
How it works
- After each guess, the AI measures how wrong it was. This number is called the loss.
- Then it nudges its numbers a tiny bit in the direction that makes the loss smaller.
- After millions of tiny nudges, the guesses get really good. That’s what training is.
Check your understanding
- What does the AI do after a wrong guess?
- Options: Nudges its numbers to be a bit less wrong; Gives up; Starts again from nothing.
Answer: Nudges its numbers to be a bit less wrong. Each mistake tells the AI which way to adjust, so it improves bit by bit. - What does the loss measure?
- Options: How wrong the model's guesses are; How long the model is; How much the computer weighs.
Answer: How wrong the model's guesses are. Lower loss means the guesses are closer to the right answers.
Remember
Training is millions of tiny corrections.
Talk about it
What did you get better at by making mistakes?
Go deeper
Training minimises a loss function, such as cross-entropy for classification. Gradient descent works out how the loss changes with each parameter (the gradient, found with backpropagation) and steps each one downhill. The learning rate sets the step size: too big and training overshoots, too small and it crawls.