Chapter 1 Introduction Lecture slides for Dana S. Nau

advertisement
Lecture slides for
Automated Planning: Theory and Practice
Chapter 1
Introduction
Dana S. Nau
University of Maryland
Fall 2009
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
1
Some Dictionary Definitions of “Plan”
plan n.
1. A scheme, program, or method
worked out beforehand for the
accomplishment of an objective: a
plan of attack.
2. A proposed or tentative project or
course of action: had no plans for the
evening.
3. A systematic arrangement of elements
or important parts; a configuration or
outline: a seating plan; the plan of a
story.
4. A drawing or diagram made to scale
showing the structure or arrangement
of something.
5. A program or policy stipulating a
service or benefit: a pension plan.
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
2
plan n.
1. A scheme,
program, or
method worked
out beforehand
for the
accomplishment
of an objective:
a plan of attack.
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
3
plan n.
2. A proposed or tentative project or course of action:
had no plans for the evening.
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
4
plan n.
3. A systematic arrangement of
elements or important parts;
a configuration or outline:
a seating plan;
the plan of a story.
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
5
plan n.
4. A drawing or diagram made to scale
showing the structure or arrangement of
something.
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
6
plan n.
5. A program or policy stipulating a service or benefit:
a pension plan.
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
7
Some Dictionary Definitions of “Plan”
plan n.
1. A scheme, program, or method
worked out beforehand for the
accomplishment of an objective: a
plan of attack.
2. A proposed or tentative project or
course of action: had no plans for the
evening.

