Outline Knowledge-based agents ·Vumpus world Logic in general -models and entailment Propositional (Boolean)logic Equivalence,validity,satisfiability Inference rules and theorem proving forward chaining backward chaining resolution
Outline • Knowledge-based agents • Wumpus world • Logic in general - models and entailment • Propositional (Boolean) logic • Equivalence, validity, satisfiability • Inference rules and theorem proving – forward chaining – backward chaining – resolution –
Knowledge bases Inference engine domain-independent algorithms Knowledge base domain-specific content Knowledge base set of sentences in a formal language 。 Declarative approach to building an agent(or other system): Tell it what it needs to know Then it can Ask itself what to do-answers should follow from the KB Agents can be viewed at the knowledge level i.e.,what they know,regardless of how implemented Or at the implementation level -i.e.,data structures in KB and algorithms that manipulate them
Knowledge bases • Knowledge base = set of sentences in a formal language • • Declarative approach to building an agent (or other system): – Tell it what it needs to know – • Then it can Ask itself what to do - answers should follow from the KB • • Agents can be viewed at the knowledge level i.e., what they know, regardless of how implemented • Or at the implementation level – i.e., data structures in KB and algorithms that manipulate them –
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)) actionASK(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
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 5彩 Bree:e PIT --1 per step,-10 for using the arrow Breeze Br eeze PIT ·Environment Gold Squares adjacent to wumpus are smelly PIT 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
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
Wumpus world characterization Fully Observable No only local perception ● Deterministic Yes -outcomes exactly specified ● Episodic No-sequential at the level of actions ● 。 Static Yes -Wumpus and Pits do not move Discrete Yes
Wumpus world characterization • Fully Observable No – only local perception • • Deterministic Yes – outcomes exactly specified • • Episodic No – sequential at the level of actions • • Static Yes – Wumpus and Pits do not move • • Discrete Yes • • Single-agent? Yes – Wumpus is essentially a