Expert system

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

Expert system

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which statement describes an expert system?
A An AI system that can give expert advice on any subject without being given rules
B An AI system that uses the knowledge and rules of human experts to give advice on one subject
2. An expert system is built to work in...
A one specialist subject, such as medical diagnosis
B every subject at once, like a general knowledge quiz
3. What is the job of an expert system?
A To stand in for a human expert when one is not available
B To replace the user's need to answer any questions
4. How does an expert system find out about the user's problem?
A It asks the user questions
B It reads the user's mind
5. What does an expert system give back to the user at the end?
A A new set of rules it wrote for the user
B A conclusion or advice

Match the Pairs

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

Left columnRight column
1expert system AAn expert system works on one specialist subject only. It cannot be an expert in every subject at once.
2ask_user("Do you have a fever?") Bprint("Advice: see a doctor")
3An expert system stands in for a human expert by giving advice on one specialist subject, such as medicine Csubject = "medical diagnosis"
4After the user answers its questions, an expert system gives a conclusion or advice DThe expert system asks the user a question to collect the facts it needs
5subject = "all subjects" EThe expert system gives the advice or conclusion using expert knowledge and rules. The user does not guess it.
6expert = "user guesses the advice" FAn AI system that uses the knowledge and rules of human experts to give advice or answers on one specialist subject

Definitions

expert system

Fill in the Blanks

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

1.
OUTPUT "Is the leaf yellow?" _____ leaf
2.
IF leaf = "yes" ____ OUTPUT "Add more water" ENDIF
3.
IF fever = "yes" THEN OUTPUT "See a doctor" _____
4.
IF temp _ 38 THEN OUTPUT "Fever" ENDIF
5.
IF rash = "yes" ___ fever = "yes" THEN OUTPUT "Advice: see a doctor" ENDIF

Spot the Error

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

Question 1
A OUTPUT "Do you have a fever?"
B INPUT temp
C IF fever = "yes" THEN
D OUTPUT "See a doctor"
E ENDIF
Question 2
A OUTPUT "Is the leaf yellow?"
B INPUT yellow
C IF yellow = "yes"
D OUTPUT "Lacks iron"
E ENDIF
Question 3
A subject ← "All subjects"
B OUTPUT "Does it start?"
C INPUT starts
Question 4
A INPUT age
B IF age > 18 THEN
C OUTPUT "Ask a parent first"
D ELSE
E OUTPUT "You can sign"
F ENDIF
Question 5
A INPUT rain
B IF rain ← "yes" THEN
C OUTPUT "Take an umbrella"
D ENDIF

Answer Key

Expert system
Section A: Quick Questions
Q1
B — An AI system that uses the knowledge and rules of human experts to give advice on one subject
Q2
A — one specialist subject, such as medical diagnosis
Q3
A — To stand in for a human expert when one is not available
Q4
A — It asks the user questions
Q5
B — A conclusion or advice
Section B: Match the Pairs
Q1
expert system → An AI system that uses the knowledge and rules of human experts to give advice or answers on one specialist subject
Q2
ask_user("Do you have a fever?") → The expert system asks the user a question to collect the facts it needs
Q3
An expert system stands in for a human expert by giving advice on one specialist subject, such as medicine → subject = "medical diagnosis"
Q4
After the user answers its questions, an expert system gives a conclusion or advice → print("Advice: see a doctor")
Q5
subject = "all subjects" → An expert system works on one specialist subject only. It cannot be an expert in every subject at once.
Q6
expert = "user guesses the advice" → The expert system gives the advice or conclusion using expert knowledge and rules. The user does not guess it.
Section C: Definitions
Q1
expert system — An AI system that uses the knowledge and rules of human experts to give advice or answers on one specialist subject. It asks the user questions and gives a conclusion.
Section D: Fill in the Blanks
Q1
OUTPUT "Is the leaf yellow?" INPUT leaf
Q2
IF leaf = "yes" THEN OUTPUT "Add more water" ENDIF
Q3
IF fever = "yes" THEN OUTPUT "See a doctor" ENDIF
Q4
IF temp > 38 THEN OUTPUT "Fever" ENDIF
Q5
IF rash = "yes" AND fever = "yes" THEN OUTPUT "Advice: see a doctor" ENDIF
Section E: Spot the Error
Q1
B — The expert system stores the user's answer in a variable and then tests it. The answer was stored in temp, but the IF rule tests fever. Line 2 should be INPUT fever.
Q2
C — An IF rule needs THEN after its condition. Line 3 should be IF yellow = "yes" THEN.
Q3
A — An expert system covers one specialist subject, such as car repair. It cannot be an expert in all subjects. Line 1 should name one subject: subject ← "Car repair".
Q4
B — The rule gives the 'ask a parent' advice to users under 18. The comparison is the wrong way round, so adults would be told to ask a parent. It should be IF age < 18 THEN.
Q5
B — A rule compares the user's answer with a value, so it uses = and not the assignment arrow ←. Line 2 should be IF rain = "yes" THEN.