Exercise 4.5
Level 1: S Level 2: A D Level 3: B E Level 4: C F Level 5: G C Level 6: G--goal node
Exercise 7.2.
Part1. Note: S--succeed, F--fail; *Serve Bond's Champagne -- F B1 expensive wine is indicated -- F B9 wine is indicated -- F B11 guest is sophisticated -- S guest should be impressed -- F *Serve Chateau Earl of Bartonville Red -- F B2 expensive wine is indicated -- F B9 wine is indicated -- F B11 guest is sophisticated -- S guest should be impressed -- F *Serve Toe Lakes Rose -- F B4 cheap wine is indicated -- S B10 wine is indicated -- S B11 guest is sophisticated -- S entree is unknown -- F *Serve Honest Henry's Apple Wine -- S B3 cheap wine is indicated -- S B10 wine is indicated -- S B11 guest is sophisticated -- S entree is chicken -- S guest is not well liked -- S Part2. Yes, with different facts: *It is not New Year's Eve, *Guest is impressed, *Guest is sophisticated, *Entree is Mexican steak. Part3. No, carrot juice will never be served, since Glop will always be tested and satisfied first providing the same facts.
Exercise 8.2.
Part 1. Fly Rule If ?x is-a bird ?x is-not-a penguin ?x is alive then ?x flies Bird Rule If ?x flies ?x is-not-a bat ?x is alive then ?x is-a bird Part 2. The recast rules will provide careful analysis, while the rules in ask-questions-later mode will give a rapid response.
The backward chainiing system stops when the it satisfies any hypothesis. The Ostrich hypothesis is confirmed before the Penguin hypothesis can be tested.
If the hypotheses were ordered with Penguin first, then Penguin would be selected.
One could modify the rules so that if it is known that the bird is a penguin, then it is not allowed to be an ostrich, etc. For example, modify the Penguin rule to be
IF ((? animal) is a bird) ((? animal) does not fly) ((? animal) swims) ((? animal) is black and white) (not ((? animal) is a ostrich)) THEN ((? animal) is a penguin)if NOT were defined. Another way to proceed is to replace the IS-A statements with SPECIES facts. The species rules could check to be sure that there was not already a species. For example,
IF ((? animal) is a bird) ((? animal) does not fly) ((? animal) swims) ((? animal) is black and white) (not ((? animal) species (? anything))) THEN ((? animal) species penguin)This way, if the species is already known, the rule will not fire.