Explaining the basic operation of an AI system

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

Explaining the basic operation of an AI system

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which sentence describes the order of an expert system's operation correctly?
A The user enters facts through the interface, the inference engine applies the rules to the knowledge base, and the answer is shown
B The knowledge base asks the user questions, then the interface applies the rules and writes new facts
2. What does the inference engine do in an expert system?
A It stores all the facts and rules the experts have collected
B It matches the user's facts against the rules and knowledge base to reach a conclusion
3. Which statement best explains how an expert system simulates intelligence?
A It reasons with stored expert knowledge and rules to give advice like a human expert
B It understands the problem in the same way a human expert thinks and feels
4. Which is the best description of how a machine learning program adapts?
A It uses the results of its past actions to change its own processes or data so it performs better next time
B A programmer must rewrite its code each time it makes a mistake
5. Which answer uses the correct key term for the part of an expert system that holds the if-then statements?
A Knowledge base
B Rule base

Match the Pairs

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

Left columnRight column
1inference engine AThe part of an expert system that stores the facts and data about the subject
2knowledge base BThe roles are swapped: the inference engine is the part that reasons, using the rule base and knowledge base
3An expert system operates in order: the user answers questions, the engine applies the rules to the data, then the result is output CThe part of an expert system that applies the rules to the knowledge base to reach a conclusion
4A machine learning program adapts by changing its own processes or data after each result so it improves over time DMachine learning adapts and learns, changing its own processes or data. It is a fixed program that does not change
5The rule base reasons by applying the inference engine to the user Einterface -> inference engine + rule base -> conclusion
6Machine learning follows fixed rules and never changes its own data Fresult -> update data -> better next answer

Definitions

AI system operation

Fill in the Blanks

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

1.
answer ← ________________(facts, rules)
2.
facts ← read(______________) rules ← read(rule_base)
3.
OUTPUT conclusion TO _________
4.
IF prediction _ actual THEN rules ← update(rules, data) ENDIF
5.
FOR EACH example IN _____________ learn(example) NEXT example

Spot the Error

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

Question 1
A INPUT answers via interface
B engine searches the interface
C engine matches rules to facts
D OUTPUT conclusion to user
Question 2
A knowledge base STORES rules
B rule base STORES IF-THEN rules
C engine APPLIES rules to facts
Question 3
A data = write_rules_by_hand()
B model = learn_patterns(data)
C model.adapt(new_data)
D output = model.predict(x)
Question 4
A FOR each new example
B ignore the correct answer
C adjust own process if wrong
D NEXT
Question 5
A RULE: IF fever AND rash
B THEN CONCLUDE measles
C FACTS: fever, cough
D MATCH: rule fires

Answer Key

Explaining the basic operation of an AI system
Section A: Quick Questions
Q1
A — The user enters facts through the interface, the inference engine applies the rules to the knowledge base, and the answer is shown
Q2
B — It matches the user's facts against the rules and knowledge base to reach a conclusion
Q3
A — It reasons with stored expert knowledge and rules to give advice like a human expert
Q4
A — It uses the results of its past actions to change its own processes or data so it performs better next time
Q5
B — Rule base
Section B: Match the Pairs
Q1
inference engine → The part of an expert system that applies the rules to the knowledge base to reach a conclusion
Q2
knowledge base → The part of an expert system that stores the facts and data about the subject
Q3
An expert system operates in order: the user answers questions, the engine applies the rules to the data, then the result is output → interface -> inference engine + rule base -> conclusion
Q4
A machine learning program adapts by changing its own processes or data after each result so it improves over time → result -> update data -> better next answer
Q5
The rule base reasons by applying the inference engine to the user → The roles are swapped: the inference engine is the part that reasons, using the rule base and knowledge base
Q6
Machine learning follows fixed rules and never changes its own data → Machine learning adapts and learns, changing its own processes or data. It is a fixed program that does not change
Section C: Definitions
Q1
AI system operation — Naming the parts of an AI system, what each does, and how they work together to take input, reason on data and rules or learn, and output a result that simulates intelligence.
Section D: Fill in the Blanks
Q1
answer ← inference_engine(facts, rules)
Q2
facts ← read(knowledge_base) rules ← read(rule_base)
Q3
OUTPUT conclusion TO interface
Q4
IF prediction ≠ actual THEN rules ← update(rules, data) ENDIF
Q5
FOR EACH example IN training_data learn(example) NEXT example
Section E: Spot the Error
Q1
B — The inference engine searches the rule base for rules that match the facts. The interface only takes input and shows output. Line 2 should be: engine searches the rule base
Q2
A — The knowledge base holds the facts (the data). The IF-THEN rules are held in the rule base. Line 1 should be: knowledge base STORES facts
Q3
A — A machine learning system learns from example data. It does not rely on rules written by hand, which is how an expert system works. Line 1 should load examples, e.g. data = load_examples()
Q4
B — To learn, the program must compare its guess with the correct answer so it can see if it was wrong and adapt. Ignoring the answer means it cannot improve. Line 2 should be: compare guess to answer
Q5
C — The rule only fires if the facts match its conditions. The facts must include both fever and rash. With cough instead of rash, the rule would not fire. Line 3 should be: FACTS: fever, rash