Tracing an expert system to a conclusion

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Tracing an expert system to a conclusion

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

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
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
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
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
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

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

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

Definitions

trace an expert system

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
IF power = "off" ____ advice ← "Plug it in"
2.
IF fever = "yes" ___ cough = "yes" THEN diagnosis ← "Flu"
3.
fever ← "no" IF _____ = "yes" THEN diagnosis ← "Flu" // Rule does not fire, so check next rule
4.
IF light = "on" THEN fault ← "Bulb" _______ light = "off" THEN fault ← "Fuse"
5.
IF fever = "yes" AND cough = "yes" THEN ______ "See a doctor"

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A User answer: light is OFF
B Rule 1: light OFF -> no fire
C Conclusion: check the cable
Question 2
A Answer 1: fever = YES
B Answer 2: rash = NO
C Rule 2 needs both: fired
D Rule 3 (fever only) fires
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
Question 4
A Answer: temperature = 36
B IF temp > 38 THEN fever
C Rule fires: fever found
Question 5
A Answer: printer has paper = NO
B IF paper = NO THEN add ink
C Rule fires: add paper

Answer Key

Tracing an expert system to a conclusion
Section A: Quick Questions
Q1
A — The rule fires and the conclusion is a faulty power cable
Q2
B — The rule does not fire because one condition is false
Q3
A — Follow the user's answers through the rules in order until one gives the conclusion
Q4
B — Flu, because Rule 1 does not fire and Rule 2 does
Q5
A — A different rule may fire and give a different conclusion
Section B: Match the Pairs
Q1
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
Q2
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
Q3
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
Q4
A different answer from the user can lead to a different conclusion → cough = yes -> flu, cough = no -> cold
Q5
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.
Q6
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.
Section C: Definitions
Q1
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.
Section D: Fill in the Blanks
Q1
IF power = "off" THEN advice ← "Plug it in"
Q2
IF fever = "yes" AND cough = "yes" THEN diagnosis ← "Flu"
Q3
fever ← "no" IF fever = "yes" THEN diagnosis ← "Flu" // Rule does not fire, so check next rule
Q4
IF light = "on" THEN fault ← "Bulb" ELSE IF light = "off" THEN fault ← "Fuse"
Q5
IF fever = "yes" AND cough = "yes" THEN OUTPUT "See a doctor"
Section E: Spot the Error
Q1
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.
Q2
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'.
Q3
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.
Q4
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.
Q5
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.