Automated Planning
Automated Planning
Restricting Assumptions
domain-independent planning
complements domain-specific planning
A state-transition system Σ =
(S,A,E,γ) can be represented by a
directed labelled graph G = (NG,EG)
where:
• the nodes correspond to the states in S, i.e.
NG=S ; and
• there is an arc from sNG to sNG,i.e. s→s
EG,with label u(AE) if and only if sγ (s,a).
m1 m1 m1 m1
c2 c2
c1 c1
c1 c1
c1 c1
m2 m2
m1
c1
cc cf
container pallet
container cd ce
ca cd
1r
1l 2l
Pile (p1 and q1( robot pile (p2 and q2, both empty(
location
cont. cont. t
palle t pall pallet cont.
robot e
robot robot
location2 move2
location1 location1 location2 location1 location2
top(c2,p2), on(c2,pallet), c2
belong(crane1,loc1), c3
p2 r1
c1
empty(crane1), adjacent(loc1,loc2), pallet
loc2
loc1
adjacent(loc2, loc1), at(r1,loc2),
occupied(loc2), unloaded(r1)}
plan π1 =
〈 move(robot,loc2,loc1),
take(crane,loc1,cont,pallet,pile),
load(crane,loc1,cont,robot),
move(robot,loc1,loc2) 〉
¦π1|=4
π1 is a minimal, non-redundant solution
State-Space Search and the STRIPS Planner 44
Overview
The STRIPS Representation
The Planning Domain Definition Language
(PDDL(
Problem-Solving by Search
Heuristic Search
Forward State-Space Search
Backward State-Space Search
The STRIPS Planner
1m 1m 1m 1m
1c 2c 2c 1c
1c 1c
1c 1c
2m 2m
1m
1c
Arad 140
Sibiu Fagaras 92
118 99
80 Vaslui
Rimnicu Vilcea
Timisoara 97 211
Pitesti 142
111
Lugoj 101 85 98 Hirsova
70 146 Bucharest Urziceni
86
Mehadia 138
90
75 Eforie
Dobreta 120 Giurgiu
Craiova
In(Sibiu( In(Bucharest(
In(Arad(
In(Sibiu( In(Bucharest(
In(Arad(
In(Sibiu( In(Bucharest(
fringe
selected
depth = 0
depth = 1
depth = 2
3
=
depth
State-Space Search and the STRIPS Planner 61
Depth-First Search:
Missionaries and Cannibals
depth = 0
depth = 1
depth = 2
3
=
depth
State-Space Search and the STRIPS Planner 62
Iterative Deepening Search
strategy:
• based on depth-limited (depth-first) search
• repeat search with gradually increasing depth
limit until a goal state is found
implementation:
for depth 0 to ∞ do
result depthLimitedSearch(problem, depth(
if result ≠ cutoff then return result
initial state
goal state
example: hSLD
A* search: If h(n) is admissible then f(n) never
overestimates the true cost of a solution
through n.
d=0
Arad (366)
selected
d=1
Zerind Sibiu Timisoara
(449) (393) (447)
Arad Oradea
d=2
(646) (671)
Fagaras Rimnicu Vilcea
(415) (413)
d=3
Sibiu Bucharest Craiova Pitesti Sibiu
(591) (450) (526) (417) (553)
d=4
Bucharest Craiova Rimnicu Vilcea
(418) (615) (607)
Theorem:
A* using tree search is optimal if the
heuristic h(n) is admissible.
cont. cont. t
palle pall pallet cont.
robot e
robot robot
location1 location2 location1 location2 location1 location2
crane crane
crane
s1 s3 s4
cont.
cont.
pallet alle
pcont.
pallet
robot robott
robot
loc1 loc1 loc2 loc1 loc2
loc2
C B
A B C
Table Table
State-Space Search and the STRIPS Planner 105
STRIPS and the Sussman
Anomaly (1)
achieve on(A,B(
• put C from A onto table C A
• put A onto B A B C B
achieve on(B,C(
• put A from B onto table A B
• put B onto C C B A C
re-achieve on(A,B( A
• put A onto B A
B
C
B
C
• put B onto C
B C A C
re-achieve on(A,B( A
• put A onto B B B
A C C
put A onto B
shortest solution
achieving on(B,C(:
put B onto C