1 / 20

Agents that use logic

Agents that use logic. Knowledge, inference and action in the environment. Logic – based agents. reason by inference on KB (search) evaluating logical expressions  knowledge of environment where do goals, plans, actions fit in? in the KB or external?. Example – reasoning only.

denzel
Download Presentation

Agents that use logic

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. Agents that use logic Knowledge, inference and action in the environment

  2. Logic – based agents • reason by • inference on KB (search) • evaluating logical expressions  knowledge of environment where do goals, plans, actions fit in? in the KB or external? D Goforth - COSC 4117, fall 2003

  3. Example – reasoning only • Smith, Jones and Clark each has a distinct job • programmer, knowledge engineer, manager • Jones owes programmer $1000 • manager’s spouse doesn’t allow borrowing • Smith is not married  Who has which job? D Goforth - COSC 4117, fall 2003

  4. Knowledge • 9 propositions: • Cp, Ck, Cm • Jp, Jk, Jm • Sp, Sk, Sm • 29 = 512 rows in truth table S: Smith; J: Jones; C: Clark p: programmer; k: knowledge engineer; m: manager D Goforth - COSC 4117, fall 2003

  5. Knowledge • general knowledge • Jp \/ Sp \/ Cp // there’s a programmer • Jp => ~Sp ^ ~Cp //just one programmer • Sp => ~Jp ^ ~Cp • Cp => ~Sp ^ ~Jp D Goforth - COSC 4117, fall 2003

  6. Knowledge • general knowledge • Jp \/ Jm \/ Jk // Jones has a job • Jp => ~Jm ^ ~Jk //just one job • Jm => ~Jp ^ ~Jk • Jk => ~Jm ^ ~Jp D Goforth - COSC 4117, fall 2003

  7. Knowledge • facts • ~Jp // Jones owes programmer $1000 • ~Jm // manager doesn’t borrow • ~Sm // Smith not married, not mgr Construct the truth table headings D Goforth - COSC 4117, fall 2003

  8. Knowledge base 24 general knowledge sentences facts 9 propositions Cp Ck Cm … CpJpSp … ~Jp~Jm~Sm KB=ΛRi Reasoning Smith is not married Jones owes programmer $1000 Common Sense manager’s spouse doesn’t allow borrowing D Goforth - COSC 4117, fall 2003

  9. Dynamic environments • Logic is based on static knowledge • If agents can act to change their environment, logical representation has problems because “facts” are changing • What happens to conclusions based on original facts? D Goforth - COSC 4117, fall 2003

  10. Wumpus world D Goforth - COSC 4117, fall 2003

  11. Representing the world • Wumpus world environment facts • 16 propositions for pits • 16 propositions for breeze • 16 propositions for wumpus • 16 propositions for stench • 16 propositions for gold • 16 propositions for glitter D Goforth - COSC 4117, fall 2003

  12. Representing the world • Wumpus world general knowledge • relate pits and breezes • relate wumpus and stench • relate gold to glitter D Goforth - COSC 4117, fall 2003

  13. Adding changing facts, plans and actions • Wumpus world agent location and orientation • proposition for location: L11 • proposition for orientation: R, U, D, L (facing Right, etc) • propositions for moving: Fwd, TL, TR • ... plus shooting, grabbing gold. • problem – information is not static • at L23 – after move: no longer true, at L22 D Goforth - COSC 4117, fall 2003

  14. Possible agent models • implement timed logic • Facts are true at specific time • keep other changing information outside KB (e.g., position, orientation of agent) D Goforth - COSC 4117, fall 2003

  15. Timed logic • solution: location and orientation have time also • L111, at location (1,1) at time 1 • L239 • R7, facing right at time 7 • R7 TR7  D8 • R7 L117  Fwd7  L218 D Goforth - COSC 4117, fall 2003

  16. t=0 1 2 3 4 5 6 Dynamic problem:too many propositions KB keeps a ‘history’ of the activity as a series of snapshots D Goforth - COSC 4117, fall 2003

  17. t=0 1 2 3 4 5 6 Dynamic problem:too many propositions • Partial solutions: • More powerful logic (next chapter) • Keep dynamic knowledge separate • static reasoning in KB • dynamic in: • algorithm in agent (p.226) • reflex wired agent (p.229) D Goforth - COSC 4117, fall 2003

  18. 2. Static reasoning onlyplus dynamic algorithm outside KB

  19. 2. Static reasoning onlyin reflex ‘circuit’ agent Vector of perceptions State variable Actions

  20. 2. Static reasoning onlyin reflex ‘circuit’ agent Vector of perceptions State variables Actions

More Related