| 1, 4
|
2, 4 | 3, 4 | 4, 4 |
| 1, 3
|
2, 3 | 3, 3 | 4, 3 |
| 1, 2
AGENT
|
2, 2
OK |
3, 2 | 4, 2 |
| 1, 1
VISITED
|
2, 1
Breeze
|
3, 1
PIT |
4, 1 |
"Percept" Sentences in KB :
! S1,1
! B1,1
! S2,1
B2,1
S1,2
! B1,2
"Knowledge about the Environment" Sentences in KB :
("If no stench in...")
R1 : ! S1,1 ==>
! W1,1 & ! W1,2
& ! W2,1
R2 : ! S2,1 ==>
! W1,1 & ! W2,1
& ! W2,2 &
! W3,1
R3 : ! S1,2 ==>
! W1,1 & ! W1,2
& ! W2,2
& ! W1,3
("If stench in ...")
R4 : S1,2
==>
W1,3 ||
W1,2 ||
W2,2 ||
W1,1
FINDING THE WUMPUS :
1. (MP) to R1 derives :
! W1,1 & ! W1,2
& ! W2,1
2. (AE) to 1. derives :
! W1,1
! W1,2
! W2,1
3. (MP) to R2 derives :
! W1,1 & ! W2,1
& ! W2,2 &
! W3,1
4. (AE) to 3. derives :
! W1,1
! W2,1
! W2,2
! W3,1
5. (MP) to R4 derives :
W1,3 ||
W1,2 ||
W2,2 ||
W1,1
6. (UR) to 5. (W1,3 ||
W1,2 ||
W2,2 ||
W1,1) and 2. (!W1,1) derives :
W1,3 ||
W1,2 ||
W2,2
7. (UR) to 6. (W1,3 ||
W1,2 ||
W2,2) and 4. (! W2,2) derives :
W1,3 ||
W1,2
8. (UR) to 7. (W1,3 ||
W1,2) and 2. (! W1,2) derives :
W1,3.
Thus,
WUMPUS is in the cell 1,3 !!!! Watch out.
"Translating Knowledge into Action" Sentences in KB :
A1,1 & East
& W2,1
==> ! Forward
Problems with PROPOSITIONAL AGENT :
(i) TOO MANY RULES
(to state "don't go forward if the wumpus is in front of you",
one needs 16 (# of cells) * 4 (# of orientations) = 64 rules)
(ii) HANDLING CHANGE
(Initially A1,1 is true but once the agent
moves somewhere
else, it becomes false and A1,1 is true. Thus, time needs to
be represented.)
A1,10 &
East0 &
W2,10
==> ! Forward0
A1,11 &
East1 &
W2,11
==> ! Forward1
A1,12 &
East2 &
W2,12
==> ! Forward2
..............................................
For 100 time steps, one needs 6400 of these rules.
In first order logic these get replaced by ONE rule :
"i "j "k
[ Ai,jk
& Eastk
& Wi+1,jk
==> ! Forwardk ]