Automated Planning

Anuncio
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Automated Planning
PLG Group
Universidad Carlos III de Madrid
AI. 2008-09
Automated Planning
1
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Indice
1
Introduction
2
Classical planning
3
Neoclassical planning
4
Heuristics
Heuristic planning
Hierarchical Task Networks
Control knowledge
Machine learning
5
Planning in the real world
Automated Planning
2
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Indice
1
Introduction
2
Classical planning
3
Neoclassical planning
4
Heuristics
Heuristic planning
Hierarchical Task Networks
Control knowledge
Machine learning
5
Planning in the real world
Automated Planning
3
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Indice
1
Introduction
2
Classical planning
3
Neoclassical planning
4
Heuristics
Heuristic planning
Hierarchical Task Networks
Control knowledge
Machine learning
5
Planning in the real world
Automated Planning
4
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Indice
1
Introduction
2
Classical planning
3
Neoclassical planning
4
Heuristics
Heuristic planning
Hierarchical Task Networks
Control knowledge
Machine learning
5
Planning in the real world
Automated Planning
5
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Heuristic planning
Types of heuristics
Domain-independent: they can be safely used in any
domain, tipically for the selection of descendants
Domain-dependent: especially devised for a given domain,
they are usually employed for all the other steps
Real planners do consist of a mixture of both!
Domain-independence ensures soundness
Domain-dependence improves the performance
General idea: to automatically define domain-independent
heuristic functions as opposed to ad-hoc
domain-dependent functions as in the N-puzzle or the
Sokoban domains.
Automated Planning
6
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Heuristic planning
Heuristics as relaxed problems
Origin of heuristics: optimal solutions to relaxed
problems [Pearl, 1983]
Relaxations are derived by dropping literals from the delete
lists: given P = (O, I, G), its relaxation P 0 is defined as
P 0 = (O0 , I, G) where:
O0 = {(pre(o), add(o), ∅)|(pre(o), add(o), del(o)) ∈ O}
A sequence of actions is a relaxed plan if and only if it is a
solution of the relaxed task P 0 of the original problem P:
The closer P 0 to P, the more informed the resulting
heuristic function, h(· )
The more simplified P 0 , the easiest to compute h(· )
Automated Planning
7
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Heuristic planning
Relaxation on reachability
Let us define the minimum distance from state s to literal p,
gs (p), as the minimum number of required actions to step
from s to another state that embraces p:
(
0
si p ∈ s
gs (p) =
min [1 + gs (pre(o))] otherwise
o∈O(p)
gs (C) with C being a set of literals can be computed as:
Additive: gs+ (C) =
P
gs (r )
r ∈C
Max: gsmax (C) = max gs (r )
r ∈C
Automated Planning
8
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Heuristic planning
Example
g(en−mesa(B)) = 2
g(encima(C,B)) = 3
g+ = 2+3 = 5
gmax = max {2,3} = 3
sujeto(C)
libre(B)
sujeto(C)
brazo−libre
libre(B)
encima(B,C)
B
C
Estado inicial
B
DEJAR(C,B)
DEJAR(C)
QUITAR(B,C)
C
Estado inicial
encima(B,C)
libre(B)
brazo−libre
en−mesa(B)
libre(B)
brazo−libre
QUITAR(B,C)
LEVANTAR(B)
sujeto(B)
libre(C)
encima(C,x)
brazo−libre
QUITAR(C,x)
libre(C)
en−mesa(C)
brazo−libre
LEVANTAR(C)
sujeto(C)
libre(B)
C
B
Estado final
Automated Planning
DEJAR(B)
PONER(C,B)
en−mesa(B)
encima(C,B)
9
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Heuristic planning
Heuristic Search Planning (HSP) [Bonet and Geffner, 2001]
HSP: it employs the heuristic function hadd = gs+ for guiding a
hill-climbing search algorithm from s —i.e., progression
HSP2: it makes use of the heuristic function hadd along with a BFS
search algorithm from s
Drawbacks:
HSP takes up to 80% of the time for computing h(· )
hadd does not account for the interactions among operators. Thus,
it looks for suboptimal sequential plans instead of optimal parallel
plans
Alternatives:
HSPr (plus regression), GRT (bidirectional search) or, more
recently HSP∗
To use GRAPHPLAN as a mean for capturing the interaction
among operators
Automated Planning
10
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Heuristic planning
G RAPHPLAN as a heuristic
Let P 0 = (O0 , I, G) be a relaxed problem.GRAPHPLAN is
guaranteed to do not find any mutex, since there are no
deletes!
GRAPHPLAN is known to find a solution to P 0 in
polynomial time in l (the largest add list), |I| and |O0 |:
hO0 , O1 , . . . , Om−1 i where Oi is the set of selected
operators in layer i and m is the goal layer
FF employs the following heuristic function:
h(S) =
X
|Oi |
i=0,...,m−1
Tipically h(S) ≤ hadd
Automated Planning
11
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Heuristic planning
Example
Nivel 1
Nivel 0
brazo−libre
libre(B)
encima(B,C)
en−mesa(C)
B
C
brazo−libre
libre(B)
encima(B,C)
en−mesa(C)
QUITAR (B,C)
sujeto(B)
libre(C)
Nivel 3
Nivel 2
encima(B,C)
en−mesa(C)
sujeto(B)
libre(C)
sujeto(C)
en−mesa(B)
encima(B,C)
en−mesa(C)
sujeto(B)
libre(C)
LEVANTAR (C)
sujeto(C)
DEJAR (B)
en−mesa(B)
libre(B)
brazo−libre
encima(C,B)
libre(C)
brazo−libre
PONER (C,B)
C
B
Solucion = {QUITAR(B,C), <LEVANTAR(C),DEJAR(B)>, PONER(C,B)}
h(S) = 1 + 2 + 1 = 4
Automated Planning
12
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Heuristic planning
Fast-Forward Plan Generation (FF) [Hoffmann and
Nebel, 2001]
FF: it makes use of the heuristic function h(S) with a
variant of breadth-first search known as enforced
hill-climbing which is substituted by a BFS when the former
does not find any solution
The computation of the relaxed GRAPHPLAN is
“improved” trying to compute the shortest paths:
NOOP S-First
Dificulty measures:
X
dif (o) =
min{i|p appears in layer i}
p∈pre(o)
Linearized sets of actions
Automated Planning
13
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Heuristic planning
FF
[Hoffmann and Nebel, 2001]
FF: it makes use of the heuristic function h(S) with a
variant of breadth-first search known as enforced
hill-climbing which is substituted by a BFS when the former
does not find any solution
The computation of the relaxed GRAPHPLAN is
“improved” trying to compute the shortest paths:
NOOPs-First
Difficulty measures:
X
dif (o) =
min{i | p appears in layer i}
p∈pre(o)
Linearized sets of actions
M ETRIC -FF: cost-based FF [Hoffmann, 2003]
Automated Planning
14
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Indice
1
Introduction
2
Classical planning
3
Neoclassical planning
4
Heuristics
Heuristic planning
Hierarchical Task Networks
Control knowledge
Machine learning
5
Planning in the real world
Automated Planning
15
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
References
Blai Bonet and Hector Geffner.
Planning as heuristic search.
Artificial Intelligence, 129(1-2):5–33, 2001.
Jörg Hoffmann and Bernhard Nebel.
The FF planning system: Fast plan generation through heuristic
search.
Journal of Artificial Intelligence Research, 14:253–302, 2001.
Jörg Hoffmann.
The Metric-FF planning system: Translating “ignoring delete
lists” to numeric state variables.
Journal of Artificial Intelligence Research, 20:291–341, 2003.
Judea Pearl.
Heuristics: Intelligent Search Strategies for Computer Problem
Solving.
Automated Planning
16
Introduction
Classical planning
Neoclassical planning
Heuristics
Planning in the real world
Addison-Wesley, 1983.
Automated Planning
17
Descargar