Polynomial-Length Planning Spans the Polynomial ... - CiteSeerX

9 downloads 0 Views 126KB Size Report
University of Minnesota, Duluth hudson@d.umn.edu. Abstract. This paper presents a family of results on the com- putational complexity of the decision problem ...
Polynomial-Length Planning Spans the Polynomial Hierarchy Hudson Turner Computer Science Department University of Minnesota, Duluth [email protected]

Abstract This paper presents a family of results on the computational complexity of the decision problem associated with planning: Does a valid plan exist? We consider the effect on complexity of several assumptions typical of classical planning: complete knowledge of the initial state, determinism, polynomial-time determination of executability of actions in a state. We consider plans of two types: conditional plans, in which the actions to be taken in executing a plan depend on the previous history of the execution, and unconditional plans. For conditional planning, we also consider the effect of limited observability of the current state during plan execution. Throughout, we restrict our attention to plans of polynomially-bounded length. Our analysis employs a simple, general action representation framework in which a planning domain is described by a transition relation encoded in classical propositional logic. The results reported here shed new light on how various restrictions on planning problems affect complexity.

1

Introduction

This paper presents a family of results on the computational complexity of planning problems in which a plan of polynomially-bounded length is sought. A planning problem traditionally consists of three elements: a description of the planning domain (specifying how actions can affect the state of the world), a description of the initial state of the world, and a description of the goal. A solution to a planning problem is a “valid” plan—one whose execution is guaranteed to achieve the goal, and whose executability is also guaranteed. Because we wish to investigate the computational complexity of planning, we focus on the associated decision problem: Does a valid plan exist? In classical planning, the initial state is completely specified, the action domain is deterministic, and a plan is simply a finite sequence of actions to be performed. These assumptions can be relaxed to obtain larger classes of planning problems. For instance, in so-called conformant planning, one no longer assumes that the initial state is completely specified, and actions are allowed to have nondeterministic effects, but

a plan is still a sequence of actions. Another class of planning problems is obtained by allowing conditional plans, in which the execution of a plan at each step may depend on the previous execution history. In characterizing this dependence, we may assume that the current state is completely observable or only partially observable during plan execution. We consider the complexity of each of these classes of planning problems. Many accounts of planning are based on action representations with another significant property: the executability of any given action(s) in any given state can be determined in polynomial time. We will consider the role this assumption plays in planning complexity. Our analysis employs a simple, general action representation framework in which a planning domain is described by a transition relation encoded in classical propositional logic. This framework allows for concurrent actions, but this complication plays only a minor role in planning complexity. More precisely, a number of hardness results that hold for fixed-length plans with concurrent actions require plans of linearly-bounded length if no concurrency is allowed. A secondary contribution of this paper is the development of a unified representation—in second-order propositional logic—of the decision problems associated with a wide range of planning problems. In the final formulation, each family of planning problems considered in this paper is a specialization of conditional planning with partial observability of the current state during plan execution. Due to space restrictions, proofs are omitted. Some results reported here are similar to results from [Littman, 1997; Littman et al., 1998; Rintanen, 1999; Baral et al., 2000; Eiter et al., 2000]. These relationships are described when the results are encountered in the text.

2 2.1

Preliminaries Action Representation Framework

Begin with a set A of action symbols and a disjoint set F of fluent symbols. A transition relation is a labeled directed graph. Each node is a subset of F , standing for the state in which the fluents corresponding to elements of F are true, and the fluents corresponding to fluent symbols not in F are false. The edges are labeled with subsets of A, with the meaning that concurrently executing the corresponding actions (and no others) in the start state can take the world to the end state.

