Inference Engine
- The Inference Engine compares the rules to working memory.
- It picks a supported rule and fires it.
- There can be more than one supported rule, and this is
resolved by a conflict resolution
strategy.
- For example if the rules look like
- if (Feature ?X colour green) and (Feature ?X type fruit) then
(Feature ?X subtype Watermelon)
- if (Feature ?X colour red) and (Feature ?X type fruit) then
(Feature ?X subtype Apple)
- and working memory says
(Feature X1 colour green), (Feature X2 colour red),
(Feature X1 type fruit).
- What rule is applied?
- What happens?
- A rule can be supported more than once.
- A fact can be used to support more than one rule.
- Undo the rule and add the working memory item
(Feature X2 type fruit).
- What rule is applied?
- Now what happens?
- Rule Based Systems work on a Recongise Act Cycle
- Roughly, rules are recognised as firable.
- A rule is applied, which may or may not change working memory
- It may have side effects (e.g. print something out or move a robot arm)
- A new set of rules is recognised
- If no rules apply, the system is done.
- Why?
- This can change if the system is interactive.
- If it is interactive, WM can change because of the interface and
new rules can be applied.