1 / 6

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.

wallis
Télécharger la présentation

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. 50

  3. Knowledge-Based Agent function KB-AGENT(percept) returns an actionstatic: KB, counter t=0 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. 196

  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) From Figure 7.7, p. 205

  5. Inference via Model Checking function TT-ENTAILS?(KB, ) returns true or false symbols a list of the proposition symbols in KB and return TT-CHECK-ALL(KB, , symbols, []) function TT-CHECK-ALL(KB, , symbols, model) returns true or false if EMPTY?(symbols) thenif PL-TRUE?(KB, model) then return PL-TRUE?(, model)else return trueelse doPFIRST(symbols); rest  REST(symbols) return TT-CHECK-ALL(KB, , rest, EXTEND(P,true,model)) andTT-CHECK-ALL(KB, , rest, EXTEND(P,false,model)) From Figure 7.4, p. 209

  6. Wumpus World Agent function PL-WUMPUS-AGENT(percept) returns an actioninputs: percept, a list [stench, breeze, glitter]static: KB, a knowledge base, initially containing “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 actionifstenchthen TELL(KB, Sx,y) else TELL(KB, Sx,y) ifbreezethen TELL(KB, Bx,y) else TELL(KB, Bx,y) ifglitterthenaction  grabelse if plan is nonempty then action  POP(plan)else if for some fringe square [i,j], ASK(KB, (Pi,j Wi,j)) is trueor for some fringe 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 From Figure 7.19, p. 226

More Related