Plan Generation & Causal-Link Planning 1
Plan Generation & Causal-Link Planning 1
Plan Generation & Causal-Link Planning 1
Causal-Link Planning 1
Review
Frame problem:
How to specify what does not change
Qualification problem
Hard to specify all preconditions
Ramification problem
Hard to specify all effects
Review
Situation Calculus
Successor state axioms:
Broken(x, do(s,a)) ↔ [a = drop(x) ∧ fragile(x, s)]∨
∃b[a=explode(b) ∧ nextTo(b, x, s)] ∨
broken(x,s) ∧ ¬ ∃ a = repair(x)
Preconditions axioms:
Poss(pickup(r,x), s) ↔ robot(r) ∧ ∀z ¬holding(z, x, s) ∧
nextTo(r, x, s)
Strips representation
Means-ends analysis
Networks of Actions (Noah)
Domain-Independent
Planning
Inputs:
Domain Action Theory
Problem Instance
C B
A B C
C B
A B C
Arcs: actions
move-B-from-table-to-C))
P(S3, G, BWA, (move-C-from-A-to-table,
move-B-from-table-to-C,
G ⊆ S3 => Success!
move-A-from-table-to-B))
Regression:
Backward Search (I <- G)
RegWS(init-state, current-goals, actions, path)
If init-state satisfies current-goals, then return path
else a =choose (actions), s.t. some effect of a
satisfies one of current-goals
If no such a, then return failure [unachievable*]
If some effect of a contradicts some of current-goals,
then return failure [inconsistent state]
CG’ = current-goals – effects(a) + preconditions(a)
If current-goals ⊂ CG’, then return failure [useless*]
RegWS(init-state, CG’, actions, concatenate(a,path))
First call: RegWS(IS, G, Actions, ())
Regression Example:
Sussman Anomaly
I: (on-table A) (on C A) (on-table B) (clear B) (clear C)
G: (on A B) (on B C) Non-Deterministic
R(I, G, BlocksWorldActions, ()) Choice!
R(I, ((clear A) (on-table A) (clear B) (on B C)), BWA,
(move-A-from-table-to-B))
R(I, ((clear A) (on-table A) (clear B) (clear C), (on-table B)),
BWA, (move-B-from-table-to-C, move-A-from-table-to-B))
R(I, ((on-table A) (clear B) (clear C) (on-table B) (on C A)),
BWA, (move-C-from-A-to-table, move-B-from-table-to-C,
move-A-from-table-to-B))
move-B-from-table-to-C))
P(S3, G, BWA, (move-C-from-A-to-table,
move-B-from-table-to-C,
G ⊆ S3 => Success!
move-A-from-table-to-B))
Progression vs. Regression
Both algorithms are:
Sound: the result plan is valid
Complete: if valid plan exists, they find one
Non-deterministic choice => search!
Brute force: DFS, BFS, Iterative Deepening, ..,
Heuristic: A*, IDA*, …
Complexity: O(bn) worst-case
b = branching factor, n = |“choose”|
Regression: often smaller b, focused by goals
Progression: full state to compute heuristics
Total-Order vs Partial-Order Plans
Plan Generation:
Search space of plans
Partial-Order Planning (POP)
Nodes are partial plans
Causal Link: Ap Q Ac
Action Ac (consumer) has precondition Q that
is established in the plan by Ap (producer).
(clear b)
move-a-from-b-to-table move-c-from-d-to-b
Partial plan representation
P = (A, O, L, OC, UL)
OC: set bof open conditions
UL: set of unsafe links where P is
deleted by some Sk
Flaw: Open condition and unsafe link
Partial Plan Representation
Example
Flaw:
Solution plan: A partial plan with no
remaining flaw. Every open condition
must be satisfied by some action. No
unsafe links should exist (i.e the plan is
consistant)
Algorithm (POP)
(on A B) (on B C)
Ainf
Work on open precondition
(on B C) and (clear B)
A0
(on C A) (on-table A) (on-table B) (clear C) (clear B)
(on A B) (on B C)
Ainf
Work on open precondition
(on A B)
A0
(on C A) (on-table A) (on-table B) (clear C) (clear B)
(on A B) (on B C)
Ainf
Protect causal links
A0
(on C A) (on-table A) (on-table B) (clear C) (clear B)
(on A B) (on B C)
Ainf
Work on open precondition
(clear A) and protect links
A0
(on C A) (on-table A) (on-table B) (clear C) (clear B)
(on C A) (clear C)
A3: move C from A to Table
-(on C A) (on-table C) (clear A)
(clear B) (clear C) (on-table B)
(clear A) (clear B) (on-table A) A1: move B from Table to C
A2: move A from Table to B -(on-table B) -(clear C) (on B C)
-(on-table A) -(clear B) (on A B)
(on A B) (on B C)
Ainf
Final plan
A0
(on C A) (on-table A) (on-table B) (clear C) (clear B)
(on C A) (clear C)
A3: move C from A to Table
-(on C A) (on-table C) (clear A)
(clear B) (clear C) (on-table B)
(clear A) (clear B) (on-table A) A1: move B from Table to C
A2: move A from Table to B -(on-table B) -(clear C) (on B C)
-(on-table A) -(clear B) (on A B)
(on A B) (on B C)
Ainf
Plartial-Order Planning vs
State-Space Planning
Complexity: O(bn) worst-case
Non-deterministic choices (n):
ProgWS, RegWS: n = |actions|
POP: n = |preconditions| + |link protection|
Generally an action has several preconditions
Branching factor (b)
POP has smaller b:
No backtrack due to goal ordering
Least commitment: no premature step ordering
Does POP make the least possible amount of
commitment?