3. A systematic arrangement of elements
or important parts; a configuration or
outline: a seating plan; the plan of a
story.
4. A drawing or diagram made to scale
showing the structure or arrangement
of something.
5. A program or policy stipulating a
service or benefit: a pension plan.
These two are closest to the
meaning used in AI
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
8
02
03
004B VMC1 0.
10 0.
34 01
[a representation] of future
02
behavior … usually a set of
actions, with temporal and
other constraints on them,
for execution by some agent
C VMC1Tate
0.
10 1.
54
or agents. 004
- Austin
[MIT Encyclopedia
of0 the4.
004T VMC1 2.
5
87
Cognitive
005Sciences,
A EC1 0.
01999]
0 32.
29
005B EC130.
00
005C EC130.
00
0.
48
2.
00
005D EC130.
00 20.
00
005T EC190.
00 54.
77
Clam
p bo
ard
Esta
blis
h da
tumpoin
t atbul
lsey
e (0
.25,1.
Inst
all0.15
-dia
mete
r si
de-m
illi
ng t
ool
Roug
h si
de-m
illpock
et a
t (0.25
, 1.
25)
leng
th 0
.40,wid
th 0
.30,dep
th 0
.50
03 Fini
sh s
idemillpoc
ketat (
-0.2
5, 1
.25)
t
.
0
h0
.
t
0
.
04 leng
Roug
hhsi
d40,
e-m
iwid
llt
pock
e30,
ta
tdep
(0h
.25
,50
3.
00)
leng
th 0
.40,wid
th 0
.30,dep
th 0
.50
05 Fini
s
i
mill
k
at
(
5
.00)
leng
th
hs
.de0
40,
wid
tpoc
h0
.et
30,
dep
t0.2
h0
.,
503
01 Inst
all0.08
-dia
mete
r en
d-mi
llin
g to
ol
[...
01 ]
Tota
l ti
me o
n VM
C1
01 Preclea
n bo
ard(scr
ub a
nd w
ash)
02 Dryboar
d inove
n at85deg.F
01 Setu
p
02 Spre
ad p
hoto
resi
st f
rom1800
0 RP
M sp
inne
r
01 Setu
p
02 Phot
olit
hogr
aphyofphot
ores
ist
usin
g ph
otot
oolin "
real
.ige
s"
01 Setu
p
02 Etch
ingof c
oppe
r
01 Tota
l ti
me o
n EC
1
006A MC130.
00
006B MC130.
00
4.
57 01
p
02 Setu
Prep
areboar
d fo
r so
lder
ing
0.
29 01 Setu
p
A
portion
of
a
manufacturing
process plan
Dana Nau: Lecture slides for Automated Planning
02
Scre
e
npr
i
nt
sold
er s
topon b
oard
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
9
Generating Plans of Action



Computer programs to aid human planners
 Project management (consumer software)
 Plan storage and retrieval
» e.g., variant process planning in manufacturing
 Automatic schedule generation
» various OR and AI techniques
For some problems, we would like generate
plans (or pieces of plans) automatically
 Much more difficult
 Automated-planning research is starting to pay off
Here are some examples …
Pro
cess
es:
Opn
C
/WWSet
u
Rnti
m
r
001A
AB
VMC1
2.
0p
0u
0.
0e
0 LN
01 Desc
Orie
nipt
ti
oon
b
ard
02 Clam
p bo
ard
03 Inst
Esta
bll
lis
h da
tdia
umm
poin
t dr
at
bul
lsey
e (0
.25,1.0
0)
001B VMC1 0.
10 0.
43 01
a
0.30
ete
r
ill
bit
02 Roug
h dr
illat (
1.25
, -0
.50)todept
h 1.
00
s
r
ill
(1.2
5
0
todep
th 1
.00
001C VMC1 0.
10 0.
77 03
01 Fini
Inst
ah
lld
0.20
-at
dia
mete
r,dr
i.50
ll)
bit
02 Roug
h dr
illat (
0.00
, 4.
88)to d
epth1.0
0
03 ]
Fini
sh d
rillat(0.0
0, 4
.88)todept
h 1.
00
[...
001T VMC1 2.
20 1.
20 01 Tota
l ti
me o
n VM
C1
[..
.]
004A VMC1 2.
00 0.
00 01 Orie
nt b
oard
02 Clam
p bo
ard
03 Esta
blis
h da
tumpoin
t atbul
lsey
e (0
.25,1.0
0)
004B VMC1 0.
10 0.
34 01 Inst
all0.15
-dia
mete
r si
de-m
illi
ng t
ool
02 Roug
h si
de-m
illpock
et a
t (0.25
, 1.
25)
leng
th 0
.40,wid
th 0
.30,dep
th 0
.50
03 Fini
sh s
idemillpoc
ketat (
-0.2
5, 1
.25)
leng
thsi
.e-m
0
40,
wid
th e
.t
0
30,
t.25
h,
.50
0
04 Roug
h
d
ill
pock
tdep
a
(0
3.
00)
leng
th 0
.40,wid
th 0
.30,dep
th 0
.50
05 leng
Fini
sh
h0
i40,
s
demwid
ill
poc
k30,
etat
-h
(
0.2
550
,3
.00)
t
.
th
.
0
dep
t
.
0
004C VMC1 0.
10 1.
54 01 Inst
all0.08
-dia
mete
r en
d-mi
llin
g to
ol
004T VMC1 2.
50 4.
87 [...
01 ]
Tota
l ti
me o
n VM
C1
005A EC1 0.
00 32.
29 01 Preclea
n bo
ard(scr
ub a
nd w
ash)
02 Dryboar
d inove
n at85deg.F
005B EC130.
00 0.
48 01 Setu
p
02 Spre
ad p
hoto
resi
st f
rom1800
0 RP
M sp
inne
r
005C EC130.
00 2.
00 01 Setu
p
02 Phot
olit
hogr
aphyofphot
ores
ist
usin
g ph
otot
oolin "
real
.ige
s"
005D EC130.
00 20.
00 01 Setu
p
02 Etch
ingof c
oppe
r
005T EC190.
00 54.
77 01 Tota
l ti
me o
n EC
1
006A MC130.
00
006B MC130.
00
006C MC130.
00
01 Prep
Setu
preboar
02
a
d fo
r so
lder
ing
01 Setu
p
02
e
intsold
er s
topon b
oard
01 Scre
Setu
pnpr
02 ]
Depo
sitsold
er p
asteat(3.3
5,1.
23)on b
oardusi
ng n
ozzl
e
[...
31 Depo
sitsold
er p
asteat(3.5
2,4.
00)on b
oardusi
ng n
ozzl
e
006
0.
0
5.
7
boar
d
n
o so
lidi
fy s
olde
r pa
ste
006D
T MC1
MC190.
00
0 18.
01
7 01
01 Dry
Tota
l ti
mein
nove
o
MC
1 at85deg.F t
[..
.]
011A TC1 0.
00 35.
00 01 Perf
ormpost
-captes
tingonboar
d
011B TC1 0.
00 29.
67 01 Perf
ormfina
l in
spec
tionofboar
d
011T TC1 0.
00 64.
67 01 Tota
l ti
me o
n TC
1
999T
4.
57
0.
29
7.
50
319.
70 403.
37 01 Tota
l ti
me t
o ma
nufa
ctur
e
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
10
Space Exploration



Autonomous planning, scheduling, control
 NASA: JPL and Ames
Remote Agent
Experiment (RAX)
 Deep Space 1
Mars Exploration
Rover (MER)
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
11
Manufacturing

Sheet-metal bending machines - Amada Corporation
 Software to plan the sequence of bends
[Gupta and Bourne, J. Manufacturing Sci. and Engr., 1999]
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
12
Games

Bridge Baron - Great Game Products
 1997 world champion of computer bridge
[Smith, Nau, and Throop, AI Magazine, 1998]
 2004: 2nd place
Us:East declarer, West dummy
Finesse(P1; S)
LeadLow(P1; S)
PlayCard(P1; S, R1)
Opponents:defenders, South & North
Contract:East – 3NT
On lead:West at trick 3 East:KJ74
West: A2
Out: QT98653
FinesseTwo(P ; S)
2
EasyFinesse(P2; S)
West— 2
StandardFinesse(P2; S)
…
…
(North— Q)
StandardFinesseTwo(P2; S)
PlayCard(P2; S, R2)
BustedFinesse(P2; S)
(North— 3)
StandardFinesseThree(P3; S)
PlayCard(P3; S, R3)
PlayCard(P4; S, R4)
FinesseFour(P4; S)
PlayCard(P4; S, R4’)
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
North— 3
East— J
South— 5
South— Q
13
Outline

Conceptual model for planning
 Example planning algorithms
 What’s bad
 What’s good
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
14
Conceptual Model
1. Environment
System 
State transition system
 = (S,A,E,)
S = {states}
A = {actions}
E = {exogenous events}
 = state-transition function
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
15
s1
State Transition
System
 = (S,A,E,)

S = {states}
 A = {actions}
 E = {exogenous events}
 State-transition function
: S x (A  E)  2S
= {s0, …, s5}
 A = {move1, move2,
s0
put
take
location 1
move2
location 2
location 1
move2
move1
location 2
move1
s3
s2
put
take
location 1
unload
location 2
location 1
location 2
load
S
s4
s5
move2
put, take, load, unload}
E
= {}
 : see the arrows
move1
location 1
location 2
location 1
location 2
The Dock Worker Robots (DWR) domain
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
16
Conceptual Model
2. Controller
Controller
Observation function
h: S  O
Given observation
o in O, produces
action a in A
s3
location 1
location 2
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
17
Conceptual Model
3. Planner’s Input
Planning problem
Planner
Omit unless
planning is online
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
18
s1
Planning
Problem
Description of 
Initial state or set of states
Initial state = s0
Objective
Goal state, set of goal
states, set of tasks,
“trajectory” of states,
objective function, …
Goal state = s5
s0
put
take
location 1
move2
location 2
location 1
move2
move1
location 2
move1
s3
s2
put
take
location 1
unload
location 2
location 1
location 2
load
s4
s5
move2
move1
location 1
location 2
location 1
location 2
The Dock Worker Robots (DWR) domain
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
19
Conceptual Model
4. Planner’s Output
Planner
Instructions to
the controller
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
20
s1
Plans
Classical plan: a sequence
of actions
s0
put
take
take
location 1
move2
location 2
location 1
move1
move1
take, move1, load, move2
move2
location 2
move1
s3
s2
put
Policy: partial function
from S into A
take
location 1
{(s0, take),
(s1, move1),
(s3, load),
(s4, move2)}
unload
location 2
location 1
location 2
load
load
s4
s5
move2
move2
move1
location 1
location 2
location 1
location 2
The Dock Worker Robots (DWR) domain
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
21
Planning Versus Scheduling


Scheduling
 Decide when and how to
perform a given set of actions
» Time constraints
» Resource constraints
» Objective functions
 Typically NP-complete
Scheduler
Planning
 Decide what actions to use to achieve some set of objectives
 Can be much worse than NP-complete; worst case is
undecidable
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
22
Three Main Types of Planners
1. Domain-specific
2. Domain-independent
3. Configurable

I’ll talk briefly about each
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
23
1. Domain-Specific Planners (Chapters 19-23)



Made or tuned for
a specific domain
Won’t work well (if
at all) in any other domain
Most successful real-world
planning systems work this
way
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
24
Types of Planners
2. Domain-Independent


In principle, a domain-independent planner
works in any planning domain
Uses no domain-specific knowledge except
the definitions of the basic actions
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
25
Types of Planners
2. Domain-Independent

In practice,
 Not feasible to develop
domain-independent planners
that work in every possible
domain

Make simplifying assumptions to
restrict the set of domains
 Classical planning
 Historical focus of most
automated-planning research
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
26
Restrictive Assumptions








A0: Finite system:
 finitely many states, actions, events
A1: Fully observable:
 the controller always ’s current state
A2: Deterministic:
 each action has only one outcome
A3: Static (no exogenous events):
 no changes but the controller’s actions
A4: Attainment goals:
 a set of goal states Sg
A5: Sequential plans:
 a plan is a linearly ordered sequence
of actions (a1, a2, … an)
A6: Implicit time:
 no time durations; linear sequence of instantaneous states
A7: Off-line planning:
 planner doesn’t know the execution status
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
27
Classical Planning (Chapters 2-9)




Classical planning requires all eight restrictive assumptions
 Offline generation of action sequences for a deterministic,
static, finite system, with complete knowledge, attainment
goals, and implicit time
Reduces to the following problem:
 Given (, s0, Sg)
 Find a sequence of actions (a1, a2, … an) that produces
a sequence of state transitions (s1, s2, …, sn)
such that sn is in Sg.
This is just path-searching in a graph
 Nodes = states
 Edges = actions
Is this trivial?
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
28
Classical Planning (Chapters 2-9)
s1



Generalize the earlier example:
 Five locations, three robot carts,
100 containers, three piles
location 1
» Then there are 10277 states
move2
Number of particles in the universe
is only about 1087
 The example is more than 10190 times as large!
put
take
location 2
move1
Automated-planning research has been heavily dominated by
classical planning
 Dozens (hundreds?) of different algorithms
 I’ll briefly describe a few of the best-known ones
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
29
c
a
b
Plan-Space Planning (Chapter 5)

Start
clear(x), with x = a

unstack(x,a)
clear(a)
clear(b),
handempty
putdown(x)
pickup(b)
handempty
holding(a)


Decompose sets of goals into the
individual goals
Plan for them separately
 Bookkeeping info to detect
and resolve interactions
stack(b,c)
For classical planning,
not used much any more
A temporal-planning extension
was used in the Mars rovers
pickup(a)
holding(a)
clear(b)
stack(a,b)
on(a,b)
on(b,c)
a
b
c
Goal:
on(a,b) & on(b,c)
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
30
Level 0
Literals in s0
c
a
b
Level 1
All actions
applicable
to s0
All effects
of those
actions
unstack(c,a)
pickup(b)
Planning Graphs
(Chapter 6)

Level 2
no-op
Relaxed problem
[Blum & Furst, 1995]
 Apply all applicable actions
at once
 Next “level” contains all the
effects of all of those actions
All actions
applicable
to subsets
of Level 1
All effects
of those
actions
unstack(c,a)
pickup(b)
c
b
pickup(a)
stack(b,c)
c
a
b
a
b
stack(b,a)
•••
putdown(b)
stack(c,b)
c
a
stack(c,a)
putdown(c)
no-op
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
31
Level 0
Literals in s0
c
a
b
Level 1
All actions
applicable
to s0


All effects
of those
actions
unstack(c,a)
pickup(b)
Graphplan
Level 2
no-op
For n = 1, 2, …
 Make planning graph of n
levels (polynomial time)
 State-space search within
the planning graph
Graphplan’s many children
 IPP, CGP, DGP, LGP,
PGP, SGP, TGP, …
All actions
applicable
to subsets
of Level 1
All effects
of those
actions
unstack(c,a)
pickup(b)
c
b
pickup(a)
stack(b,c)
c
a
b
a
b
stack(b,a)
•••
putdown(b)
stack(c,b)
c
a
stack(c,a)
putdown(c)
no-op
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
32
Level 0
Literals in s0
c
a
b
Level 1
All actions
applicable
to s0


All effects
of those
actions
unstack(c,a)
pickup(b)
Graphplan
Level 2
no-op
All actions
applicable
to subsets
of Level 1
All effects
of those
actions
unstack(c,a)
pickup(b)
c
b
pickup(a)
For n = 1, 2, …
c
a b
 Make planning graph of n
levels (polynomial time)
a b
 State-space search within
the planning graph
c
a
Graphplan’s many children
 IPP, CGP, DGP, LGP,
Running out
PGP, SGP, TGP, …
of names
stack(b,c)
stack(b,a)
•••
putdown(b)
stack(c,b)
stack(c,a)
putdown(c)
no-op
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
33
Heuristic Search (Chapter 9)

Can we do an A*-style heuristic search?
 For many years, nobody could come up with a good h
function
 But planning graphs make it feasible
» Can extract h from the planning graph

Problem: A* quickly runs out of memory
 So do a greedy search

Greedy search can get trapped in local minima
 Greedy search plus local search at local minima

HSP [Bonet & Geffner]
FastForward [Hoffmann]

Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
34
Translation to Other Domains (Chapters 7, 8)

Translate the planning problem or the planning graph
into another kind of problem for which there are efficient
solvers
 Find a solution to that problem
 Translate the solution back into a plan

Satisfiability solvers, especially those that use local search
 Satplan and Blackbox [Kautz & Selman]

Integer programming solvers such as Cplex
 [Vossen et al.]
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
35
Types of Planners:
3. Configurable



Domain-independent planners are quite slow compared with
domain-specific planners
 Blocks world in linear time [Slaney and Thiébaux, A.I., 2001]
 Can get analogous results in many other domains
But we don’t want to write a whole new planner for every
domain!
Configurable planners
 Domain-independent planning engine
 Input includes info about how to
solve problems in the domain
» Hierarchical Task Network (HTN) planning
» Planning with control formulas
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
36
Task:
travel(x,y)
Method: taxi-travel(x,y)
get-taxi
ride(x,y)
pay-driver
Method: air-travel(x,y)
get-ticket(a(x),a(y))
fly(a(x),a(y))
travel(a(y),y)
travel(x,a(x))
travel(UMD, Toulouse)
get-ticket(BWI, TLS)
get-ticket(IAD, TLS)
go-to-Orbitz
go-to-Orbitz
find-flights(BWI,TLS)
find-flights(IAD,TLS)
buy-ticket(IAD,TLS)
BACKTRACK
 Problem reduction
travel(UMD, IAD)
get-taxi
 Tasks (activities) rather than goals
ride(UMD, IAD)
 Methods to decompose tasks into subtasks
pay-driver
fly(BWI, Toulouse)
 Enforce constraints, backtrack if necessary
travel(TLS, LAAS)
 Real-world applications
get-taxi
ride(TLS,Toulouse)
 Noah, Nonlin, O-Plan, SIPE, SIPE-2,
pay-driver
HTN Planning
(Chapter 11)
SHOP, SHOP2
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
37
Planning with Control Formulas (Chapter 10)
c
a

b
a1 = pickup(b)
s1, f1 s1 doesn’t satisfy f1
a2 = pickup(c)
s2, f2
a
b
c
s0, f0
. . .
goal
At each state si we have a control formula fi in temporal logic
“never pick up x from table unless x needs to be on another block”
 For each successor of s, derive a control formula using logical
progression
 Prune any successor state in which the progressed formula is false
 TLPlan [Bacchus & Kabanza]
 TALplanner [Kvarnstrom & Doherty]
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
38
Comparisons
up-front
human effort


Domain-specific
Configurable
Domain-independent
performance
Domain-specific planner
 Write an entire computer program - lots of work
 Lots of domain-specific performance improvements
Domain-independent planner
 Just give it the basic actions - not much effort
 Not very efficient
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
39
Comparisons
coverage
Configurable
Domain-independent
Domain-specific

A domain-specific planner only works in one domain

In principle, configurable and domain-independent planners should
both be able to work in any domain
In practice, configurable planners work in a larger variety of
domains
 Partly due to efficiency
 Partly due to expressive power

Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
40
Example


International Planning Competitions
 1998, 2000, 2002, 2004, 2006, 2008
 All of them included domain-independent planners
The 2000 and 2002 competitions also included configurable
planners
 The configurable planners
» Solved the most problems
» Solved them the fastest
» Usually found better solutions
» Worked in non-classical planning domains that were
beyond the scope of the domain-independent planners
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
41
But Wait …


IPC 2002 was the last planning competition to include
configurable planners.
Two reasons for this:
(1) It’s hard to enter them in the competition
» Must write all the domain knowledge yourself
» Too much trouble except to make a point
» The authors of those planners felt they had already
made their point
(2) Cultural bias …
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
42
Cultural Bias




Most automated-planning researchers feel that using domain
knowledge is “cheating”
Researchers in other fields have trouble comprehending this
 Operations research, control theory, engineering, …
 Why would anyone not want to use the knowledge they
have about a problem they’re trying to solve?
In the past, the bias has been very useful
 Without it, automated planning wouldn’t have grown into a
separate field from its potential application areas
But it’s less useful now
 The field has matured
 The bias is too restrictive
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
43
Example


Typical characteristics
of application domains
 Dynamic world
 Multiple agents
 Imperfect/uncertain info
 External info sources
» users, sensors, databases
 Durations, time constraints,
asynchronous actions
 Numeric computations
» geometry, probability, etc.
Classical planning excludes all of these
North
Q 9 A A
J 7 K 9
6
5
5
3
West
6
East
2
Q
8
South
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
44
Good News, Part 1



Classical planning research has produced some very powerful
techniques for reducing the size of the search space
Some of these can be generalized to non-classical domains
Example:
 Plan-space planning was originally developed for classical
planning
 In the Mars rovers, it was extended for reasoning about time
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
45
Good News, Part 2


AI planning is gradually generalizing beyond classical planning
Example: the planning competitions
 1998, 2000: classical planning
 2002: added elementary notions of time durations, resources
 2004: added inference rules, derived effects, and a separate track
for planning under uncertainty
 2006: added soft goals, trajectory constraints, preferences, plan
metrics
 2008: new track for planners that can learn
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
46
Good News, Part 3

Success in high-profile applications like the
Mars rovers
 Creates excitement about building
planners that work in the real world
 Provides opportunities for synergy
between theory and practice
 Understanding real-world planning
leads to better theories
 Better theories lead to better realworld planners
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
47
A running example: Dock Worker Robots

Generalization of the earlier example
 A harbor with several locations
» e.g., docks, docked ships,
storage areas, parking areas
 Containers
» going to/from ships
 Robot carts
» can move containers
 Cranes
» can load and unload containers
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
48
A running example: Dock Worker Robots

Locations: l1, l2, …

Containers: c1, c2, …
 can be stacked in piles, loaded onto robots, or held by cranes

Piles: p1, p2, …
 fixed areas where containers are stacked
 pallet at the bottom of each pile

Robot carts: r1, r2, …
 can move to adjacent locations
 carry at most one container

Cranes: k1, k2, …
 each belongs to a single location
 move containers between piles and robots
 if there is a pile at a location, there must also be a crane there
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
49
A running example: Dock Worker Robots

Fixed relations: same in all states
adjacent(l,l’) attached(p,l) belong(k,l)

Dynamic relations: differ from one state to another
occupied(l) at(r,l)
loaded(r,c)
unloaded(r)
holding(k,c) empty(k)
in(c,p)
on(c,c’)
top(c,p)
top(pallet,p)

Actions:
take(c,k,p)
load(r,c,k)
put(c,k,p)
unload(r)
move(r,l,l’)
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
50
Any
Questions?
Dana Nau: Lecture slides for Automated Planning
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
51
Download