Logical Agents Chapter 7
1 Logical Agents Chapter 7
a simple knowledge-based agent function KB-agent( percept)returns an action static: KB, a knowledge base t, a counter, initially 0, indicating time TELL(KB, MAKE-PERCEPT-SENTENCE( percept, t)) action+ ASK(KB, MAKE- ACTION-QUERY(t) TELL(KB, MAKE-ACTION-SENTENCE(action, t)) t←t+1 return action The agent must be able to Represent states, actions, etc Incorporate new percepts Update internal representations of the world
2 A simple knowledge-based agent • The agent must be able to: • – Represent states, actions, etc. – – Incorporate new percepts – – Update internal representations of the world – – Deduce hidden properties of the world
Wumpus World PEas description Performance measure Gold: +1000. death: -1000 SSSSS PIT -1 per step, -10 for using the arrow sssss Environment sSSSS 2 Squares adjacent to wumpus are smelly Breezer Squares adjacent to pit are breezy START Glitter iff gold is in the same square Shooting kills wumpus if you are facing it Shooting uses up the only arrow
3 Wumpus World PEAS description • Performance measure – Gold: +1000, death: -1000 – -1 per step, -10 for using the arrow • Environment • – Squares adjacent to wumpus are smelly – – Squares adjacent to pit are breezy – – Glitter iff gold is in the same square – – Shooting kills wumpus if you are facing it – – Shooting uses up the only arrow – Grabbing picks up gold if in same square
Exploring a wumpus world 2 [1,2]
4 Exploring a wumpus world 1 2 3 4 1 2 [1,2]
Exploring a wumpus world B。K 2 A [1,2]
5 Exploring a wumpus world 1 2 3 4 1 2 [1,2]
Exploring a wumpus world B。K 2 A [1,2]
6 Exploring a wumpus world 1 2 3 4 1 2 [1,2]
Exploring a wumpus world B。K 2 LoKs [1,2]
7 Exploring a wumpus world 1 2 3 4 1 2 [1,2]
Exploring a wumpus world B。K 2 LoKs [1,2] 8
8 Exploring a wumpus world 1 2 3 4 1 2 [1,2]
Exploring a wumpus world B。K 2 [1,2]
9 Exploring a wumpus world 1 2 3 4 1 2 [1,2]
Exploring a wumpus world B。K 2 [1,2] 10
10 Exploring a wumpus world 1 2 3 4 1 2 [1,2]