1 / 7

Ch. 7 – Logical Agents

Ch. 7 – Logical Agents. Supplemental slides for CSE 327 Prof. Jeff Heflin. Goal-Based Agent. sensors. State. What the world is like now. How the world evolves. Environment. What it will be like if I do action A. What my actions do. What action I should do now. Goals. actuators. Agent.

salene
Download Presentation

Ch. 7 – Logical Agents

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ch. 7 – Logical Agents Supplemental slides for CSE 327 Prof. Jeff Heflin

  2. Goal-Based Agent sensors State What the world is like now How the world evolves Environment What it will be like if I do action A What my actions do What action I should do now Goals actuators Agent From Fig. 2.13, p. 52

  3. Knowledge-Based Agent function KB-Agent(percept) returns an actionpersistent: KB, a knowledge baset, 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 + 1return action From Figure 7.1, p. 236

  4. Grammar for Propositional Logic Sentence  AtomicSentence | ComplexSentence AtomicSentence True | False | Symbol Symbol P | Q | R | … ComplexSentence ( Sentence) | [ Sentence] |  Sentence|(Sentence  Sentence) | (Sentence  Sentence) | (Sentence  Sentence) | (Sentence  Sentence) From Figure 7.7, p. 244

  5. Checking Entailment Not Entailed! Entailed! Entailed! Assume KB={PQ, Q, QR}

  6. Inference via Model Checking function TT-Entails?(KB, ) returns true or false symbols a list of the proposition symbols in KB and returnTT-Check-All(KB, , symbols, {}) functionTT-Check-All(KB, , symbols, model) returns true or false ifEmpty?(symbols) thenifPL-True?(KB, model) then returnPL-True?(, model)else return trueelse doPFirst(symbols); rest  Rest(symbols) returnTT-Check-All(KB, , rest, model {P=true} andTT-Check-All(KB, , rest, model {P=false}) From Figure 7.10, p. 248

  7. Wumpus World Agent function HYBRID-WUMPUS-AGENT(percept) returns an actioninputs: percept, a list [stench, breeze, glitter]persistent: KB, a knowledge base, contains “rules” of the Wumpus worldx, y, orientation, the agent’s position visited, array of squares visited by agent, initially emptyaction, most recent action, initially nullplan, an action sequence, initially empty update x, y, orientation, visited based on actionifstenchthenTell(KB, Sx,y) else Tell(KB, Sx,y) ifbreezethenTell(KB, Bx,y) else Tell(KB, Bx,y) ifglitterthenaction  grabelse if plan is nonempty then action  Pop(plan)else if for some frontier square [i,j], Ask(KB, (Pi,j Wi,j)) is trueor for some frontier square [i,j], Ask(KB, (Pi,j Wi,j)) is falsethen do plan A*-Graph-Search(Route-Problem([x,y], orientation,[i,j], visited))action  Pop(plan)else action  a randomly chosen movereturn action Simplified version of agent described in Figure 7.20, p. 270

More Related