Upload
trantuyen
View
223
Download
0
Embed Size (px)
Citation preview
Introduction
to
Autom
ated Task
Planning
Jon
as Kvarn
ström
Au
tom
ated P
lann
ing an
d D
iagno
sis Gro
up
Artificial In
telligence an
d In
tegrated C
om
pu
ter Systems (A
IICS) / ID
A
3
jonkv@ida
What is Planning?
Plan
nin
g is thin
kin
g a
he
ad
No
t just rea
cting
to w
ha
t ha
pp
ens!
Th
ink
ing
ab
ou
t po
ssible a
ction
s an
d th
eir effects,
form
ula
ting
a co
mp
lete pla
nth
at d
escribes w
ha
t to d
o a
nd
wh
en,
in o
rder to
ach
ieve
a g
oa
l
…so
wh
en d
o w
e wan
t com
pu
ters
to d
o th
at?
4
jonkv@ida
Shakey
�C
lassical examp
le: Sh
ak
ey
�U
sed th
e ST
RIP
Sp
lann
er
▪Stan
ford
Research
Institu
teP
rob
lem So
lver
▪O
ne o
f the first p
lann
ers (196
9)
5
jonkv@ida
Miconic 10 Elevators
�S
chin
dler M
icon
ic 10 elevato
rs�
Peo
ple en
ter their d
estinatio
nb
efore
they b
oard
an elevato
r
�M
any elevato
rs, man
y floo
rs
�T
he g
oa
l: For everyo
ne to
be a
t their d
estina
tion
�T
he p
lan
tells us:
Wh
ich eleva
tors sh
ou
ld go
to w
hich
floo
rs, in w
hich
ord
er?
�T
he g
ain
: Less tim
e to w
ait fo
r an
elevato
r!
6
jonkv@ida
Sheet Metal B
ending
�R
ob
ots b
end
ing
sheet m
etal�
Go
al:B
end
a flat sheet to
a specific sh
ape
�C
on
straints:
Th
e piece m
ust n
ot co
llide w
ith an
ythin
g wh
en m
oved
!(G
eo
me
tric rea
son
ing
required
)
�O
ptim
ized
op
era
tion
saves a
lot o
f time =
mo
ney!
7
jonkv@ida
NASA Earth O
bserving-1 Mission
�E
arth O
bservin
g-1 M
ission
�
Satellite in lo
w earth
orb
it
▪C
an o
nly co
mm
un
icate 8 x 10
min
utes/d
ay
▪O
perates fo
r lon
g perio
ds w
itho
ut su
pervisio
n
�C
ASP
ER
softw
are:C
on
tinu
ou
s Activity Sch
edu
ling, P
lann
ing, E
xecutio
n an
d R
eplan
nin
g
�D
ram
atica
lly incre
ase
s scien
ce re
turn
s
▪In
teresting even
ts are analyzed
(volcan
ic erup
tion
s, …)
▪T
argets to view
are plan
ned
dep
end
ing o
n p
reviou
s ob
servation
s
▪P
lans d
ow
nlin
k activities:
Lim
ited b
and
wid
th
�h
ttp://a
se.jp
l.na
sa.g
ov
/
8
jonkv@ida
Unm
anned Aerial Vehicles
�U
nm
ann
ed aerial veh
icles�
Mu
ltiple
ag
en
tsto
coo
rdin
ate
�A
ction
s executed
con
curre
ntly
9
jonkv@ida
UAV 1: Photogram
metry
�P
ho
tograp
h b
uild
ings, to
generate 3D
mo
dels
10
jonkv@ida
UAV 2: Traffic M
onitoring
�M
on
itor traffic / fin
d p
ossib
le rou
tes for em
ergency veh
icles
11
jonkv@ida
UAV 3: Finding Forest Fires
�P
atrol large areas search
ing fo
r forest fires, d
ay after day after d
ay…
12
jonkv@ida
UAV 4: Em
ergency Services Logistics
�A
ssist in em
ergency situ
ation
s
▪D
eliver pack
ages of fo
od
, med
icine, w
ater
13
jonkv@ida
Why Planning?
�C
an’t w
e just so
lve these p
rob
lems o
urselves?
�M
anu
al plan
nin
g can b
e bo
ring
and
ine
fficien
t
▪W
ho
wan
ts to sp
end
all day gu
idin
g elevators?
�A
uto
mated
plan
nin
g may cre
ate
hig
he
r qu
ality p
lan
s
▪So
ftware can
systematically o
ptim
ize, can in
vestigate millio
ns o
f alternatives
�A
uto
mated
plan
nin
g can b
e app
lied w
he
re th
e a
ge
nt is
▪Satellites can
no
t always co
mm
un
icate with
grou
nd
op
erators
▪Sp
acecraft or ro
bo
ts on
oth
er plan
ets may b
e ho
urs aw
ay by rad
io
Dom
ain-Specific vs.
Dom
ain-In
dependen
t Planning
15
jonkv@ida
Introduction
�L
et’s say we are in
terested in
the p
ho
tog
ram
me
tryd
om
ain�
Mu
ltiple U
AV
s available
�G
oal: T
o tak
e pictu
res of b
uild
ings
�H
ow
do
you
create a ph
oto
gra
mm
etry p
lan
?
16
jonkv@ida
Dom
ain-Specific Planning
�D
om
ain
-spe
cific pla
nn
er: C
reated fo
r a particu
lar do
main
�In
pu
t: A m
ap co
ntain
ing b
uild
ings
▪E
verythin
g else is imp
licit,sin
ce the p
lann
er already k
no
ws
wh
at action
s are available, etc
(hard
cod
ed!)
�Im
plem
entatio
n:
▪C
alculate su
itable U
AV
po
sition
s
▪C
all a Travellin
g Salesman
Pro
blem
solver
▪G
enerate fligh
t com
man
ds
PG Problem
PG
-spe
cificP
lan
ne
r
PG Plan
So
un
ds sim
ple
, an
d ca
n b
e ve
rye
fficien
t! Bu
t…
17
jonkv@ida
Dom
ain-Specific Planning
�S
pecializatio
n m
eans le
ss flex
ibility! W
hat if…
�yo
u w
ant to
de
liver
a cou
ple o
f crates at the sam
e time?
▪G
eneralize in
pu
t…
�yo
u h
ave to co
nsid
er refu
elin
g?
▪D
ifferent algo
rithm
!
�yo
u h
ave two
UA
Vs
and
a UG
V(gro
un
d veh
icle)?
▪D
ifferent
algorith
m!
�yo
u w
ant to
survey an
are
a(sen
d a vid
eo feed
of th
e grou
nd
)?
�yo
u h
ave dyn
amic n
o-fly-zo
nes (”d
on
’t fly there
at 15:00
-16:0
0”)? P
G +
De
livery
Pla
nn
er
PG
Pla
nn
er
w/ fu
el
Mu
lti-T
SP
pla
nn
er18
jonkv@ida
Dom
ain-Independent Planning
�W
e wan
t a ge
ne
ricp
lann
ing
system!
�C
apab
le of tak
ing a h
igh-level d
escrip
tion
of a
ny
pro
blem
do
main
and
then
solvin
g pro
blem
s with
in th
e do
main
!
�A
sing
lep
lann
er
▪Im
pro
vemen
ts to th
e plan
ner �
all do
main
s ben
efit
�H
igh
-leve
ld
om
ain an
d p
rob
lem d
efinitio
ns
▪E
asier to sp
ecify these th
an to
write sp
ecialized algo
rithm
s
▪E
asier to ch
an
ge
than
a hard
-cod
ed o
ptim
ized im
plem
entatio
n
▪A
lso u
seful fo
r rap
id p
roto
typin
g
Satellite
Domain
Ge
ne
ral
Pla
nn
er
Satellite
problem
instan
ce
Plan
UAV
Domain
Ge
ne
ral
Pla
nn
er
Photogram
metry
problem
instan
ce
Plan
19
jonkv@ida
What is Com
mon?
Wh
at is com
mo
n to
all of th
ese pro
blem
s?
20
jonkv@ida
This is Common!
�T
he w
orld
con
tains vario
us typ
es of o
bje
cts�
Bu
ildin
gs, cards, aircraft, sw
itches, p
eop
le, …
�W
e are generally in
terested in
pro
pe
rties
of th
ese ob
jects�
Lo
catio
no
f a card
, wh
ether w
e ha
ve a
pictu
reo
f a bu
ildin
go
r no
t, …
�G
oa
lscan
be d
escribed
as desired
pro
perties
�W
e sho
uld
ha
ve a
pictu
reo
f each b
uild
ing
�A
ction
sm
od
ify pro
perties (sim
plified
!)�
takeo
ff(uav)
�n
ow
the U
AV
is in th
e air
�p
ho
tograp
h(u
av, bu
ildin
g)
�n
ow
we h
ave
a p
icture
of th
e bu
ildin
g
�C
an o
nly b
e executed
if we ca
n se
eth
e bu
ildin
g
21
jonkv@ida
Example 1
�In
the E
mergen
cy Services L
og
istics do
main
:�
1. Wh
at ob
jects exist?
▪H
elico
pte
rs! h
eli = { su
rv1, surv2, …
, cargo
1, cargo2, …
}
▪B
oxe
s!b
ox =
{ bo
x1, bo
x2, … }
▪L
oca
tion
s!lo
c=
{ basestatio
n,
perso
n1, p
erson
2, …,
dep
ot1, d
epo
t2, … }
▪L
et’s generalize:
Bo
th h
elicop
ters and
bo
xesare o
bje
ctsas w
ell.
22
jonkv@ida
Example 2
�2. W
hat p
rop
erties can d
ifferent typ
es of o
bjects h
ave?(D
efined
usin
g state
va
riab
les)
▪A
n o
bject is o
r isn’t at a certain
locatio
n:
at(o
bject, lo
c)A
helico
pter is o
r isn’t at a certain
locatio
n:
at(h
eli, loc)
A h
elicop
ter is or isn
’t carrying a certain
bo
x:ca
rrying(h
eli, box)
23
jonkv@ida
Example 3
�3. W
hat p
rop
erties do
the o
bjects o
f the cu
rren
tp
rob
lem h
ave no
w?
▪E
very bo
x is at a certain lo
cation
:a
t(box1, d
epo
t1), a
t(box2, d
epo
t1), …
▪E
very helico
pter is at a certain
locatio
n:
at(su
rv1, ba
sestatio
n),
at(su
rv2, perso
n1), …
▪So
me h
elicop
ters are carrying b
oxes:
carryin
g(cargo
1, box4
)
�4
. Wh
at pro
perties sh
ou
ld th
ey
ha
ve?
Th
is is ou
r goal!
▪a
t(box1, p
erson
1), a
t(box2, p
erson
2), …
Situ
atio
nw
e w
an
t to
ach
ieve
Situ
atio
nrig
ht n
ow
24
jonkv@ida
Example 4
�4
. Wh
at can w
e do
abo
ut it? A
ction
s!�
Exam
ple: fly(h
eli, loc1, lo
c2)
▪P
reco
nd
ition
s:at(h
eli, loc1)
loc2 is free –
no
oth
er helico
pter th
erefu
el(heli) >
dist(lo
c1, loc2) * fu
elUsage(h
eli)
▪E
ffects:
at(heli, lo
c1) is no
lon
ger true
at(heli, lo
c2) is true in
steadfu
el(heli) d
ecreases by d
ist(loc1, lo
c2) * fuelU
sage(heli)
▪T
ime
req
uire
me
nts:
distan
ce(loc1, lo
c2) / speed
(heli)
�T
ake o
ff / land
�H
over at th
e curren
t locatio
n
�P
ositio
n th
e camera at an
gle θ
�T
ake a visu
al pictu
re / Tak
e an in
frared p
icture
�L
ift a pack
age usin
g a win
ch / D
eliver a pack
age usin
g win
ch
L1
L2
25
jonkv@ida
Dom
ain-Independent Planning
Inp
ut 1: P
lan
nin
g d
om
ain
Inp
ut 2: P
rob
lem
insta
nce
Ob
ject T
ype
s:T
he
re a
re U
AV
s, bo
xes …
Pro
pe
rties:
Eve
ry UA
V h
as a m
ax
Sp
ee
d, …
Actio
ns:
De
finitio
n o
f fly, pick
up
, …
Ob
jects:
Cu
rren
t UA
Vs a
re {U
AV
1,UA
V2}
Initia
l Sta
te:
Bo
x loca
tion
s, …
Go
al:
Bo
x b1 a
t loca
tion
l1, …
Bu
t wh
at lang
uage sh
ou
ld w
e use?
27
jonkv@ida
Desirable Properties
�D
esira
ble
pro
pe
rties
of a d
om
ain-in
dep
end
ent p
lann
er:�
Sho
uld
be as g
en
era
las p
ossib
le
▪H
and
le a wid
e variety of d
om
ains
�Sh
ou
ld b
e as efficie
nt
as po
ssible
▪G
enerate p
lans q
uick
ly
�Sh
ou
ld gen
erate plan
s of th
e hig
he
st qu
ality
▪F
ewer actio
ns, lo
wer co
st, faster to execu
te, …
�Sh
ou
ld su
pp
ort th
e u
ser
as mu
ch as p
ossib
le
▪P
rovid
e usefu
l high
-level structu
res such
as action
sth
at a user can
easily specify
Man
y of th
ese pro
perties are in
direct co
nflict!2
8
jonkv@ida
Classical Planning
�F
or efficien
cy, plan
ners gen
erally explo
it do
ma
in stru
cture
�T
his im
plies co
nstra
inin
gth
e expressivity o
f the p
lann
eran
d its in
pu
t langu
age!
�C
lassica
l pla
nn
ing
uses a co
mm
on
set of co
nstrain
ts…�
Som
etimes called
"STR
IPS p
lann
ing"
�D
emo
nstrated
usin
g a simp
le do
main
: Th
e Blo
cks W
orld
�A
lso in
trod
uces P
DD
L, th
e Plan
nin
g Do
main
Defin
ition
Lan
guage
▪G
eneral lan
guage
▪Su
bsets are su
pp
orted
by m
ost m
od
ern p
lann
ers
29
jonkv@ida
Blocks W
orld
�W
ha
t you
can
do
:�
Pick
up
a blo
ck
▪u
nless so
meth
ing is o
n to
p o
f it
�P
ut
a blo
ck th
at you
’re ho
ldin
g…
▪o
n th
e ta
ble
(space fo
r all blo
cks)
▪o
n a
no
the
r blo
ck,
un
less som
ethin
g is on
top
of it
�W
hich
action
s will ach
ieve you
r goals?
Yo
ur g
rea
test d
esire
Wh
at yo
u k
no
wY
ou
CB
A
C B A
30
jonkv@ida
PDDL: D
omain and Problem
Definition
�P
DD
L: L
isp-lik
elan
gu
age, expressio
ns in
paren
theses
�E
veryd
om
ainis n
amed
,asso
ciatedw
ith exp
licit list of e
xp
ressiv
ityre
qu
irem
en
ts
▪(d
efin
e(d
om
ain
blo
cksw
orld
)(:re
qu
irem
en
ts:a
dl
;; Co
nd
ition
al effects, qu
an
tificatio
n, …
:eq
ua
lity;; U
se of “=
”…
);; R
ema
inin
g do
ma
in in
form
atio
n go
es here!
)
�P
rob
lem
insta
nce
has a n
ame, b
elon
gs to a d
om
ain
▪(d
efin
e(p
rob
lem
MyT
hreeB
lock
Pro
blem
)(:d
om
ain
blo
cksw
orld
)…
)
Co
lon
be
fore
ma
ny k
ey
wo
rds,
in o
rde
r to a
void
collisio
ns
wh
en
ne
w k
ey
wo
rds a
re a
dd
ed
31
jonkv@ida
1: Objects
�In
classical plan
nin
g, there is a fin
iteset o
f ob
jects
�O
bjects are gen
erally declared
in th
e pro
ble
m in
stan
ce
▪D
ifferent o
bjects in
differen
t instan
ces!
▪(d
efin
e(p
rob
lem
MyT
hreeB
lock
Pro
blem
)(: d
om
ain
blo
cksw
orld
)(:o
bje
ctsA
B C
)…
)
�W
e can ch
oo
seto
mo
del th
e table as a sp
ecial blo
ck
▪A
lways p
resent in
all instan
ces �d
efined
in th
e do
main
▪(d
efin
e(d
om
ain
blo
cksw
orld
)(: re
qu
irem
en
ts:ad
l…
)(:co
nsta
nts
Tab
le)…
)
CB
A
32
jonkv@ida
2: Finite States
�C
lassical plan
nin
g: W
orld
mo
deled
usin
g fin
ite sta
tes
�A
finite set o
f state
va
riab
les
(pred
icates or n
on
-bo
olean
fluen
ts),w
ith valu
es from
a finite d
om
ain
▪�
A fin
ite (bu
t gigantic!) set o
f po
ssible states o
f the w
orld
▪E
ach state gives every state variab
le a specific valu
e
�M
any w
ays to m
od
el any d
om
ain! O
ne e
xa
mp
lefo
r blo
cks w
orld
:
▪W
em
ust k
no
wif
a blo
ck is o
nso
meth
ing
else, or n
ot
▪W
em
ust k
no
ww
heth
eran
ob
jectis th
e tab
le,
wh
ichw
em
od
eledas a ”sp
ecial” blo
ck
▪(d
efin
e(d
om
ain
blo
cksw
orld
)(:re
qu
irem
en
ts:ad
l…
)(:p
red
icate
s(o
n ?X
?Y) (istab
le?X
))…
)
CB
A
Va
riab
les a
re
pre
fixed
with
“?”
33
jonkv@ida
2b: State Example
�T
hree d
ifferent states
in th
e Blo
cks W
orld
�C
an b
e describ
ed grap
hically
�C
an b
e describ
ed in
text(th
e follo
win
g 3 slides!)
C B A
CB
ACB A
34
jonkv@ida
3: Complete Initial Inform
ation
�W
e assum
e com
ple
te in
form
atio
nab
ou
t the in
itial state�
All
state variables are given
values in
the p
rob
lem
insta
nce
▪B
W: o
n(A
,B), o
n(B
,Tab
le), on
(C,T
able)…
etc.
CB A
35
jonkv@ida
3b: Initial State in PDDL
�H
ow
do
we co
mp
lete
lysp
ecify the in
itial BW
state?▪
(an
d(n
ot
(on
A A
)) (no
t(o
n A
B)) (o
n A
C)
(no
t(o
n A
Tab
le)(n
ot
(on
B A
)) (no
t(o
n B
B)) (n
ot
(on
B C
)) (on
B T
ab
le)
(no
t(o
n C
A)) (n
ot
(on
C B
)) (no
t(o
n C
C)) (o
n C
Ta
ble
)(n
ot
(on
Tab
le A)) (n
ot
(on
Tab
le B))
(no
t(o
n T
able C
)) (no
t(o
n T
able T
able))
( no
t(istab
leA
)) (no
t(istab
leB
)) (no
t(istab
leC
))(ista
ble
Ta
ble
))
�O
bservatio
n: G
iven co
mp
lete info
, mo
st facts a
re fa
lse!
▪A
blo
ck can
on
ly be o
n o
ne
oth
er blo
ck:
Given
any ?x, at m
ost o
ne in
stance o
f (on
?x ?y) is true
(Given
100
0 b
lock
s, ?x is on
1, no
t on
99
9)
CB
A
36
jonkv@ida
3c: Conventions for Initial States
�C
on
ventio
n: O
nly sp
ecify wh
at is true
in th
e initial state
▪(d
efin
e(p
rob
lem
MyT
hreeB
lock
Pro
blem
)(:d
om
ain
blo
cksw
orld
)(:o
bje
ctsA
B C
)(:in
it(o
n A
C) (o
n C
Tab
le) (on
B T
able) (istab
leT
able))
…)
�T
his is a sh
orth
an
d n
ota
tion
, and
is on
lyu
sed in
:init.
▪P
DD
L is fo
r plan
ners th
at cann
ot h
and
le un
kn
ow
n in
itial info
rmatio
n,
so fo
r con
ven
ien
ce,
an ato
m th
at is no
t men
tion
ed is b
y defin
ition
false
CB
A
37
jonkv@ida
4: Operators and Actions
�A
set of sin
gle
-step
op
era
tors
defin
es wh
at you
can d
o�
Part o
f the d
om
ain
de
scriptio
n
�M
any w
ays of m
od
eling an
y do
main
! On
e examp
le:
▪“p
ut” sh
ou
ld take a b
lock
from
wh
ere it is, and
pu
t it on
ano
ther b
lock
�E
ach o
perato
r has p
ara
me
ters: p
ut(x,y)
▪In
stan
tiate
din
to a
ction
s: pu
t(A,B
), pu
t(A,C
), …
�E
ach o
perato
r has a p
reco
nd
ition
▪“T
here m
ust b
e no
oth
er blo
ck o
n to
p o
f x”, …
�E
ach o
perato
r has e
ffects
▪A
fterward
s, x will b
e on
top
of y
��� �p
ut(A
,B) ��� �
CB
ACB A
38
jonkv@ida
4b: Operators and Actions
�E
ach actio
n is execu
ted as a sin
gle
step
�If th
e preco
nd
ition
ho
lds in
the cu
rrent state:
▪T
he actio
n can
be execu
ted
▪A
sing
len
ew state resu
lts, wh
ere the effects h
old
.
�U
AV
do
main
:
▪F
lying fro
m (10
0,10
0) to
(300
,300
)is b
asically mo
deled
as “telepo
rting”
in a sin
gle step
▪W
e do
n’t m
od
el the fact
that th
e UA
V m
oves th
rou
ghin
tervenin
g locatio
ns
▪Su
fficient fo
r sequ
ential p
lans
��� �p
ut(A
,B) ��� �
CB
ACB A
39
jonkv@ida
4c: Operator Preconditions
�P
reco
nd
ition
: Mu
st ho
ld fo
r an actio
n to
be ap
plicab
le
▪C
lassica
l pla
nn
ing: W
e mu
st kno
ww
ha
t an
actio
n requ
ires!
▪(d
efin
e(d
om
ain
blo
cksw
orld
) …(:a
ction
pu
t:p
ara
me
ters
(?mo
ved ?d
est):p
reco
nd
ition
(an
d;; D
on
't pu
t the ta
ble o
n to
p o
f som
ethin
g(n
ot
(istable
?mo
ved))
;; Do
n't p
ut a
blo
ck on
top
of itself
(no
t(=
?mo
ved ?d
est));; T
here is n
oth
ing o
n to
p o
f the b
lock w
e mo
ve(n
ot
(ex
ists(?o
ther) (o
n ?o
ther ?m
oved
))) ;; E
ither th
e destin
atio
n is th
e tab
le,;; o
r there is n
oth
ing o
n to
p o
f it(o
r(istab
le?d
est) (no
t(e
xists
(?oth
er) (on
?oth
er ?dest))))
)
Co
nn
ective
s:(an
d …
)(o
r …)
(imp
ly …)
(no
t …)
Qu
an
tifiers:
(exists (?v) …)
(forall
(?v) …)
Op
erators
are called
action
s in
PD
DL
…
40
jonkv@ida
4d: Effects
�E
ffects: W
hat ch
an
ge
sif yo
u p
erform
an actio
n?
▪C
lassica
l pla
nn
ing: W
e mu
st kno
wa
ll effects!
▪C
an’t state th
at an actio
n m
ayfa
il:(o
n x y) o
r(o
n x T
able)
▪C
an’t m
od
el ou
tcom
e pro
ba
bilitie
s:9
5% (o
n x y), 5%
(on
x Tab
le)
▪In
stead, co
mp
lete info
rmatio
n: O
nly (a
nd
…) is p
ossib
le!
▪In
clud
e atom
s that b
ecom
e true: (o
n?m
oved
?dest)
▪In
clud
e negated
atom
s that b
ecom
e false: (no
t(o
n ?m
oved
?oth
er))
: effe
ct(a
nd
;; ?mo
ved is n
ow
on
?dest.
(on
?mo
ved ?d
est);; If ?m
oved
wa
s on
som
e ?oth
er, it no
lon
ger is.(fo
rall
(?oth
er)(w
he
n(o
n ?m
oved
?oth
er) (no
t(o
n ?m
oved
?oth
er))))
Uses qu
an
tified a
nd
con
ditio
na
l effects (AD
L):
(wh
en(co
nd
ition
-in-in
vocatio
n-state)
(effects-in-resu
lt-state))
41
jonkv@ida
5: No O
ther Agents
�C
lassical plan
nin
g assum
es the state o
f the w
orld
can o
nly b
e mo
dified
by actio
ns gen
erated b
y the p
lann
er
▪N
o agen
ts are mo
ving b
lock
s arou
nd
un
less we say so
in th
e plan
!
▪�
Wh
en co
nsid
ering d
ifferent p
oten
tial plan
s,th
e plan
ner can
pred
ict the exact en
d resu
lt of every actio
n in
the p
lanw
itho
ut w
orryin
g abo
ut so
meo
ne "d
isturb
ing" its execu
tion
42
jonkv@ida
6: Goals
�G
oals o
nly co
nstrain
the fin
al sta
teo
f a plan
�Sp
ecify the e
nd
resu
lt, no
t ho
w yo
u get th
ere
�Sp
ecified in
the p
rob
lem
insta
nce
�G
oal fo
r ou
r examp
le instan
ce�
On
e po
ssibility:
▪(d
efin
e(p
rob
lem
AB
C)
(:do
ma
inb
lock
swo
rld)
…(:go
al
(an
d(o
n A
B) (o
n B
C) (o
n C
Tab
le))))C B A
43
jonkv@ida
6b: Goals
�A
com
ple
tego
al specificatio
n is gen
erally no
t requ
ired�
Som
e pred
icates can "fo
llow
from
oth
ers"
▪(d
efin
e(p
rob
lem
AB
C)
(: do
ma
inb
lock
swo
rld)
…(:go
al
(an
d(o
n A
B) (o
n B
C) (o
n C
Tab
le))))
�H
ere we d
on
't specify th
at (on
A C
) mu
st be false
▪T
his ju
st follo
ws fro
m th
e fact that
a blo
ck can
't be o
n tw
o d
ifferent b
lock
s at the sam
e time
C B A
44
jonkv@ida
6c: Goals
�A
goal sp
ecification
can u
sually co
rrespo
nd
to m
any states
�A
n arb
itrary con
jun
ction
is allow
ed
�W
e do
no
tassu
me th
at pred
icates left ou
t mu
st be false!
▪(d
efin
e(p
rob
lem
AB
C)
(:do
ma
inb
lock
swo
rld)
…(:go
al
(an
d(o
n B
C) (o
n C
Tab
le))))
▪W
e do
n't say w
heth
er (on
A B
) is true,
so eith
er of th
e two
follo
win
g states wo
uld
be co
nsid
ered go
al states!
�So
metim
es disju
nctio
ns m
ay be allo
wed
as well
C B A
C B
A
Usin
g Object Types
Same E
xpressivity, M
ore C
on
venien
t
46
jonkv@ida
Example D
omain: Logistics
�T
he "trad
ition
al" log
isticsd
om
ain�
Un
like th
e blo
cks w
orld
, man
y ob
ject typ
es
▪W
e have a n
um
ber o
f pa
cka
ge
sat given
loca
tion
s
▪M
ove p
ackages w
ithin
a cityu
sing tru
cks
▪M
ove p
ackages b
etween
cities usin
g airp
lan
es
▪A
irplan
es can o
nly m
ove b
etween
certain a
irpo
rtlo
cation
s
▪G
oal: P
ackages sh
ou
ld b
e at their d
estinatio
ns
47
jonkv@ida
Logistics Dom
ain in PDDL
�F
irst attemp
t at a log
istics do
main
:�
(de
fine
(do
ma
inlo
gistics)(: p
red
icate
s(in
city?L
?C) (a
t?X
?L) (in
?P ?V
))
(:actio
nlo
ad
:pa
ram
ete
rs(?P
?V ?L
):p
reco
nd
ition
(an
d(a
t ?P ?L
) (at ?V
?L))
:effe
ct(a
nd
(in ?P
?V) (n
ot
(at ?P ?L
)))
(:actio
nd
rive-tru
ck:p
ara
me
ters
(?T ?L
1 ?L2 ?C
):p
reco
nd
ition
(an
d(in
city?L
1 ?C) (in
city?L
2 ?C) (a
t ?T ?L
1)):e
ffect
(an
d(n
ot
(at ?T ?L
1)) (at ?T ?L
2)))…
)P
rob
lem
: No
typ
e ch
eck
ing
!•
loa
d p
lan
e7 o
nto
city5 a
t truck
2•
drive
city9
from
truck
1 to a
irpla
ne
2
48
jonkv@ida
Type Predicates
�S
olu
tion
1: Typ
e pred
icates�
(de
fine
(do
ma
inlo
gistics)(: p
red
icate
s(in
city?L
?C) (at ?X
?L) (in
?P ?V
)(lo
catio
n?L
) (airp
ort
?A) (ve
hicle
?V) (tru
ck?T
)(a
irpla
ne
?P) (p
ack
ag
e?P
))(: a
ction
loa
d:p
ara
me
ters
(?P ?V
?L)
:pre
con
ditio
n(a
nd
(pa
cka
ge
?P) (ve
hicle
?V) (lo
catio
n ?L
)(at ?P
?L) (at ?V
?L))
:effe
ct(a
nd
(in ?P
?V) (n
ot
(at ?P ?L
))))…
)
�(d
efin
e(p
rob
lem
MyL
ogisticsP
rob
lem)
(:do
ma
inlo
gistics)(:o
bje
ctsp
lane1 p
lane2 tru
ck1 tru
ck2 tru
ck3 lo
c1 loc2 …
)(:in
it(in
citylo
c1 linkö
pin
g) …
(pla
ne
plan
e1) (pla
ne
plan
e2)(lo
catio
nlo
c1) (loca
tion
loc2)
…))
49
jonkv@ida
Explicit Types
�S
olu
tion
2: "Tru
e" types (m
any m
od
ern p
lann
ers)�
(de
fine
(do
ma
inlo
gistics)(: re
qu
irem
en
ts:typ
ing
)(:typ
es
truck
airp
lan
e –
veh
iclea
irpo
rt –lo
catio
n
pa
cka
ge
veh
icle lo
catio
n city
(: pre
dica
tes
(incity
?L –
loca
tion
?C –
city)(a
t?X
–p
ack
ag
e?L
–lo
catio
n)
(in?P
–p
ack
ag
e?V
–ve
hicle
))(:a
ction
loa
d:p
ara
me
ters
(?P –
pa
cka
ge
?V –
veh
icle?L
–lo
catio
n)
:pre
con
ditio
n(a
nd
(at
?P ?L
) (at
?V ?L
)):e
ffect
(an
d(in
?P ?V
) (no
t(a
t?P
?L)))
…)
�(d
efin
e(p
rob
lem
MyL
ogisticsP
rob
lem)
(: do
ma
inlo
gistics)(:o
bje
ctsp
lane1 p
lane2 –
airp
lan
etru
ck1 tru
ck2 tru
ck3 –
truck
loc1 lo
c2 –lo
catio
n…
)
•U
nu
sua
l syn
tax
:su
btyp
e sub
type …
-su
pertyp
e•
All “to
p-level” typ
es mu
st be
declared
last!
51
jonkv@ida
The 4-Operator B
locks World
�P
lann
ing
will b
e dem
on
strated u
sing
the B
lock
s Wo
rld�
A m
ore co
mm
on
variation
, with
4 o
pe
rato
rs
▪(p
icku
p?x)
–takes ?x fro
m th
e table
▪(p
utd
ow
n?x)
–p
uts ?x o
n th
e table
▪(u
nsta
ck?x ?y)
–takes ?x fro
m o
n to
p o
f ?y
▪(sta
ck?x ?y)
–p
uts ?x o
n to
p o
f ?y
▪P
lans are tw
ice as lon
g, bu
t each o
perato
r is less com
plex
�A
dd
ition
al pred
icates used
to avo
id q
uan
tification
▪(o
nta
ble
?x)–
?x is on
the tab
le
▪(cle
ar
?x):–
?x is an o
rdin
ary b
lock
wh
ose to
p is fre
e
▪(h
old
ing
?x)–
the ro
bo
t is ho
ldin
g blo
ck ?x
▪(h
an
de
mp
ty)–
the ro
bo
t is no
t ho
ldin
g a blo
ck
pic
ku
p(B
)p
utd
ow
n(A
)u
nsta
ck
(A,C
)sta
ck
(B,C
)
CB
A
52
jonkv@ida
State Space
�A
ny classical p
lann
ing
pro
blem
corresp
on
ds to
a state
spa
ce�
Th
is state space is a d
irecte
d g
rap
h
�E
ach n
od
eis a w
orld
state
�E
ach d
irecte
d e
dg
eco
rrespo
nd
s to an
exe
cuta
ble
actio
n
A
BC
D
A
BC
DA
B
CD
A
BC
D
ABC
DA
BC
D
AB
CD
A sm
all p
art
of a
BW
state space,
for a tin
y pro
blem
in
stance.
No
tice that th
e BW
la
cks d
ea
d e
nd
s.
Th
is is no
ttru
efo
r all do
main
s!
53
jonkv@ida
Sequential Plans
�F
or sim
ple se
qu
en
tial
(no
t con
curren
t or tim
ed) p
lans:
�A
plan
is a pa
thin
the state sp
acefro
m th
e initia
l state
to a
ny
of th
e go
al sta
tes
(recall that m
any states m
ay satisfy the go
al)!
A
BC
D
A
BC
DA
B
CD
A
BC
D
ABC
DA
BC
D
AB
CD
So h
ow
do
we fin
dsu
ch a p
ath?
Forward State-Space Search
(Progression Search
)
55
jonkv@ida
Progression Search 1
�P
rog
ressio
n(F
orw
ard-ch
ainin
g):
�“If I’m
at th
is state n
ow
,w
ha
t actio
ns a
re ap
plica
ble,
an
d w
here w
ill they ta
ke me?”
�B
egin at th
e initial state
�Search
forw
ard, h
op
ing to
find
a goal state
�E
xamp
le:�
Initial state
Go
al state
CB
A
DC B A
D
56
jonkv@ida
Progression Search 2
�F
ou
r po
tential w
ays of ach
ieving
the go
al:�
1) We m
ay already h
ave achieved
the go
al (no
t true h
ere)
�2) U
nstack
(A,C
), then
con
tinu
e
�3) P
icku
p(B
), then
con
tinu
e
�4
) Pick
up
(D), th
en co
ntin
ue
ABCD
A
BC
DA
B
CD
A
BC
D
A
BC
D
57
jonkv@ida
Progression Search 3
�H
ypo
thetically: S
up
po
se we u
nstack
(A,C
). Wh
at then
?▪
1) Alread
y achieved
the go
al? No
.
▪2) M
ay stack(A
,C) –
cycle, skip
this.
▪3) M
ay stack(A
,B), co
ntin
ue
▪4
) May stack
(A,D
), con
tinu
e
▪5) M
ay pu
tdo
wn
(A), co
ntin
ue
ABCD
A
BC
DA
B
CD
A
BC
D
A
BC
D
A
BC
D
ABC
DA
BC
D
AB
CD
58
jonkv@ida
Progression Search 4
�R
esult: A
sea
rch tre
estru
cture
�O
ne start state, p
ossib
ly man
y goal states
▪E
ach n
od
e is associated
with
a search state (in
this case =
wo
rld state)
▪B
ranch
ing ru
le: Given
a no
de,
there is o
ne o
utgo
ing b
ranch
for each
app
licable actio
n
GG
59
jonkv@ida
Depth First
�R
emain
ing
cho
ice: sea
rch a
lgo
rithm
�D
ecides w
hich
action
s to “sim
ulate”, in
wh
ich o
rder
�O
ne p
ossib
ility: Dep
th first
cyclecycle
GG
60
jonkv@ida
Breadth First
�A
no
ther p
ossib
ility: Bread
th first
▪Sam
e search tree, d
ifferent search
ord
er
▪P
lans w
ill be o
ptim
al in th
e nu
mb
er of actio
ns
▪So
metim
es faster, som
etimes slo
wer, u
sually to
o m
uch
mem
ory
▪C
an also
use iterative d
eepen
ing an
d o
ther b
lind
search m
etho
ds G
G
The D
ifficulty of Planning
62
jonkv@ida
Forward-chaining Search
�S
eems in
tuitive –
bu
t wh
at are the resu
lts?�
Mo
vie 4 / n
o-ru
les
�T
his search
pro
cedu
re is “blin
d”: It ju
st tries all variation
s!
�Is
this really a p
rob
lem? C
om
pu
ters are fast!�
Wh
at if we h
ave 100
po
ssible actio
ns in
each step
, no
t 4 o
r 5?
�W
hat if a p
lan req
uires 10
0 step
s?
▪10
0 p
lans h
aving 1 step
▪10
00
0 p
lans h
aving 2 step
s
▪1 0
00
00
0 p
lans h
aving 3 step
s
▪10
0 0
00
00
0 p
lans h
aving 4
steps
▪10
00
0 0
00
00
0 p
lans h
aving 5 step
s
▪…
�E
mergen
cy Service Lo
gistics / 20 h
elicop
ters, 100
locatio
ns 20
0 b
oxes:
▪7 * 10
415
po
tential p
lans…
700
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
0 p
lans –
bu
t com
pu
ters are fast…
Assu
me 10
20(10
0 b
illion
billio
n) p
lans p
er secon
d:
200
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
years –b
ut
we h
ave mu
ltiple co
res…
Su
pp
ose every p
article in th
e un
iverse is a com
pu
ter:20
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
0 years
63
jonkv@ida
Hopeless?
�Is th
ere still ho
pe fo
r plan
nin
g?
�O
f cou
rse there is!
�O
ur trivial p
lann
ing m
etho
d u
ses blin
dsearch
–tries e
very
thin
g!
�W
ew
ou
ldn
’t cho
ose su
ch silly actio
ns –
so w
hy sh
ou
ld th
e com
pu
ter?
�P
lan
nin
g is p
art o
f Artificia
l Inte
llige
nce
!�
Develo
pin
g meth
od
s to ju
dg
ew
hat actio
ns are p
rom
ising
given go
als
�R
apid
pro
gress in th
e last decad
e
▪W
e are still far from
true h
um
an-level u
nd
ersta
nd
ing
▪B
ut p
lann
ers are tho
usan
ds o
f times faster th
an 10
-15 years ago,
even o
n th
e same h
ardw
are,d
espite b
eing m
uch
mo
re ex
pre
ssive
▪A
very a
ctiveresearch
area
Heuristic Progression
Search
and D
omain
-Depen
dent G
uidance
65
jonkv@ida
Heuristic Search (1)
�O
ne ap
pro
ach: h
eu
ristic fun
ction
s�
For each
no
de, (u
nd
er)estimates th
e cost to
reach th
e goal
�U
sually n
ot p
erfe
ct (can’t alw
ays sho
w th
e be
stw
ay to go
)
▪E
xamp
le: Can
’t always ch
oo
se the o
ptim
al blo
ck to
un
stack
▪W
ou
ld b
e equ
ivalent to
solvin
g the o
riginal p
lann
ing p
rob
lem!
�…
togeth
er with
he
uristic se
arch
me
tho
ds
�A
*, hill clim
bin
g, man
y specialized
meth
od
s
66
jonkv@ida
Heuristic Search (2)
�A
very simp
le do
ma
in-in
de
pe
nd
en
th
euristic:
�C
ou
nt th
e nu
mb
er of p
redicates w
ith th
e “wro
ng” valu
e
▪N
ote: O
nly lo
cal
info
rmatio
n u
sed (cu
rren
tstate)
A
BC
AB
C A
BC
7
on
tab
le(C
)o
n(A
,C)
¬o
n(C
,A)
¬o
n(A
,B)
clea
r(A)
clea
r(B)
¬cle
ar(C
)
CAB
-o
n(A
,C)
-cle
ar(A
)-
¬cle
ar(C
)+
ho
ldin
g(A
)+
ha
nd
em
pty
-cle
ar(B
)+
¬o
nta
ble
(B)
+ h
old
ing
(B)
+ h
an
de
mp
ty
9
ABC
4
AB
C
6
-¬
on
(A,B
)-
ho
ldin
g(A
)-
ha
nd
em
pty
+ cle
ar(A
)
-h
old
ing
(A)
-h
an
de
mp
ty+
clea
r(A)
+ o
nta
ble
(A)
6
67
jonkv@ida
Heuristic Search (3)
�A
pe
rfect so
lutio
n? N
o!
▪O
ften u
seful co
mp
ared to
blin
d search
▪M
od
ern h
euristics are m
ore so
ph
isticated –
can still b
e "mislead
ing"
A
BC
DA
B
CD
A
BC
D
A
BC
D
ABCD
5
859
on
tab
le(B
)¬
on
(A,B
)o
n(A
,C)
¬o
n(B
,C)
clea
r(B)
BACD
6
BAC
D
6
-o
n(A
,C)
+ ¬
clea
r(A)
+ cle
ar(C
)+
¬h
an
de
mp
ty+
ho
ldin
g(A
)
68
jonkv@ida
Heuristic Search (4)
�H
and
-tailored
do
ma
in-d
ep
en
de
nt
heu
ristics:▪
2 actio
ns
for an
y blo
ck th
at is no
t "on
" its destin
ation
,o
r that is ab
ove so
me o
ther
blo
ck th
at is no
t on
itsd
estinatio
n
▪1 a
ction
for an
y blo
ck w
e are ho
ldin
g, to p
ut it d
ow
n
▪If w
e ho
ld a b
lock
wh
ose d
estinatio
n is n
ot yet read
y,w
e mu
st pu
t it on
the tab
le –an
d later, 2 a
ction
sto
mo
ve it again
A
BC
DA
B
CD
A
BC
D
A
BC
D
ABCD
Mu
st mo
ve B
; ho
ldin
g A
2*1 + 1+
0 =
3
Mu
st mo
ve A
; ho
ldin
g B
; de
stn
ot
rea
dy
2*1+ 1+
2 = 5
Mu
st mo
ve A
, B; h
old
ing
D2*2 +
1+2 =
7
Mu
st mo
ve A
, B2*2 +
0+
0 =
4
69
jonkv@ida
Dom
ain-Dependent G
uidance
�O
ther fo
rms o
f do
ma
in-sp
ecific
gu
idan
ce:�
Ru
les
that h
elp th
e plan
ner reco
gnize "stu
pid
" action
s
▪"D
on
't un
load
pack
ages befo
re you
reach th
e destin
ation
"
▪"D
on
't drive to
a destin
ation
wh
ere there's n
oth
ing to
pick
up
"
�So
metim
es a small set o
f com
mo
n se
nse
rules w
ill suffice
▪E
xamp
les later –T
AL
plan
ner
A
BC
DA
B
CD
A
BC
D
A
BC
D
ABCD
Mo
ves a blo
ck th
at had
to b
e mo
ved,
in o
rder to
pu
t som
ethin
g else on
C.
GO
OD
.
B w
as mo
ved, b
ut it d
id n
ot b
lock
an
ythin
g and
its destin
ation
is no
t yet read
y. BA
D.
As ab
ove. B
AD
.
Backw
ard State-Space Search
(Regression
Search)
71
jonkv@ida
Regression Search (1)
�S
earch m
etho
d #
2: Reg
ression
�“If th
is is the go
al,
wh
at a
ction
cou
ld I u
se to a
chieve p
art o
f the go
al,
an
d w
ha
t wo
uld
I ha
ve to d
o b
efore th
at?”
�B
egin at th
e goal
�Search
back
ward
s, ho
pin
g to fin
d th
e initial state
�E
xamp
le:�
Initial state
Go
al
CB
A
DC B A
D
72
jonkv@ida
Regression Search (2)
�T
hree p
oten
tial ways o
f achievin
g th
e goal:
�1) It m
ight alread
y have b
een ach
ieved –
no
t in th
is case
�2) T
he last actio
n w
as stack
(A,B
)
▪B
efore th
is, we’d
have th
e same situ
ation
,excep
t A w
ou
ld b
e held
.
�3) T
he last actio
n w
as pu
tdo
wn
(D)
▪B
efore, D
wo
uld
have b
een h
eld.
ABCD
A
BC
D
A
BCD
ABC
D
73
jonkv@ida
Regression Search (3)
�H
ow
may w
e achieve th
e state wh
ere we’re h
old
ing A
?�
pick
up
(A)
�u
nstack
(A,D
)
�u
nstack
(A,B
)▪
Cycle!
ABCD
A
BC
D
A
BCD
ABC
D
ABCD A
BCD
A
BCD
74
jonkv@ida
No Current State during Search!
�F
orw
ard
sea
rchh
as a "curren
t state"
�B
ack
wa
rds se
arch
has a "cu
rrent go
al"
goal
pu
tdo
wn
(D)
un
stack(D
,F)
g1g2
initial
s2stack
(A,C
)u
nstack
(A,B
)s1
75
jonkv@ida
Backw
ard and Forward Search
FO
RW
AR
D S
EA
RC
H
�P
rob
lematic w
hen
:
�T
here are m
any a
pp
licab
leactio
ns
in th
e "average state"�
high
forw
ard b
ranch
ing facto
r�
need
guid
ance
�Y
ou
kn
ow
if an actio
n is ap
plicab
le,b
ut n
ot if it w
ill con
tribu
teto
the go
al
BA
CK
WA
RD
SE
AR
CH
�P
rob
lematic w
hen
:
�T
here are m
any re
lev
an
tactio
ns
for th
e "average goal"
�h
igh b
ackw
ard b
ranch
ing facto
r�
need
guid
ance
�Y
ou
kn
ow
if an actio
n
con
tribu
tes to th
e goal,
bu
t no
t if you
can ach
ieve its p
recon
ditio
ns
�B
lind
back
ward
searchis g
en
era
llyb
etter than
blin
d fo
rward
search:
Relevan
ce ten
ds
to p
rovid
eb
etter guid
ance th
an ap
plicab
ility
�B
ut h
euristics are still n
eeded
77
jonkv@ida
Background 1
�S
tate-space p
lann
ing
com
mits
imm
ediately to
actio
n o
rde
r�
Se
lects
an actio
n th
at seems “u
seful”
▪A
ccord
ing to
heu
ristics
▪A
ccord
ing to
relevan
ce, in regressio
n p
lann
ing
�P
uts it in
its fina
l pla
cein
the p
lan
�C
on
tinu
es from
the resu
lting state (p
rogressio
n)…
�…
Or fro
m th
e resultin
g goal (regressio
n)
goal
pu
tdo
wn
(D)
un
stack(D
,F)
g1g2
initial
s2stack
(A,C
)u
nstack
(A,B
)s1
78
jonkv@ida
Background 2: Exam
ple
�H
euristic fo
rward
-chain
ing
migh
t beg
in as fo
llow
s:
�L
uck
ily, the h
euristic alw
ays selected u
sefu
lactio
ns
▪P
ickin
g up
b1 is n
ecessary, drivin
g is necessary, p
uttin
g b1 d
ow
n is n
ecessary
�B
ut w
e still have a p
rob
lem!
▪A
t som
e time, th
e rob
ot also
ha
sto
pick
up
blo
ck b
2
▪T
he b
est plan
wo
uld
be to
do
that righ
t after pick
up
(b1,A
):T
he ro
bo
t has tw
o arm
s
▪C
an't in
sert a n
ew
actio
nth
ere in state sp
ace search!
pu
t(b1, B
)e
ffects:
at(b1,B
),¬
ho
ldin
g(b
1)
We
wa
nt:
at(b1,B
)at(b
2,B)
We
ha
ve:
rob
ot-at(A
)at(b
1,A)
at(b2,A
)
drive(A
,B)
effe
cts:¬
rob
ot-at(A
),ro
bo
t-at(B)
pick
up
(b1,A
)e
ffects:
ho
ldin
g(b
1),¬
at(b1,A
)
rob
ot-at(A
)h
old
ing
(b1)
at(b2,A
)
rob
ot-at(B
)h
old
ing
(b1)
at(b2,A
)
rob
ot-at(B
)at(b
1,B)
at(b2,A
)
79
jonkv@ida
Background 3: Alternative A
�T
he p
lann
er can b
acktrack
, wastin
g som
e of its effo
rt,o
r con
tinu
e from
wh
ere it is:
pu
t(b1, B
)effects:
at(b1,B
),¬
ho
ldin
g(b
1)
We w
ant:
at(b1,B
)at(b
2,B)
We h
ave:ro
bo
t-at(A)
at(b1,A
)at(b
2,A)
pu
t(b2, B
)effects:
at(b2,B
),¬
ho
ldin
g(b
2)
drive(A
,B)
effects:¬
rob
ot-at(A
),ro
bo
t-at(B)
pick
up
(b1,A
)effects:
ho
ldin
g(b
1),¬
at(b1,A
)
pick
up
(b2,A
)effects:
ho
ldin
g(b
2),¬
at(b2,A
)
drive(B
,A)
effects:¬
rob
ot-at(B
), ro
bo
t-at(A)
drive(A
,B)
effects:¬
rob
ot-at(A
), ro
bo
t-at(B)
rob
ot-at(A
)h
old
ing
(b1)
at(b2,A
)
rob
ot-at(B
)h
old
ing
(b1)
at(b2,A
)
rob
ot-at(B
)at(b
1,B)
at(b2,A
)
rob
ot-at(A
)at(b
1,B)
at(b2,A
)
rob
ot-at(A
)at(b
1,B)
ho
ldin
g(b
2)
rob
ot-at(B
)at(b
1,B)
ho
ldin
g(b
2)
rob
ot-at(B
)at(b
1,B)
at(b2,B
)
Resu
lts in a su
bo
ptim
alp
lan! W
e cou
ldh
ave do
ne
it in 5 actio
ns.
80
jonkv@ida
Background 4: W
hat We Prefer
We w
ant:
at(b1,B
)at(b
2,B)
We h
ave:ro
bo
t-at(A)
at(b1,A
)at(b
2,A)
pick
up
(b1,A
)effects:
ho
ldin
g(b
1),¬
at(b1,A
)
Since th
e first three actio
ns w
e fou
nd
were actu
ally usefu
l for th
e goal,
we w
ou
ld p
refer if we co
uld
just slid
e the last o
nes o
ver…
rob
ot-at(A
)h
old
ing
(b1)
at(b2,A
)
pu
t(b1, B
)effects:
at(b1,B
),¬
ho
ldin
g(b
1)
drive(A
,B)
effects:¬
rob
ot-at(A
),ro
bo
t-at(B)
rob
ot-at(B
)h
old
ing
(b1)
at(b2,A
)
rob
ot-at(B
)at(b
1,B)
at(b2,A
)
pick
up
(b2,A
)effects:
ho
ldin
g(b
2),¬
at(b2,A
)
rob
ot-at(A
)at(b
1,B)
ho
ldin
g(b
2)
…an
d th
en in
sert ano
ther p
icku
p actio
n in
betw
een!
Th
is is no
lon
ger state-space search
!R
equ
ires differen
t techn
iqu
es…
Gen
erating Partial-O
rder Plans
82
jonkv@ida
No Current State during Search!
�F
orw
ard
sea
rchh
as a "curren
t state"
�B
ack
wa
rds se
arch
has a "cu
rrent go
al"
�W
ith p
artia
l-ord
er p
lan
s: No
“curren
t” state or go
al!�
Wh
at is true after stack
(A,B
) belo
w?
▪D
ep
en
ds
on
the o
rder in
wh
ich o
the
ractio
ns are execu
ted
▪C
ha
ng
es
if we in
sert ne
wactio
ns b
efo
restack
(A,B
)!
stack(A
,B)
pu
tdo
wn
(D)
un
stack(D
,F)
goal
pu
tdo
wn
(D)
un
stack(D
,F)
g1g2
initial
s2stack
(A,C
)u
nstack
(A,B
)s1
goalactio
nin
itaction
83
jonkv@ida
Search Nodes are Partial Plans
�N
o cu
rrent state �
sea
rch n
od
es
can’t co
rrespo
nd
to sta
tes!
�A
no
de in
the search
space h
as to b
e a pa
rtial p
lan
�E
ach su
ccesso
ris a m
od
ified, re
fine
dp
artial plan
�U
se search strategies, b
acktrack
ing, h
euristics, ... to
search th
issp
ace!
initial search
no
de
initactio
ngo
alaction
initactio
ngo
alaction
pu
tdo
wn
(D)
initactio
ngo
alaction
un
stack(B
,C)
initactio
ngo
alaction
pu
tdo
wn
(D)
pu
tdo
wn
(K)
Th
is is on
e form
of
”plan
-space” p
lann
ing
!
84
jonkv@ida
POCL vs Forw
ard-Chaining
�W
hat is th
e initia
lsearch
no
de?
�Fo
rward
state space search
: Th
e initia
l state
�P
OC
L: T
he in
itial p
lan
, con
sisting o
f:
▪A
special in
itial a
ction
wh
ose effects sp
ecify the in
itial state
▪A
special g
oa
l actio
nw
ho
se preco
nd
ition
s specify th
e goal
▪A
pre
ced
en
ce co
nstra
int: th
e initial actio
n is b
efore th
e goal actio
n
at(b1, B)
at(b2, B)
goalactio
nin
itaction
at(b1, A)
at(b2, A)
robot-at(A)
85
jonkv@ida
POCL vs Forw
ard-Chaining
�W
hat are th
e succe
ssors
of a search
no
de?
�P
rogressio
n: O
ne su
ccessor p
er action
executab
le in th
e curren
t state
▪P
recon
ditio
ns satisfied
, effects con
sistent, …
�P
OC
L: O
ne su
ccessor fo
r every way th
at a flaw
in th
e plan
can b
e fixed
▪E
very way o
f sup
po
rting an
op
en
go
al
▪E
very way o
f remo
ving a th
rea
t
initial search
no
de
initactio
ngo
alaction
initactio
ngo
alaction
pu
tdo
wn
(D)
initactio
ngo
alaction
un
stack(B
,C)
86
jonkv@ida
Flaw Type 1: O
pen Goals
�O
pen
goal:
�A
n actio
n a
has a p
recon
ditio
n p
that w
e haven
’td
ecided
ho
w to
establish
(it has n
o in
com
ing ca
usa
l link
)
�Fo
r examp
le, the p
recon
ditio
ns o
f the g
oa
l actio
n!
�T
o reso
lve the flaw
:�
Fin
d an
action
bth
at causes p
to b
ecom
e true
▪C
an b
e a new
action
▪C
an b
e an actio
n a
lread
yin
the p
lan,
if we can
make su
re it preced
es a
�C
reate a cau
sal lin
k
Partial o
rder! T
his w
as no
t p
ossib
le in b
ackw
ard search
…
Eve
n if th
ere
is alre
ad
ya
n a
ction
tha
t cau
ses p
,yo
u ca
n still a
dd
a n
ew
actio
n th
at a
lsoca
use
s p!
at(b1, B)
at(b2, B)go
alaction
87
jonkv@ida
Resolving O
pen Goals 1
�In
this in
itial Blo
cks W
orld
plan
we h
ave sixo
pen
goals
�W
e can ch
oo
se to fin
d su
pp
ort fo
r clea
r(A):
▪F
rom
the in
itaction
▪F
rom
a new
instan
ce of u
nstack
(B,A
), un
stack(C
,A), o
r un
stack(D
,A)
▪F
rom
a new
instan
ce of stack
(A,B
), stack(A
,C), stack
(A,D
), or p
utd
ow
n(A
)
�W
e can ch
oo
se to fin
d su
pp
ort fo
r on
(A,B
):
▪O
nly fro
m a n
ew in
stance o
f stack(A
,B)
�…
on(A,B)
on(B,C)
on(C,D)
ontable(D)
handempty
clear(A)
clear(A)
ontable(A)
clear(B)
ontable(B)
clear(C)
on(C,D)
ontable(D)
handempty
initaction
goalaction
We
ha
ven
't de
cide
d h
ow
to a
chie
ve a
ny o
f the
se
six go
als!
88
jonkv@ida
Resolving O
pen Goals 2
�S
up
po
se we a
dd
stack
(A,B
)to
sup
po
rt (ach
ieve
) on
(A,B
)�
Mu
st add
a cau
sal lin
kfo
r on
(A,B
)
▪D
ashed
line
�M
ust a
lsoad
d p
receden
ce con
straints
�T
he p
lan lo
ok
sto
tally ord
ered
▪B
ecause it actu
ally on
ly has o
ne “real” actio
n…
holding(A)
clear(B)
¬holding(A)
clear(A)
ontable(A)
clear(B)
ontable(B)
clear(C)
on(C,D)
ontable(D)
handempty
initaction
on(A,B)
on(B,C)
on(C,D)
ontable(D)
handempty
clear(A)
goalaction
¬clear(B
)
on(A,B)
handempty
clear(A)
stack(A,B)
Ca
usa
l link
says:T
his in
stance o
f stack(A
,B)
is respo
nsib
le for
achievin
g on
(A,B
)fo
r the go
alaction
89
jonkv@ida
Resolving O
pen Goals 3
�N
ow
we h
ave 7 op
en go
als�
We can
cho
ose to
find
sup
po
rt for clear(A
):
▪F
rom
the in
itaction
▪F
rom
the in
stance o
f stack
(A,B
)th
at we ju
st add
ed
▪F
rom
a ne
win
stance o
f stack
(A,B
), stack(A
,C), stack
(A,D
), or p
utd
ow
n(A
)
▪F
rom
a ne
win
stance o
f un
stack(B
,A), u
nstack
(C,A
), or u
nstack
(D,A
)
�…
holding(A)
clear(B)
¬holding(A)
clear(A)
ontable(A)
clear(B)
ontable(B)
clear(C)
on(C,D)
ontable(D)
handempty
initaction
on(A,B)
on(B,C)
on(C,D)
ontable(D)
handempty
clear(A)
goalaction
¬clear(B
)
on(A,B)
handempty
clear(A)
stack(A,B)
90
jonkv@ida
Flaw Type 2: Threats
�S
econ
d flaw
type: A
thre
at
▪in
itaction
sup
po
rtsclear(B
) for stack
(A,B
) –th
ere’s a causal lin
k
▪p
icku
p(B
) de
lete
sclear(B
), and
may o
ccur b
etw
ee
nin
itaction
and
stack(A
,B)
▪So
we can
’t be certain
that clear(B
) still ho
lds w
hen
stack(A
,B) starts!
holding(A)
clear(B)
¬holding(A)
clear(A)
ontable(A)
clear(B)
ontable(B)
clear(C)
on(C,D)
ontable(D)
handempty
initaction
on(A,B)
on(B,C)
on(C,D)
ontable(D)
handempty
clear(A)
goalaction
¬clear(B
)
on(A,B)
handempty
clear(A)
stack(A,B)
holding(B)
clear(C)
¬holding(B)
¬clear(C
)
on(B,C)
handempty
clear(B)
stack(B,C)
handempty
clear(B)
¬handempty
¬clear(B
)
¬ontable(B)
holding(B)
pickup(B)
91
jonkv@ida
Resolving Threats 1
�H
ow
to m
ak
e su
reth
at clear(B) h
old
s wh
en stack
(A,B
) starts?�
Altern
ative 1: Th
e action
that d
isturb
sth
e preco
nd
ition
is placed
afte
rth
e action
that h
as
the p
recon
ditio
n
▪O
nly p
ossib
le if the resu
lting p
artial ord
er is con
sistent (acyclic)!
holding(A)
holding(A)
holding(A)
holding(A)
clear(B)
clear(B)
clear(B)
clear(B)
¬holding(A)
¬holding(A)
¬holding(A)
¬holding(A)
clear(A)
clear(A)
clear(A)
clear(A)
ontable
ontable
ontable
ontable(A)(A)(A)(A)
clear(B)
clear(B)
clear(B)
clear(B)
ontable
ontable
ontable
ontable(B)(B)(B)(B)
clear(C)
clear(C)
clear(C)
clear(C)
on(C,D)
on(C,D)
on(C,D)
on(C,D)
ontable
ontable
ontable
ontable(D)(D)(D)(D)
handempty
handempty
handempty
handempty
initaction
on(A,B)
on(A,B)
on(A,B)
on(A,B)
on(B,C)
on(B,C)
on(B,C)
on(B,C)
on(C,D)
on(C,D)
on(C,D)
on(C,D)
ontable
ontable
ontable
ontable(D)(D)(D)(D)
handempty
handempty
handempty
handempty
clear(A)
clear(A)
clear(A)
clear(A)
goalaction
¬clear(B
)¬clear(B
)¬clear(B
)¬clear(B
)
on(A,B)
on(A,B)
on(A,B)
on(A,B)
handempty
handempty
handempty
handempty
clear(A)
clear(A)
clear(A)
clear(A)
stack(A,B)
holding(B)
holding(B)
holding(B)
holding(B)
clear(C)
clear(C)
clear(C)
clear(C)
¬¬¬ ¬holding(B)
holding(B)
holding(B)
holding(B)
¬¬¬ ¬clear(C
)clear(C
)clear(C
)clear(C
)
on(B,C)
on(B,C)
on(B,C)
on(B,C)
handempty
handempty
handempty
handempty
clear(B)
clear(B)
clear(B)
clear(B)
stack(B,C)handempty
handempty
handempty
handempty
clear(B)
clear(B)
clear(B)
clear(B)
¬¬¬ ¬handempty
handempty
handempty
handempty
¬clear(B
)¬clear(B
)¬clear(B
)¬clear(B
)
¬¬¬ ¬ontable
ontable
ontable
ontable(B(B(B (B))) )
holding(B)
holding(B)
holding(B)
holding(B)
pickup(B)
92
jonkv@ida
Resolving Threats 2
�A
lternative 2:
▪T
he actio
n th
at distu
rbs
the p
recon
ditio
nis p
laced b
efo
reth
e action
that su
pp
orts
the p
recon
ditio
n
▪O
nly p
ossib
le if the resu
lting p
artial ord
er is con
sistent –
no
t in th
is case!
holding(A)
holding(A)
holding(A)
holding(A)
clear(B)
clear(B)
clear(B)
clear(B)
¬holding(A)
¬holding(A)
¬holding(A)
¬holding(A)
clear(A)
clear(A)
clear(A)
clear(A)
ontable
ontable
ontable
ontable(A)(A)(A)(A)
clear(B)
clear(B)
clear(B)
clear(B)
ontable
ontable
ontable
ontable(B)(B)(B)(B)
clear(C)
clear(C)
clear(C)
clear(C)
on(C,D)
on(C,D)
on(C,D)
on(C,D)
ontable
ontable
ontable
ontable(D)(D)(D)(D)
handempty
handempty
handempty
handempty
initaction
on(A,B)
on(A,B)
on(A,B)
on(A,B)
on(B,C)
on(B,C)
on(B,C)
on(B,C)
on(C,D)
on(C,D)
on(C,D)
on(C,D)
ontable
ontable
ontable
ontable(D)(D)(D)(D)
handempty
handempty
handempty
handempty
clear(A)
clear(A)
clear(A)
clear(A)
goalaction
¬clear(B
)¬clear(B
)¬clear(B
)¬clear(B
)
on(A,B)
on(A,B)
on(A,B)
on(A,B)
handempty
handempty
handempty
handempty
clear(A)
clear(A)
clear(A)
clear(A)
stack(A,B)
holding(B)
holding(B)
holding(B)
holding(B)
clear(C)
clear(C)
clear(C)
clear(C)
¬¬¬ ¬holding(B)
holding(B)
holding(B)
holding(B)
¬¬¬ ¬clear(C
)clear(C
)clear(C
)clear(C
)
on(B,C)
on(B,C)
on(B,C)
on(B,C)
handempty
handempty
handempty
handempty
clear(B)
clear(B)
clear(B)
clear(B)
stack(B,C)
handempty
handempty
handempty
handempty
clear(B)
clear(B)
clear(B)
clear(B)
¬¬¬ ¬handempty
handempty
handempty
handempty
¬clear(B
)¬clear(B
)¬clear(B
)¬clear(B
)
¬¬¬ ¬ontable
ontable
ontable
ontable(B(B(B (B))) )
holding(B)
holding(B)
holding(B)
holding(B)
pickup(B)
93
jonkv@ida
Resolving Threats 3
�O
nly ca
usa
l link
scan
be th
reatened
!�
Belo
w, p
icku
p(B
) do
es no
tth
reaten th
e preco
nd
clear(B) o
f stack(A
,B)
▪W
e haven
’t decid
ed yet h
ow
to ach
ieve clear(B): N
o in
com
ing cau
sal link
▪So
we can
’t claim th
at its achievem
ent is th
reatened
!
holding(A)
holding(A)
holding(A)
holding(A)
clear(B)
clear(B)
clear(B)
clear(B)
¬holding(A)
¬holding(A)
¬holding(A)
¬holding(A)
clear(A)
clear(A)
clear(A)
clear(A)
ontable
ontable
ontable
ontable(A)(A)(A)(A)
clear(B)
clear(B)
clear(B)
clear(B)
ontable
ontable
ontable
ontable(B)(B)(B)(B)
clear(C)
clear(C)
clear(C)
clear(C)
on(C,D)
on(C,D)
on(C,D)
on(C,D)
ontable
ontable
ontable
ontable(D)(D)(D)(D)
handempty
handempty
handempty
handempty
initaction
on(A,B)
on(A,B)
on(A,B)
on(A,B)
on(B,C)
on(B,C)
on(B,C)
on(B,C)
on(C,D)
on(C,D)
on(C,D)
on(C,D)
ontable
ontable
ontable
ontable(D)(D)(D)(D)
handempty
handempty
handempty
handempty
clear(A)
clear(A)
clear(A)
clear(A)
goalaction
¬clear(B
)¬clear(B
)¬clear(B
)¬clear(B
)
on(A,B)
on(A,B)
on(A,B)
on(A,B)
handempty
handempty
handempty
handempty
clear(A)
clear(A)
clear(A)
clear(A)
stack(A,B)
holding(B)
holding(B)
holding(B)
holding(B)
clear(C)
clear(C)
clear(C)
clear(C)
¬¬¬ ¬holding(B)
holding(B)
holding(B)
holding(B)
¬¬¬ ¬clear(C
)clear(C
)clear(C
)clear(C
)
on(B,C)
on(B,C)
on(B,C)
on(B,C)
handempty
handempty
handempty
handempty
clear(B)
clear(B)
clear(B)
clear(B)
stack(B,C)handempty
handempty
handempty
handempty
clear(B)
clear(B)
clear(B)
clear(B)
¬¬¬ ¬handempty
handempty
handempty
handempty
¬clear(B
)¬clear(B
)¬clear(B
)¬clear(B
)
¬¬¬ ¬ontable
ontable
ontable
ontable(B(B(B (B))) )
holding(B)
holding(B)
holding(B)
holding(B)
pickup(B)
94
jonkv@ida
The PSP Procedure
�P
lan-S
pace P
lann
ing
:�
PSP
(π)
flaw
s�
Op
enG
oals(π
) ∪T
hreats(π
)if fla
ws
= ∅
then
return
π
sele
ctan
y flaw φ
∈fla
ws
resolvers
�F
ind
Reso
lvers(φ, π
)if reso
lvers=
∅th
en retu
rn failu
re // Ba
cktra
ck
no
nd
ete
rmin
istically
cho
ose
a resolver ρ
∈reso
lversπ
’ �R
efine(ρ
, π) // A
ctua
lly ap
ply th
e resolver
return
PSP
(π’)
end
�C
all PSP
(the in
itial plan
)
�P
SP is b
oth
sou
nd
and
com
plete
�It retu
rns a p
artially ord
ered so
lutio
n p
lan
▪A
ny to
tal ord
ering o
f this p
lan w
ill achieve th
e goals
No
t a back
trackin
g p
oin
t! Reso
lving
on
e flaw
cann
ot p
revent u
s from
resolvin
g o
ther flaw
s.
Th
is isa b
acktrack
ing
po
int. F
or exam
ple, a
resolver m
igh
t add
an actio
n th
at solves th
islo
cal flaw, b
ut th
at cann
ot b
e part o
f a solu
tion
.
Th
e plan
is com
plete exactly w
hen
th
ere are no
remain
ing
flaws (n
o o
pen
go
als, no
threats)
95
jonkv@ida
Conclusions
�P
artial-ord
er plan
nin
g d
ela
ys com
mitm
en
tto
action
ord
ering
�L
ow
er bran
chin
g factor
�M
ore efficien
t in so
me situ
ation
s
�M
any P
OP
plan
ners still a
ssum
e se
qu
en
tial e
xe
cutio
n�
Th
e inten
tion
was to
find
plan
s qu
ickly,
no
t to fin
d p
artially con
strained
plan
s
�P
OC
Lp
lann
ing
was
lon
gco
nsid
eredm
ore
efficie
nt
than
FC
�W
ith n
ew h
euristics, fo
rward
-chain
ing p
lann
ers too
k th
e lead
�A
t this p
oin
t, man
y of th
e fastest plan
ners are fo
rward
-chain
ing,
bu
t partial-o
rder p
lann
ers have also
imp
roved
96
jonkv@ida
Other Search Spaces for Planning
�M
an
y oth
er se
arch
spa
ces:
�P
ara
llel
pro
gression
and
regression
▪Start fro
m b
oth
end
s; ho
pe to
meet in
the m
idd
le
�E
nco
din
g: T
ransfo
rm in
to an
oth
er pro
blem
,
e.g. SAT
(bo
olean
satisfiability)
�…
�C
on
sult th
e literature fo
r mo
re info
rmatio
n!
98
jonkv@ida
Sequential Plans: Blocks W
orld
�S
equ
ential p
lans are O
K fo
r blo
cks w
orld
�T
here is o
nly o
ne ro
bo
t…
pic
ku
p(B
)
pu
tdo
wn
(A)
un
stac
k(A
,C)
stac
k(B
,C)
99
jonkv@ida
Sequential Plans: Logistics
�C
on
sider seq
uen
tialp
lann
ing
for L
og
istics:�
Tw
op
lans w
ith th
e same
nu
mb
ero
f action
s
�D
o yo
u see th
e differen
ce?
loa
d(P
1,T
1)
loa
d(P
2,T
1)
loa
d(P
3,T
1)
driv
e(T
1,A
,B)
un
loa
d(P
1,T
1)
driv
e(T
1,B
,C)
un
loa
d(P
2,T
1)
driv
e(T
1,C
,D)
un
loa
d(P
3,T
1)
loa
d(P
1,T
1)
loa
d(P
2,T
2)
loa
d(P
3,T
3)
driv
e(T
1,A
,B)
un
loa
d(P
1,T
1)
driv
e(T
2,A
,C)
un
loa
d(P
2,T
2)
driv
e(T
3,A
,D)
un
loa
d(P
3,T
3)
100
jonkv@ida
The Linear Plan: Logistics
�T
he first p
lan u
ses three tru
cks
�C
ou
ldeasily
be execu
tedco
ncu
rren
tly
�T
his is w
hat
we
wan
t!
�H
ow
sho
uld
sequ
ential p
lann
ers seeth
at we p
refer the first p
lan?
loa
d(P
1,T
1)
loa
d(P
2,T
1)
loa
d(P
3,T
1)
driv
e(T
1,A
,B)
un
loa
d(P
1,T
1)
driv
e(T
1,B
,C)
un
loa
d(P
2,T
1)
driv
e(T
1,C
,D)
un
loa
d(P
3,T
1)
loa
d(P
1,T
1)
loa
d(P
2,T
2)
loa
d(P
3,T
3)
driv
e(T
1,A
,B)
un
loa
d(P
1,T
1)
driv
e(T
2,A
,C)
un
loa
d(P
2,T
2)
driv
e(T
1,A
,D)
un
loa
d(P
3,T
3)
101
jonkv@ida
Plan Structures
�T
he p
lan
structu
resh
ou
ld d
epen
d o
n:
�T
he ab
ilities of th
e executio
n system
▪If
it canp
erform
man
ytask
s con
curren
tly, we
wan
tco
ncu
rren
tp
lans
▪O
therw
ise, we
migh
tb
e satisfiedw
ith sim
ple se
qu
en
ces
�T
he d
esired so
lutio
n p
rop
erties
▪Is tim
ing
imp
ortan
t, or can
it be ign
ored
?
�T
he ab
ilities of th
e algorith
ms
▪M
ost algo
rithm
s are tightly b
ou
nd
top
lan stru
ctures
▪M
ay settle for a less exp
ressive plan
structu
re,if th
is allow
s you
to u
se an algo
rithm
wh
ich is b
etter in o
ther resp
ects
102
jonkv@ida
Temporal Concurrent
Plans
�T
emp
oral co
ncu
rrent
plan
s: Exp
licit timin
g�
Pred
ict the am
ou
nt o
f time req
uired
for each
action
[0,1
0] lo
ad
(P1
,T1
)[1
0,5
70
] driv
e(T
1,A
,B)
[57
0,5
80
] un
loa
d(P
1,T
1)
[0,1
0] lo
ad
(P2
,T2
)[1
0,4
20
] driv
e(T
2,C
,D)
[42
0,4
30
] un
loa
d(P
2,T
2)
[0,1
0] lo
ad
(P3
,T3
)[1
0,8
45
] driv
e(T
3,E
,F)
[84
5,8
55
] un
loa
d(P
3,T
3)
103
jonkv@ida
Action Durations in PD
DL
�P
DD
L su
pp
orts actio
n d
uratio
ns
�…
An
d so
me p
lann
ers imp
lemen
t this, gen
erating tem
po
ral plan
s.
▪(:d
ura
tive-a
ction
turn
:pa
ram
ete
rs(?cu
rrent-target ?n
ew-target -
target):d
ura
tion
(= ?d
uratio
n (/ (an
gle ?curren
t-target ?new
-target)(tu
rn-rate)))
: con
ditio
n(a
nd
(at
start
(po
intin
g ?curren
t-target))(a
tsta
rt(n
ot
(con
troller-in
-use))))
:effe
ct(a
nd
(at
start
(no
t(p
oin
ting ?cu
rrent-target)))
(at
start
(con
troller-in
-use))
(at
start
(vibratio
n))
(at
en
d(n
ot
(con
troller-in
-use)))
(at
en
d(n
ot
(vibratio
n)))
( at
en
d(p
oin
ting ?n
ew-target))))
105
jonkv@ida
TALplanner
�T
AL
plan
ner: A
plan
ner d
evelop
ed at ID
A�
Forw
ard-ch
ainin
g and
uses d
epth
-first search
▪A
llow
s us to
use h
ighly exp
ressive mo
dels
▪A
rbitrary p
recon
ditio
ns
▪C
on
ditio
nal effects
▪T
imin
g, con
curren
cy and
resou
rces
�D
epth
first requ
ires guid
ance an
d go
al-directed
ness
▪N
o b
uilt-in
heu
ristics
▪U
ses do
main
-dep
end
ent ru
les
to gu
ide to
ward
s the go
al
▪C
an also
specify d
om
ain-d
epen
den
t he
uristics
�D
id w
ell in in
ternatio
nal co
mp
etition
s
106
jonkv@ida
TALplanner Example D
omain
�E
xamp
le Do
main
: Zen
oT
ravel�
Plan
es mo
ve peo
ple b
etween
cities (bo
ard
, de
ba
rk, fly
)
�P
lanes h
ave limited
fuel level; m
ust re
fue
l
�E
xamp
le instan
ce:
▪70
peo
ple
▪35 p
lanes
▪30
cities
107
jonkv@ida
ZenoTravelProblem Instance
�A
smaller p
rob
lem in
stance
108
jonkv@ida
What Just H
appened?
�N
o ad
ditio
nal d
om
ain k
no
wled
ge specified
yet!
�P
ure d
epth
first…in
itial no
de
on
e of th
ego
al no
des
109
jonkv@ida
Control Rules
�T
AL
plan
ner u
ses con
trol ru
les
�T
he p
lan gen
erates a sequ
ence o
f states
▪P
lan:
step 1: b
oard
(p1, p
lane1, city4
),step
2: bo
ard(p
2, plan
e1, city4)
▪States: tim
e 0: in
itial statetim
e 1: after p1 b
oard
ing
time 2: after p
2 bo
ardin
g
�C
on
trol ru
les are form
ulas
that m
ust h
old
in th
is state sequ
ence
�R
ules can
also refer to
the go
al
▪go
al(f) true if f m
ust h
old
in all go
al states
at(p1, city4
)at(p
2, city4)
bo
ard(p
1, plan
e1, city4)
bo
ard(p
2, plan
e1, city4)
in(p
1, pla
ne
1)at(p
2, city4)
in(p
1, plan
e1)in
(p2, p
lan
e1)
110
jonkv@ida
Multiple U
ses of Control Rules
�C
on
trol ru
les have m
ultip
le uses
�P
run
e parts o
f the tree th
at do
no
t con
tain so
lutio
ns
▪N
o n
eed to
investigate d
ead en
ds
▪So
me d
om
ains, like Z
eno
Travel, h
ave no
dead
end
s
�P
run
e parts o
f the tree th
at con
tain “b
ad” so
lutio
ns
▪P
lans th
at achieve th
e goal, b
ut are u
nn
ecessarily expen
sive
▪A
pp
licable to
this d
om
ain!
�P
run
e parts o
f the tree th
at con
tain red
un
dan
t solu
tion
s▪
In o
ptim
izing p
lann
ing, w
e do
n’t sto
p w
hen
the first p
lan is fo
un
d
▪N
o p
oin
t in visitin
g man
y plan
s with
equ
al cost
111
jonkv@ida
Control Rules
�F
irst pro
ble
m in
the exam
ple:
�P
assengers d
ebark
wh
enever p
ossib
le.
�R
ule: "A
t any tim
epo
int, if a p
assenger d
ebark
s, he is at h
is goal.”
�#
con
trol
:nam
e "on
ly-deb
ark-w
hen
-in-go
al-city"fo
rall
t, perso
n, a
ircraft
[[t] in
(perso
n, a
ircraft) →
[t+1] in
(perso
n, a
ircraft) ∨
ex
istscity [
[t] at(a
ircraft, city) ∧
go
al(a
t(perso
n, city)) ] ]
112
jonkv@ida
Control Rules
�S
eco
nd
pro
ble
m in
the exam
ple:
�P
assengers b
oard
plan
es, even at th
eir destin
ation
s
�R
ule: "A
t any tim
epo
int, if a p
assenger b
oard
s a plan
e, he w
as no
t at his
destin
ation
.”
�#
con
trol
:nam
e "on
ly-bo
ard-w
hen
-necessary"
fora
llt, p
erson
, aircra
ft[
([t] !in(p
erson
, aircra
ft) ∧[t+
1] in(p
erson
, aircra
ft)) →e
xists
city1, city2[
[t] at(p
erson
, city1) ∧g
oa
l(at(p
erson
, city2)) ∧city1
!= city2
] ]
113
jonkv@ida
Zeno Travel, second attempt
114
jonkv@ida
What's
Wrong This Tim
e?
�O
nly co
nstrain
ed p
assengers
�F
orgo
t to co
nstrain
airplan
es
�W
hich
cities are reason
able d
estinatio
ns?
�1. A
passen
ger’s destin
ation
�2. A
place w
here a p
erson
wan
ts to leave
�3. T
he airp
lane’s d
estinatio
n
115
jonkv@ida
Control Rules
�#
con
trol :n
ame "p
lanes-alw
ays-fly-to-go
al“fo
rall t, aircraft, city [[t] at(aircraft, city) →([t+
1] at(aircraft, city)) |exists city2 [
city2 != city &
([t+1] at(aircraft, city2)) &
[t] reason
able-d
estinatio
n(aircraft, city2) ]]
�#
defin
e [t] reason
able-d
estinatio
n(aircraft, city):
[t] has-p
assenger-fo
r(aircraft, city) |exists p
erson
[[t] at(p
erson
, city) &[t] in
-wro
ng-city(p
erson
) ] |go
al(at(aircraft, city)) &[t] em
pty(aircraft) &
[t] all-perso
ns-at-th
eir-destin
ation
s-or-in
-plan
es ]
116
jonkv@ida
Zeno Travel, third attempt
117
jonkv@ida
Positive Side Effects
�P
ositive
effe
ctso
f usin
g d
om
ain k
no
wled
ge:�
Better p
erform
ance th
an d
om
ain-in
dep
end
ent h
euristics
▪W
hen
you
’ve fou
nd
the righ
t con
trol ru
les!
�C
an u
se mo
re detailed
do
main
mo
dels
▪W
ith co
ntro
l rules, th
is has a sm
aller imp
act on
perfo
rman
ce
�C
an gen
erate better p
lans
▪C
an p
run
e no
n-so
lutio
ns, b
ut also
ba
dso
lutio
ns
�N
eg
ative
effe
ctso
f usin
g d
om
ain k
no
wled
ge:�
Req
uires m
ore k
no
wled
ge
�R
equ
ires mo
re do
main
engin
eering
�R
ules are so
metim
es easy to fin
d, so
metim
es difficu
lt
�A
s always: A
tradeo
ff!