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

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 Review: Classical Representation l Function-free first-order language L l Statement of a classical planning problem: P = (s 0, g, O) l s 0 : initial state - a set of ground atoms of L l g: goal formula - a set of literals l Operator: (name, preconditions, effects) Classical planning problem: P = ( ,s 0,S g )

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 Review: Set-Theoretic Representation l Like classical representation, but restricted to propositional logic l State: a set of propositions - these correspond to ground atoms u {on-c1-pallet, on-c1-r1, on-c1-c2, …, at-r1-l1, at-r1-l2, …} l No operators, just actions take-crane1-loc1-c3-c1-p1 precond: belong-crane1-loc1, attached-p1-loc1, empty-crane1, top-c3-p1, on-c3-c1 delete: empty-crane1, in-c3-p1, top-c3-p1, on-c3-p1 add: holding-crane1-c3, top-c1-p1 l Weaker representational power than classical representation u Problem statement can be exponentially larger

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 Review: State-Variable Representation l A state variable is like a record structure in a computer program  Instead of on(c1,c2) we might write cpos(c1)=c2 l Load and unload operators: l Equivalent power to classical representation u Each representation requires a similar amount of space u Each can be translated into the other in low-order polynomial time l Classical representation is more popular, mainly for historical reasons u In practice, state-variable representation is probably more convenient

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 Motivation l Recall that in classical planning, even simple problems can have huge search spaces u Example: »DWR with five locations, three piles, three robots, 100 containers 10 277 states »Largest estimates of particles in universe: only about 10 87 l How difficult is it to solve classical planning problems? location 1 location 2 s0s0

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 Outline l Background on complexity analysis l Restrictions (and a few generalizations) of classical planning l Decidability and undecidability l Tables of complexity results u Classical representation u Set-theoretic representation u State-variable representation

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 Complexity Analysis l Complexity analyses are done on language-recognition problems u A language is a set L of strings over some alphabet A u Recognition procedure for L »A procedure R(x) that returns “yes” iff the string x is in L »If x is not in L, then R(x) may return “no” or may fail to terminate l Translate classical planning into a language-recognition problem l Examine the language-recognition problem’s complexity

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 Planning as a Language-Recognition Problem l We will consider two language-recognition problems: PLAN-EXISTENCE = {P : P is the statement of a planning problem that has a solution} PLAN-LENGTH = {(P,n) : P is the statement of a planning problem that has a solution of length ≤ n} l Look at complexity of PLAN-EXISTENCE and PLAN-LENGTH under different conditions

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 Complexity of Language-Recognition Problems l Suppose R is a recognition procedure for D l Complexity of R u T R (n) = worst-case runtime for R on strings in D of length n u S R (n) = worst-case space requirement for R on strings in D of length n l Complexity of D u T D = best asymptotic time complexity of any recognition procedure for D u S D = best asymptotic space complexity of any recognition procedure for D

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 Complexity Classes l Complexity classes: u NLOGSPACE(nondeterministic procedure, logarithmic space)  P(deterministic procedure, polynomial time)  NP(nondeterministic procedure, polynomial time)  PSPACE(deterministic procedure, polynomial space)  EXPTIME(deterministic procedure, exponential time)  NEXPTIME(nondeterministic procedure, exponential time)  EXPSPACE(deterministic procedure, exponential space) l Let C be a complexity class and p be a language-recognition problem u p is C-hard if for every problem q in C, q can be reduced to p in a polynomial amount of time »NP-hard, PSPACE-hard, etc. u p is C-complete if p is C-hard and p is also in C »NP-complete, PSPACE-complete, etc.

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 l Do we give the operators as input to the planning algorithm, or fix them in advance? l Do we allow infinite initial states?* l Do we allow function symbols?* l Do we allow negative effects? l Do we allow negative preconditions? l Do we allow more than one precondition? l Do we allow operators to have conditional effects?* u i.e., effects that only occur when additional preconditions are true * These take us outside of classical planning Possible Conditions

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 Decidability of Planning Next: analyze complexity for the decidable cases Halting problem Can cut off the search at every path of length n

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 Complexity of Planning no operator has >1 precondition PSPACE-complete or NP-complete for some sets of operators

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 l Caveat: these are worst-case results u Individual planning domains can be much easier l Example: both DWR and Blocks World fit here, but neither is that hard u For them, PLAN-EXISTENCE is in P and PLAN-LENGTH is NP -complete

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 l Here, PLAN-LENGTH is easier than PLAN-EXISTENCE for the same reason as in the decidability table u Can cut off every search path at depth n

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 Equivalences l Set-theoretic representation and ground classical representation are basically identical u For both, exponential blowup in the size of the input u Thus complexity looks smaller as a function of the input size l Classical and state-variable representations are equivalent, except that some of the restrictions aren’t possible in state-variable representations u Hence, fewer lines in the table Classical representation State-variable representation Set-theoretic or ground classical representation trivial P(x 1,…,x n ) becomes f P (x 1,…,x n )=1 write all of the ground instances f(x 1,…,x n )=y becomes P f (x 1,…,x n,y)

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 every operator with >1 precondition is the composition of other operators no operator has >1 precondition Like classical rep, but fewer lines in the table


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

Similar presentations


Ads by Google