Class 8 · Unit 2: Building with no-code AI · Lesson 2.5 · 40 min
Automation around us
The bell rings at 10:30 even when eleven children made it through the snow. “It should know.” “It's a timer. It has one job.”
Today you will: Build a rule-based sorter in Scratch · Compare it with your trained model · Choose the simplest tool that does the job
Story
The school bell rings at 10:30. It rings at 10:30 on the morning after heavy snow, when eleven children have made it in and the roads are shut.
Bilal: “It should know.”
Hiba: “It's a timer. It can't know anything. It has one job.”
On the way home they pass the traffic signal at the junction. Thirty seconds green, thirty seconds red, all day — empty road at eight in the morning, forty cars waiting at five.
In Bengaluru, Bilal has read, some signals watch the queue and change with it.
Three machines: a bell, a signal, and a signal that learns. Which one is AI — and does the bell need to be?
Watch
Three levels of machine — — scan code 8.2.5 in the printed book.
Warm up your fingers
Skill: typing while thinking, Term 1 (5 min)
- On typing.com, continue this term's lessons.
- Then type these three lines from dictation, without looking at the keys:
automation follows a fixed actiona rule-based system follows rules a person wrotea learned model finds its own patterns in data - Target: 28–32 WPM at 93%+.
On the laptop
You need: Scratch Desktop · your Teachable Machine model · rule-vs-model.ods · waste-photos/
Mission 1: The rule-based sorter (10 min, in pairs)
- ☐1
In Scratch, build a waste helper with
ask [ ] and waitandif / else: food or leaf → wet · paper, plastic or metal → dry · battery, bulb or medicine → hazardous · otherwise → ask a person. - ☐2
Test it on five items; record its answers in the Rule-based column.
Mission 2: The same five, past the model (10 min)
- ☐3
Predict: which system will handle an item that fits none of the rules? Then show the model the same five and record its answers in the Model column.
- ☐4
Fill Which was right? and Could you tell why it decided? Then one line each: which could you read? which handled the unlisted item? which would you fix faster?
- ☐5
Last row: one school job that needs a timer, one that needs rules, one that needs a learned model — and defend the third.
No laptop today?
Three columns on the board — automation, rule-based, learned model — and twenty machines to sort: school bell, fan regulator, electricity meter, pressure-cooker whistle, timed signal, queue-watching signal, billing software, voice assistant, face unlock, spam filter, washing machine, calculator, ATM, photo app, sensor street light, irrigation timer, soil-moisture irrigation, thermostat, translation app, fire alarm.
Now you know
- Automation repeats a fixed action and doesn't look at the world — and that's fine.
- Rule-based systems follow if–then rules a person wrote: readable, explainable, quick to change.
- Learned models find patterns in data: they cope with the unlisted, but nobody can point to the line that decided.
- Smart homes and farms mix all three.
- Choose the simplest thing that does the job. A model needs data, testing and watching.
Debate it
The school could replace its fixed bell with a system that learns when classes actually end and rings then.
Name two things that could go wrong — and say whether the problem the school actually has is a bell problem at all.
Check yourself — practice, not a test
1. Match each machine to its level:
Washing machine programme · Thermostat following written if–then rules · Signal that changes with the number of waiting vehicles · School bell on a timer
Match with: learned model · automation · rule-based2. Which is the best reason to choose a rule-based system over a learned model?
- ○ It is always more accurate
- ○ You can read the rules and explain every decision
- ○ It needs no electricity
- ○ It is newer technology
3. Irrigation that switches on at 7 a.m. every day is an example of AI.
- ○ True
- ○ False
4. A system that finds its own patterns in data instead of following written rules is called a learned ______.
5. A learned model costs more than a rule to run. Why? (choose all)
- ○ It needs data collected and prepared
- ○ It must be tested on data it has not seen
- ○ It has to be watched in case accuracy drops
- ○ It needs a faster internet connection at all times
Remember
Use the simplest machine that does the job. Not everything should learn.