Upload
keanu
View
36
Download
0
Embed Size (px)
DESCRIPTION
Lecture slides for Automated Planning: Theory and Practice. Chapter 14 Temporal Planning. Dana S. Nau CMSC 722, AI Planning University of Maryland, Fall 2004. Temporal Planning. Motivation: want to do planning in situations where actions have nonzero duration may overlap in time - PowerPoint PPT Presentation
Citation preview
1Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Chapter 14Temporal Planning
Lecture slides for
Automated Planning: Theory and Practice
Dana S. Nau
CMSC 722, AI Planning
University of Maryland, Fall 2004
2Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Temporal Planning Motivation: want to do planning in situations where actions
have nonzero duration may overlap in time
Need an explicit representation of time Two equivalent approaches:
(1) use logical atoms, and extend the usual planning operators to include temporal conditions on those atoms
» temporal databases (2) use state variables, and specify change and persistence
constraints on the state variables
» chronicles In each case, the chapter gives a planning algorithm that’s like a
temporal-planning version of PSP
3Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Definitions Temporally Qualified Expression (tqe):
expression a@[t1,t2)
» a is an atom
» t1, t2 are temporal variables (not constants)
• range over the set of real numbers Temporal database: a pair = (F,C)
F is a finite set of tqes C is a finite set of constraints
» temporal constraints and object constraints C must be consistent (i.e., there must exist variable assignments
that satisfy it)
4Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Example rob1 remains at location loc1, rob2 moves from loc2 to loc3
5Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Enabling Conditions A set of tqes F supports a tqe e = a@[t1,t2) if F contains
a tqe e' = a'@[t'1,t'2) such that a and a' are unifiable
Enabling condition: a set of constraints sufficient to makea'@[t'1,t'2) a@[t1,t2)
Express the unifier as a collection of constraints Add two additional constraints: t'1 ≤ t1 and t2 ≤ t'2
There may be more than one enabling condition F may contain more than one e' that can support e
(e/F) = {enabling conditions for e in F}
If = (F,C), then (e/)
= {enabling conditions for e in F that are consistent with C} For sets of tqes, the obvious generalizations (see next slide)
6Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Enabling Conditions and Entailment A set of tqes F supports a set of tqes E = {e1, e2, …, en} if there is a
substitution that unifies each ei in E with an e'i = a'i@[t’i1,t’i2) in F
Enabling condition:a set of constraints sufficient to make e'i ei for every i
Express the substitution as a collection of constraints For each i, add additional constraints t'i1 ≤ ti1 and ti2 ≤ t'i2
(E/F) = {enabling conditions for E in F}
If = (F,C), then (E/)
= {enabling conditions for E in F that are consistent with C}
= (F,C) entails ' = (F',C') if supports F', and there is an enabling condition C'' in (F'/)
such that C entails C'' U C'
7Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Temporal Planning Operators
o = (name(o), precond(o), effects(o), const(o)) name(o): name & variables; last two variables are ts, te
precond, effects: sets of tqes const(o): temporal constraints and object constraints
Note: tqes don’t have negations; thus no precond– and effects–
Can get the same effect with domain axioms» will describe later
8Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Actions
Action: partially instantiated operator (like in plan-space planning) An action a is applicable to = (F,C) if
F supports precond(a) there is an enabling condition C' in (a/F) such that
C U const(a) U C' is consistent
The result of applying a to is a set of possible databases e.g., suppose a = pickup(x)@[t1,t2)
» different possible values for x, t1, t2
A temporary definition (we’ll revise this later): 0(,a) = {(F U effects(a), C U const(a) U C' | C' is in (a/F)}
short for (precond(a)/F)
9Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
move(rob1,loc1,loc2)@[ts,te) is enabled
Enabling condition is
Example
10Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Suppose we also have adjacent(loc3,loc2) Then move(rob2,loc3,loc2)@[t's,t'e) is also enabled
Suppose we also have adjacent(loc1,loc3) Then move(rob1,loc1,loc3)@[t''s,t''e) is also enabled
11Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Domain Axioms Format: set of tqes disjunct of constraints For an axiom r: cond(r) disj(r)
(r/F) is short for (cond(r)/F)
12Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Negative Effects
Axioms can be used to take the place of negative effects
Axiom: no object can be intwo places at the same time
13Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Augment with the effects of move(rob1,loc1,loc2)@[ts,te)
The axiom is supported for r = r' = rob1, l = loc1, l' = routes Can infer that
14Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Negative Preconditions
Axioms can also be used to take the place of negative preconditions
Axiom: a robot cannot be in a location atthe same time that the location is free
15Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Consistency = (F,C) is consistent with an axiom r if
for every enabling condition c in (r/F) there is a condition c' in disj(r) such that C U c U c' is consistent
is consistent with a set of axioms X if is consistent with every axiom in X Consistency condition: a set of constraints that needs to be met to ensure that
is consistent with the supported axioms
There can be more than one consistency condition Each disj(r) may contain more than one constraint c2
Analogy: a consistency condition is like a way to resolve all existing threats
16Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Satisfaction = (F,C) satisfies a set of axioms X if either (X/) is empty or there is
a consistency condition c that is entailed by C If satisfies X then it will continue to satisfy X when additional
constraints are added If is consistent with X but does not satisfy X then an additional
constraint c in (X/) needs to be added to to make it satisfy X The set of all databases obtained from that satisfy X is
17Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
18Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Plans
sequence.
19Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Concurrent Interfering
Actions
Here, each action provides some of the conditions needed to enable the other
This could not happen in classical planning, but does happen in temporal planning
20Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Applying pairs of actions
21Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Applying sets of actions
22Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Planning Search space similar to the one for PSP (Chapter 5) CSP-based techniques to handle the constraints
23Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Algorithm
Similar to a temporal database
24Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Flaws
Intuitively, open goals are like open goals in PSP, and the ways of resolving them are analogous to how open goals are resolved in PSP.
25Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Flaws (Continued)
Recall that the primary use of axioms is to entail negative preconditions and effects. Resolving an unsatisfied-axiom flaw consists of asserting those preconditions/effects into the database.
Intuitively, threats are like threats in PSP, and the ways of resolving them are analogous to how threats are resolved in PSP.
26Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
27Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
28Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
29Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
State variables are partially specified functions May never specify the entire function
30Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
31Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
32Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
Chronicle State-variable equivalent of a temporal database
33Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
34Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
35Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
36Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
37Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/