Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A small expert system for identifying animals has five rules.
The user's answers give these facts: it has feathers, it cannot fly, it is very tall, it does not swim.
The inference engine applies the rules again and again until no new fact appears. How many rules fire, and what is the final conclusion about the animal?
An expert system has four parts. The knowledge base holds the facts. The rule base holds the IF ... THEN rules. The inference engine applies the rules to the facts and the user's answers, chooses the next question and reaches a conclusion. The interface asks the questions and shows the conclusion.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Step 1. First pass. Rule 1 fires: it has feathers, so it is a bird (a new fact). Rule 2 cannot fire: we do not know that it gives milk.
Step 2. Using the new fact. Rule 3 now fires: it is a bird, it cannot fly and it is very tall, so it is an ostrich. Rule 4 does not fire, because it does not swim. Rule 5 does not fire, because it is not known to be a mammal.
Step 3. Another pass. No rule gives a new fact, so the engine stops.
Answer: rules fire (rules 1 and 3), and the conclusion is that the animal is an ostrich.
Watch out. Rule 3 could not fire on the first look at the user's facts. It needed the conclusion of rule 1. This chaining is the inference engine reasoning.
Log in to join the discussion.
Loading…