Lesson 2 of 1234
How Machines Learn From Examples
Imagine teaching a puppy to sit by showing it again and again. That is a lot like how we teach computers to learn.
Lesson map
What this lesson covers
Learning path
The main moves in order
- 1The Puppy Trick
- 2training
- 3examples
- 4supervised learning
Concept cluster
Terms to connect while reading
Section 1
The Puppy Trick
Pretend you want to teach a puppy to sit. You say sit, you gently help it sit, and you give it a treat. You do this many times. After a while, the puppy hears the word and sits on its own.
Computers learn in a surprisingly similar way. We show them tons of examples. We tell them when they are right and when they are wrong. Over time, they get better and better.
Teach a computer to spot cats
- 1Show it 10,000 photos, each labeled cat or not cat
- 2Let it make guesses
- 3Tell it every time it gets a guess wrong
- 4Let it adjust its brain a tiny bit after each mistake
- 5Repeat until it gets most guesses right
After all that practice, the computer has built its own little cat detector. It did not memorize every photo. It learned the shape of cat-ness: pointy ears, whiskers, a certain kind of tail.
What can go wrong
- If all the example cats are orange, it may think black cats are not cats
- If someone labels dogs as cats by mistake, it will get confused
- If it only sees inside photos, it may not know outdoor cats
“Practice makes progress, not perfect, especially for computers.”
Key terms in this lesson
The big idea: computers learn by looking at lots of examples and fixing their mistakes over and over. The better the examples, the better the computer gets.
End-of-lesson quiz
Check what stuck
15 questions · Score saves to your progress.
Tutor
Curious about “How Machines Learn From Examples”?
Ask anything about this lesson. I’ll answer using just what you’re reading — short, friendly, grounded.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Explorers · 15 min
A Brain Made of Many Tiny Layers
Inside an AI is something called a neural network. It is like a sandwich with many layers, and each layer passes an idea to the next.
Explorers · 15 min
Where Do AI's Examples Come From?
AI needs millions of examples. But where do those examples come from? The answer will surprise you.
Explorers · 12 min
Why AI Tests Are Tricky
People give AIs tests called benchmarks. But passing a test is not the same as being truly smart. Let's find out why.
