Causal-link Planning II Jos Luis Ambite Planning as Search State - - PowerPoint PPT Presentation

causal link planning ii
SMART_READER_LITE
LIVE PREVIEW

Causal-link Planning II Jos Luis Ambite Planning as Search State - - PowerPoint PPT Presentation

Causal-link Planning II Jos Luis Ambite Planning as Search State Space Plan Space Algorithm Progression, POP Regression Nodes World States Partial Plans Edges/ Actions Plan refinements: For example, in BW: Step addition


slide-1
SLIDE 1

Causal-link Planning II

José Luis Ambite

slide-2
SLIDE 2

2

CS 541 Causal Link Planning II

Planning as Search

Partial Plans World States Nodes Plan refinements:

Step addition Step reuse Demotion Promotion

Actions

For example, in BW: move-A-from-B-to-C move-B-from-A-to-Table move-C-from-B-to-A …

Edges/ Transitions POP Progression, Regression Algorithm Plan Space State Space

slide-3
SLIDE 3

3

CS 541 Causal Link Planning II

POP algorithm

POP((A, O, L), agenda, actions) If agenda = () then return (A, O, L) Pick (Q, aneed) from agenda aadd = choose(actions) s.t. Q ∈effects(aadd) If no such action aadd exists, fail. L’ := L ∪ (aadd, Q, aneed) ; O’ := O ∪ (aadd < aneed) agenda’ := agenda - (Q, aneed) If aadd is new, then A := A ∪ aadd and ∀P ∈preconditions(aadd), add (P, aadd) to agenda’ For every action at that threatens any causal link (ap, Q, ac) in L’ choose to add at < ap or ac < at to O. If neither choice is consistent, fail. POP((A’, O’, L’), agenda, actions)

Termination Action Selection Update goals Protect causal links

  • Demotion: at < ap
  • Promotion: ac < at

Goal Selection Demotion Promotion Step Addition Step Reuse

slide-4
SLIDE 4

4

CS 541 Causal Link Planning II

More expressive action representation

Actions with variables Conditional effects Disjunctive preconditions Universal quantification

  • > UCPOP [Penberthy & Weld 92]
slide-5
SLIDE 5

5

CS 541 Causal Link Planning II

Propositional STRIPS

Move-C-from-A-to-Table: precondition: (and (on C A) (clear C)) effects: (and (on C Table) (not (on C A)) (clear A)) With n blocks => O(n3) actions! Many actions not relevant for goal

slide-6
SLIDE 6

6

CS 541 Causal Link Planning II

Action schemata

Move ?b from ?x to ?y parameters: ?b, ?x, ?y preconds: (and (on ?b ?x) (clear ?b) (clear ?y) (≠ ?b ?x) (≠ ?b ?y) (≠ ?x ?y) (≠ ?y Table)) effects: (and (on ?b ?y) (not (on ?b ?x)) (clear ?x) (not (clear ?y)))

slide-7
SLIDE 7

7

CS 541 Causal Link Planning II

Modifications to POP to handle actions with variables (1)

Plan = (A, O, L, B), where

A: set of actions in the plan O: temporal orderings between actions (a < b) L: causal links linking actions via a literal B: binding constraints (co-designation and non co- designation)

Unification (instead of matching)

To satisfy (Q, aneed) we can use an action aadd such that P ∈ effects(aadd) and MGU(P, Q, B) ≠ ⊥ For example, use a new action move(?b ?x ?y) to satisfy on(A C), since MGU(on(?b ?y), on(A C), B)= ((?b = A) (?y = C)) ≠ ⊥

slide-8
SLIDE 8

8

CS 541 Causal Link Planning II

Modifications to POP to handle actions with variables (2)

Distinct variables for new action instances

Move(?b1 ?x1 ?y1), Move(?b2 ?x2 ?y2), …

Add codesignation constrains in the preconditions of a new action to the bindings B

After adding move(?b ?x ?y) to satisfy on(A C), B := B ∪ ((?b ≠ ?x) (?x ≠ ?y) (?b = A) (?y = C)) [(?b ≠ ?y) and (?y ≠ Table) are already satisfied since ?b and ?y are bound to constants]

slide-9
SLIDE 9

9

CS 541 Causal Link Planning II

Modifications to POP to handle actions with variables (3)

Threat resolution:

Delay threat checks until ground values are known for variables, or “Separation”: add (inequality) binding that ensures condition does not unify.

Ensure all actions eventually grounded

Require ground initial state (no variables) “Safe” operators: vars(effects) ⊆ vars (precs)

slide-10
SLIDE 10

10

CS 541 Causal Link Planning II

POP with variables

A0

(on C A) (on-table A) (on-table B) (clear C) (clear B)

Ainf

(on A B) (on B C) ((?b1= B) (?y1 = C) (?b1 ≠ ?x1) (?x1 ≠ ?y1) (?y1 ≠ Table))

A1: move ?b1 from ?x1 to ?y1

(on ?b1 ?y1)

  • (on ?b1 Table)
  • (clear ?y1)

(clear ?b1) (clear ?y1) (on ?b1 ?x1)

Step addition

(on ?b2 ?y2)

A2: move ?b2 from ?x2 to ?y2

(clear ?b2) (clear ?y2) (on ?b2 ?x2)

  • (on ?b2 Table) -(clear ?y2)

((?b2 A) (?y2 B) … )

Step addition Step reuse

slide-11
SLIDE 11

11

CS 541 Causal Link Planning II

