Longer example of forward chaining


next up previous contents
Next: More complicated inference methods
Up: How the inference engine works
Previous: Longer example of backward chaining
Back: to main list of student notes

Longer example of forward chaining

Take the same knowledge base as before. Assume now that we start with an empty STM. We add the fact Purpose = serious. Does this trigger any rules? Well, it matches the conditions of 2 and 3. However, there's nothing to match the rest of those conditions, so neither of the rules can be triggered. Unlike the last example, forward chaining will not follow the rules backwards to try satisfying conditions; it just tests the data already there.

Now add another fact to STM, /verb/Lessons = 178/. This matches the condition of rules 6 and 7, but neither of them can be triggered since there's nothing else to match the Lessons part.

Now add a third fact, Pressups = 5. This triggers rule 8, which adds a fourth fact, Fitness = poor. This in turn triggers rule 6 (both parts of whose conditions now match STM). Rule 6 adds Rating = beginner. And that triggers rule 2, which can now add a value for Resort.


next up previous contents
Next: More complicated inference methods
Up: How the inference engine works
Previous: Longer example of backward chaining
Back: to main list of student notes



Jocelyn Ireson-Paine
Wed Feb 14 23:39:25 GMT 1996