planning and acting
play

Planning and Acting Chapter 11, Section 3 of; based on AIMA Slides - PowerPoint PPT Presentation

Planning and Acting Chapter 11, Section 3 of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 1 Outline The real world Sensorless/contingent


  1. Planning and Acting Chapter 11, Section 3 of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 1

  2. Outline ♦ The real world ♦ Sensorless/contingent planning (Conditional planning) ♦ Online replanning (Monitoring and replanning) of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 2

  3. The real world On(x) ~Flat(x) START FINISH ~Flat(Spare) Intact(Spare) Off(Spare) On(Tire1) Flat(Tire1) Off(x) ClearHub Intact(x) Flat(x) On(x) Remove(x) Puton(x) Inflate(x) ~Flat(x) Off(x) ClearHub On(x) ~ClearHub of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 3

  4. Things go wrong Incomplete information Unknown preconditions, e.g., Intact ( Spare ) ? Disjunctive effects, e.g., Inflate ( x ) causes Inflated ( x ) ∨ SlowHiss ( x ) ∨ Burst ( x ) ∨ BrokenPump ∨ . . . Incorrect information Current state incorrect, e.g., spare NOT intact Missing/incorrect postconditions in operators Qualification problem: can never finish listing all the required preconditions and possible conditional outcomes of actions of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 4

  5. Solutions Conformant or sensorless planning Devise a plan that works regardless of state or outcome Such plans may not exist Conditional planning Plan to obtain information ( observation actions ) Subplan for each contingency, e.g., [ Check ( Tire 1) , if Intact ( Tire 1) then Inflate ( Tire 1) else CallAAA Expensive because it plans for many unlikely cases Monitoring/Replanning Assume normal states, outcomes Check progress during execution , replan if necessary Unanticipated outcomes may lead to failure (e.g., no AAA card) (Really need a combination; plan for likely/serious eventualities, deal with others when they arise, as they must eventually) of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 5

  6. Conformant planning Search in space of belief states (sets of possible actual states) L R L R S S S L R R L S S R L L R S S R L of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 6

  7. Conditional planning If the world is nondeterministic or partially observable then percepts usually provide information , i.e., split up the belief state ACTION PERCEPT of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 7

  8. Conditional planning contd. Conditional plans check (any consequence of KB +) percept [ . . . , if C then Plan A else Plan B , . . . ] Execution: check C against current KB, execute “then” or “else” Need some plan for every possible percept (Cf. game playing: some response for every opponent move) (Cf. backward chaining: some rule such that every premise satisfied AND–OR tree search (very similar to backward chaining algorithm) of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 8

  9. Example Double Murphy: sucking or arriving may dirty a clean square 8 Left Suck 7 3 8 6 GOAL LOOP Right Suck Left Suck 4 2 7 5 1 8 GOAL LOOP of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 9

  10. Example Triple Murphy: also sometimes stays put instead of moving 8 Left Suck 7 3 6 GOAL [ L 1 : Left, if AtR then L 1 else [ if CleanL then [ ] else Suck ]] or [ while AtR do [ Left ] , if CleanL then [ ] else Suck ] “Infinite loop” but will eventually work unless action always fails of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 10

  11. Execution Monitoring “Failure” = preconditions of remaining plan not met Preconditions of remaining plan = all preconditions of remaining steps not achieved by remaining steps = all causal links crossing current time point On failure, resume POP to achieve open conditions from current state IPEM (Integrated Planning, Execution, and Monitoring): keep updating Start to match current state links from actions replaced by links from Start when done of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 11

  12. Example Start At(Home) At(Home) Sells(HWS,Drill) Sells(SM,Ban.) Go(HWS) Sells(SM,Milk) At(HWS) Sells(HWS,Drill) Buy(Drill) At(HWS) Go(SM) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Ban.) Buy(Milk) Buy(Ban.) At(SM) Go(Home) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 12

  13. Example Start At(Home) Go(HWS) At(HWS) At(HWS) Sells(HWS,Drill) Sells(HWS,Drill) Buy(Drill) Sells(SM,Ban.) Sells(SM,Milk) At(HWS) Go(SM) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Ban.) Buy(Milk) Buy(Ban.) At(SM) Go(Home) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 13

  14. Example Start At(Home) Go(HWS) At(HWS) Sells(HWS,Drill) Buy(Drill) At(HWS) At(HWS) Have(Drill) Go(SM) Sells(SM,Ban.) Sells(SM,Milk) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Ban.) Buy(Milk) Buy(Ban.) At(SM) Go(Home) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 14

  15. Example Start At(Home) Go(HWS) At(HWS) Sells(HWS,Drill) Buy(Drill) At(HWS) Go(SM) At(SM) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Ban.) Have(Drill) Sells(SM,Ban.) Buy(Milk) Buy(Ban.) Sells(SM,Milk) At(SM) Go(Home) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 15

  16. Example Start At(Home) Go(HWS) At(HWS) Sells(HWS,Drill) Buy(Drill) At(HWS) Go(SM) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Ban.) Buy(Milk) Buy(Ban.) At(SM) At(SM) Have(Drill) Go(Home) Have(Ban.) Have(Milk) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 16

  17. Example Start At(Home) Go(HWS) At(HWS) Sells(HWS,Drill) Buy(Drill) At(HWS) Go(SM) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Ban.) Buy(Milk) Buy(Ban.) At(SM) Go(Home) At(Home) Have(Drill) Have(Milk) At(Home) Have(Ban.) Have(Drill) Have(Ban.) Finish Have(Milk) of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 17

  18. Emergent behavior PRECONDITIONS FAILURE RESPONSE START Color(Chair,Blue) ~Have(Red) Get(Red) Have(Red) Fetch more red Have(Red) Paint(Red) Color(Chair,Red) FINISH of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 18

  19. Emergent behavior PRECONDITIONS FAILURE RESPONSE START Color(Chair,Blue) ~Have(Red) Get(Red) Have(Red) Paint(Red) Color(Chair,Red) Extra coat of paint Color(Chair,Red) FINISH of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 19

  20. Emergent behavior PRECONDITIONS FAILURE RESPONSE START Color(Chair,Blue) ~Have(Red) Get(Red) Have(Red) Paint(Red) Color(Chair,Red) Extra coat of paint Color(Chair,Red) FINISH “Loop until success” behavior emerges from interaction between monitor/replan agent design and uncooperative environment of; based on AIMA Slides c Artificial Intelligence, spring 2013, Peter Ljungl¨ � Stuart Russel and Peter Norvig, 2004 Chapter 11, Section 3 20

Recommend


More recommend