← IGCSE Computer Science Paper 1

Tracing an expert system to a conclusion

Follow the user's answers through the IF-THEN rules in order, checking which rules fire and which do not, until one rule gives the final conclusion.

Understanding Tracing an expert system to a conclusion in IGCSE Computer Science Paper 1

What it does: This shows rules being checked in order. Rule 1 does not fire, Rule 2 fires, and its THEN part is the conclusion that ends the trace. A rule fires only when all its conditions match the user's answers. A single mismatch means the rule is skipped.

Common mistakes: The user's answer is OFF, which matches the condition of Rule 1, so the rule fires and gives the conclusion. The line should say it fires, not that it does not. Rule 2 needs fever AND rash. The rash answer is NO, so the condition is false and Rule 2 does not fire. It should say 'not fired'.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 662–678) and word search (Modules 652–678).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A fault-finding expert system has the rule: IF the screen is black AND the power light is off THEN the fault is the power cable. The user answers: screen black = yes, power light off = yes. What happens?
The rule does not fire because the screen is blackThe rule fires and the conclusion is a faulty power cable
Matches
Rule fires: IF fever = yes AND rash = yes, user said rash = no
↓
The rule cannot fire because one condition does not match the answer. AND needs every condition to be true.
Applying
Meanings
Term
trace an expert system
Meaning
Follow the user's answers through the IF-THEN rules in order, checking which rules fire and which do not, until one rule gives the final conclusion.
Practice
power ← "on"
Testing
Gaps
IF power = "off"
Check Answer
Spots
1User answer: light is OFF
2Rule 1: light OFF -> no fire

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Tree Frog' badge — Leap of Logic, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A fault-finding expert system has the rule: IF the screen is black AND the power light is off THEN the fault is the power cable. The user answers: screen black = yes, power light off = yes. What happens?
A. The rule fires and the conclusion is a faulty power cable ✓
B. The rule does not fire because the screen is black
Both conditions in the rule are true, so the rule fires and gives its conclusion: the power cable is the fault.
2. Same rule: IF the screen is black AND the power light is off THEN the fault is the power cable. The user answers: screen black = yes, power light off = no. What happens?
A. The rule fires because the screen is black
B. The rule does not fire because one condition is false ✓
An AND rule only fires when every condition is true. The power light is on, so the rule is skipped and the next rule is checked.
3. When tracing an expert system, what do you do with the rules?
A. Follow the user's answers through the rules in order until one gives the conclusion ✓
B. Pick the rule you like best and ignore the user's answers
Tracing means checking each rule against the user's answers, in order, to see which rules fire and which do not.
4. A medical expert system has: Rule 1: IF temperature is high AND rash is present THEN diagnosis is measles. Rule 2: IF temperature is high AND rash is absent THEN diagnosis is flu. The user answers: temperature high = yes, rash = no. Which conclusion is reached?
A. Measles, because the temperature is high
B. Flu, because Rule 1 does not fire and Rule 2 does ✓
Rule 1 needs a rash, which is absent, so it does not fire. Rule 2 matches both answers, so the conclusion is flu.
5. A medical expert system gave the conclusion 'measles' when the user said the rash was present. The user changes the answer to 'rash absent'. What is the effect?
A. A different rule may fire and give a different conclusion ✓
B. The conclusion must stay as measles
Different answers lead the trace through different rules, so the conclusion can change. The system reasons from the answers given.

Match the Pairs

IF screen = dark AND power light = on THEN fault = backlight → A rule that fires only when both conditions match the user's answers, giving the conclusion that the backlight is faulty
IF fever = yes AND rash = no THEN illness = flu → A rule that does not fire if the user answers rash = yes, so the trace moves on to the next rule
Tracing follows the user's answers through the rules in order until one rule gives the final conclusion → Rule 1: no match. Rule 2: match -> conclusion
A different answer from the user can lead to a different conclusion → cough = yes -> flu, cough = no -> cold
Rule fires: IF fever = yes AND rash = yes, user said rash = no → The rule cannot fire because one condition does not match the answer. AND needs every condition to be true.
Trace: check the THEN part first, then the IF part → The IF conditions must be checked against the answers first. THEN gives the conclusion only after the conditions match.

Key Term

trace an expert system
Follow the user's answers through the IF-THEN rules in order, checking which rules fire and which do not, until one rule gives the final conclusion.

Fill in the Blanks

1. IF power = "off" THEN advice ← "Plug it in"
Hint: Type the keyword that introduces the conclusion part of a fault-finding rule.
2. IF fever = "yes" AND cough = "yes" THEN diagnosis ← "Flu"
Hint: Type the operator that means both conditions must be true for this medical rule to fire.
3. fever ← "no" IF fever = "yes" THEN diagnosis ← "Flu" // Rule does not fire, so check next rule
Hint: Type the name of the variable that holds the user's answer being tested by this rule.
4. IF light = "on" THEN fault ← "Bulb" ELSE IF light = "off" THEN fault ← "Fuse"
Hint: Type the keywords that test a second rule only when the first rule did not fire.
5. IF fever = "yes" AND cough = "yes" THEN OUTPUT "See a doctor"
Hint: Type the command that displays the final conclusion to the user.

Spot the Error

Question 1
A User answer: light is OFF
B Rule 1: light OFF -> no fire
C Conclusion: check the cable
Line B — The user's answer is OFF, which matches the condition of Rule 1, so the rule fires and gives the conclusion. The line should say it fires, not that it does not.
Question 2
A Answer 1: fever = YES
B Answer 2: rash = NO
C Rule 2 needs both: fired
D Rule 3 (fever only) fires
Line C — Rule 2 needs fever AND rash. The rash answer is NO, so the condition is false and Rule 2 does not fire. It should say 'not fired'.
Question 3
A Answer: light is OFF
B Rule 1: light OFF -> no fire
C Rule 2: light ON -> fires
D Conclusion: check the screen
Line A — The rest of the trace shows Rule 1 not firing and Rule 2 firing, so the user's answer must be that the light is ON. If it were OFF, Rule 1 would fire instead.
Question 4
A Answer: temperature = 36
B IF temp > 38 THEN fever
C Rule fires: fever found
Line A — A temperature of 36 is not greater than 38, so the rule would not fire. The answer must be 39 for the rule to fire and find a fever.
Question 5
A Answer: printer has paper = NO
B IF paper = NO THEN add ink
C Rule fires: add paper
Line B — The rule's THEN part must match the conclusion reached when it fires. The trace ends with 'add paper', so the rule should say THEN add paper.

Student with a class code? Join your class →