Conflict Resolution
- Take last week's semantic nets labs and copy it to a new file.
- Remove the facts in the semantic net file so that you have the
smallest number of facts that you need to override inheritence.
- If you load and run the system, it should still give you the
correct results, however if the rules were applied in a different
order, they would not override the inheritence.
- In what order are the rules applied? You can use the step menu
item, Ctl-T, or (run 1) to step through.
- You will note that many rules are applicable at most stages.
(Use (agenda) to see which rules). The strategy that is used
can be modified.
- You can see which strategy is being used by (get-strategy),
and change the strategy by (set-strategy new-strat)
- I've found that the default strategy is depth. How does
the order of rule application change if you use breadth?
Does the result change?
- Unfortunately, I've not found a simple mechanism that
Clips gives us for backward chaining.
- That's too bad, because we don't always want to store
all the information about a particular object, but
would like to derive it at runtime.
- For instance, my net has the feature of how the animal travels.
I can derive all the facts (cache them as it were), or I can
keep the basic net structure and derive the fact when I need it.
- Deriving as few new facts as possible write some rules that
enable you tell if x ISA y. I use an assertion (IS? bat mammal)
to drive this.
- I took advantage of the salience property of a rule which allows
you to rank which rules apply first. (defrule A (declare (salience 5))
LHS => RHS). In essence this overrides the conflict resolution
strategy.
- Make sure that you also can say if x ISnotA y.
- Deriving as few new facts as possible write some rules that
enable you tell if what value x has for feature y.
I use an assertion (feature? bat blood)
to drive this.
- Now load in the full semantic net from lab 5, and see how
the system performs on a range of questions.