found. This approach, however, while so successful in the classical setting (Kautz and Selman,1996),1 does not appear to work well in the conformant setting. Actually, an action set may complete and consistent with an initial state, but may fail to achieve the goal for other initial state, not being valid and, thus, not encoding a conformant plan. Checking validity, however, while useful for pruning can be very expensive. We show then that such validity checks can be performed in linear time provided that the theory T encoding the problem is transformed into a logically equivalent theory T0 in Deterministic Decomposable Negation Normal Form (d-dnnf Darwiche, 2001a).
In d-dnnf, validity checks can be reduced to two linear-time operations: projection (finding the strongest consequence of a formula over some of its variables) and model counting (finding the number of satisfying assignments).
We now define the propositional encoding of conformant problems, how to verify validity using logical operations, for then introduce d-dnnf and how to verify validity efficiently, obtaining an effective conformant planner.
3.2 Propositional Encoding of Conformant Tasks
Following the conformant planning task definition of Section2.4on page18, we con-sider conformant planning problems P given by tuples of the form P = hF, I, O, Gi where F stands for the fluent symbols f in the problem, O stands for a set of de-terministic actions a with conditional effects a : C → L, I is a set of clauses over the fluents in F encoding the initial, and G is a set of literals over the fluents in F encoding the goal situations.2
We also consider parallel plans to be a sequence {A0, A1, . . . , An−1} of sets of actions.
Every pair of actions in each set Ai must be compatible, meaning that actions do not interfere each other. For more details about parallel plans see Section1.9on page10.
We assume throughout that the planning problem is consistent in the sense that the set of possible initial states is not empty, and that for no pair of conflicting rules a : C → and a : C0 → −L, there is a state reachable from some initial state s0 where both C and C0, and the precondition of the action a are all true.
We build on the propositional encoding for classical planning presented in Section1.9 on page 10. The encoding of a conformant planning problem P = hF, I, O, Gi with horizon N is called TN(P ). In this encoding there are variables xi for fluents and actions x where i is a temporal index in [0, N ] for fluents and in [0, N − 1] for actions, for the problem of finding a plan for P within N time steps. The only difference in the encoding of a conformant planning is that now the Init part of TN(P ) has a clause C0 for each init clause C ∈ I.3 Thus, the propositional encoding for a conformant problem P = hF, I, O, Gi is as follows.
Definition 3.1. The propositional theory TN(P ) for a conformant planning problem P = hF, I, O, Gi and horizon N is given by the following set of clauses:
1SeeGiunchiglia et al.(1998) for a similar approach that only branches on action literals.
2See comments on non-deterministic actions in sections2.4on page18
3If we allow clauses for encoding the goal of P , the Goal part of TN(P ) may has a clause CN
for each goal clause C ∈ G. The conformant planner depicted in this chapter supports such goals, and some benchmarks (sortnet for example) are actually encoded with clauses in goal.
1. Init: a literal C0 for each clause C ∈ I.
2. Goal: a literal LN for each literal L ∈ G.
3. Actions: For i = 0, 1, . . . , N − 1 and a ∈ O:
ai ⊃ Pre(a)i (preconditions)
Ci∧ ai ⊃ Ei+1 (for each rule a : C → E) 4. Frame: for i = 0, 1, . . . , N − 1, each fluent literal L
Li ∧ ^
a:C→¬L
¬[Ci ∧ ai] ⊃ Li+1
where the conjunction ranges over the rules a : C → ¬L
5. Exclusion: ¬ai∨ ¬a0i for i = 0, . . . , N − 1 if a and a0 are incompatible
Recall that for a formula B, Bi refers to the formula obtained by replacing each variable x in B by its time-stamped counterpart xi, and that pair of actions are incompatible when serial plans are required or if their effects share some boolean variable.
Let us consider an example of a cnf encoding of a problem, for getting a better idea of the theories we are dealing with.
Example: a CNF encoding of a conformant problem
Consider the following conformant problem P : Fluents p, q, r
Init p ∨ q, ¬r
Actions aq and ar with no preconditions, but conditional effects
• aq : p → q
• ar : q → r Goal r
Following the propositional encoding for conformant planning we show a theory T2(P ) for horizon N = 2, for obtaining serial plans:
• Init: p0∨ q0, ¬r0
• Goal: r2
• For 0 ≤ i ≤ 1, axioms for:
– Effects of actions:
pi∧ aqi⊃ qi+1 qi∧ ari ⊃ ri+1
3.2. propositional encoding of conformant tasks 31
– For each literal, the corresponding frame axiom:
p pi ⊃ pi+1
¬p ¬pi ⊃ ¬pi+1 q qi ⊃ qi+1
¬q ¬qi∧ ¬(pi∧ aqi) ⊃ ¬qi+1 r ri⊃ ri+1
¬r ¬ri∧ ¬(qi∧ ari) ⊃ ¬ri+1 – Exclusion: ¬aqi∨ ¬ari
Action Sets and Validity
Given the encoding TN(P ), we will refer to collections of action literals as action sets, and denote them as TA. We assume that no action set contains complementary or incompatible literals.
Definition 3.2. An action set TA is complete when it mentions all action variables in the theory TN(P )
We will refer to an action set that is complete, as a complete plan or simply plans.4 Definition 3.3. An action set TA is consistent if TA is logically consistent with the theory TN(P ).
If P is a classical planning problem, a consistent action set that is complete encodes a plan for P , yet this is not true if P is conformant. Indeed, a consistent action set that is complete encodes a sequence of actions that conforms with some but not necessarily all possible initial states of P .
As an illustration, consider the following conformant problem P : Fluents p, s, q, x
Init p ∨ ¬p, s, ¬q, ¬x
Actions a, b, c and d with no preconditions, but conditional effects
• a : s → q
• b : p, s → x
• c : ¬p, q → x
• d : true → ¬s Goal x
For a horizon N = 3, we can generate a propositional encoding TN(P ) that will have actions variables for time steps 0, 1 and 2. A plan for this problem is {a0, b1, c2}.
The action set {d0} is inconsistent, while {b0, d1} is consistent. It maybe extended up to a satisfying assignment of all fluents in TN(P ) by assuming that p is true in the initial situation, but cannot be extended to a conformant plan. In contrast, the action set {b0} can be extended to a conformant plan, and we will say that such action sets are valid.
4A complete plan denotes a maximal consistent set of action literals