370 likes | 518 Views
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
E N D
Lecture slides for Automated Planning: Theory and Practice Chapter 14Temporal 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 • 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
Definitions • Temporally Qualified Expression (tqe): • expression a@[t1,t2) • a is an atom • t1, t2 are temporalvariables (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)
Example • rob1 remains at location loc1, rob2 moves from loc2 to loc3
Enabling Conditions • A set of tqes Fsupports a tqe e = a@[t1,t2)if F containsa 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 maycontain 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)
Enabling Conditions and Entailment • A set of tqes Fsupports 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'iei 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'
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
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 thatCU const(a) UC' 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) = {(FU effects(a), CU const(a) UC' | C' is in (a/F)} short for (precond(a)/F)
Example • move(rob1,loc1,loc2)@[ts,te) is enabled • Enabling condition is
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
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)
Negative Effects • Axioms can be used to take the place of negative effects Axiom: no object can be intwo places at the same time
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
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
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 CU 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
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 tobe added to to make it satisfy X • The set of all databases obtained from that satisfy X is
Plans sequence.
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
Planning • Search space similar to the one for PSP (Chapter 5) • CSP-based techniques to handle the constraints
Algorithm Similar to a temporal database
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.
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.
State variables are partially specified functions • May never specify the entire function
Chronicle • State-variable equivalent of a temporal database