Worksheets › Class 6 › Simple Pattern Recognition and Decision Making › Cheat sheet
Class 6 Simple Pattern Recognition and Decision Making: cheat sheet
CBSE Computational Thinking and AI. We use patterns we have seen to make decisions: if–then rules, rules checked in order, and labelling a new item like its nearest example.
Key ideas
- A decision rule says what to do when a condition holds, like “if it is cloudy, carry an umbrella”.
- When rules are checked in order, the FIRST rule that fits gives the label; the later rules are not used.
- A rule learned from labelled examples must fit every example, not just most of them.
- AND needs both conditions to hold; OR needs at least one of them.
- A nearest-neighbour model gives a new item the label of the closest labelled example.
- A prediction from a pattern, like the next bus time, can still be wrong sometimes.
Remember
| “weight > 15 kg” | strictly more: 15 kg itself does not count |
| Distance in this chapter | difference in the first numbers + difference in the second numbers |
| Example | (3, 8) to (6, 4): 3 + 4 = 7 |
| Bus every 15 minutes | 8:00, 8:15, 8:30, 8:45 → next at 9:00 |
| Sorting into groups | classification |
Watch out
- Checking a later rule after an earlier one has already given the label.
- Treating “more than 15” as including 15.
- Adding the coordinates instead of their differences when finding the closest example.
Worked example
(a) A parcel sorter uses: Rule 1: if weight > 15 kg, label "Heavy". Rule 2: otherwise, if length > 40 cm, label "Long". Rule 3: otherwise, label "Small". (Check the rules in order.) A parcel weighs 13 kg and is 10 cm long. Which label does it get? (b) A parcel sorter uses: Rule 1: if weight > 20 kg, label "Heavy". Rule 2: otherwise, if length > 30 cm, label "Long". Rule 3: otherwise, label "Small". (Check the rules in order.) Parcels (weight, length): (2 kg, 50 cm), (31 kg, 35 cm), (20 kg, 45 cm), (21 kg, 15 cm), (32 kg, 45 cm). How many are labelled "Small"?
Working: (a) 13 is not more than 15; 10 is not more than 40, so Rule 3; (b) Long, Heavy, Long, Heavy, Heavy
Answer: (a) Small; (b) 0
Practise Simple Pattern Recognition and Decision Making
Revise with this page, then practise: every Simple Pattern Recognition and Decision Making sheet in the app is new, with an answer key and working.
Coming soon for Android and iPhone.