Conditional effects

Move ?b from ?x to ?y parameters: ?b, ?x, ?y preconds: (and (on ?b ?x) (clear ?b) (clear ?y) (≠ ?b ?x) (≠ ?b ?y) (≠ ?x ?y)) effects: (and (on ?b ?y) (not (on ?b ?x)) (clear ?x) (when (≠ ?y Table) (not (clear ?y))))

CE Antecedent: State before action execution CE Consequent: State after action execution

slide-12
SLIDE 12

12

CS 541 Causal Link Planning II

Conditional Effects

(when P Q) means if P holds in the state before the action is applied, then Q will hold in the state resulting from the application of the action In the situation calculus: P(x, s) → Q(y, do(a,s))

slide-13
SLIDE 13

13

CS 541 Causal Link Planning II

Modifications to POP to handle conditional effects

Allow conditional effects to be used for causal links

Add the antecedent of conditional effect to the agenda.

Threat resolution by “confrontation”:

Add the negation of the antecedent of the conditional effect to the agenda.

Handle negated goals

Same as positive goals Closed world assumption for initial state

slide-14
SLIDE 14

14

CS 541 Causal Link Planning II

Disjunctive preconditions

Ex: (and (on ?x ?y) (or (clear ?x) (big-and-flat ?x))) Modifications to POP:

Put (or Q1 Q2) on the agenda when the action is selected. When (or Q1 Q2) is picked from the agenda, choose either Q1 or Q2 to work on.

Note: No disjunctive effects

slide-15
SLIDE 15

15

CS 541 Causal Link Planning II

Universal quantification in preconditions and effects

Move-briefcase(?b ?loc1 ?loc2) preconds: (and (briefcase ?b) (at ?b ?loc1) (forall ((padlock ?p)) (not (locked ?b ?p))) (≠ ?loc1 ?loc2)) effects: (and (at ?b ?loc2) (not (at ?b ?loc1)) (forall ((object ?x)) (when (in ?x ?b) (and (at ?x ?loc2) (not (at ?x ?loc1))))

slide-16
SLIDE 16

16

CS 541 Causal Link Planning II

Universal quantification restricted to finite, static types

Assume a finite, static set of typed objects

No object creation No object destruction

Example:

Extension[(briefcase ?b)] = {B1} Extension[(padlock ?p)] = {P1, P2} Extension[(object ?x)] = {B1, P1, P2, O1, O2, O3, …}

slide-17
SLIDE 17

17

CS 541 Causal Link Planning II

Approach: Replace quantified expressions with ground literals

Since quantification is over a finite set (type), replace “forall” goals with the conjunction of all the ground formulas obtained from the instances

  • f the type.

Universal base: Y(∀t1x ∆(x)) = Y(∆(c1)) ∧ … ∧ Y(∆(cn)) where the instances of t1 are (c1, .., cn) Example: if Extension[(padlock ?x)] = {p1, p2}, then

(forall ((padlock ?x)) (not (locked ?x ?b))) (and (not (locked p1 ?b)) (not (locked p2 ?b)))

slide-18
SLIDE 18

18

CS 541 Causal Link Planning II

Modifications to POP to handle quantification

Replace a universally quantified goal with its universal base. Use ground literals from the universal base of a quantified effect as needed for causal links. Consider threats when their bindings refer to universally quantified variables.

slide-19
SLIDE 19

19

CS 541 Causal Link Planning II

Briefcase example

A0 Ainf

(briefcase B) (at B home) (in P B) (at P home) (at B office) (at P home)

slide-20
SLIDE 20

20

CS 541 Causal Link Planning II

Briefcase example: No threats yet

A0 Ainf

(briefcase B) (at B home) (in P B) (at P home) (at B office) (at P home)

move B ?l office

(at ?o1 office) (not (at ?o1 ?l)) (briefcase B) (at B ?l) (at B office) (not (at B ?l)) (in ?o1 B)

slide-21
SLIDE 21

21

CS 541 Causal Link Planning II

Briefcase example: (?l = home) => threat to (at P home)

A0 Ainf

(briefcase B) (at B home) (in P B) (at P home) (at B off) (at P home)

move B home office

(not (at B home)) (briefcase B) (at B home) (in ?o1 B) (at B office) (at ?o1 office) (not (at ?o1 home))

slide-22
SLIDE 22

22

CS 541 Causal Link Planning II

Briefcase example: Solve threat by confrontation

A0 Ainf

(briefcase B) (at B home) (in P B) (at P home) (at B off) (at P home)

move B home office

(not (at B home)) (briefcase B) (at B home) (in ?o1 B) (at B office) (at ?o1 office) (not (at ?o1 home)) (not (in P B))

slide-23
SLIDE 23

23

CS 541 Causal Link Planning II

Briefcase example: Final Plan

A0 Ainf

(briefcase B) (at B home) (in P B) (at P home) (at B off) (at P home)

take-out P B move B home office

(not (at B home)) (briefcase B) (at B home) (in ?o1 B) (at B office) (at ?o1 office) (not (at ?o1 home)) (not (in P B)) (in P B) (not (in P B))

slide-24
SLIDE 24

24

CS 541 Causal Link Planning II

Quantified goal example

slide-25
SLIDE 25

25

CS 541 Causal Link Planning II

Quantified goal example

slide-26
SLIDE 26

26

CS 541 Causal Link Planning II

Quantified goal example

slide-27
SLIDE 27

27

CS 541 Causal Link Planning II