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

conditional planning
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Conditional Planning

Section 11.3

  • Sec. 11.3 – p.1/18
slide-2
SLIDE 2

Outline

Fully observable environments Partially observable environments Conditional POP

  • Sec. 11.3 – p.2/18
slide-3
SLIDE 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 planA else planB

Full observability: The agent knows what state it currently is, does not have to execute an

  • bservation action

Simply get plans ready for all possible contingencies

  • Sec. 11.3 – p.3/18
slide-4
SLIDE 4

Modeling uncertainty

Actions sometimes fail → disjunctive effects Example: moving left sometimes fails Action(Left,PRECOND: AtR,EFFECT: AtL ∨ AtR) Conditional effects: effects are conditioned on secondary preconditions Action(Suck, PRECOND: ;, EFFECT: (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, PRECOND: AtR;, EFFECT: AtL ∨ (AtL ∧ when CleanL: ¬ CleanL))

  • Sec. 11.3 – p.4/18
slide-5
SLIDE 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 SUCK is applied to a clean square The agent is playing a game against nature

  • Sec. 11.3 – p.5/18
slide-6
SLIDE 6

Perform and-or search

LOOP GOAL LOOP Left Suck GOAL Right Suck Left Suck

  • Sec. 11.3 – p.6/18
slide-7
SLIDE 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
slide-8
SLIDE 8

And-or Search Algorithm

function AND-OR-GRAPH-SEARCH ( problem) returns a conditional plan, or failure OR-SEARCH(INITIAL-STATE[problem], problem, []) function OR-SEARCH (state, problem, path) returns a conditional plan, or failure if GOAL-TEST[problem](state) then return the empty plan if state is on path then return failure for each action, state-set in SUCCESSORS [problem](state) do plan ← AND-SEARCH (state, problem, [state | path]) if plan = failure then return [action | plan] return failure

  • Sec. 11.3 – p.8/18
slide-9
SLIDE 9

And-or Search Algorithm

function AND-SEARCH (state-set, problem, path) returns a conditional plan, or failure for each si in state-set do plani ← OR-SEARCH(Si, problem, path) if plan = failure then return failure return **[if s1 **[if then plan1 **[if else if s2 **[if else if then plan2 **[if else if else . . . if sn−1 **[if else if else . . . if then plann−1 **[if else if else . . . if else plann]

  • Sec. 11.3 – p.9/18
slide-10
SLIDE 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
slide-11
SLIDE 11

First level of the search

Left Suck GOAL

  • Sec. 11.3 – p.11/18
slide-12
SLIDE 12

Triple Murphy vacuum world

No acyclic solutions A cyclic solution is to try going left until it works. Use a label. [L1: Left, if atR then L1 else if CleanL then [] else Suck]

  • Sec. 11.3 – p.12/18
slide-13
SLIDE 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
slide-14
SLIDE 14

Part of the search

Left CleanL ~CleanL Suck Right Suck CleanR ~CleanR

  • Sec. 11.3 – p.14/18
slide-15
SLIDE 15

Conditional POP (CNLP algorithm)

GOAL A atL cleanL cleanR INIT LEFT atL cleanL cleanR atL ~cleanL Dangling Edge

  • Sec. 11.3 – p.15/18
slide-16
SLIDE 16

Conditional POP (CNLP algorithm)

GOAL A atL cleanL cleanR GOAL B atL cleanL cleanR INIT LEFT atL cleanL cleanR atL ~cleanL Duplicate the goal and label it

  • Sec. 11.3 – p.16/18
slide-17
SLIDE 17

Conditional POP (CNLP algorithm)

GOAL A atL cleanL cleanR GOAL B atL cleanL cleanR INIT LEFT atL cleanL cleanR atL ~cleanL SUCK

  • Sec. 11.3 – p.17/18
slide-18
SLIDE 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