conditional planning
play

Conditional Planning Section 11.3 Sec. 11.3 p.1/18 Outline Fully - PowerPoint PPT Presentation

Conditional Planning Section 11.3 Sec. 11.3 p.1/18 Outline Fully observable environments Partially observable environments Conditional POP Sec. 11.3 p.2/18 Uncertainty The agent might not know what the initial state is The agent


  1. Conditional Planning Section 11.3 Sec. 11.3 – p.1/18

  2. Outline Fully observable environments Partially observable environments Conditional POP Sec. 11.3 – p.2/18

  3. Uncertainty The agent might not know what the initial state is The agent might not know the outcome of its actions The plans will have branches rather than being straight line plans, includes conditional steps → → if < test > then plan A else plan B Full observability : The agent knows what state it currently is, does not have to execute an observation action Simply get plans ready for all possible contingencies Sec. 11.3 – p.3/18

  4. Modeling uncertainty Actions sometimes fail → disjunctive effects Example: moving left sometimes fails Action ( Left , P RECOND : AtR , E FFECT : AtL ∨ AtR ) Conditional effects : effects are conditioned on secondary preconditions Action ( Suck , P RECOND : ;, E FFECT : ( when AtL: CleanL ) ∧ ( when AtR: CleanR )) Actions may have both disjunctive and conditional effects: Moving sometimes dumps dirt on the destination square only when that square is clean Action ( Left , P RECOND : AtR ;, E FFECT : AtL ∨ ( AtL ∧ when CleanL: ¬ CleanL )) Sec. 11.3 – p.4/18

  5. The vacuum world example Double Murphy world the vacuum cleaner sometimes deposits dirt when it moves to a clean destination square sometimes deposits dirt if S UCK is applied to a clean square The agent is playing a game against nature Sec. 11.3 – p.5/18

  6. Perform and-or search Left Suck GOAL Suck LOOP Right Suck Left GOAL LOOP Sec. 11.3 – p.6/18

  7. The plan In the “double-Murphy” vacuum world, the plan is: [ Left , if AtL ∧ CleanL ∧ CleanR then [ ] else Suck ] Sec. 11.3 – p.7/18

  8. And-or Search Algorithm function A ND -O R -G RAPH -S EARCH ( problem ) returns a conditional plan , or failure O R -S EARCH ( I NITIAL -S TATE [ problem ], problem , []) function O R -S EARCH ( state, problem, path ) returns a conditional plan , or failure if G OAL -T EST [ problem ]( state ) then return the empty plan if state is on path then return failure for each action, state-set in S UCCESSORS [ problem ]( state ) do plan ← A ND -S EARCH ( state, problem , [ state | path ]) if plan � = failure then return [ action | plan ] return failure Sec. 11.3 – p.8/18

  9. And-or Search Algorithm function A ND -S EARCH ( state-set, problem, path ) returns a conditional plan , or failure for each s i in state-set do plan i ← O R -S EARCH ( S i , problem, path ) if plan = failure then return failure return **[ if s 1 **[ if then plan 1 **[ if else if s 2 **[ if else if then plan 2 **[ if else if else . . . if s n − 1 **[ if else if else . . . if then plan n − 1 **[ if else if else . . . if else plan n ] Sec. 11.3 – p.9/18

  10. Triple Murhpy vacuum world The vacuum cleaner sometimes deposits dirt when it moves to a clean destination square It sometimes deposits dirt if suck is applied to a clean square + move sometimes fails Sec. 11.3 – p.10/18

  11. First level of the search Left Suck GOAL Sec. 11.3 – p.11/18

  12. Triple Murphy vacuum world No acyclic solutions A cyclic solution is to try going left until it works. Use a label . [ L 1 : Left , if atR then L 1 else if CleanL then [] else Suck ] Sec. 11.3 – p.12/18

  13. Partially observable environments The agent knows only a certain amount of the actual state (e.g., local sensing only, does not know about the other squares) Automatic sensing : at every time step the agent gets all the available percepts Active sensing : percepts are obtained only by executing specific sensory actions Belief state : The set of possible states that the agent can be in “Alternate double Murphy world”: dirt can sometimes be left behind when the agent leaves a clean square Sec. 11.3 – p.13/18

  14. Part of the search Left CleanL ~CleanL Suck Right CleanR ~CleanR Suck Sec. 11.3 – p.14/18

  15. Conditional POP (CNLP algorithm) INIT atL cleanL cleanR LEFT atL ~cleanL cleanL atL cleanR Dangling Edge GOAL A Sec. 11.3 – p.15/18

  16. Conditional POP (CNLP algorithm) INIT atL cleanL cleanR LEFT atL ~cleanL cleanL atL cleanR GOAL A cleanL atL Duplicate the goal cleanR and label it GOAL B Sec. 11.3 – p.16/18

  17. Conditional POP (CNLP algorithm) INIT atL cleanL cleanR LEFT atL ~cleanL cleanL atL cleanR GOAL SUCK A cleanL atL cleanR GOAL B Sec. 11.3 – p.17/18

  18. Comments Classical planning is NP Conditional planning is harder than NP Had to go back to state space search Many problems are intractable Sec. 11.3 – p.18/18

Recommend


More recommend