Worked example 1
A simple medical expert system has the following rules: R1: IF has_fever AND has_rash THEN has_measles R2: IF has_fever AND has_sore_throat THEN has_tonsillitis R3: IF has_tonsillitis THEN treatment_is_antibiotics
A user provides the facts: and . Using forward chaining, show how the inference engine determines the treatment.
Show solution outline
- Initial Facts: The system starts with two known facts: is TRUE and is TRUE. [1 mark]
- Rule Matching: The inference engine scans the rule base. Rule R1 requires , which is not known, so it is ignored. Rule R2's conditions ( AND ) are both met. [1 mark]
- Inference: By applying Rule R2, the inference engine deduces a new fact: is TRUE. This new fact is added to the system's working memory. [1 mark]
- Second Iteration: The engine scans the rules again with the new fact. Rule R3's condition () is now met. [1 mark]
- Conclusion: By applying Rule R3, the engine concludes that . The system would then present this as the recommended course of action. [1 mark]