Question Driven Backward Chaining
- Unfortunately, Clips does not have backward chaining built into
- Fortunately, you can modify clips to implement backward chaining.
- The implmentation in lab6start.clp is
not perfect but does low Question Driven Backward Chaining.
- To start save lab6start.clp on your machine and
- lab6start.clp is the backward chaining bit and you only need
to load this once per session. lab6simp.clp is a simple
backward chaining rule set.
- Note that rules are now defined in a different fashion and
you have to follow these conventions.
- Also note that you need an answer and a goal.
- This simple system implements a decision tree for:
- whiskers -> cat
- no whiskers -> dog
- invertebrate -> worm
- If you load it, reset and run, it should ask if the animal has
a backbone. If you say yes, it asks if it has whiskers. If you
say yes again, it is a cat.
- Play around with it for a while using step and agenda to
see if you can understand how it works
- Try to add another invertebrate; jellyfish is distinguished from
worm by living in water.
- Now, do a larger animal decision tree (this is what you're doing).
- lives in water -> jelly fish
- doesn't live in water -> worm
- not warm blooded
- lives in water -> fish
- doesn't live in water -> lizard
- warm blooded
- eats meat -> eagle
- doesn't eat meat -> robin
- no feathers
- fluffy tail -> cat
- no fluffy tail -> dog