The shape of the lesson
By the end of the lesson, learners can
- What is AI?: AI does not mean a computer that is conscious or truly understands.
- Expert systems: An expert system gives a non-expert the advice a human expert would give, such as a doctor, a mechanic or a geologist.
- Machine learning: In a normal program, a programmer must change the code to change what it does.
- AI: the simulation of intelligent behaviours by computers.
- Characteristics: data and rules for using it; ability to reason; can learn and adapt.
- Expert system: knowledge base (facts), rule base (rules), inference engine (reasons), interface (questions and answers).
- Machine learning: the program automatically adapts its own processes and/or data.
One picture every idea returns to
Artificial intelligence (AI) is a branch of computer science dealing with the simulation of intelligent behaviours by computers. Its main characteristics are: a collection of data and rules for using that data; the ability to reason (apply the rules to reach conclusions); and it can include the ability to learn and adapt. At IGCSE you study two kinds: expert systems, which have a knowledge base, rule base, inference engine and interface; and machine learning, where a program can automatically adapt its own processes and/or data.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, Computers that seem to think.. A program that diagnoses a car fault like a mechanic, an email filter that gets better at spotting spam the more you use it: both simulate intelligent behaviour. Put the figure on the board: it is the one picture every idea in the lesson returns to. | Whole class, then pairs |
| 5 to 13 min | Teach and check: What is AI? | AI does not mean a computer that is conscious or truly understands. Your turn: A calculator gives the correct answer to 365 × 24 every time. Explain why it is not usually described as AI. | Whole class, then pairs |
| 13 to 21 min | Teach and check: Expert systems | An expert system gives a non-expert the advice a human expert would give, such as a doctor, a mechanic or a geologist. Model the worked example Medical diagnosis on the board, one line at a time. Your turn: Give two uses of expert systems other than medical diagnosis. | Pairs |
| 21 to 30 min | Teach and check: Machine learning | In a normal program, a programmer must change the code to change what it does. Your turn: A music streaming site suggests songs. Explain how machine learning means the suggestions improve over time. | Think-Pair-Share |
| 30 to 36 min | Check | The four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong. | Individual, then whole class |
| 36 to 43 min | Plenary | The exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording. | Individual, random call |
| 43 to 45 min | Exit and homework | Set the worksheet below (6 questions, 17 marks). Learners self-assess against the objectives before they leave. | Individual |
Protect the parts that carry the learning
The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.
Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.
Cut first if the build overruns: the last check in Machine learning, never the check or the plenary.
In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.
Think-Pair-Share
Pose the question, give thirty seconds of silent thinking, then a minute to compare with a partner before a few pairs share with the class. The silent minute is the part that cannot be cut.
The full structure, with its variations and the other twelve, is on the cooperative-learning page.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| "AI is when a computer thinks like a human" is too vague for marks. | Use the syllabus words: simulates intelligent behaviour, using data and rules, the ability to reason, and possibly to learn and adapt. |
| Do not mix up the knowledge base and the rule base. | The knowledge base holds the facts; the rule base holds the rules; the inference engine uses the rules on the facts. |
| "Machine learning is when a computer learns" just repeats the question. | Say it automatically adapts its own processes and/or data, without being reprogrammed. |
Artificial intelligence: expert systems and machine learning: worksheet
6 questions, 17 marks. Written in the style of the papers; no past paper question is reproduced.
State what is meant by artificial intelligence.
Describe the main characteristics of an AI system.
An expert system is used to identify faults in washing machines. Identify the four components of the expert system and give the purpose of each.
A technician uses an expert system to find the fault in a washing machine. Describe how the expert system is used to reach a diagnosis.
Explain what is meant by machine learning, using an example.
A bank uses software to spot fraudulent card payments. Over time it becomes better at telling unusual payments from normal ones, without a programmer changing the code. State whether this is an expert system or machine learning, and justify your answer.
Answer key and marking notes
A branch of computer science dealing with the simulation of intelligent behaviours by computers.
- It has a collection of data and rules for using that data.
- It has the ability to reason (apply the rules to the data to reach a conclusion).
- It can include the ability to learn and adapt (change its own data or processes).
- Knowledge base: stores the facts about washing machines and their faults, gathered from experts.
- Rule base: stores the IF ... THEN rules for using the facts, e.g. IF the drum does not turn AND the motor hums THEN the belt may be broken.
- Inference engine: applies the rules to the facts and the user's answers to reach a diagnosis, and chooses the next question.
- Interface: asks the user questions and displays the likely fault (and its probability / the reasoning).
- The interface asks the technician a question about the machine (e.g. does the drum turn?).
- The technician enters an answer (e.g. yes/no) through the interface.
- The inference engine searches the knowledge base using the rules in the rule base.
- It uses the answers so far to decide the next question, and the questions and answers repeat.
- The interface outputs the most likely fault, often with a probability and an explanation of the reasoning.
- A program can automatically adapt its own processes and/or data (without being reprogrammed).
- Example: a spam filter updates itself each time a user marks an email as spam, so it blocks similar emails in future (or any valid example such as recommendations or speech recognition).
- Machine learning.
- The software automatically adapts its own processes/data from new payment data and feedback; an expert system's rules only change when people update them.
6 multiple-choice questions on this lesson
From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.
Which part of an expert system holds the IF ... THEN rules?
- AThe rule base
- BThe knowledge base
- CThe inference engine
- DThe interface
Which of these is one of the main characteristics of AI?
- AThe ability to reason
- BThe ability to store more data than any other computer
- CThe ability to process data without a program
- DThe ability to move using actuators
An expert system for diagnosing car faults shows the question "Do the headlights work?" and the conclusion "The battery is flat (85%)". Which component displays these?
- AThe interface
- BThe inference engine
- CThe knowledge base
- DThe rule base
A video site recommends films. After a user watches several comedies, the program updates itself and recommends more comedies, without a programmer changing the code. What is this an example of?
- AMachine learning
- BAn expert system
- CAn automated system
- DRobotics
A user answers "yes" to "Does the patient have a fever?" and "yes" to "Does the patient have a rash?". The expert system then uses the rule IF fever AND rash THEN possible measles to suggest a diagnosis. Which component carried out this reasoning?
- AThe inference engine
- BThe rule base
- CThe knowledge base
- DThe interface
A bank compares two systems for spotting fraud. System A uses rules written by fraud experts. System B studies millions of past transactions and updates itself as new fraud is reported. Which statement is correct?
- ASystem B uses machine learning and can adapt to new types of fraud automatically
- BSystem A uses machine learning because its rules came from human experts
- CSystem B is an expert system because it has a knowledge base of transactions
- DBoth systems change automatically whenever a new type of fraud appears
Quiz key
The rule base stores the IF ... THEN rules for using the facts. The knowledge base holds the facts collected from experts. The inference engine applies the rules to the facts to reach a conclusion, but does not store them. The interface handles questions and answers with the user.
The main characteristics of AI are a collection of data and rules for using it, the ability to reason, and possibly the ability to learn and adapt. Storing huge amounts of data alone is not intelligence. All computers need a program. Moving with actuators is a feature of robots, not a characteristic of AI.
The interface lets the user interact with the system: it asks questions and displays the conclusion. The inference engine decides which question to ask and works out the conclusion, but the interface shows it. The knowledge base and rule base store facts and rules; they do not display anything.
The program automatically adapts its own data and processes from new data, which is machine learning. An expert system uses rules written in by people from expert knowledge and only changes if someone updates it. An automated system uses sensors, a microprocessor and actuators to control a physical process. Robotics is about the design, construction and operation of robots.
The inference engine applies the rules in the rule base to the facts and the user's answers to reach a conclusion, so it did the reasoning. The rule base only stores the rule. The knowledge base stores the facts. The interface collected the answers and will display the result, but does not reason.
System B works out patterns from data and automatically adapts its own processes and data, which is machine learning, so it can respond to new fraud patterns. System A is an expert system: its rules are written in by people, which is the opposite of machine learning. Holding data does not make System B an expert system; an expert system's rules come from human experts. System A only changes when someone updates its rule base, so 'both change automatically' is false.
Slides for this lesson
A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.