Tutorpip← About this lessonOpen the sheet →Download PDF
Ages 10+ · Coding · How computers work
AI and machine learning
Three pet sorters02468105Few7Lots9Variedphotos right
Photos sorted right out of ten. These are the story's own numbers, to show the idea. Varied means lots of different examples.
The big ideaA machine can learn patterns from many examples, but it can be mistaken, so people decide.

How it works

Rules for every case would never end. A pointy ear does not always mean cat, so the rules break.

Machine learning is a different idea: the machine learns patterns from many examples, like a hundred photos each labelled cat or dog.

It does not understand pets. It only finds patterns in what it is shown, and it can be sure and mistaken.

People check a machine's work, and for anything that matters, people decide.

Many labelledphotosIt findspatternsIt guesses anew photoPeople checkthe answer
How the pet sorter learns.
Rules written by hand• pointy ears means cat• some dogs have pointy ears• the rule breaksLearning from examples• a hundred labelled photos• the machine finds patterns• varied photos teach more
Rules, or examples?

Example 1: Rules break

  1. Mina writes rules: pointy ears mean cat, and a fluffy tail means dog.
  2. But some dogs have pointy ears, and some cats have fluffy tails.
  3. The rules break, and rules for every case would never end.

Example 2: Learning from examples

  1. A hundred photos, each labelled cat or dog, go into the machine.
  2. It notices patterns: cat photos share some shapes, and dog photos share others.
  3. A new photo lands nearer the cats or nearer the dogs, and that is its guess.

Example 3: A pattern nobody meant

  1. Zoe holds up her fluffy dog snoozing on a sofa, and the sorter says cat.
  2. Nearly every cat photo had a sofa in it.
  3. The machine learned a pattern nobody meant: sofa means cat.
  4. It only found patterns in what it was shown, so it was sure and mistaken.

Example 4: Adding different photos

  1. Mina adds many different photos: dogs on sofas, cats in gardens, all kinds.
  2. The machine learns again.
  3. This time it says dog for Zoe's snoozing pup.

Example 5: Reading the bars

  1. In the story, the Few sorter got 5 right out of ten, and the Varied sorter got 9.
  2. The Varied sorter got 9 - 5 = 4 more right.
  3. More examples helped, and different examples helped most.

Words to know

machine learning
A machine learns patterns from many examples.
example
A labelled photo the machine learns from.
pattern
Something that shows up again and again.
mistaken
Wrong, even when the machine seems sure.
varied
Different from each other.

Watch out

Try it

  1. True or false: a machine understands pets like a person.
  2. Which teaches a machine more: copies of one photo, or many different photos?
  3. Why did the sorter say cat for Zoe's dog on a sofa?
  4. Who decides about things that matter?
  5. The Few sorter got 5 right and the Varied sorter got 9. How many more did Varied get?
Answers: 1. False · 2. Many different photos · 3. Nearly every cat photo had a sofa, so it learned sofa means cat · 4. People · 5. 4
Try at homePlay pet sorter with a grown-up. They show you six labelled pictures or objects, like cats and dogs, or fruit and vegetables. Then they show a new one. Guess which group it belongs to. Were you ever sure and mistaken? What would help you learn more?
For grown-upsPlay pet sorter together: show six labelled pictures or objects, like cats and dogs or fruit and vegetables, then a new one to guess. Ask whether your child was ever sure and mistaken, and what would help them learn more.
Open these notes on screenScan the code, or go to tutorpip.com.