We assume that such a transition relation is encoded in classical propositional logic as follows. Let state(F ) be a formula in which the only nonlogical symbols are elements of F . It encodes the set of states that correspond to its models. Let act(F; A; F 0 ) be a formula with nonlogical symbols taken from F [ A [ F 0 , where F 0 is obtained from F by priming each element of F . (Assume F 0 is disjoint from F [ A. From now on similar disjointness assumptions will be left unstated.) Let state(F 0 ) be the formula obtained from state(F ) by substituting for each occurrence of each fluent symbol its primed counterpart. (Throughout, this sort of notation will be used to generate formulas by substitution.) Of course each model of state(F 0 ) corresponds to a state in the obvious way. Then the formula state(F ) ^ act(F; A; F 0 ) ^ state(F 0 )

(1)

encodes the set of labeled edges that correspond to its models: that is, the start state corresponds to the interpretation of the symbols in F , the label corresponds to the interpretation of the symbols in A, and the end state corresponds to the interpretation of the symbols in F 0 . We abbreviate (1) as tr(F; A; F 0 ) :

This domain representation framework accomodates nondeterminism, concurrent actions and dynamic worlds. For an example illustrating all three features, take F = fHeads; JustWong and A = fToss; CallHeadsg, and let state(F ) = JustWon  Heads. For act(F; A; F 0 ) take the conjunction of the following two formulas.

0 :Toss  (Heads  Heads) 0 0 JustWon  Heads ^ Toss ^ CallHeads

Executing Toss and CallHeads (concurrently) in any state results in either state fHeads; JustWong or state ;. Executing no action in state fHeads; JustWong results in state fHeadsg. We do not address in this paper how such action representations are to be obtained. There are many possibilities. For instance, domain descriptions in STRIPS-based languages are easily translated (in polynomial time) into domain descriptions in the format used in this paper. Such descriptions can also be obtained from more expressive action languages, such as the high-level action language C [Giunchiglia and Lifschitz, 1998], for which “definite” descriptions yield such classical propositional theories in polynomial time by the syntactic process of “literal completion” introduced in [McCain and Turner, 1997]. For example, the domain description above can be obtained from the following C description.

never JustWon Heads default JustWon inertial Heads Heads Toss possibly auses Heads Toss possibly auses Heads

aused JustWon if Heads after Toss CallHeads ^ :

:

;:

:

^

2.2

Planning Framework

In the remainder of the paper, we use this action representation framework to investigate the computational complexity of several classes of planning problems. That is, we consider

the complexity of the associated decision problem—existence of a valid plan. The input size parameter for our complexity results is (any reasonable measure of) the size of (1) plus the size of the formula init(F ) describing the initial state and the formula goal(F ) describing the goal. (As before, we assume that the nonlogical symbols in these formulas are taken from F .) Henceforth, we will find it convenient to assume that init(F ) j= state(F ) : We will be interested in plans whose length is bounded by a polynomial in the input size. Precise formulations for the existence of a valid plan, for various types of plans—namely, unconditional, conditional, conditional with partial observability—will be developed in subsequent sections.

2.3

The Polynomial Hierarchy and PSPACE

For our purposes, it is convenient to characterize complexity classes in terms of second-order propositional logic. (See, for instance, [Papadimitriou, 1994].) Consider quantified boolean formulas (QBFs) of the form Q1 x1 Q2 x2    Qk xk

(

x1 ; x2 ; : : : ; x k

)

(2)

where (i) each of x1 ; x2 ; : : : ; xk stands for a tuple of propositional variables, (ii) each of Q1 ; Q2 ; : : : ; Qk stands for a quantifier, with each Qi+1 different from Qi , and (iii) (x1 ; x2 ; : : : ; xn ) is a formula without quantifiers and without nonlogical constants, whose variables are taken from x1 ; x2 ; : : : ; xn . For a formula of this kind, the corresponding decision problem is this: Is it satisfiable? Equivalently, we can ask if it is logically valid, or, since no nonlogical constants occur in it, we may simply ask if it is true. For each natural number k , the complexity class P correk sponds to the family of formulas of form (2) with Q1 = 9, and the complexity class P corresponds to the family of k such formulas with Q1 = 8. That is, for each of these families of QBFs, the decision problem is complete for the corresponding complexity class. Some important special cases are P P1 = , P1 = , and P . Finally, the 0 = 0 = complexity class PSPACE corresponds to the decision problem for the family of all QBFs of form (2).

NP

2.4

oNP

P

Some Common Assumptions in Planning

The assumption that the initial state is completely described is expressed by the QBF 9f

(init( ) f

^ 8f

0 (init(f 0 )  f

= 0 )) f

(respectively f 0 ) is a tuple of distinct propositional

where f variables corresponding to the propositional constants in F (respectively F 0 ), and f = f 0 is shorthand for the conjunction of formulas p  p0 for each pair of similar variables p 2 f and p0 2 f 0 . (From now on we’ll employ such notation without remarking on it.)

An action domain is deterministic iff the QBF 8f 8a 8f

0 8f 00 (tr(f; a; f 0 ) ^ tr(f; a; f 00 )  f 0 = f 00 )

is true. So determining that an action domain is deterministic is a problem in coNP. Moreover, it is coNP-hard. Proposition 1 Determining that an action domain is deterministic is coNP-complete. Actions are always executable iff the QBF 8f 8a 9f

0 (state(f )  tr(f; a; f 0 ))

is true. So determining that actions are always executable is a problem in P 2 . Again, hardness can be shown. Proposition 2 Determining that actions are always executable is P 2 -complete. In many accounts of planning, it is unusual for actions to be always executable. Nonetheless, action description languages used for planning often have a similarly useful property: not only is there a polynomial-time algorithm for obtaining formulas state(F ) and act(F; A; F 0 ), but there is also a polynomial-time algorithm for obtaining a classical propositional formula executable(F; A), logically equivalent to state(F )  9f 0 tr(F; A; f 0 ), in which only atoms from F [ A occur. Such action description languages make it easy to determine whether actions are executable in a state. Given such a characterization of executability, one can easily make actions always executable. Add a new fluent symbol OK. Let state(F [ fOKg) = state(F ), and obtain act(F [ fOKg; A; F 0 [ fOK0 g) by conjoining the following. OK0

OK ^ executable(F; A) OK0  act(F; A; F 0 ) 0 0 :OK  F = F



Now a planning problem for the original domain description can be equivalently posed for the transformed description by conjoining OK with each of init(F ) and goal(F ). (By the way, notice that this transformation does not introduce additional concurrency or nondeterminism.) Thus, for instance, a planning problem posed using a STRIPS-based action representation language can be translated in polynomial time into our planning framework, with the additional guarantee that actions will be always executable in the resulting domain description. We say that the executability of actions is polynomial-time computable iff, for every interpretation I of F [ A that satisfies state(F ), whether I j= 9f 0 tr(F; A; f 0 ) can be decided in polynomial time. Of course in our framework it is in general not the case that the executability of actions in a state can be determined in polynomial time (assuming 6= ).

Typically, the language will include action atoms (each representing the proposition that a certain action occurs at a certain time) and fluent atoms (each representing the proposition that a certain fluent holds at a certain time). Assume that action atoms have the form Actt , where Act is an action symbol and subscript t is a natural number—the “time stamp” of Actt . Similarly, assume that fluent atoms have the form Pt , with P a fluent symbol and t a time stamp. A plan of length k is obtained by finding a model of init(F0 ) ^

^1

k

tr(Ft ; At ; Ft+1 ) ^ goal(Fk )

(3)

t=0

where each Fi (respectively Ai ) is the set of fluent atoms (respectively action atoms) obtained by adding time stamp i to each fluent symbol (respectively action symbol). The plan is the sequence of (possibly concurrent) action occurrences corresponding to the interpretation of the action atoms. In order to guarantee that the plan extracted from a model of (3) is valid—that is, always executable and sure to achieve the goal under all possible executions—the initial state must be completely described, and the domain must be deterministic. If these assumptions are indeed satisfied, the existence of a valid plan is expressed by the QBF

z }| { 

z }| { 9f V 11

9f0 9a0 9f1    9ak

init(f0 ) ^

k

t=0

 (4)

k

tr(ft ; at ; ft+1 ) ^ goal(fk )

where each fi (respectively ai ) is a tuple of distinct propositional variables corresponding to the propositional constants in Fi (respectively Ai ). This shows once again what is widely known: classical planning, for plans of polynomiallybounded length, belongs to . (Of course k is polynomiV ally bounded so that the formula tk=01 tr(ft ; at ; ft+1 ) can be obtained in polynomially-bounded time from tr(F; A; F 0 ).) Recall that, in the current framework, classical planning includes the possibility of concurrent actions. Moreover, it may not be possible to determine in polynomial time whether given actions are executable in a given state. These complications do not push the problem beyond .

NP

NP

Theorem 1 Classical planning for plans of length 1 is -hard, even if actions are always executable.

NP

Corollary 1 Classical planning is NP-complete, for plans of polynomially-bounded length.

Proposition 3 Determining that given actions are executable in a given state is NP-complete.

Notice that (4) is true iff there is a plan of exactly length k . This is significant because our framework allows for dynamic worlds in which the state may change even when no actions occur. It is not difficult though to modify a domain description (in polynomial time) so that we can instead decide directly the existence of a plan of length at most k .

3

4

P NP

Classical Planning

In our planning framework, classical planning is essentially what is widely known as satisfiability planning [Kautz and Selman, 1992]. In satisfiability planning, an action domain is (also) described by a finite theory of propositional logic.

Conformant Planning

In conformant planning, a plan is still a sequence of (possibly concurrent) actions, but the action domain may be nondeterministic, and the initial state may be incompletely specified. As usual, a plan is valid if it is guaranteed to be executable,

and every possible execution achieves the goal. The key issues can be illustrated by considering plans of length 1. There is at least one possible initial state: init(f0 ) :

9f0

(5)

There is an unconditional one-step plan that is executable starting from any of the possible initial states:

(init( 0 )

9a0 8f0

f

 9f1

tr(f0 ; a0 ; f1 )) :

(6)

There is an unconditional one-step plan that achieves the goal in every possible execution starting from any of the possible initial states: 9a0 8f0

(init( 0 ) f

(tr(

 8f1

f0 ; a0 ; f1

)



goal(f1 ))) :

So to say there is a one-step unconditional plan that is executable (starting in any possible initial state) and sufficient to achieve the goal (when executed starting in any possible initial state), we can write 9a0 8f0

(init( 0 ) f

tr(f0 ; a0 ; f1 ) (7) ^ 8f1 (tr(f0 ; a0 ; f1 )  goal(f1 ))) :

 9f1

Consequently, the decision problem for one-step unconditional planning is expressed by the conjunction of (5) and (7). We can put (7) in prenex form as follows.

0 (init(f0 )  tr(f0 ; a0 ; f10 )

9a0 8f0 8f1 9f1

(tr(

^

f 0 ; a0 ; f1

)



goal(f1 )))

Hence, the decision problem for one-step conformant planning belongs to the complexity class P 3 . Hardness can also be shown. Theorem 2 Conformant planning for plans of length 1 is

3 -hard. P

So far we have considered conformant planning only for plans of length 1. As a first step toward the general formulation, let us consider plans of length 2. We need not alter the formula (5) expressing the existence of at least one possible initial state. To say that there is an unconditional plan whose first step is executable in any possible initial state, we can (again) write (6). To say that there is an unconditional plan such that the second step is executable in any state reached after executing the first step in any possible initial state, we can write 9a0 9a1 8f0 8f1

(init( 0 ) tr( f

^

f 0 ; a0 ; f1

)

 9f2

tr(f1 ; a1 ; f2 )) :

To say that there is an unconditional two-step plan whose execution is sufficient to achieve the goal (starting in any possible initial state), we can write 9a0 9a1 8f0 8f1 8f2

(init( 0 ) f

^

tr(f0 ; a0 ; f1 ) ^ tr(f1 ; a1 ; f2 )  goal(f2 )) :

Combining (6) and these last two formulas appropriately in in prenex form, we can obtain

0

0

9a0 9a1 8f0 8f1 8f2 9f1 9f2

((init(f0 )  tr(f0 ; a0 ; f10 )) ^ ^

(init( 0 ) (init( 0 ) f

^

f

^

tr(f0 ; a0 ; f1 )  tr(f1 ; a1 ; f20 )) tr(f0 ; a0 ; f1 ) ^ tr(f1 ; a1 ; f2 )  goal(f2 ))) :

The general form is similar. For conformant planning for plans of length k , take the conjunction of (5) and

V



9a0    9ak

^

0

0

1 8f0    8fk 9f1    9fk t 1 init f0 ^ u=0 tr fu ; au ; fu+1

V

( ) (  V 1 init( 0 ) =0 tr(

1 t=0 k

f

^

k

t

ft ; at ; ft+1

)



)





tr(ft ; at ; ft0+1 )



goal(fk )

:

(8) The form of (8) shows that conformant planning for plans of polynomially-bounded length is in P 3 . Corollary 2 Conformant planning is P 3 -complete, for plans of polynomially-bounded length. In a comment following their formally stated complexity results, Eiter et al. [2000] mention a similar P 3 -completeness result for conformant planning, but their result is restricted to plans of a fixed length. They employ an expressive highlevel action description language whose salient feature in this context is that determining the executability of given actions -complete. in a given state is If we assume that actions are always executable, we can eliminate the check for plan executability from (8), which can then be reduced to

NP



9a0    9ak

1 8f0    8fk k 1 f0 ^ tr ft ; at ; ft+1 t=0

init(

)

V

(

)





goal(fk )

:

(9)

So the complexity of conformant planning falls to P 2 if actions are always executable. We can show hardness for plans of length 1 even if we assume in addition that the action domain is deterministic. Theorem 3 Conformant planning for plans of length 1 is P2 -hard for deterministic planning domains in which actions are always executable. Theorem 4 Conformant planning is P 2 -complete, for plans of polynomially-bounded length, if the executability of actions is polynomial-time computable. A similar result (Theorem 2) in [Baral et al., 2000] is obtained using an action representation language that guarantees determinism and nonconcurrency, and makes it easy to determine whether actions are executable in a state (as discussed in Section 2.4). Our analysis suggests that only the last property is crucial for placing the problem within P 2 . On the other hand, as mentioned previously, [Eiter et al., 2000] employs a relatively expressive action description language, and a related P 2 result reported there (Theorem 3) is also obtained by directly imposing polynomial-time decidability of executability of given actions in a given state. The latter result again assumes that plan length is fixed (not just polynomially-bounded). We are now in position to verify that our formulation of conformant planning reduces to classical planning if we assume determinism and a completely specified initial state. Under the assumption of a completely specified initial state, (5) can be dropped, and (9) can be replaced by 9a0    9ak

 9f 1 9f0 9f1   V

init(f0 ) ^

which is equivalent to (4).

k

k

1

t=0



tr(ft ; at ; ft+1 ) ^ goal(fk )

5

Conditional Planning

Conditional planning is an extension of conformant planning in which the actions to be performed in executing a plan may depend on the previous execution history. In this setting, interesting questions arise concerning the nature of this dependence. For the analysis in this section, we simply assume that each step in the execution of a conditional plan may depend arbitrarily on the previous execution history. Thus, in a rather general sense, we address here the fundamental question of existence of a valid conditional plan. In the following section, we go on to consider what happens if the current state is only partially observable during plan execution. As with conformant planning, it is convenient to begin by considering plans of length 1. Of course the existence of at least one possible initial state is again expressed by (5). To say that there is a one-step conditional plan that is executable in any possible initial state, we can write 8f0

(init( 0 ) f

 9a0 9f1

tr(f0 ; a0 ; f1 )) :

(10)

To say that there is a one-step conditional plan that is sufficient to achieve the goal if executed starting in any possible initial state, we can write 8f0

(init( 0 ) f

 9a0 8f1

(tr(

f0 ; a0 ; f1

)



goal(f1 ))) :

Consequently, a formula for the decision problem corresponding to one-step conditional planning is the conjunction of (5) and

0

8f0 9a0 9f1 8f1

(init( 0 ) f

tr(f0 ; a0 ; f10 ) (tr(f0 ; a0 ; f1 )  goal(f1 ))) :



^

As a first step toward obtaining the general form, let’s consider conditional plans of length 2. We need not alter the formula (5) expressing the existence of at least one possible initial state. To say that there is a conditional plan whose first step is executable in any possible initial state, we (again) write (10). To say that there is a conditional plan such that the second step is executable in any state reached after executing the first step in any possible initial state, we can write 8f0

(init( 0 ) f

 9a0 8f1

(tr(

f 0 ; a0 ; f1

)



9a1 9f2

tr(f1 ; a1 ; f2 ))) :

To say that there is a two-step conditional plan whose execution is sufficient to achieve the goal (starting in any possible initial state), we can write 8f0

(init( 0 ) f

 9a0 8f1

(tr(

f 0 ; a0 ; f1

9a1 8f2

(tr(

)



f1 ; a1 ; f2

)



goal(f2 )))) :

Combining (10) and these last two formulas appropriately in prenex form, we can obtain

0

0

8f0 9a0 8f1 9a1 9f1 9f2 8f2

((init( 0 ) tr( 0 0 10 )) (init( 0 ) tr( 0 0 1 ) (init( 0 ) tr( 0 0 1 ) f



f ;a ;f

^

f

^

f ;a ;f



^

f

^

f ;a ;f

^

tr(f1 ; a1 ; f20 )) tr(f1 ; a1 ; f2 )  goal(f2 ))) :

Notice that, written in this form, it is clear that the “choice” of actions to be performed at time 0 depends only on the values of fluents at time 0. Similarly, the choice of actions to be performed at time 1 depends only on the values of fluents at

time 0, the actions performed at time 0, and the values of fluents at time 1. Here’s the general form. For conditional planning for plans of length k , take the conjunction of (5) and the following.

z }| { V 

z

8f0 9a0    8fk

1 t=0 k



^

}| { V 11

V

k

9f1    9f

0

k



8fk

tr(fu ; au ; fu+1 )  tr(ft ; at ; ft0+1 ) u=0

init(f0 ) ^

init(f0 ) ^

0

1 9ak t

1

t=0



tr(ft ; at ; ft+1 )  goal(fk )

(11) So the decision problem for conditional planning for plans of length k (k > 0) belongs to complexity class P 2k+1 . If actions are always executable, (11) can be simplified:

z }| {



z

8f0 9a0 8f1    9ak

}|

{

1 8fk

init(f0 ) ^

V

k

1

t=0



tr(ft ; at ; ft+1 )  goal(fk )

Theorem 5 Conditional planning for plans of length P2k+1 -hard, even if actions are always executable.

:

k

is

Corollary 3 Conditional planning for plans of length (k > 0) is P 2k+1 -complete.

k

PSPACE-complete,

Corollary 4 Conditional planning is for plans of polynomially-bounded length.

PSPACE

A related -completness result appears in [Littman, 1997] (Theorem 2). Although Littman is interested in probabilistic planning, his proof construction for hardness essentially uses just nondeterminism. On the other hand, it does not appear that his completeness result implies Corollary 4, since in his approach actions are always executable. What if we assume that the action domain is deterministic? Then (11) can be equivalently replaced with

z }| { 

z

8f0 9a0 9f1    9ak

}|

{

1 9fk

init(f0 ) 

V

k

1

t=0



tr(ft ; at ; ft+1 ) ^ goal(fk )

which drops the complexity to P 2 ! Moreover, we can show hardness even if actions are always executable. Theorem 6 For deterministic planning domains in which actions are always executable, conditional planning for plans of length 1 is P 2 -hard. A similar hardness result is obtained in [Rintanen, 1999] (Theorem 2), using a deterministic action language, without concurrency, for which it is easy to determine executability of actions in a state. Corollary 5 Conditional planning in deterministic planning domains is P 2 -complete, for plans of polynomially-bounded length. A similar completeness result appears in [Baral et al., 2000] (Theorem 8). As mentioned previously, they use deterministic action domains for which it is easy to determine executability of actions in a state. Our analysis suggests that the key is determinism.

6

Conditional Planning with Partial Observability

junction of (5) and O

Our analysis so far cannot account for an intruiging result obtained by Baral et al. [2000]. Despite the fact that they consider only deterministic action domains, their Theorem 4 identifies a variant of polynomial-length conditional planning that is -hard. The key is that their action description language incorporates a rudimentary account of sensing actions. This feature allows them to model planning domains in which knowledge of the current state during plan execution is incomplete because the current state is only partially observable. Such planning domains can be modeled in our setting by partitioning the set F of fluent symbols into two sets O N F ;F intuitively corresponding to observable and nonobservable fluents, respectively. Let’s start again with plans of length 1. As usual, the existence of at least one possible initial state is expressed by (5). The existence of a conditional one-step plan that can be executed in any possible initial state is expressed by

PSPACE

O

8f0

N

9a0 8f0

(init( 0 ) f

 9f1

tr(f0 ; a0 ; f1 )) :

Notice that the choice of actions to be performed at time 0 depends only on the values of observable fluents at time 0. The existence of a conditional one-step plan sufficient to achieve the goal (when executed starting in any possible initial state) is expressed by O

8f0

N

9a0 8f0

(init( 0 ) f

 8f1

(tr(

f 0 ; a0 ; f1

)



goal(f1 ))) :

Again, the choice of actions to be performed at time 0 depends only on the values of observable fluents at time 0. As we did previously for simpler forms of planning, we combine formulas expressing executability and sufficiency, obtaining O

8f0

N

9a0 8f0

0 8f1 9f1 (init(f0 )  tr(f0 ; a0 ; f10 ) ^ (tr(f0 ; a0 ; f1 )  goal(f1 ))) ;

which, conjoined with (5), expresses the decision problem for one-step conditional planning with partial observability. To extend this to two-step conditional planning, we need to express the existence of a two-step conditional plan such that the second step is executable in any state reached by executing the first step in any possible initial state. In doing so, we must capture the fact that (i) the choice of actions to be performed at time 0 depends only on the observable fluents at time 0, and (ii) the choice of actions to be performed at time 1 depends only on the observable fluents at time 0, the actions performed at time 0, and the observable fluents at time 1. O

8f0

O

9a0 8f1

N

9a1 8f0

(init( 0 ) f

^

N

8f1

tr(f0 ; a0 ; f1 )  9f2 tr(f1 ; a2 ; f2 ))

We similarly need to express that there exists such a plan that is sufficient to achieve the goal when executed starting in any possible initial state. O

8f0

O

9a0 8f1

(init( 0 ) f

^

N

9a1 8f0

O

8f0

N

8f1

tr(f0 ; a0 ; f1 )  8f2 (tr(f1 ; a2 ; f2 )  goal(f2 )))

These observations suggest that two-step conditional planning with partial observability can be expressed by the con-

N

9a0 8f1

9a1 8f0

N

8f1

((init(f0 )  tr(f0 ; a0 ; f10 ))

0

0

8f2 9f1 9f2

tr(f0 ; a0 ; f1 )  tr(f1 ; a1 ; f20 )) tr(f0 ; a0 ; f1 ) ^ tr(f1 ; a1 ; f2 )  goal(f2 ))) : Here’s the general form. For conditional planning with partial observability for plans of length k , take the conjunction of (5) and the following. ^

^

(init( 0 ) (init( 0 ) f

^

f

^

z }| { z }| { 0 0 8f0 9a0    8f 1 8f0    8f 1 9a 1 8f 9f1    9f V   V 1 1 0 init(f0 ) ^ =0 =0 tr(f ; a ; f +1 )  tr(f ; a ; f +1 )   V O

O k

t

t

u

^

init(f0 ) ^

k

1

t=0

N k

N

k

k

u

u

k

u

k

t

tr(ft ; at ; ft+1 )  goal(fk )

t

t

(12) So for plans of length k , conditional planning with partial observability belongs to complexity class P 2k+2 . We can immediately conclude, based on the hardness results established in the previous section (with “complete” observability), that the problem is PSPACE-complete. Corollary 6 Conditional planning with partial observability is PSPACE-complete, for plans of polynomially-bounded length. We can refine this result. Theorem 7 Conditional planning with partial observability for plans of length k (k > 0) is P 2k+2 -complete. If actions are always executable, take the conjunction of (5) and the following.

z }| { O

8f0

z 

O

9a0    8fk

}|

{

1 9ak

init(f0 )

N

N

1 8f0    8fk 1 8fk k 1 ^ tr ft ; at ; ft+1  t=0

V

(

)



goal(fk )

So the problem falls to P 2k+1 , and we’ve already established hardness for the special case when all fluents are observable (Theorem 5). Here’s a stronger hardness result, in which we assume also that the action domain is deterministic. Theorem 8 For deterministic planning domains with actions always executable, conditional planning with partial observability for plans of length k is P 2k+1 -hard. Corollary 7 For deterministic planning domains with actions always executable, conditional planning with partial observability is PSPACE-hard, for plans of polynomiallybounded length. Theorem 9 Conditional planning with partial observability for plans of length k (k > 0) is P 2k+1 -complete, if the executability of actions is polynomial-time computable. We are now in position to verify that all forms of planning considered in this paper can be seen as special cases of conditional planning with partial observability. If all fluents are observable, (12) reduces to a formula equivalent to (11), so, as one would expect, conditional planning with partial observability includes conditional planning with “complete” observability as a special case. If on the other hand no fluents are observable, (12) reduces to (8), showing that conformant planning too is a special case of conditional planning with partial observability. Of course we observed previously that classical planning is a special case of conformant planning.

7

Hardness Without Concurrent Actions

Eliminating concurrency has little effect on hardness. An action domain is nonconcurrent iff

^

tr(F; A; F 0 )



( (1)

: A

A(1); A(2) A(1)

6=

2

(2))

^A

P

A

A(2)

is logically valid. It is convenient to introduce a special notion of “always executable” for nonconcurrent domains. Nonconcurrent actions are always executable iff the following formula is logically valid. state(F )

^

^

A(1); A(2) A(1)

( (1)

: A

6=

2

(2))

^ A

It is not clear that this possibility reduces the complexity of classical planning. Roughly speaking, after quantifiers over actions are eliminated from (4), we are left with a disjunction of a polynomial number of “unambiguous sat” problems (in which the question is: Is a propositional theory with at most one model satisfiable?). This problem is thought to be beyond without being -hard [Papadimitriou, 1994]. On the other hand, when plan length is fixed the complexity of conformant planning drops for nonconcurrent domains.



9f

0 tr(F; A; f 0 )

A

A(2)

Proposition 4 Determining that an action domain is nonconcurrent is coNP-complete. Hardness in Propositions 1–3 holds even for nonconcurrent domains. Theorems 1–3 and 5–8 establish hardness results for plans of fixed length, but the proof constructions rely on concurrency. Corresponding hardness results for nonconcurrent domains can be established by allowing instead plans of length jAj (so plan length can be linearly-bounded in the size of input). In each case, there is a corresponding proof construction in which A is the set of action symbols used in the original (concurrent) construction and actions previously performed concurrently are performed sequentially instead. Theorem 10 For nonconcurrent domains: (i) Classical planning for plans of length jAj is -hard, even when actions are always executable. (ii) Conformant planning for plans of length jAj is P 3 -hard. (iii) Conformant planning for plans of length jAj is P 2 -hard for deterministic planning domains in which actions are always executable. (iv) Conditional planning for plans of length jAj is -hard, even if actions are always executable. (v) Conditional planning for plans of length jAj is P 2 -hard for deterministic action domains in which actions are always executable. (vi) Conditional planning with partial observability for plans of length jAj is -hard for deterministic action domains in which actions are always executable.

NP

PSPACE

PSPACE

We have noted that the complexity results from [Eiter et al., 2000] most closely related to those of this paper employ an assumption of fixed plan length (rather than polynomiallybounded plan length). It may be interesting to consider the effect of assuming both nonconcurrency and fixed plan length. For classical and conformant planning, a fixed plan length guarantees that the number of possible plans with no concurrent actions is polynomially-bounded: there are (jAj + 1)k nonconcurrent plans of length k . Consequently, the existential quantifiers over actions in formula (4) for classical planning and formula (8) for conformant planning can be eliminated in polynomial time.

NP

Theorem 11 For nonconcurrent domains: (i) Conformant planning for plans of length 1 is P 2 -hard. (ii) Conformant planning for plans of fixed length is P2 -complete. (iii) For deterministic planning domains in which actions are always executable, conformant planning for plans of length 1 is D P -hard. (iv) For deterministic planning domains in which the executability of actions is polynomial-time computable, conformant planning for plans of fixed length is P D -complete. The complexity class D P consists of problems that can be probsolved in polynomial-time given the answer to one lem and one coNP problem. Parts (ii) and (iv) of Theorem 11 are very similar to results in [Eiter et al., 2000] (Theorem 4 and subsequent remarks). What about the effect of fixed plan length on the complexity of conditional planning without concurrency? It is clear that we do not obtain a polynomial bound on the number of possible plans. In fact, we do not even obtain a polynomial bound on the space needed to represent a conditional plan, since a conditional plan is essentially a function that maps the observable portion of a partial plan execution to the next action to be performed. On this view, for plan length k , a plan O function has a domain of size ki=1 (2jF j )i .

NP

8

Conditional Planning with Polynomially-Bounded Plan Representations

Since even a fixed plan length does not yield a polynomial bound on the size of conditional plans, we may wish to consider imposing such a bound directly. In fact this possibility is crucial in the computational approach to conditional planning described by Rintanen [1999]. As mentioned previously, Rintanen’s paper includes a proof of P 2 -hardness for conditional planning. But his main concern is with computational approaches based on problem encodings that directly restrict the size of possible plans to be considered. More precisely, he introduces several different planning problem encodings (in second-order propositional logic), each requiring only polynomial time to construct (given a domain description in his action representation language). Each such encoding restricts consideration to the family of conditional plans that are representable in that particular polynomial-size encoding. Rintanen claims for such computational approaches a complexity of P 2 . Notice though that we can understand conformant planning as one of the possible manifestations of such

One-step planning:

0 (init(f0 ) ^ plan(p0 ; f ; a0 ; p1 )  tr(f0 ; a0 ; f 0 ) ^ (tr(f0 ; a0 ; f1 )  goal(f1 ))) 0 1 0 0 0 Two-step planning, where step(P; F; A; P ; F ) stands for plan(P; F ; A; P ) ^ tr(F; A; F 0 ): O

9p0 8p1 8a0 8f0 f1 9f1

O

0 0 ((init(f0 ) ^ plan(p0 ; f0

9p0 8p1 p2 8a0 a1 8f0 f1 f2 9f1 f2

tr(f0 ; a0 ; f10 )) O 0 ^ (init(f0 ) ^ step(p0 ; f0 ; a0 ; p1 ; f1 ) ^ plan(p1 ; f1 ; a1 ; p2 )  tr(f1 ; a1 ; f2 )) ^ (init(f0 ) ^ step(p0 ; f0 ; a0 ; p1 ; f1 ) ^ step(p1 ; f1 ; a1 ; p2 ; f2 )  goal(f2 ))) O

General formulation:

V ^

1 t=0 k



0

 1 8f0    f V9f1    f

9p0 8p1    pk 8a0    ak

init(f0 ) ^

init(f0 ) ^

V

k

1 t=0 k

1 u=0

t

; a0 ; p 1

)



0



k

step(pu ; fu ; au ; pu+1 ; fu+1 ) ^ plan(pt ; ftO ; at ; pt+1 )  tr(ft ; at ; ft0+1 )



step(pt ; ft ; at ; pt+1 ; ft+1 )  goal(fk )

Figure 1: Conditional planning, for a family of plans with a polynomial-size representation. an approach, and it is P 3 -hard. It appears that Rintanen’s informal argument depends on an implicit assumption that executability of actions in a state is polynomial-time computable. Rintanen’s approach resembles that taken by [Littman et al., 1998] in the setting of probabilistic planning (with the implicit assumption that actions are always executable). Littman et al. consider several plan encodings of polynomiallybounded size and obtain complexity results closely related to the P 2 result for propositional conditional planning. It appears that such results are necessarily fragmentary— that is, each depends on a particular choice of (polynomialsize) plan representation. As mentioned previously, we can view a conditional plan as a function that maps the observable portion of a partial execution history to the set of next actions to take. Presumably, not just any polynomial-size representation of such a plan function will do. In particular, it seems reasonable to choose a representation guaranteed to allow polynomial-time computation of the plan function. Here’s a sketch of another family of such results. Define (as a ptime-computable function of the set F O [ A of atoms and the plan length k ) a set P of new “plan” atoms, and define a ptime construction that takes P and tr(F; A; F 0 ) to a classical propositional formula plan(P; F O ; A; P 0 ) in which each atom X of A [ P 0 appears only as the left-hand side of an equivalence X  FX (P; F O ). So each atom of A [ P 0 is explicitly defined in terms of atoms from P [ F O . (Consequently, the value of each atom in A [ P 0 can be computed in polynomial-time given the values of the atoms in P [ F O .) Figure 1 shows how the associated planning problem can be expressed. In this formulation, the conditional plan is determined by the choice of values for the plan atoms at time 0. It is clear that this problem belongs to P 3 , for any choice of ptime construction for plan formula plan(P; F O ; A; P 0 ). It is also clear that we can devise a p-time construction for plan(P; F O ; A; P 0 ) that captures conformant planning for plans of length 1. Hence, for some such families of psize conditional plans, the plan existence problem is P 3 -hard. As with conformant planning, the plan existence problem will drop to P 2 if the executability of actions is polynomialtime computable.

Acknowledgements Thanks to Vladimir Lifschitz and Jussi Rintanen for helpful comments. This work partially supported by NSF Career Grant #0091773.

References [Baral et al., 2000] Chitta Baral, Vladik Kreinovich, and Raul Trejo. Computational complexity of planning and approximate planning in presence of incompleteness. Artificial Intelligence, 2000. To appear. [Eiter et al., 2000] Thomas Eiter, Wolfgang Faber, Nicola Leone, Gerald Pfeifer, and Axel Polleres. Planning under incomplete information. In Proc. Computational Logic 2000, 2000. [Giunchiglia and Lifschitz, 1998] Enrico Giunchiglia and Vladimir Lifschitz. An action language based on causal explanation: Preliminary report. In Proc. AAAI-98, pages 623–630, 1998. [Kautz and Selman, 1992] Henry Kautz and Bart Selman. Planning as satisfiability. In J. Lloyd, editor, Proceedings of the 10th European Conference on Artificial Intelligence (ECAI 92), pages 359–379, Vienna, Austria, 1992. [Littman et al., 1998] Michael Littman, Judy Goldsmith, and Martin Mundhenk. The computational complexity of probabilistic planning. Journal of Artificial Intelligence Research, 9:1–36, 1998. [Littman, 1997] Michael Littman. Probabilistic propositional planning: representations and complexity. In Proc. of AAAI-97, pages 748–754, 1997. [McCain and Turner, 1997] Norman McCain and Hudson Turner. Causal theories of action and change. In Proc. of AAAI-97, pages 460–465, 1997. [Papadimitriou, 1994] Christos Papadimitriou. Computational Complexity. Addison Wesley, 1994. [Rintanen, 1999] Jussi Rintanen. Constructing conditional plans by a theorem prover. Journal of Artificial Intelligence Research, 10:323–352, 1999.