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.
Rahat: “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, Rahat 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.
Learn it
Not every machine that seems clever is AI, and not every job needs AI. Machines come at three levels. Automation repeats a fixed action and never looks at the world, like the school bell. A rule-based system follows if–then rules a person wrote. A learned model finds its own patterns in data. Higher is not better: the right choice is the simplest one that does the job.
Words to know
- Automation a fixed action on a timer or a switch, like the school bell or a car wash. It never looks at the world.
- Rule-based system follows if–then rules a person wrote, like a thermostat. The rules can be read, explained and changed quickly.
- Learned model finds its own patterns in data. It copes with cases nobody listed, but nobody can point to the line that decided, and it can fail in ways nobody predicted.
- Explainable you can say exactly why the system decided what it did.
Step by step: three ways to water an orchard
- Automation: the pump switches on at 7 a.m. every day, even after a night of rain.
- Rule-based: "IF the soil sensor reads dry, THEN switch on the pump." It looks at the world, and anyone can read the rule.
- Learned model: it learns from years of soil, weather and harvest data when watering helps most, including situations nobody wrote a rule for.
- Choose: for one orchard, the rule-based pump is probably enough. A learned model needs data collected and prepared, testing on unseen data, and watching in case accuracy drops. That is a lot of cost for a small gain.
CBSE's three comparisons: irrigation on a 7 a.m. timer vs soil-moisture sensors · a traffic signal on a fixed 30 seconds vs one that responds to the queue · a car wash that runs the same cycle every time.
Smart homes and farms mix all three: a timer for the porch light, a rule for the heater, a learned model for the voice assistant.
Careful: rule-based does not mean "not a computer". Rules are code; a person simply wrote them. And a learned model does not decide better than rules, only differently: when it is wrong, nobody can point to the line that needs fixing.
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.
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.
Typing practice
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%+.