Class 6 · Unit 1: AI and everyday life · Lesson 1.5 · 45 min
Three ways machines learn
Hiba learns birds from names. Bilal sorts buttons with no names at all. Sana falls off her bicycle and tries again. Machines learn in exactly these three ways.
Today you will: Train a real model on an apple and a pen · Find groups in data with no labels · Teach a “robot” with rewards
Story
Hiba, Bilal and their cousin Sana are each learning something new.
Hiba is learning birds. Her grandfather points: that is a bulbul, that is a myna. She learns from examples with names.
Bilal tips out a box of buttons. Nobody tells him anything, but he puts them into piles: big ones, small ones, and shiny ones. He finds groups by himself.
Sana is learning to ride a bicycle. She wobbles and falls (ouch!), tries again, and stays up a little longer (yes!). She learns from rewards and mistakes.
Machines learn in these same three ways.
Watch
Three ways machines learn — — scan code 6.1.5 in the printed book.
Warm up your fingers
Skill: whole home row review (7 min)
- On typing.com, open Beginner → "Home Row Review".
- Type
asdf jkl;five times, then the wordssad,fall,lads,flask. - Check your own accuracy at the end. Did it go up since Lesson 1?
On the laptop
Three stations of 5 minutes. Groups rotate.
Mission 1: Supervised — labels (groups, 5 min)
- ☐1
teachablemachine.withgoogle.com → Get Started → Image Project → Standard — no account. Rename the classes
AppleandPen. - ☐2
Click Webcam: record about 30 images of an apple, then of a pen. Train Model — keep the tab open.
- ☐3
Predict: what will it call your eraser? Then hold up the apple, the pen, and the eraser. Why that guess?
(The images stay on the laptop unless you save them. Close the tab when done.)
Mission 2: Unsupervised — no labels (groups, 5 min)
- ☐4
Open
fruit-cards.ods: 12 fruits with weight (g) and colour, no names. - ☐5
Data → Sort by weight. Colour each group of similar fruits a different fill. How many groups?
Mission 3: Reinforcement — rewards (groups, 5 min)
- ☐6
Open
robot-path.ods: a 5×5 grid, Robot 🤖 top-left, Goal ⭐ bottom-right, 2 walls. - ☐7
One student is the robot and says a move; the partner types +1 for closer to the star, −1 for bumping a wall. Play 3 rounds — is round 3's score higher?
- ☐8
Label the agent, environment, state, action and reward in your sheet.
No laptop today?
- Supervised: the teacher shows 10 leaf cards labelled chinar or willow, then one with no label — the class guesses.
- Unsupervised: sort a bag of mixed buttons or beans into piles with no names.
- Reinforcement: chalk a 5×5 grid on the floor. A blindfolded "robot" gets a clap for a good step and a "buzz" for a wall.
Now you know
- Machine Learning (ML) is a machine learning from data instead of rules a person wrote.
- Training is the learning — showing the machine data until it picks up the pattern.
- The model is what training makes: the part that does the job afterwards. In Part 1 your model told an apple from a pen.
| Type | Learns from | Examples |
|---|---|---|
| Supervised | Examples with labels | Spam or real mail · photos labelled "cat" · a house price |
| Unsupervised | Data with no labels — mostly clustering (finding groups) | Customers who buy alike · one odd reading among thousands |
| Reinforcement | Trying, with rewards and penalties | A program learning chess · a robot learning to walk |
- More examples help: all three learn better from more, and more varied, data or practice.
Debate it
In Part 1, Teachable Machine was trained only on red apples. Then Bilal showed it a green apple, and it said "Pen"!
Whose mistake is that: the machine's, or the people who chose the examples? How would you fix it?
Check yourself — practice, not a test
1. Match each type of Machine Learning to its example:
Sorting spam from real mail · Grouping customers who buy similar things, with no labels · A game program that improves from its wins and losses · Predicting a house price from labelled past sales
Match with: Reinforcement · Supervised · Unsupervised2. Bilal sorts buttons into piles without anyone telling him the groups. This is like:
- ○ Supervised learning
- ○ Unsupervised learning
- ○ Reinforcement learning
- ○ Automation
3. In supervised learning, the examples come with labels (the right answers).
- ○ True
- ○ False
4. Put the Teachable Machine steps in order:
- 1. Record examples
- 2. Train the model
- 3. Test with something new
- 4. Name the classes
5. In reinforcement learning, the machine learns from rewards and ______.
6. Training produces a ______, which is the part that does the job afterwards.
7. Match the reinforcement-learning word to your robot game:
Agent · Environment · Action · Reward
Match with: Moving right or down · The 5×5 grid · +1 for getting closer to the star · The robot
Remember
Labels → supervised. No labels → unsupervised. Rewards → reinforcement.