Ch 3 · 6.3 Artificial Intelligence · O Level Computer Science 2210
Topic 3 of 3 in Automated and Emerging Technologies — O Level Computer Science 2210 — 49 lessons.
Introduction
Voice assistants, recommendation feeds, medical diagnosis tools and the AI tutor in CodeArc all try to behave intelligently. This lesson explains what AI means and how two kinds of AI system work. (Syllabus section 6.3.)
Key ideas — What AI is
Artificial intelligence (AI) is a branch of computer science dealing with the simulation of intelligent behaviours by computers: tasks that would need intelligence if a human did them, such as recognising speech, making decisions or diagnosing problems.
🧑🏫 Teacher's explanation
Imagine you are teaching a child how to identify a fruit. You don't just give them a list of every single apple in the world; instead, you give them a set of rules (it is round, it is red, it has a stem) and a collection of examples (data). Eventually, the child doesn't just follow rules; they start to recognize a fruit they have never seen before because they have learned the patterns. This is the essence of AI.
📖 Definitions
🔍 Worked example — Easy
Identify the four components of an Expert System used to diagnose a medical condition.
🔍 Worked example — Standard
A medical expert system is used. The knowledge base contains 'High Fever' and 'Sore Throat'. The rule base contains 'IF High Fever AND Sore Throat THEN Flu'. If the user inputs 'High Fever' and 'Sore Throat' via the interface, what component processes this to reach a conclusion?
🔍 Worked example — Exam-style
Compare Machine Learning and Expert Systems in terms of how they 'learn' or adapt.
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
(a) Identify the four main components of this expert system. [4] (b) Explain the difference between an expert system and machine learning. [2] [6 marks]
Key ideas — Characteristics of AI
🧑🏫 Teacher's explanation
Imagine you are teaching a child how to play a board game. You don't just give them the board; you give them a set of rules (the rules for using data) and a memory of every game they have ever played (the data). As they play, they realize that certain moves lead to losing, so they change how they play next time. This ability to change their strategy based on experience is 'learning and adapting'.
📖 Definitions
🔍 Worked example — Easy
Identify the four components of an expert system used to diagnose a medical condition.
🔍 Worked example — Standard
A machine learning algorithm is used to identify spam emails. If the algorithm correctly identifies a new spam email and updates its internal filters to catch similar emails in the future, which characteristic of AI is being demonstrated?
🔍 Worked example — Exam-style
An expert system is used to determine if a car part needs replacing. The system contains a list of all car parts and their lifespans (Knowledge Base) and a set of rules such as 'IF mileage > 50,000 THEN suggest belt replacement' (Rule Base). If the system uses these to suggest a replacement to a user via a screen, name the component that performs the logical reasoning.
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
(a) Identify the four main components of an expert system. [4] (b) Explain the difference between an expert system and machine learning. [2] [6 marks]
Key ideas — Expert systems
An expert system imitates the knowledge and decision-making of a human expert in a particular field (e.g. medical diagnosis, car fault finding, mineral prospecting). It has four components:
🧑🏫 Teacher's explanation
Imagine you are playing a game of '20 Questions'. You have a huge book of facts about animals (the Knowledge Base) and a set of rules like 'IF the animal has fur AND it is small, THEN it might be a rodent' (the Rule Base). You, the player, act as the Inference Engine, scanning the rules to decide which question to ask next based on the answers given. Finally, you communicate these questions and the final answer to your friend (the Interface).
📖 Definitions
🔍 Worked example — Easy
Identify the four components of an expert system used in a medical diagnosis application.
🔍 Worked example — Standard
A user inputs 'High Fever' and 'Rash'. The system checks: IF 'High Fever' AND 'Rash' THEN 'Measles'. Which component is responsible for matching these inputs to the rule?
🔍 Worked example — Exam-style
Trace the operation of an expert system for car fault finding. A user reports 'Engine won't start'. The system asks 'Are the lights dim?' User answers 'Yes'. The system concludes 'Battery is low'. Map the components to these actions.
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
(a) State the purpose of the knowledge base in this system. [1] (b) Explain how the inference engine works within the system. [2] [3 marks]
Key ideas — Machine learning
Machine learning is when a program has the ability to automatically adapt its own processes and/or data, without being explicitly reprogrammed.
🧑🏫 Teacher's explanation
Imagine you are teaching a child to identify a fruit. Instead of giving them a strict rulebook saying "A fruit must be round, red, and have a stem" (which is like an Expert System), you simply show them 100 pictures of apples and 100 pictures of oranges. At first, the child might guess wrong, but every time you correct them, they adjust their mental criteria. Eventually, they 'learn' the patterns themselves.
📖 Definitions
🔍 Worked example — Easy
Identify the core difference: A system is given a set of 'IF-THEN' rules by a human programmer to diagnose a car fault. Is this Machine Learning or an Expert System?
🔍 Worked example — Standard
A machine learning algorithm is processing a dataset of 1,000 images. It correctly identifies 700 images but misidentifies 300. Describe the next step the algorithm takes to 'learn'.
🔍 Worked example — Exam-style
A developer is choosing between an Expert System and a Machine Learning system for a medical diagnostic tool. The requirement is that the system must be able to improve its accuracy automatically as more patient records are uploaded. Which should they choose and why?
⚠️ Common errors
🧠 Quick check 1
🧠 Quick check 2
🎯 Exam question
(a) Define the term 'Artificial Intelligence'. [1] (b) The company is considering switching from a traditional rule-based system to a Machine Learning system. Describe one advantage of using Machine Learning over a system that relies on human-written rules. [2] [3 marks]
Worked example
The interface asks the mechanic questions about the symptoms (e.g. "Does the engine start?"). The inference engine applies the rules in the rule base to these answers and the facts in the knowledge base, choosing the next question until it reaches a conclusion. The interface then displays the most likely fault and the reasons, perhaps with a probability.
🔍 Worked example — Easy
Identify the four components of an expert system used to diagnose a faulty lightbulb.
🔍 Worked example — Standard
A mechanic uses an expert system. The system asks: 'Is the battery charged?'. The mechanic answers 'No'. The system then concludes 'Fault: Alternator'. Map these actions to the expert system components.
🔍 Worked example — Exam-style
Compare Machine Learning and Expert Systems in terms of how they adapt to new information.
⚠️ Common errors
Common mistakes
Practice
Answers: (1) A branch of computer science dealing with the simulation of intelligent behaviours by computers. (2) Collection of data and rules for using it; the ability to reason; it can include the ability to learn and adapt. (3) Knowledge base, rule base, inference engine, interface; the inference engine applies the rules to the facts and the user's input to reach conclusions. (4) A program's ability to automatically adapt its own processes and/or data; e.g. a spam filter learning from emails marked as spam.