1 / 33

Complexity of Classical Planning

Complexity of Classical Planning. Megan Smith Lehigh University CSE 497, Spring 2007. Outline. Review Classical Planning Complexity Background Computational Complexity Main Results. Review: Classical Representation. Function-free first-order language L

carrington
Télécharger la présentation

Complexity of Classical Planning

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Complexity of Classical Planning Megan Smith Lehigh University CSE 497, Spring 2007

  2. Outline • Review Classical Planning • Complexity Background • Computational Complexity • Main Results

  3. Review: Classical Representation • Function-free first-order language L • Statement of a classical planning problem: P = (s0, g, O) • s0: initial state - a set of ground atoms of L • g: goal formula - a set of literals • Operator: (name, preconditions, effects) • Classical planning problem: P= (,s0,Sg) Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

  4. Review: Set-Theoretic Representation • Like classical representation, but restricted to propositional logic • State: a set of propositions - these correspond to ground atoms • {on-c1-pallet, on-c1-r1, on-c1-c2, …, at-r1-l1, at-r1-l2, …} • 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 • Weaker representational power than classical representation • Problem statement can be exponentially larger Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

  5. Review: State-Variable Representation • A state variable is like a record structure in a computer program • Instead of on(c1,c2) we might write cpos(c1)=c2 • Equivalent power to classical representation • Each representation requires a similar amount of space • Each can be translated into the other in low-order polynomial time • Classical representation is more popular, mainly for historical reasons • In many cases, state-variable representation is more convenient Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

  6. Review: State-Variable Representation (cont…) • Load and unload operators: Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

  7. Decidability • Decidable • An algorithm can be written that will return “yes” if the problem is solvable and “no” if it is not • Semidecidable • An algorithm can be written that will return “yes” if the problem is solvable but will not return if it is not • Undecidable • Neither decidable nor semidecidable

  8. Language Recognition Problems • Utilized in complexity analyses • Definitions: • L – finite set of characters • L* - set of all possible strings of characters in L • ℒ - a language, given L and L*, ℒ may be any subset of L*

  9. Language Recognition Problems • Recognition procedure for ℒ : • computational procedure p such that for every s∈L*, • p(s) returns yes if s∈ℒ and • p(s) does not return yes if s∉ℒ • may return “no” or not at all

  10. Language Recognition Problems (LR) • Worst case running time: Tmax(p,n,ℒ) = max{T(p,s)|s∈ℒand |s| = n} • Worst case running space: Smax(p,n,ℒ) = max{S(p,s)|s∈ℒand |s| = n} • reduction of ℒ1 to ℒ2: • deterministic procedure r: ℒ1*→ℒ2* • such that s ∈ℒ1 iff r(s) ∈ ℒ2

  11. Complexity Classes • Time • P • NP • EXPTIME • NEXPTIME • Space • NLOGSPACE • PSPACE • EXPSPACE

  12. Bounded by Time • P – Set of all languages ℒ such that ℒ has a deterministic recognition procedure whose worst-case running time is polynomially bounded

  13. Bounded by Time • NP – Set of all languages ℒ such that ℒ has a nondeterministic recognition procedure whose worst-case running time is polynomially bounded • Examples: Boolean-SAT, knapsack problem, clique problem, vertex cover problem, etc.

  14. Bounded by Time • EXPTIME – Set of all languages ℒ such that ℒ has a deterministic recognition procedure whose worst-case running time is exponentially bounded

  15. Bounded by Space • NLOGSPACE - Set of all languages ℒ such that ℒ has a nondeterministic recognition procedure whose worst-case space requirement is logarithmically bounded

  16. Bounded by Space • PSPACE - Set of all languages ℒ such that ℒ has a recognition procedure whose worst-case space requirement is polynomially bounded

  17. Bounded by Space • EXPSPACE - Set of all languages ℒ such that ℒ has a recognition procedure whose worst-case space requirement is exponentially bounded

  18. Complexity Classes • Given a complexity class C and a language ℒ • ℒ is C-hard if every language in C is reducible to ℒ in polynomial time • ℒ is C-complete if ℒ is C-hard and ℒ ∈C • Some sets known to be unequal • Unknown whether all are unequal • P = NP anyone? NLOGSPACE ⊆ P ⊆NP ⊆PSPACE ⊆EXPTIME ⊆NEXPTIME ⊆EXPSPACE

  19. Planning Problems as LR Problems • PLAN-EXISTENCE – set off all strings s⊆L* such that s is the statement of a solvable problem • Also known as PLANSAT

  20. Planning Problems as LR Problems • PLAN-LENGTH – set of all strings of the form (s,k) such that s is the statement of a solvable planning problem, k is a nonnegative integer, and s has a solution plan that contains no more than k actions

  21. Decidability Results • For classical, set-theoretic, & state-variable planning, PLAN-EXISTENCE is decidable • If we extend classical or state-variable planning to allow terms to contain function symbols, PLAN-LENGTH is still decidable • If we extend classical or state-variable planning to allow terms to contain function symbols, PLAN-EXISTENCE is semidecidable

  22. Proof of Semidecidability • Let P = (O,s0, g) • O has no negative preconditions, no negative effects, and at most one positive effect • Set of Horn clauses Hp: • ∀a ∈ s0; Hp includes {true ⇒ a} • Hp includes {true ⇒g} • ∀o∈O let precond(o) = {p1,…,pn} and effects(o)={e}; Hp includes {e ⇒ p1,…,pn} • P has solution plan iff Hp is consistent SEMIDECIDABLE!

  23. EXPSPACE Turing Machine • Turing Machine M = (K,∑,Γ,δ,q0,F) • K = {q0,…, qm} is a finite set of states • F⊆K is set of final states • Γ is finite set of allowable symbols • ∑ ⊆ Γ is the set of allowable input symbols • q0 ∈ K is the start state • δis a mapping from K× Γ to K× Γ× {Left,Right} • Given a Turing Machine M that uses at most an exponential number of tape cells in terms of the length of its input and an input string x, does M accept the string x? … …

  24. Complexity Results • No restrictions, the size of any state is at most exponential: • PLAN-EXISTENCE is in EXPSPACE • No negative effects: • PLAN-EXISTENCE is reduced to NEXPTIME • No negative effects & no negative preconditions (ordering now doesn’t matter) • PLAN-EXISTENCE is now reduced to EXPTIME NLOGSPACE ⊆ P ⊆NP ⊆PSPACE ⊆EXPTIME ⊆NEXPTIME ⊆EXPSPACE

  25. Complexity Results (cont…) • Even with both these restrictions, PLAN-LENGTH remains NEXPTIME • If each operator has at most one precondition: • Both PLAN-EXISTENCE & PLAN-LENGTH are now in PSPACE • Restricting all atoms to be ground lowers complexity by one level NLOGSPACE ⊆ P ⊆NP ⊆PSPACE ⊆EXPTIME ⊆NEXPTIME ⊆EXPSPACE

  26. Complexity Results (cont…) • If the operator set is fixed in advance: • classical planning is at most in PSPACE NLOGSPACE ⊆ P ⊆NP ⊆PSPACE ⊆EXPTIME ⊆NEXPTIME ⊆EXPSPACE

  27. Interesting Properties • Extending planning operators to allow conditional effects doesn’t affect these complexity results • In most cases, the complexity of PLAN-EXISTENCE in classical planning is one level harder than in set-theoretic planning NLOGSPACE ⊆ P ⊆NP ⊆PSPACE ⊆EXPTIME ⊆NEXPTIME ⊆EXPSPACE

  28. Interesting Properties (cont…) • If negative effects are allowed, PLAN-EXISTENCE is EXPSPACE-complete but PLAN-LENGTH is only NEXPTIME-complete • PLAN-LENGTH has same complexity regardless of allowing/disallowing negated preconditions • Negative effects are more powerful than negative preconditions NLOGSPACE ⊆ P ⊆NP ⊆PSPACE ⊆EXPTIME ⊆NEXPTIME ⊆EXPSPACE

  29. STRIPS Review • π  the empty plan • do a modified backward search from g • instead of -1(s,a), each new set of subgoals is just precond(a) • whenever you find an action that’s executable in the current state, then go forward on the current search path as far as possible, executing actions and appending them to π • repeat until all goals are satisfied π = a6, a4 s = ((s0,a6),a4) g6 satisfied in s0 g1 a1 a4 a6 g4 g2 g a2 g3 a5 g5 a3 a3 g3 current search path Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

  30. Propositional STRIPS Planning • Initial state is finite set of ground atomic formuals • Preconditions & postconditions of an operator are ground literals • Goals are ground literals • Operators don’t have any variables or indirect side effects

  31. Extended Propositional STRIPS Planning • Augments propositional STRIPS planning with a “domain theory” • domain theory = set of ground formulas • infers additional effects • requires preference ordering of all literals to avoid ambiguity

  32. References • Automated Planning, Theory and Practice, Chapter 3 • Tom Bylander The Computational Complexity of Propositional STRIPS Planning, in: Artificial Intelligence, 1994

More Related