2.2 Partial-order planning
2.2.1 An algorithm for partial-order planning
Intuitively, since π is a solution when it has no flaw, the main principle is to refine π, while maintaining ≺ and B consistent, until it has no flaw. The basic operations for refining a partial plan π toward a solution plan are the following:
– Find the flaws of π, i.e., its subgoals and its threats. – Select one such flaw.
procedure PSP(π)
f laws← OpenGoals (π) ∪ Threats (π) if f laws = /0 then return π
select any flaw φ ∈ f laws resolvers← Resolve (φ, π)
if resolvers = /0 then return failure
non-deterministically choose choose a resolver ρ ∈ resolvers π0← Refine (ρ, π)
return PSP (π0)
Figure 2.7: The PSP procedure.
– Choose a resolver for the flaw. – Refine π according to that resolver.
Figure 2.7 specifies a recursive non-deterministic procedure called PSP (for Plan- Space Planning) for resolving plan-space planning problems. Specifically:
– flaws denotes the set of all flaws in π provided by procedures OpenGoals and Threats; φ is a particular flaw in this set.
– resolvers denotes the set of all possible ways to resolve a specific flaw φ in a plan π and is given by the procedure Resolve. The resolver ρ is a particular element of this set.
– π0is the new plan obtained by refining π according to the resolver ρ as a conse- quence of the procedure Refine.
The PSP procedure is called with an initial plan π0and each successful recursion is
a refinement of the current plan according to the given resolver. Each invocation of the Resolve procedure introduces new variables and/or constraints to an underlying dy- namic constraint network which is responsible for maintaining consistent the domains od the variables with the ≺ and B constraints. Intuitively, refinement operations avoid adding to the partial plan any constraint that is not strictly needed for addressing the refinement purpose (this is called the least commitment principle). It is worth noticing that more than in finding a complete assignment for all the variables of the constraint network, we are interested only in checking its consistency. Because this check should be made for each node of the search space we are interested in efficient polynomial procedures even at the cost of some compromise (i.e., the possibility for false positives in the consistency check procedure). Moreover, since the real world has high degrees of uncertainty, we are interested in maintaining different possible solutions in a sin- gle constraint network which might come in handy at plan execution time in order to handle possible unforeseen events.
Solving the classic rover domain. What happen if we apply the partial-order ap- proach at the rover domain? Initially, the π0partial plan contains the a0action, at time
zero, having {At (pos2) , PntngAt (straight)} as positive effects. Additionally, π0con-
tains the ainfaction, whose temporal variable has domain, initially, within the [0, + inf]
interval, having {TakenPic (pos3, right)} as preconditions. The OpenGoals procedure,
initially, returns the sole TakenPic (pos3, right) goal which can be resolved by intro-
ducing both a partial instantiation of the TakePicture (?at, ?pntng_at) operator and a causal link linking its effect to the precondition of the ainf action. It is worth noting
that while the introduction of the operator introduces three variables in the underlying constraint network (i.e., the ?at variable, the pntng_at variable and the action’s tem- poral variable), the introduction of the causal link constraints the ?at and the pntng_at variables to assume, respectively, the pos3and the right values. Furthermore, the intro-
duction of the ordering constraint reduces the domain of the ainf’s temporal variable to
the [1, + inf] interval. The OpenGoals procedure is called again returning, this time, the At(pos3) and the PntngAt (right) flaws. The first one can be solved by introducing a partial instantiation of the GoTo (? f rom, ?to) operator and a causal link linking its pos- itive effect to the precondition of the earlier introduced TakePicture (?at, ?pntng_at) action. This leads to the situation depicted in Figure 2.6. The flaws to be solved are, now, At (? f rom) and the still unsolved PntngAt (right). While the first one can be re- solved by introducing a causal link between the At (pos2) effect of the a0action and
the At (? f rom) GoTo’s precondition, reducing the domain of the ? f rom variable to the sole pos2allowed value, PntngAt (right) can be solved by introducing a new partially
instantiated operator, i.e., LookAt (? f rom, ?to), a causal link linking its positive effect and the PntngAt (right) precondition of the TakePicture (?at, ?pntng_at) action. Fi- nally, a causal link linking the PntngAt (straight) effect of the a0and the precondition
of the last introduced action would result in a solution plan. It is worth noting that, con- versely to the previously described classical approach, the achieved solution plan does enforces an ordering constraint between the GoTo action and the LookAt one, hence the gain in flexibility at execution time (and the partial-order name of the approach).
It is worth to highlight the fact that the order in which flaws are processed is not important neither for the soundness nor for the completeness of the procedure. It is, however, very important for efficiency aspects. In this regard, it is worth noting that the notion of explicit states, within the search procedure, is lost. State-space planners receive huge benefit from heuristics which, as has been briefly mentioned in Section 2.1.1, are explicitly defined on the concept of states. Although there are some attempts to generalize state-space heuristics to plan-space planning [87], it turns out that, in general, plan-space planners are not competitive enough with respect to state-space planners on the computationally efficiency field.