alo cse f buf A SNe PS Approach
alo @ cse f buf A SNe. PS Approach to The Wumpus World Agent or Cassie Meets the Wumpus Stuart C. Shapiro & Michael Kandefer Department of Computer Science and Engineering, and Center for Cognitive Science University at Buffalo, The State University of New York 201 Bell Hall, Buffalo, NY 14260 -2000 {shapiro|mkw 3}@cse. buffalo. edu http: //www. cse. buffalo. edu/~{shapiro|mkw 3}/ NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf : perform get(gold) No breeze here. No stench here. Exploring the cave. . . Found a safe room. . . 2 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf I am in room (1, 0), facing east No breeze here. No stench here. Exploring the cave. . . Found a safe room. . . 3 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 4 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf I am in room (1, 1), facing south I feel a breeze. No stench here. Exploring the cave. . . Found a safe room. . . 5 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 6 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf I am in room (0, 1), facing west No breeze here. No stench here. Exploring the cave. . . Found a safe room. . . 7 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 8 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf I am in room (0, 2), facing south I feel a breeze. No stench here. Exploring the cave. . . Visiting an old room. . . This is boring. 9 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 10 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Exploring the cave. . . Visiting an old room. . . This is boring. 11 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Exploring the cave. . . Visiting an old room. . . This is boring. 12 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 13 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Exploring the cave. . . Found a safe room. . . 14 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf I am in room (2, 0), facing east I feel a breeze. No stench here. Exploring the cave. . . Visiting an old room. . . This is boring. 15 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 16 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Exploring the cave. . . Visiting an old room. . . This is boring. 17 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Exploring the cave. . . Visiting an old room. . . This is boring. 18 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 19 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Exploring the cave. . . Visiting an old room. . . This is boring. 20 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 21 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Exploring the cave. . . I'll chance a move. . . 22 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf I am in room (1, 2), facing south No breeze here. I'm grabbing for the gold. No stench here. I'm going home! 23 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 24 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 25 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 26 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 27 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Score = 966. 28 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Formalism Used • SNe. PS KRR system • SNe. RE acting subsystem 29 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Strategy • Wander semi-randomly until find gold – Opportunistically shoot the wumpus • Grab the gold • Go home • Stop 30 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf 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) 31 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Finding Home • Lay down Visited. From(r 2, r 1) “arrows” while exploring. • No two with same r 2 to cut loops. • Follow backwards to find home. 32 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Finding Walls • Two walls adjacent to home room known • When bump, believe wall location 33 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Important SNe. PS 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 34 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Important SNe. PS Features 2 • SNe. RE acts with operational semantics – External acts: • go(right) • do(grab) • sense. For(breeze) – Control acts: • snsequence(go(right), go(right)) – Mental acts: • believe(p) • disbelieve(p) 35 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Important SNe. PS Features 3 • SNe. RE policies integrate reasoning & acting – whendo(See(glitter), do(grab)) – Act. Plan(find(home), snif({if(In(cell(0, 0)), do(stop)), else(…)})) 36 NRAC-05 S. C. Shapiro & M. Kandefer
alo f buf @ cse Important SNe. PS Features 4 Use of SNe. PS 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) 37 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Important SNe. PS Features 5 Nondeterministic Choice ~Have(gold) =>(all(r 1)(In(r 1) => Act. Plan(explore(cave), withsome({? r 2, ? d 1}, Safe. New. Room(r 1, ? r 2, ? d 1), snsequence 3(turn(? d 1), move(forward), believe(Bored(0))), <else clause>)))) 38 NRAC-05 S. C. Shapiro & M. Kandefer
alo f buf @ cse Important SNe. PS Features 6 Numerical Quantifier wheneverdo(Feel(breeze), withsome/3(? r, In(? r), believe(nexists(1, 4, 4)(c)({Adjacent(? r, c)}: {Contains(c, pit)})))) 39 NRAC-05 S. C. Shapiro & M. Kandefer
alo @ cse f buf Problems • The SNe. PS control structure – Asynchronous – Multiprocessing – Producer/consumer – Message passing – Focused bidirectional inference • Made designing the agent, viewed as a programming task, somewhat difficult. 40 NRAC-05 S. C. Shapiro & M. Kandefer
- Slides: 40