Skip to main content

Expert systems, forward and backward chaining, and inference techniques: HSC Enterprise Computing Intelligent Systems

Syllabus dot point

“Investigate common applications of expert systems, including diagnosis, monitoring, process control, and scheduling and planning; describe key features of an expert system, including knowledge base, inference engine, including forward chaining and backward chaining, and user interface (UI); compare techniques used by different inference engines, including truth maintenance, hypothetical reasoning, heuristic knowledge and fuzzy logic, and ontology classification”

HSCEnterprise ComputingIntelligent Systems9 min read

Quick answer

Expert systems use a knowledge base of facts and IF-THEN rules, an inference engine and a user interface to give expert-level advice in diagnosis, monitoring, process control, and scheduling and planning. Forward chaining reasons from facts to conclusions; backward chaining tests a goal against the facts. Truth maintenance handles changing facts, hypothetical reasoning explores alternatives, heuristics and fuzzy logic handle uncertainty, and ontologies classify concepts.

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Practice questions

What this dot point is asking

You need to know where expert systems are used, name and describe their key features (including both chaining methods), and compare four inference techniques. Questions often give you rules and facts and ask you to trace forward or backward chaining.

The answer

Common applications

Application What the expert system does Example
Diagnosis Infers causes from symptoms Medical triage, fault finding in cars or networks
Monitoring Compares readings with expected values and raises alerts Patient vital signs, network intrusion detection
Process control Adjusts a process in response to conditions Chemical plant temperature, smart greenhouse vents
Scheduling and planning Allocates resources and orders tasks within constraints Airline crew rostering, production scheduling

Key features

  • Knowledge base: facts and IF-THEN rules from human experts (captured by a knowledge engineer).
  • Inference engine: applies rules to facts to derive conclusions.
    • Forward chaining (data-driven): start with known facts, fire every rule whose conditions are met, add the conclusions as new facts, and repeat until no more rules fire or a goal is reached. Suits monitoring, control and planning, where data arrives and the system reacts.
    • Backward chaining (goal-driven): start with a hypothesis, find rules that would conclude it, and check their conditions, asking the user where facts are unknown. Suits diagnosis, where there are a limited number of possible answers to test.
  • User interface (UI): collects facts (questions, sensors), shows conclusions and usually includes an explanation facility ("I concluded this because rules R2 and R5 fired").

Comparing inference techniques

Four techniques
  • Truth maintenance: records the justification for each belief so that when a fact changes, dependent conclusions are withdrawn or revised. Keeps knowledge consistent over time.
  • Hypothetical reasoning: explores "what if" assumptions in separate contexts, following each through to its consequences, then keeps the hypothesis that fits the evidence. Useful for planning and diagnosis with several possible explanations.
  • Heuristic knowledge and fuzzy logic: heuristics are rules of thumb from experience that give good-enough answers quickly; fuzzy logic handles vague concepts with degrees of truth from 0 to 1. Both deal with uncertainty and imprecision.
  • Ontology classification: organises concepts into a hierarchy of classes and relationships (a golden retriever is a dog, which is a mammal), so the engine infers properties by inheritance and classifies new cases.
Technique Handles Strength Limitation
Truth maintenance Changing facts Consistent conclusions Overhead of tracking dependencies
Hypothetical reasoning Several possible explanations Explores alternatives safely Can be slow with many hypotheses
Heuristics and fuzzy logic Uncertainty and vagueness Human-like, fast, smooth control Answers are approximate, heuristics can be wrong
Ontology classification Categories and relationships Reuses knowledge through inheritance Building a good ontology is hard work
Worked example

Rules for a plant disease adviser: R1 IF leaves yellow AND soil wet THEN overwatering. R2 IF overwatering AND roots brown THEN root rot.

Forward chaining with facts "leaves yellow", "soil wet", "roots brown":

  1. R1's conditions are met, so add "overwatering".
  2. R2's conditions are now met, so add "root rot". Conclusion: root rot.

Backward chaining with the goal "root rot":

  1. R2 concludes root rot; it needs "overwatering" and "roots brown".
  2. "Overwatering" is concluded by R1; check "leaves yellow" and "soil wet" (ask the user: yes, yes).
  3. Ask "roots brown?" (yes). Goal proven.
Common traps
Swapping the chaining methods
Forward = facts to conclusions; backward = goal to facts.
Describing an expert system as learning by itself
Classic expert systems use rules given by experts; machine learning systems learn from data.
Listing techniques without comparing
"Compare" needs similarities and differences.

Practice questions

Original practice questions graded from foundation to exam level, each with a full worked solution. Try them before revealing the solution.

foundation3 marks
Identify the three key features of an expert system and state the purpose of each.
Show worked solution →
  • Knowledge base: stores the facts and IF-THEN rules gathered from experts.
  • Inference engine: applies the rules to the facts to reach conclusions, using forward or backward chaining.
  • User interface: lets users enter facts and answer questions, and presents conclusions (often with an explanation of how they were reached).

Marking guide: 1 mark each.

core4 marks
A car diagnosis expert system has these rules. R1: IF engine cranks AND no spark THEN ignition fault. R2: IF engine does not crank AND lights dim THEN flat battery. R3: IF engine cranks AND spark present AND fuel gauge empty THEN out of fuel. Explain how backward chaining would test the hypothesis 'flat battery'.
Show worked solution →

Backward chaining starts with the goal "flat battery" and finds a rule that concludes it: R2.

To prove R2, it needs both conditions. It checks "engine does not crank": this is not yet known, so it asks the user, who answers yes. It then checks "lights dim": it asks the user, who answers yes.

Both conditions are true, so R2 fires and the system concludes "flat battery". If either answer were no, the hypothesis would fail and the engine would try another goal (for example ignition fault via R1).

Marking guide: 1 mark for starting from the goal, 1 mark for selecting R2, 1 mark for checking or asking for each condition, 1 mark for the conclusion or failure path.

exam6 marks
Compare fuzzy logic and truth maintenance as techniques used by inference engines, using a smart greenhouse control system as the context.
Show worked solution →
Fuzzy logic
Greenhouse conditions are not simply hot or cold. Fuzzy logic assigns degrees of membership: 29 degrees might be 0.6 "warm" and 0.3 "hot". Rules such as "IF temperature is hot AND humidity is high THEN open vents wide" fire to a matching degree, and the outputs are combined into a precise vent position. This gives smooth, human-like control rather than vents slamming fully open or shut at a threshold.
Truth maintenance
The system also keeps track of why it believes things. It may conclude "the vents are open because it is hot". If a new sensor reading shows the temperature has fallen, a truth maintenance system retracts the belief "it is hot" and any conclusions that depended on it (the vents should close), keeping the knowledge consistent as facts change.
Comparison
Fuzzy logic deals with vague or partial truth at a moment in time; truth maintenance deals with changing facts over time and the dependencies between beliefs. Fuzzy logic improves the quality of each control decision; truth maintenance keeps the whole set of conclusions consistent. A robust greenhouse system benefits from both.

Marking guide: 2 marks for fuzzy logic applied, 2 marks for truth maintenance applied, 2 marks for a clear comparison of what each handles.

Practise this

Sources & how we know this

ExamExplained