![Page 1: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/1.jpg)
cse@buffal
o
A SNePS Approach to The Wumpus World Agent
or Cassie Meets the WumpusStuart C. Shapiro & Michael Kandefer Department of Computer Science and Engineering,
and Center for Cognitive Science
University at Buffalo, The State University of New York201 Bell Hall, Buffalo, NY 14260-2000
{shapiro|mkw3}@cse.buffalo.eduhttp://www.cse.buffalo.edu/~{shapiro|mkw3}/
![Page 2: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/2.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 2
cse@buffal
o
: perform get(gold)No breeze here.No stench here.Exploring the cave...Found a safe room...
![Page 3: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/3.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 3
cse@buffal
o
I am in room (1, 0), facing eastNo breeze here.No stench here.Exploring the cave...Found a safe room...
![Page 4: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/4.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 4
cse@buffal
o
![Page 5: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/5.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 5
cse@buffal
o
I am in room (1, 1), facing southI feel a breeze.No stench here.Exploring the cave...Found a safe room...
![Page 6: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/6.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 6
cse@buffal
o
![Page 7: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/7.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 7
cse@buffal
o
I am in room (0, 1), facing westNo breeze here.No stench here.Exploring the cave...Found a safe room...
![Page 8: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/8.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 8
cse@buffal
o
![Page 9: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/9.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 9
cse@buffal
o
I am in room (0, 2), facing southI feel a breeze.No stench here.Exploring the cave...Visiting an old room...This is boring.
![Page 10: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/10.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 10
cse@buffal
o
![Page 11: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/11.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 11
cse@buffal
o
Exploring the cave...Visiting an old room...This is boring.
![Page 12: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/12.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 12
cse@buffal
o
Exploring the cave...Visiting an old room...This is boring.
![Page 13: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/13.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 13
cse@buffal
o
![Page 14: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/14.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 14
cse@buffal
o
Exploring the cave...Found a safe room...
![Page 15: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/15.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 15
cse@buffal
o
I am in room (2, 0), facing eastI feel a breeze.No stench here.Exploring the cave...Visiting an old room...This is boring.
![Page 16: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/16.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 16
cse@buffal
o
![Page 17: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/17.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 17
cse@buffal
o
Exploring the cave...Visiting an old room...This is boring.
![Page 18: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/18.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 18
cse@buffal
o
Exploring the cave...Visiting an old room...This is boring.
![Page 19: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/19.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 19
cse@buffal
o
![Page 20: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/20.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 20
cse@buffal
o
Exploring the cave...Visiting an old room...This is boring.
![Page 21: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/21.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 21
cse@buffal
o
![Page 22: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/22.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 22
cse@buffal
o
Exploring the cave...I'll chance a move...
![Page 23: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/23.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 23
cse@buffal
o
I am in room (1, 2), facing southNo breeze here.I'm grabbing for the gold.No stench here.I'm going home!
![Page 24: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/24.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 24
cse@buffal
o
![Page 25: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/25.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 25
cse@buffal
o
![Page 26: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/26.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 26
cse@buffal
o
![Page 27: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/27.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 27
cse@buffal
o
![Page 28: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/28.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 28
cse@buffal
o
Score = 966.
![Page 29: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/29.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 29
cse@buffal
o
Formalism Used
• SNePS KRR system• SNeRE acting subsystem
![Page 30: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/30.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 30
cse@buffal
o
Strategy
• Wander semi-randomly until find gold– Opportunistically shoot the wumpus
• Grab the gold• Go home• Stop
![Page 31: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/31.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 31
cse@buffal
o
Semi-Random Exploration
• If have an adjacent safe new room, go there• Else if totally bored,
– Risk going to any adjacent new room• Might die!
– If none move randomly (boring)• Else go to an old room (boring)
![Page 32: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/32.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 32
cse@buffal
o
Finding Home
• Lay down VisitedFrom(r2, r1) “arrows” while exploring.
• No two with same r2 to cut loops.• Follow backwards to find home.
![Page 33: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/33.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 33
cse@buffal
o
Finding Walls
• Two walls adjacent to home room known• When bump, believe wall location
![Page 34: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/34.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 34
cse@buffal
o
Important SNePS Features 1
• First-person beliefs– Not third-person “truth” about agent or world
• Beliefs are current beliefs– Even if about the past
• On-line acting• Reified propositions as well as acts & …• Neither states nor times are privileged
![Page 35: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/35.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 35
cse@buffal
o
Important SNePS Features 2• SNeRE acts with operational semantics
– External acts:• go(right)• do(grab)• senseFor(breeze)
– Control acts:• snsequence(go(right), go(right))
– Mental acts:• believe(p)• disbelieve(p)
![Page 36: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/36.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 36
cse@buffal
o
Important SNePS Features 3
• SNeRE policies integrate reasoning & acting– whendo(See(glitter), do(grab))– ActPlan(find(home), snif({if(In(cell(0,0)), do(stop)), else(…)}))
![Page 37: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/37.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 37
cse@buffal
o
Important SNePS Features 4Use of SNePS andor connective
and belief revision for state constraints:
andor(1,1){Facing(north), Facing(south), Facing(east), Facing(west)}Facing(east)=> ~Facing(north), ~Facing(south), ~Facing(west)believe(Facing(south))
Facing(south), ~Facing(north),~Facing(east), ~Facing(west)
![Page 38: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/38.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 38
cse@buffal
oImportant SNePS Features 5
Nondeterministic Choice~Have(gold) =>(all(r1)(In(r1) => ActPlan(explore(cave), withsome({?r2, ?d1}, SafeNewRoom(r1, ?r2, ?d1), snsequence3(turn(?d1), move(forward), believe(Bored(0))), <else clause>))))
![Page 39: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/39.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 39
cse@buffal
oImportant SNePS Features 6
Numerical Quantifier
wheneverdo(Feel(breeze), withsome/3(?r, In(?r), believe(nexists(1,4,4)(c)({Adjacent(?r,c)}: {Contains(c,pit)}))))
![Page 40: A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus](https://reader033.vdocuments.us/reader033/viewer/2022051419/56815be5550346895dc9d7d5/html5/thumbnails/40.jpg)
NRAC-05 S. C. Shapiro & M. Kandefer 40
cse@buffal
o
Problems• The SNePS control structure
– Asynchronous– Multiprocessing– Producer/consumer– Message passing– Focused bidirectional inference
• Made designing the agent, viewed as a programming task, somewhat difficult.