How a computer learns from examples
AI doesn't learn like you do from a teacher's rules. It finds patterns in lots of examples. Try being the AI yourself!
In 60 seconds
How a computer learns from examples
AI doesn't learn like you do from a teacher's rules. It finds patterns in lots of examples. Try being the AI yourself!
Two stages
| Stage | What happens | Mango example |
|---|---|---|
| Training (learning) | The computer sees many labelled examples and finds a pattern | Thousands of mango photos marked "ripe" or "not ripe" |
| Using | It uses the pattern on something new | You show a new mango photo, it guesses "ripe" |
Why variety matters
- Only one kind of mango
- All photos in bright sunlight
- Just a few examples
- Many kinds of mangoes
- Photos in different light and places
- Lots of examples, checked carefully
Watch and read more
Lab
An unplugged "Be the AI" game where you learn a secret rule from picture cards.
The problem
Play with a parent, sibling, friend or class. No screen needed.
- Teacher: draw 10 simple picture cards (fruits, animals, shapes). Secretly choose a rule, like "things that are round" or "things that can fly".
- Show the cards one by one to the "AI" player, saying "YES" or "NO" for each. This is training.
- Now show 5 new cards without saying anything. The AI player guesses YES or NO. This is using.
- Count correct guesses, then reveal the rule.
- Play again with a trickier rule. Did more varied cards help?
You are done when
Hard questions
Try to answer before you reveal. If you can answer these, you understood the lesson.
Q1In the game, the AI player guessed "yes" for everything red. What went wrong?Reveal
Maybe many of the training "yes" cards happened to be red, so the player learned a shortcut: "red means yes". The real rule was something else. Real AI can make the same mistake when examples aren't varied enough.
Q2Why test the AI on new cards, not the same ones used in training?Reveal
Getting the training cards right might just mean remembering them. Testing on new cards shows whether the player really learned the pattern. Real AI builders do the same: they test on examples the AI has never seen.
Questions people ask
Who gives AI its examples?
People and companies collect them: photos, text, sounds and more. Sometimes people label them by hand, like marking photos "ripe" or "not ripe".
Does AI keep learning while I use it?
Some systems are updated later with new examples, but many don't change while you use them. Learning usually happens in the training stage.
Is this how chatbots learn too?
In a similar way. Chatbots learn patterns from huge amounts of text, which helps them guess good next words. That's also why they can sound right and still be wrong.
Lesson test
5 questions. Get 3 right (60%) to pass and complete this lesson.