Test 2 Name __________________ Score __
KB
P1,2
(
|
| Facts | Rule |
| R, S | R |
| R,S,X | S |
| R,S,X,W | X |
| R,S,X,W,Y | Y |
| R,S,X,W,Y,Z |
| Facts | Goal | Rule |
| R,S | Z | Y |
| R,S | Y,Z | X |
| R,S | X,W,Y,Z | R |
| R,S,X | W,Y,Z | S |
| R,S,X,W | Y,Z | X |
| R,S,X,W,Y | Z | Y |
| R,S,X,W,Y,Z |
Prove using forward or backward chaining: Valuable(z); all valuable horses.
Forward - Prove everything possible until Horse(x) Ù Parent(y,x) Ù Fast(y) is proven

Backward
Goal: Valuable(z)
Subgoals: Horse(x), Parent(y,x), Fast(y)

Prove using resolution: Valuable(Comet)
Add ØValuable(Comet)
"x ["y ØAnimal(y) Ú ØKills(x,y) Ú "z ØLoves(z,x)]
[ØAnimal(y) Ú ØKills(x,y)] Ú ØLoves(z,x)
- Operators
- On( b, x) - Block b is on top of block x.
- Clear( x ) - Block x has no block on top of it.
- Block( b ) - b is a block
- Actions
- Action( Move(b, x, y), Move block b from x to y
Precond: On(b, x) Ù Clear(b) Ù Clear(y) Ù Block(b)
Ù (b≠x) Ù (b≠y) Ù (x≠y),
Effect: On(b, y) Ù Clear(x) Ù ØOn(b, x) Ù ØClear(y))
Action( Move(A, Table, B)
Precond: On(A,
Table)
Ù Clear(A)
Ù Clear(B)
Ù Block(A)
{b/A, x/Table, y/B}
Effect: On(A,B)
Ù Clear(Table)
Goal : On(B, C)
Ù On(C,Table)
Ù
Block(C)
Ù On(A, Table)
Ù Clear(A)
Ù Clear(B)
Ù Block(A)
Action( Move(B, Table, C)
Precond: On(B,
Table) Ù Clear(B)
Ù Clear(C)
Ù Block(B)
{b/B, x/Table, y/C}
Effect: On(B,C)
Ù Clear(Table)
Goal : On(A, Table)
Ù On(B, Table)
Ù On(C,Table)
Ù Block(A)
Ù Block(B)
Ù Block(C)
Ù Clear(A)
Ù Clear(B)
Ù Clear(C)
- Operators
- On( b, x) - Block b is on top of block x.
- Clear( x ) - Block x has no block on top of it.
- Block( b ) - b is a block
- Actions
- Action( Move(b, x, y), Move block b from x to y
Precond: On(b, x) Ù Clear(b) Ù Clear(y) Ù Block(b)
Ù (b≠x) Ù (b≠y) Ù (x≠y),
Effect: On(b, y) Ù Clear(x) Ù ØOn(b, x) Ù ØClear(y))
Graphical representation of Move(b,x,y)
Action( Move(b, x, y),
Preconditions: On(b, x) Ù Clear(b) Ù Clear(y)
Effect: On(b, y) Ù Clear(x) )- Operators:
- finish
- Preconditions: the overall goal
On(A,B) Ù On(B,C) Ù On(C, Table) Ù Clear(A)
- Effect: Nothing
- initial
- Preconditions: True
- Effects: All literals in initial state.
On(A, Table) Ù On(B, Table) Ù On(C, A)
Ù Clear(B) Ù Clear(C) Ù Clear(Table)- Graphical representation of finish and initial operators in an unfinished plan.