1
The Graphplan Planner
Searching the Planning Graph
The Graphplan Planner 2
Literature
Malik Ghallab, Dana Nau, and Paolo
- Traverso. Automated Planning – Theory
The Graphplan Planner Searching the Planning Graph Literature - - PDF document
The Graphplan Planner Searching the Planning Graph Literature Malik Ghallab, Dana Nau, and Paolo Traverso. Automated Planning Theory and Practice , chapter 6. Elsevier/Morgan Kaufmann, 2004. The Graphplan Planner 2 1 Neoclassical
The Graphplan Planner 2
The Graphplan Planner 3
concerned with restricted state-transition
representation is usually restricted to
neoclassical vs. classical planning
resulted in significant speed-up and revival of
The Graphplan Planner 4
The Graphplan Planner 5
propositional representation
STRIPS representation
state-variable representation
The Graphplan Planner 6
Let L={p1,…,pn} be a finite set of proposition
The Graphplan Planner 7
s0
location1 location2 pallet cont. crane
s2
location1 location2 pallet cont. crane
s1
location1 location2 pallet cont. crane
s3
location1 location2 pallet cont. crane
s4
location1 location2 pallet crane robot robot robot robot robot cont.
s5
location1 location2 pallet crane robot cont. take put move1 move2 move2 move1 take put load unload move2 move1
The Graphplan Planner 8
s0
location1 location2 pallet cont. crane robot
The Graphplan Planner 9
The Graphplan Planner 10
The Graphplan Planner 11
The Graphplan Planner 12
The Graphplan Planner 13
A plan is any sequence of actions π=〈a1,…,ak〉,
if k=0 (π is empty)
if k>0 and a1 applicable in s
The Graphplan Planner 14
The Graphplan Planner 15
yes no yes s5 4 〈move1,take,load,move2〉 yes no yes s5 4 〈take,move1,load,move2〉 no yes yes s5 8 〈take,move1,put,move2, take,move1,load,move2〉
s3 2 〈take,move1〉
undef. 2 〈move2,move2〉
s0 〈〉
The Graphplan Planner 16
The successor function Γm:2S→2S for a
The transitive closure of Γ defines the set of all
The Graphplan Planner 17
Let P=(Σ,si,g) be a propositional planning
The regression set of g for a relevant action
The Graphplan Planner 18
The regression function Γ-m for a propositional
The transitive closure of Γ-1 defines the set of
The Graphplan Planner 19
The Graphplan Planner 20
P1=(Σ1,si,g) where Σ1=(
L1={p1,p2} statement: P =({a1}, si, g) where
P2=(Σ2,si,g) where Σ2=(
L2={p1,p2,p3}
The Graphplan Planner 21
The Graphplan Planner 22
Expressiveness: For every propositional
Conciseness: propositional action
Consistency: not every assignment of truth
The Graphplan Planner 23
Let P=(O,si,g) be the statement of a STRIPS
Then P’=(ground(O),si,g) is a statement of a
The Graphplan Planner 24
The Graphplan Planner 25
Let P=(O,si,g) be a ground statement of a
The Graphplan Planner 26
The Graphplan Planner 27
robots can load and unload autonomously locations may contain unlimited number of
problem: swap locations of containers
loc1 loc2 conta robr contb robq
The Graphplan Planner 28
move(r,l,l’)
load(c,r,l)
unload(c,r,l)
The Graphplan Planner 29
robots:
containers:
initial state: {r1, q2, a1, b2, ur, uq}
The Graphplan Planner 30
move actions:
load actions:
unload actions:
The Graphplan Planner 31
The Graphplan Planner 32
tree structure, where:
all nodes in reachability tree are Γ>({si})
problem: O(kd) nodes;
The Graphplan Planner 33
r1, q2, a1, b2, ur, uq r1, q2, a1, bq, ur r1, q2, ar, b2, ur r1, q1, a1, b2, ur, uq r2, q2, a1, b2, ur, uq r2, q2, a1, bq, ur r2, q2, a1, br, uq r2, q1, a1, b2, ur, uq r1, q2, a1, b2, ur, uq Mq21 Mr12 Lar1 Lbq2 Mr21 Mq21 Lbq2 Lbr2
The Graphplan Planner 34
layered directed graph G=(N,E):
first proposition layer P0:
action layer Aj:
proposition layer Pj:
The Graphplan Planner 35
The Graphplan Planner 36
r1 q2 a1 b2 ur uq r1 r2 q1 q2 a1 ar b2 bq ur uq r1 r2 q1 q2 a1 ar b2 bq ur uq aq br r1 r2 q1 q2 a1 ar b2 bq ur uq aq br a2 b1 Mr12 Mq21 Lbq2 Lar1 Mr12 Mq21 Lbr2 Lar1 Mr21 Mq12 Lbq2 Laq1 Uar1 Ubq2 Mr12 Mq21 Lbr2 Lar1 Mr21 Mq12 Lbq2 Laq1 Uar1 Ubq2 Uar2 Ubq1 Uaq1 Ubr2 P0 A1 P3 P2 P1 A3 A2
The Graphplan Planner 37
reachability analysis:
necessary condition, but not sufficient low complexity:
The Graphplan Planner 38
Mr12 and Lar1:
Mr12 and Mr21:
Mr12 and Mq21:
r1 r2 q1 q2 a1 ar b2 bq ur uq r1 r2 q1 q2 a1 ar b2 bq ur uq aq br Mr12 Mq21 Lbr2 Lar1 Mr21 Mq12 Lbq2 Laq1 Uar1 Ubq2 P2 P1 A2
The Graphplan Planner 39
The Graphplan Planner 40
The Graphplan Planner 41
A set π of independent actions is applicable to
The result of applying the set π in s is defined
The Graphplan Planner 42
The Graphplan Planner 43
Let P = (A,si,g) be a statement of a
A layered plan over G is a sequence of sets of
The Graphplan Planner 44
The Graphplan Planner 45
Proposition: If ∏ = 〈π1,…,πk〉 is a solution to a
The Graphplan Planner 46
r2 and ar:
independent
in P1
r1 and r2:
in P1
r1 q2 a1 b2 ur uq r1 r2 q1 q2 a1 ar b2 bq ur uq P0 A1 P1 Mr12 Mq21 Lbq2 Lar1
The Graphplan Planner 47
Mr12 Mq21 Lbq2 Lar1 r1 r2 q1 q2 a1 ar b2 bq ur uq
No-Op for proposition p:
r1 and r2:
independent
in P1
r1 q2 a1 b2 ur uq P0 A1 P1 Ar1
The Graphplan Planner 48
The Graphplan Planner 49
The Graphplan Planner 50
r1 and r2 are mutex in
r1 is precondition for
r2 is precondition for
hence: Lar1 and Mr21
r1 r2 q1 q2 a1 ar b2 bq ur uq r1 r2 q1 q2 a1 ar b2 bq ur uq aq br Mr12 Mq21 Lbr2 Lar1 Mr21 Mq12 Lbq2 Laq1 Uar1 Ubq2 P2 P1 A2
The Graphplan Planner 51
The Graphplan Planner 52
The Graphplan Planner 53
Proposition: If p,q∈Pj-1 and (p,q)∉μPj-1 then (p,q)∉μPj.
Proposition: If a1,a2∈Aj-1 and (a1,a2)∉μAj-1 then
The Graphplan Planner 54
actions with mutex
can be removed
r1 r2 q1 q2 a1 ar b2 bq ur uq r1 r2 q1 q2 a2 ar b2 bq ur uq aq br Uar2 P2 P1 A2
The Graphplan Planner 55
The Graphplan Planner 56
The Graphplan Planner 57
The Graphplan Planner 58
k-th planning graph Gk:
+ ⊆ Aj×Pj, j∈{1…k}
– ⊆ Aj×Pj, j∈{1…k}
The Graphplan Planner 59
+ ek + ∪ (a × {p | p∈Pk and p∈effects+(a)})
– ek – ∪ (a × {p | p∈Pk and p∈effects–(a)}) The Graphplan Planner 60
The Graphplan Planner 61
A fixed-point level in a planning graph G is a
Proposition: Every planning graph G has a
Proof:
The Graphplan Planner 62
general idea:
The Graphplan Planner 63
a2 b1 Uar1
r1 q2 a1 b2 ur uq r1 r2 q1 q2 a1 ar b2 bq ur uq r1 r2 q1 q2 a1 ar b2 bq ur uq aq br r1 r2 q1 q2 a1 ar b2 bq ur uq aq br Mr12 Mq21 Lbq2 Lar1 Mr12 Mq21 Lbr2 Lar1 Mr21 Mq12 Lbq2 Laq1 Uar1 Ubq2 Mr12 Mq21 Lbr2 Lar1 Mr21 Mq12 Lbq2 Laq1 Ubq2 Uar2 Ubq1 Uaq1 Ubr2 P0 A1 P3 P2 P1 A3 A2
The Graphplan Planner 64
OR-nodes:
AND-nodes:
search:
The Graphplan Planner 65
P0 Pi Pj Pk
The Graphplan Planner 66
nogood table (denoted ∇) for planning graph
be achieved
that layer)
before searching for set g in Pj:
when search for set g in Pj has failed:
The Graphplan Planner 67
The Graphplan Planner 68
The Graphplan Planner 69
function graphplan(A,si,g) i 0; ∇ []; P0 si; G (P0,{}) while (g⊈Pi or g2∩μPi≠{}) and ¬fixedPoint(G) do i i+1; expand(G) if g⊈Pi or g2∩μPi≠{} then return failure η fixedPoint(G) ? |∇(κ)| : 0 ∏ extract(G,g,i) while ∏=failure do i i+1; expand(G) ∏ extract(G,g,i) if ∏=failure and fixedPoint(G) then if η=|∇(κ)| then return failure η |∇(κ)| return ∏
The Graphplan Planner 70
The Graphplan Planner 71
The Graphplan Planner 72
The Graphplan Planner 73
l1 l2
k1 ca k2
q2 p2
cb cc cd ce cf r1
The Graphplan Planner 74
The Graphplan Planner 75
solve “relaxed” problem and use solution as
planning heuristic:
no need to compute mutex relations no need to re-compute planning graph for
The Graphplan Planner 76
The Graphplan Planner 77