Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:

Similar presentations


Presentation on theme: "Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:"— Presentation transcript:

1 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 Chapter 14 Temporal Planning Lecture slides for Automated Planning: Theory and Practice Dana S. Nau CMSC 722, AI Planning University of Maryland, Fall 2004

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/ 2 Temporal Planning l Motivation: want to do planning in situations where actions u have nonzero duration u may overlap in time l Need an explicit representation of time l Two equivalent approaches: u (1) use logical atoms, and extend the usual planning operators to include temporal conditions on those atoms »temporal databases u (2) use state variables, and specify change and persistence constraints on the state variables »chronicles l In each case, the chapter gives a planning algorithm that’s like a temporal-planning version of PSP

3 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 Definitions l Temporally Qualified Expression (tqe): u expression a@[t 1,t 2 ) »a is an atom »t 1, t 2 are temporal variables (not constants) range over the set of real numbers l Temporal database: a pair  = (F,C) u F is a finite set of tqes u C is a finite set of constraints »temporal constraints and object constraints u C must be consistent (i.e., there must exist variable assignments that satisfy it)

4 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 Example rob1 remains at location loc1, rob2 moves from loc2 to loc3

5 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 Enabling Conditions l A set of tqes F supports a tqe e = a@[t 1,t 2 ) if F contains a tqe e' = a'@[t' 1,t' 2 ) such that a and a' are unifiable l Enabling condition: a set of constraints sufficient to make a'@[t' 1,t' 2 )  a@[t 1,t 2 ) u Express the unifier as a collection of constraints u Add two additional constraints: t' 1 ≤ t 1 and t 2 ≤ t' 2 l There may be more than one enabling condition u F may contain more than one e' that can support e l  (e/F) = {enabling conditions for e in F} l If  = (F,C), then  (e/  ) = {enabling conditions for e in F that are consistent with C} l For sets of tqes, the obvious generalizations (see next slide)

6 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 Enabling Conditions and Entailment l A set of tqes F supports a set of tqes E = {e 1, e 2, …, e n } if there is a substitution that unifies each e i in E with an e' i = a' i @[t’ i1,t’ i2 ) in F l Enabling condition: a set of constraints sufficient to make e' i  e i for every i u Express the substitution as a collection of constraints u For each i, add additional constraints t' i1 ≤ t i1 and t i2 ≤ t' i2 l  (E/F) = {enabling conditions for E in F} l If  = (F,C), then  (E/  ) = {enabling conditions for E in F that are consistent with C} l  = (F,C) entails  ' = (F',C') if   supports F', and there is an enabling condition C'' in  (F'/  ) such that C entails C'' U C'

7 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 Temporal Planning Operators l o = (name(o), precond(o), effects(o), const(o)) u name(o): name & variables; last two variables are t s, t e u precond, effects: sets of tqes u const(o): temporal constraints and object constraints l Note: tqes don’t have negations; thus no precond – and effects – u Can get the same effect with domain axioms »will describe later

8 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 Actions l Action: partially instantiated operator (like in plan-space planning) l An action a is applicable to  = (F,C) if u F supports precond(a)  there is an enabling condition C' in  (a/F) such that C U const(a) U C' is consistent l The result of applying a to  is a set of possible databases u e.g., suppose a = pickup(x)@[t 1,t 2 ) »different possible values for x, t 1, t 2 l 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)

9 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/ 9 move(rob1,loc1,loc2) @[t s,t e ) is enabled l Enabling condition is Example

10 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 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

11 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 Domain Axioms l Format: set of tqes  disjunct of constraints l For an axiom r: cond(r)  disj(r) u  (r/F) is short for  (cond(r)/F)

12 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 Negative Effects l Axioms can be used to take the place of negative effects Axiom: no object can be in two places at the same time

13 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/ 13 Augment  with the effects of move(rob1,loc1,loc2) @[t s,t e ) l The axiom is supported for r = r' = rob1, l = loc1, l' = routes l Can infer that

14 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 Negative Preconditions l Axioms can also be used to take the place of negative preconditions Axiom: a robot cannot be in a location at the same time that the location is free

15 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 Consistency l  = (F,C) is consistent with an axiom r if u for every enabling condition c in  (r/F) u there is a condition c' in disj(r)  such that C U c U c' is consistent l  is consistent with a set of axioms X if  is consistent with every axiom in X l Consistency condition: a set of constraints that needs to be met to ensure that  is consistent with the supported axioms l There can be more than one consistency condition u Each disj(r) may contain more than one constraint c 2 l Analogy: a consistency condition is like a way to resolve all existing threats

16 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 Satisfaction l  = (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 l If  satisfies X then it will continue to satisfy X when additional constraints are added l 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 l The set of all databases obtained from  that satisfy X is

17 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

18 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 Plans sequence.

19 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 Concurrent Interfering Actions l Here, each action provides some of the conditions needed to enable the other l This could not happen in classical planning, but does happen in temporal planning

20 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 Applying pairs of actions

21 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 Applying sets of actions

22 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 Planning l Search space similar to the one for PSP (Chapter 5) l CSP-based techniques to handle the constraints

23 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 Algorithm Similar to a temporal database

24 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 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.

25 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 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.

26 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

27 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

28 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

29 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 l State variables are partially specified functions l May never specify the entire function

30 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

31 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

32 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 Chronicle l State-variable equivalent of a temporal database

33 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

34 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

35 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

36 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

37 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


Download ppt "Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:"

Similar presentations


Ads by Google