Download presentation
Presentation is loading. Please wait.
Published byRosa Cameron Modified over 9 years ago
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 = (s 0, g, O) s 0 : initial state - a set of ground atoms of L g: goal formula - a set of literals Operator: (name, preconditions, effects) Classical planning problem: P = (,s 0,S g ) 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: 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 Planning Licensed 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 Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/
6
Review: State-Variable Representation (cont…) 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/ Load and unload operators:
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: T max (p,n, ℒ ) = max{T(p,s)|s ∈ ℒ and |s| = n} Worst case running space: S max (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 Allow function symbols?Decidability of PLAN-EXISTENCE Decidability of PLAN-LENGTH NoDecidable YesSemidecidableDecidable
22
Proof of Semidecidability Let P = (O,s 0, g) O has no negative preconditions, no negative effects, and at most one positive effect Set of Horn clauses H p : ∀ a ∈ s 0 ; H p includes {true ⇒ a} H p includes {true ⇒ g} ∀ o ∈ O let precond(o) = {p 1,…,p n } and effects(o)={e}; Hp includes {e ⇒ p 1,…,p n } P has solution plan iff Hp is consistent SEMIDECIDABLE!
23
EXPSPACE Turing Machine Turing Machine M = (K, ∑, Γ, δ,q 0,F) K = { q 0,…, q m } 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 q 0 ∈ 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? ……
25
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
26
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
27
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
28
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
29
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
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/ 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 g g1g1 g2g2 g3g3 a1a1 a2a2 a3a3 g4g4 g5g5 g3g3 a4a4 a5a5 current search path a6a6 π = a 6, a 4 s = ( (s 0,a 6 ),a 4 ) g6g6 a3a3 satisfied in s 0
31
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
32
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
33
References Automated Planning, Theory and Practice, Chapter 3 Tom Bylander The Computational Complexity of Propositional STRIPS Planning, in: Artificial Intelligence, 1994The Computational Complexity of Propositional STRIPS Planning
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.