Additive Pattern Databases for Decoupled Search
Abstract
Abstraction heuristics are the state of the art in optimal clas- sical planning as heuristic search.
Despite their success for explicit-state search, though, abstraction heuristics are not available for decoupled state-space search, an orthogonal reduction technique that can lead to exponential savings by decomposing planning tasks.
In this paper, we show how to compute pattern database (PDB) heuristics for decoupled states.
The main challenge lies in how to additively employ multiple patterns, which is crucial for strong search guidance of the heuristics.
We show that in the general case, for arbitrary collections of PDBs, computing the heuristic for a de- coupled state is exponential in the number of leaf components of decoupled search.
We derive several variants of decoupled PDB heuristics that allow to additively combine PDBs avoiding this blow-up and evaluate them empirically.
Introduction
Classical planning (Ghallab, Nau, and Traverso 2004) is the problem of ﬁnding a sequence of deterministic actions that lead from a given initial world state to a state satisfying a desired goal speciﬁcation.
A popular approach for optimally solving classical planning tasks is heuristic statespace search (Pearl 1984; Bonet and Geffner 2001) and A ∗ search in particular.
The most commonly used type of search space representation is explicit search , where each state is represented individually.
Another successful alternative is symbolic search (e.g. Torralba et al. 2017), where search states are not represented individually, but as sets of states, using symbolic data structures.
More recently, Gnad and Hoffmann (2018) introduced a third variant called decoupled search .
It entails factoring the variables of a planning task into a center and several leaf factors, with the property that leaf factors are conditionally independent.
This allows searching on the center only and keeping track of the reached leaf states and their cost, for a center path.
State-of-the-art heuristics for optimal planning for explicit A ∗ search are based on abstractions and combined with cost partitioning (e.g. Seipp and Helmert 2018;
Seipp,
Keller, and Helmert 2020; Sievers and Helmert 2021).
For decoupled search, heuristics in general have so far been computed using a compilation introduced by Gnad and Hoffmann (2018). The compilation modiﬁes the planning task based on the decoupled state for which the heuristic is computed.
It is “perfect in the limit”, i.e., computing the perfect (explicit state) heuristic on the compiled task is equivalent to computing the perfect heuristic for the decoupled state. While this approach could in principle also be used for abstraction heuristics, it is infeasible in practice because abstraction heuristics are precomputed, which is impossible given that the compilation depends on the decoupled state the heuristic should be evaluated on. In this work, we therefore deﬁne an alternative way of using an existing (explicit state) heuristic in decoupled search, which does not rely on the compilation, by enumerating all explicit states represented by a decoupled state. We show that this way of using the heuristic is at least as good as via the compilation.
Since this new approach possibly is prohibitively expensive, in the remainder of this work, we focus on computing projections, which are the fundamental abstractions underlying pattern database (PDB) heuristics (Culberson and Schaeffer 1998;
Edelkamp 2001), for decoupled search.
We show how to avoid enumerating the exponentially many explicit states represented by a decoupled state when computing the exact PDB heuristic values for that state.
Furthermore, we show how to admissibly sum up heuristic values of PDBs which are additive in the sense of the canonical PDB heuristic (Haslum et al. 2007) or which have been cost-partitioned using saturated cost partitioning (Seipp and Helmert 2018).
We prove that exact admissible combination is an NP -complete problem and present two approximations where we impose restrictions on the patterns used for the PDB heuristics.
Our experimental study shows that PDBs can yield strong performance in decoupled search, surpassing the previous state-of-the art in optimal decoupled search, LM-cut (Helmert and Domshlak 2009), for some variants.
We conclude with a discussion of directions for future work.
Background Classical Planning
We consider the SAS + planning formalism (B¨ackstr¨om and
Nebel 1995), which is based on ﬁnite-domain state variables .
Let V be a ﬁnite set of variables v , each with a ﬁnite domain D ( v ) .
A partial state s is an assignment to a subset of the variables, written vars ( s ) ⊂ V .
We write s [ v ] for the value of v in s .
For a subset V (cid:48) ⊆ V , s [ V (cid:48) ] denotes the restriction of s onto V (cid:48) ,
i.e., the assignment to V (cid:48) ∩ vars ( s ) by s .
We also treat partial states s as sets of facts v (cid:55)→ d for all v ∈ vars ( s ) and d ∈ D ( v ) .
If vars ( s ) =
V , then s is called a state .
A SAS + planning task is deﬁned as Π =
(cid:104)V , A , I , G (cid:105) .
V is a ﬁnite set of ﬁnite-domain state variables.
A is a ﬁnite set of actions a = (cid:104) pre
( a ), eﬀ ( a ), c ( a ) (cid:105) , where pre ( a ) and eﬀ ( a ) are partial states called precondition and effect of a , and c ( a ) ∈ R
+ is the cost of a .
I is the initial state and G is a partial state called the goal .
Action a is applicable in partial state s if pre ( a ) ⊆ s .
Applying it leads to the successor state s (cid:74) a (cid:75) , where s (cid:74) a (cid:75) [ v ] = eﬀ ( a )[ v ] for all v ∈ vars ( eﬀ ( a )) and s (cid:74) a (cid:75) [ v ] = s [ v ] for all v (cid:54)∈ vars ( eﬀ ( a )) .
An s - plan is a sequence π of actions applicable in I such that the resulting state s (cid:74) π (cid:75) is a goal state , i.e., G ⊆ s (cid:74) π (cid:75) .
A plan for Π is an I -plan.
The cost of π , c ( π ) , is the summed-up action cost.
Optimally solving a planning task means ﬁnding an optimal plan, i.e., one of minimal cost, or showing that no plan exists.
We write S (Π) for the set of states deﬁned over V of Π .
Pattern Database Heuristics
To solve planning tasks Π optimally, we use the A ∗ algorithm (Hart, Nilsson, and Raphael 1968) with an admissible heuristic.
A heuristic h maps a state s of the task Π to an estimate h ( s ) ∈ R 0+ ∪ {∞} of the cost of reaching a goal.
It is admissible if it never overestimates the true cost of reaching a goal from s , written h ∗ ( s ) (and also called the perfect heuristic).
A pattern database (PDB) heuristic h P is induced by a subset P ⊆ V of the variables of Π , called the pattern .
h P ( s ) is deﬁned as the perfect heuristic in the projection Π | P of Π onto P , which can be computed by removing all occurrences of variables from P in Π .
PDBs are precomputed once by computing the optimal solution costs, h P ( s P ) , of all abstract states s P ∈ S P in the abstract planning task Π | P .
During search, concrete states s are mapped to abstract states s P using a perfect hash function (Sievers, Ortlieb, and Helmert 2012).
This hash function is welldeﬁned for all partial states s Q with Q = vars ( s ) ⊇ P , and we will abuse notation by writing h P ( s Q ) for the heuristic computation of such states.
PDBs grow exponentially in the number of included variables and thus single PDB heuristics alone typically do not provide enough guidance.
Instead, state-of-the-art planners use different techniques for admissibly combining many PDB heuristics.
Let H =
{ h 1 , . . .
, h n } be a set of arbitrary admissible heuristics
h i .
We say that the heuristics in H are additive if h ( s )
= (cid:80) ni
=1 h i ( s ) is admissible.
For non-additive heuristics, a trivial alternative for admissibly combining them is replacing the sum by the maximum (e.g. Holte et al. 2006).
A more advanced combination technique for the case that h i are PDB heuristics is due to Haslum et al.
(2007) who deﬁne the canonical PDB heuristic which is based on the disjoint additivity of patterns underlying the PDBs.
Two patterns P 1 and P 2 are disjoint-additive if there exist no v 1 ∈ Pand v 2 ∈ P 2 with v 1 , v 2 ∈ vars ( eﬀ ( a )) for any action a of the task.
For a set of patterns C , also called pattern collection , the canonical PDB heuristic h C is deﬁned as the maximum over the sums of PDBs induced by patterns in maximal disjoint-additive subsets,
[Equation]
where A ( C ) is the set of maximal disjoint-additive subsets of C .
h C is admissible.
There are other combination techniques for PDBs not covered here (e.g. Felner, Korf, and
Hanan 2004; Pommerening, R¨oger, and Helmert 2013).
The most general general combination technique for a set of arbitrary admissible but non-additive heuristics H is cost partitioning (Katz and Domshlak 2010; Pommerening et al.
Cost partitioning computes each heuristic
h
c
i i under a cost function c
i different from the original cost function c of the task.
Then, (cid:80) ni
=
h c
i i is admissible if (cid:80) ni
=1 c i ( a ) ≤ c ( a ) for all actions a of the task.
Since computing the optimal cost partitioning is usually infeasible in practice, in our experiments, we use the state-of-the-art saturated cost partitioning (SCP) (Seipp and Helmert 2018).
In a nutshell, it considers the heuristics in H in an arbitrary but ﬁxed order.
When computing h c
i i , it computes the saturated costs scf i , which are the minimum costs needed by the heuristic computation.
They can be computed efﬁciently for abstraction heuristics by looping over all abstract transitions of the abstract state space.
The costs not needed by h i , c i − scf i , are the costs
c i +1 available to the next heuristic h
i +
and so on.
Decoupled Search
Decoupled search decomposes a planning task by partitioning its variables into disjoint non-empty subsets, called a factoring F ⊆ 2 V .
It imposes a structural requirement on the interaction between the factors F ∈ F , a star topology, with a single center factor C ∈ F and an arbitrary number of leaf factors L :=
F \ { C } , such that the center can interact arbitrarily with the leaves, but leaves may only interact with each other if the center is involved as well.
Formally, a factoring
F is a star factoring , iff for all actions
a ∈ A it holds that either there exists an L ∈ L such that vars ( pre ( a ))
⊆
C ∪ L and vars ( eﬀ ( a )) ⊆
L , or vars ( eﬀ ( a )) ∩ C (cid:54) = ∅ .
By imposing this structural requirement, decoupled search can efﬁciently handle cross-factor dependencies.
Throughout this work, we will assume star factorings, and omit the “star”.
Given a factoring F for a task Π , actions affecting C , i. e., with an effect on a variable in C , are called center actions , denoted A C , and those affecting a leaf are called leaf actions , denoted A L ; leaf actions of a particular leaf L ∈ L are denoted A L .
A sequence of center actions applicable in
I in the projection of Π onto C is a center path ; a sequence of A L -actions applicable in I in the projection onto L is a leaf path .
A complete assignment to C or to L ∈ L is called a center state or leaf state , respectively.
S L is the set of all leaf states and that of a particular leaf L is denoted S L .
A decoupled state s F is a pair (cid:104) s C ( s F ), prices ( s F ) (cid:105) where s C ( s F ) is a center state, and prices ( s F ) : S L (cid:55)→ R 0+ ∪ {∞} is a pricing function , mapping each leaf state to a non-negative price .
By π C ( s F ) we denote the center path on which s F was reached during search.
The pricing function is maintained during decoupled search in a way so that the price of a leaf state s L is the cost of a cheapest leaf path that ends in s L and that is compliant with π C ( s F ) , i. e., that can be embedded into π C ( s F ) such that the resulting action sequence is applicable in I in the projection of Π onto
C ∪ L .
We denote the set of all decoupled states of Π and F by S F (Π) .
Decoupled search branches over center actions only, enumerating, for each leaf separately, the set of leaf states that can be reached in form of the pricing function.
Every search algorithm can be employed on the decoupled state space (Gnad and Hoffmann 2018).
A decoupled state s F represents a set of explicit states, its member states , which takes the form of a hypercube whose dimensions are the leaf factors L .
Formally, a state s of Π is a member state of a decoupled state s F , if s [ C ] =
s C ( s F ) and, for all leaves L ∈ L , prices ( s F )
[ s [ L ]] < ∞ .
The price of s in s F is price ( s F , s ) :
= (cid:80) L ∈L prices ( s F )
[ s [ L ]] .
The hypercube of s F , denoted [ s F ] , is the set of all member states of s F .
Hypercubes capture both the reachability and the price of the member states.
For every member state s we can construct an action sequence that starts in I and ends in s by augmenting π C ( s F ) with cheapest-compliant leaf paths, i. e., the leaf paths that lead to the pricing function of s F .
A solution for a decoupled state s F is a decoupled plan , i. e., a center path π C that starts in s F and ends in a decoupled goal state s F G that contains a goal member state s ∈
[ s F G ] with G ⊆ s .
The augmented cost of a decoupled plan is c ( π C ) + min s ∈
[ s F G ] ∧ G ⊆ s price ( s F G , s ) , which takes into account both the cost of the center actions from s F to s F G , as well as the price of the cheapest goal member state of s F G .
A decoupled plan for s F is augmented-optimal if its augmented cost is minimal among all decoupled plans for s F .
In Figure 1 we illustrate two decoupled states from a simple logistics domain.
The planning task has a truck t that can drive between two locations l , r , and two packages p 1 , p 2 , that can be in the truck or at any of the two locations.
Each package can be loaded into the truck if both are are the same position, or unloaded at the current truck position if it is in the truck.
Initially, the truck and p 1 are at l and pis at r .
We consider the factoring F where the truck is in the center C = { t } , and each package forms a leaf factor L i = { p i } . Decoupled search then branches over the drive actions, while load and unload are leaf actions. The left of
Figure 1 depicts the initial decoupled state I F , with center state { t = l } and where the pricing function assigns a price of 0 to the initial states of both leaves, i. e., { p 1 = l } and { p 2 = r } , a price of 1 to { p 1 = t } because the package can be loaded into the truck by applying a leaf action in the initial state (i. e., the leaf path (cid:104) load ( p 1 , l ) (cid:105) is compliant with the empty center path of I F ), and a price of ∞ for all remaining leaf states, which are not reachable. Applying drive ( r ) in I F results in the state on the right, with accordingly changed center state and where the pricing function is updated as shown. The initial state I F contains two member states, namely I = { t = l , p 1 = l , p 2 = r } and s 1 = { t = l , p 1 = t , p 2 = r } . The state s F contains six member states, namely all combinations of leaf states with ﬁnite price together with the center state, e. g., { t = r , p 1 = 0,
p 2 = t } ∈ [ s F ] .
Heuristics for decoupled search approximate the cost of augmented-optimal decoupled plans.
Formally, a decoupled s C ( I [Figure] ) = { t = l } { p 1 = l }→{ p 1 = t }→{ p 1 = r }→∞ { p 2 = l }→∞ { p 2 = t }→∞ { p 2 = r }→drive ( r ) s C ( s F ) =
{ t = r } { p 1 = l }→{ p 1 = t }→{ p 1 = r }→{ p 2 = l }→∞ { p 2 = t }→ [Figure] { p [Figure]
= r }→
F ≤ h ∗F .
Gnad and Hoffmann (2018) introduced a compilation that allows to compute (in principle) arbitrary heuristics for decoupled states.
They construct a compiled planning task Π L $ in which the heuristic is forced to select and “buy” exactly one member state composed of a leaf state for each leaf:
Deﬁnition 1.
The buy-leaves compilation of a planning task Π
= (cid:104)V , A , I , G (cid:105) and decoupled state s F is the task Π L $ = (cid:104)V L $ , A L $ , s F L $ , G L $ (cid:105) with cost function
c
L $ :
The variables V L $ include a new Boolean variable bought [ L ] for every leaf L , V L $ :
=
V ∪ { bought [ L ] | L ∈ L} .
For all leaf variables v (cid:54)∈ C , we add the new value none to D ( v ) .
The initial state is s F L $ :=
s C ( s F ) ∪ { v = none | v (cid:54)∈ C } ∪ { bought [ L ] = ⊥
| L ∈ L} .
The goal is G L $ :=
G ∪ { bought [ L ] = (cid:62) | L ∈ L} .
The actions A L $ are the previous ones A , adding precondition bought [ L ] = (cid:62) to a whenever ( vars ( pre ( a )) ∪ vars ( eﬀ ( a )))
∩ L (cid:54) = ∅ .
We furthermore add, for every leaf L , and for every leaf state s L ∈ S L where prices ( s F )
[ s L ] < ∞ , a new “buy” action a [ s L ] with precondition
pre ( a [ s L ]) :
= { bought [ L ] = ⊥} and effect eﬀ ( a [ s L ]) :=
s L ∪ { bought [ L ] = (cid:62)} .
The cost function c
L $ extends the previous one by setting c L $ ( a [ s L ]) :
=
prices ( s F )[ s L ] for each new action a [ s L ] .
The leaf variables are assigned the value none initially to indicate that they “do not have a state yet”.
Before we can do anything relying on a leaf factor L , we have to “buy” (exactly) one of its states, at the price speciﬁed in the decoupled state s F at hand.
The price we pay in doing so accounts for
L ’s compliant path before s F ; the classical plan obtained on Π L $ accounts for L ’s compliant path behind s F .
Note that the goal in Π L $ forces the plan to buy a leaf state from every L , even if L has no goal and would otherwise not be touched by any actions in the plan for Π L $ .
This is necessary because L may have had to move before s F : we need to account for any costs incurred in L in order to comply with the center path π C ( s F ) leading to s F in the ﬁrst place.
Computing h ∗ on the compilation results in h ∗F (Gnad and
Hoffmann 2018)
so the compilation is perfect in the limit.
All existing decoupled heuristics are computed on the compilation.
From now on, we write h F to denote a decoupled heuristic based on the explicit heuristic h (which we generally write without subscript).
Throughout the paper, we will deﬁne several variants and ways of computing decoupled heuristics h F , which we denote by using additional subscripts.
For the decoupled heuristic obtained by computing the explicit heuristic h on the compilation, we write h F , comp .
Decoupled Heuristics
The buy-leaves compilation can in principle be used to compute any heuristic.
For PDB heuristics and abstractions in general, however, this does not make sense: one of the main advantages of PDBs is that the distance from every abstract state to the goal is precomputed , and the stored values are simply looked up every time the heuristic is evaluated on a state.
The compilation, however, results in a different task for each decoupled state, and thus the PDB would need to be recomputed for each state evaluation.
Moreover, the new bought [ L ] variables should be considered during the pattern selection process, thus affecting the choice of patterns, effectively resulting in the computation of a different PDB.
Simply ignoring these variables potentially enables abstract paths where multiple leaf states of one leaf are bought, selecting more than one member state, which leads to information loss.
To address these difﬁculties, we consider an alternative way of computing heuristics that does not rely on the compilation.
We deﬁne the explicit decoupled heuristic as h F , ex = min s ∈
[ s F ] price ( s F , s )
+ h ( s ) .
It evaluates an arbitrary explicit heuristic h for a decoupled state s F by minimizing the sum of price and heuristic over all member states.
In this section, we analyze the properties of heuristics of this general form, where as the remainder of the paper deals with decoupled PDB heuristics and their combination in particular.
First, we show that computing the explicit decoupled perfect heuristic results in the perfect decoupled heuristic h
∗F .
Proposition 1.
Let s F be a decoupled state of a task Π and factoring F .
Then h ∗F , ex = h
∗F .
Proof.
Remember that for h ∗ , h ∗F =
h
∗F , comp (Gnad and
Hoffmann 2018), we hence show h
∗F , ex = h F , comp instead in the following.
Let π be an optimal plan in the buy-leaves compilation for s F , i. e., c L $ ( π ) =
h
∗F ( s F ) .
Then, the subsequence A [ s L ] of actions a [ s L ] in π corresponds to a member state s ∈ s F that has been bought by h ∗ F .
Note that the actions in A [ s L ] can be moved to the front of π , since all actions preceding a [ s L ]
∈ A [ s L ] are neither preconditioned by nor affect L ∪{ bought [ L ] } .
Hence, the reordered plan π (cid:48)
ﬁrst buys the member state s , then solves s .
Converting the sufﬁx of π (cid:48) back to the original task by removing all bought [ L ] - preconditions results in a plan for s [ V ] for Π .
Since h
∗F returns the cost of an optimal plan for Π L $ , there is no member state s (cid:48) ∈
[ s F ] where price ( s F , s (cid:48) )
+ h ∗ ( s (cid:48) ) <
h
∗F ( s F ) .
For the other direction, observe that we can transform any solution for min s ∈ [ s F ] price ( s F , s ) + h ∗ ( s ) with underlying optimal plan π for s into a plan for Π L $ with the same cost.
Since the sum of the price of s and an optimal plan for s is minimal, there does not exist a cheaper solution of Π L $ .
For any admissible heuristic h , since h lower bounds h ∗ , computing h F , ex is a lower bound for h ∗F :
Corollary 1.
Let h be an admissible heuristic.
Then h F , ex is admissible.
While both h F , ex and the buy-leaves compilation result allow us to compute any admissible heuristic in decoupled search, a relevant question is which of them is more informative.
In fact, even though the buy-leaves compilation is perfect in the limit, for heuristics based on common relaxations there can be an additional information loss inherent to the compilation.
For delete-relaxation heuristics, for example, this is because an arbitrary set of leaf states can be bought for each leaf L , because the “delete” effect bought [ L ] = ⊥ is ignored.
h F , ex overcomes this information loss by explicitly enumerating and computing the heuristic for all member states of a decoupled state.
An interesting observation is that for any consistent heuristic h , h F , ex strictly dominates h
F , comp .
To prove this, we need an additional requirement on the employed heuristic:
Deﬁnition 2.
Let Π be a planning task, F a factoring for Π , and s F ∈ S F (Π) a decoupled state.
Let further Π L $ be the buy-leaves compilation for s F , and h , h L $ be two heuristic functions, where h is deﬁned on Π and h L $ on Π L $ .
Then the pair of heuristics (cid:104) h , h L $ (cid:105) is buy-leaves agnostic iff for all s ∈ S (Π) : h ( s )
=
h L $ ( s ∪{ bought [ L ]= (cid:62)| L ∈L} ) .
It is reasonable to assume that heuristics are buy-leaves agnostic.
After applying a buy action a [ s L ] for each leaf in the compilation, the resulting states s L $ are exactly the member states s ∈ [ s F ] extended by bought [ L ] =
(cid:62) facts for all leaves.
In every descendant of such a s L $ the additional precondition bought [ L ] = (cid:62) of all original actions a ∈ A that were adapted in the compilation is always fulﬁlled, and none of the new actions a [ s L ] is ever applicable.
Therefore, the reachable state spaces behind s and s L $ are isomorphic and the successor states are identical except for the bought [ L ] = (cid:62) facts.
The h max heuristic (Bonet and
Geffner 2001), for example, is buy-leaves agnostic.
Proposition 2.
Let h , h L $ be two consistent and buy-leaves agnostic heuristics.
Then, for every decoupled state s F it holds that h F , ex ( s F ) ≥ h F , comp ( s F ) .
Cases where the inequality is strict, i. e., where h F , ex ( s F ) > h F , comp ( s F ) , can be constructed, too.
A PDB heuristic that is deﬁned on the same subset of variables for both Π and Π L $ , i. e., that ignores the bought [ L ] variables, is able to use multiple buy actions for a leaf L and thereby combine cheap leaf facts of L , leading to lower overall cost.
Pattern Databases for Decoupled Search
For any explicit heuristic, we can compute its decoupled counterpart h F , ex by enumerating all member states.
However, this is in general not a good idea, as there is an exponential number of member states in [ s F ] so this foregoes the advantage of the compact decoupled state representation.
When computing PDB heuristics, however, we can take advantage of the fact that the heuristic value of a PDB only depends on a subset of the variables/leaf factors.
Let Π be a planning task with variables V , and let
P ⊆
V be a pattern.
We write L h P to denote the set of leaves affected by a PDB heuristic h P , i.e., L h P :=
{ L ∈
L |
L ∩ P (cid:54) = ∅} .
We deﬁne the price of an abstract state s P ∈ S P as price ( s F , s P ) :
= (cid:80)
L ∈L hP min s L ∈ S L , s P [ L ] ⊆ s L prices ( s F )[ s L ] , i. e., for each affected leaf we select the reached leaf state with minimum price that is projected to the leaf part of s P and sum-up those minimum prices.
With this, we have a new approach to compute a PDB heuristic for a decoupled state, which we call decoupled PDB :
dPDB ( h P , s F ) =
[Equation]
Note that this can be computed in polynomial time in the number of abstract states | S P | , without enumerating all member states.
In practice, the number of abstract states can sometimes be larger than the number of member states (with ﬁnite price) in s F .
Therefore, instead of iterating over all abstract states, one can iterate directly over those such that price ( s F , s P ) < ∞ .
To do so, we can, for each leaf separately, compute the set of reached abstract leaf states, i. e., the set { s L [ P ] | prices ( s F )
[ s L ] < ∞} , and their minimum price minprice ( s L [ P ]) =
min s L ∈ S L , s L [ P ] ⊆
s L prices ( s F )[ s L ] .
In a second step, we multiply out these sets across leaves, which, augmented with the abstract center state s C ( s F )
[ P ] , results in full abstract states s P ∈ S P , and minimize the sum of their price and heuristic value.
The number of abstract states generated thereby is upper-bounded by the number of member states of s F and the number of abstract states of P , but is typically much smaller than both.
The following proposition shows that the heuristic values computed by dPDB are equivalent to the explicit decoupled
PDB heuristic h P F , ex , except for the missing inclusion of leaf prices of leaves unaffected by P .
Proposition 3.
Let Π be a planning task with factoring F and h P a PDB heuristic.
Then h P F , ex ( s F ) =
[Equation]
Proof.
Let s be the member state that minimizes h P
F , ex ( s F ) .
Then:
[Equation]
The claim follows with the observation that s minimizes h P F , ex ( s F ) .
Since h P is independent of the assignments to variables in V \ P , there are no other leaf states of any L ∈ L \ L h P with a price lower than prices ( s F )
[ s [ L ]] .
In the remainder of this section, we discuss the relationship of h P F , ex and PDB heuristics computed on the compilation.
Our ﬁrst result shows that, given an arbitrary PDB heuristic h P , we can construct a heuristic for the buy-leaves compilation that is just as informative as h P F , ex , by incorporating all bought [ L ] variables into the pattern.
Proposition 4.
Let Π be a planning task with factoring
F , and h P a PDB heuristic for Π .
There exists a heuristic h P (cid:48)
F , comp for the buy-leaves compilation Π L $ such that for all decoupled states s F : h P (cid:48) F , comp ( s F ) =
h P F , ex ( s F ) .
Note that the construction in the proof leads to an increase in the size of the PDB’s abstract state space that is exponential in the number of leaves.
Our second result shows that not adapting the pattern to the compilation in general results in an information loss.
Proposition 5.
[Equation]
The previous two propositions, while not very relevant in practice since we never compute PDB heuristics on the buyleaves compilation, indicate an issue that we will face when considering additive PDB collections.
Decoupled heuristics take into account the pricing function of the given decoupled state, and it is important to do so to incorporate all available information to get good estimates.
Let P 1 , P 2 be two disjoint-additive patterns.
Then, taking the perspective of the buy-leaves compilation, we need to include the bought [ L ] variables into both patterns to not lose information.
But then the patterns are no longer disjoint-additive, so we cannot simply sum-up their estimates admissibly.
We will propose solutions to this issue in the next section.
Multiple PDBs for Decoupled Search
As the size of PDBs grows exponentially in the number of variables included in their pattern, planners typically compute a set of small PDB heuristics and combine them admissibly with one of the techniques mentioned in the background section.
In the following, we assume that we are provided with a set H of additive sets H of admissible PDB heuristics.
In the spirit of the canonical PDB heuristic, we admissibly combine the heuristics as h H ( s ) =
max H ∈H (cid:80) h ∈
H h ( s ) .
Note that this deﬁnition covers both the canonical PDB heuristic (in which case H
=
A ( C ) for the set of patterns C
underlying all heuristics occurring in
H , and heuristics in H can be part of several additive sets
H ) and arbitrarily cost-partitioned heuristics (in which case multiple heuristics in H can be computed over the same pattern, but most likely using a different cost function).
In the following we drop the superscript P of PDB heuristics.
Besides h H , we also consider two special cases:
• H -sum: |H| = 1 , the heuristic is a set of additive PDBs.
• H
-max
| H | = 1 for all H ∈ H and the heuristic is simply the maximum of a set of PDBs.
To evaluate h H for decoupled search, the straightforward way is to use the explicit decoupled heuristic (cf. section “Decoupled Heuristics”): h HF , ex ( s F ) = min s ∈ [ s F ] price ( s F , s ) + max H ∈H (cid:80)
h ∈ H h ( s ) .
In our previous example, assuming three PDBs with patterns P 1 = { t , p 1 } , P 2 = { p 2 } , and P 3 = { p 1 , p 2 } , where
P 1 and P 2 are additive, so H = {{ h P 1 , h P 2 } , { h P 3 }} , and that the goal is G = { p 1 = r , p 2 = l } , the heuristic value of the initial decoupled state I F is obtained as follows:
[Equation]
Besides this exact way, we suggest several approximations in the following, and discuss their complexity.
Na¨ıve Combination
As explained in the previous section, the value of a single PDB can be computed efﬁciently for decoupled states.
Therefore, a natural and na¨ıve approximation to compute decoupled h H is to combine the individual estimates from the decoupled PDBs: h HF , na¨ıve
[Equation]
[Equation]
max H ∈H (cid:80) h ∈
H h F , ex ( s F ) .
However, such a simple combination is not valid, as it not only induces information loss, but also makes the sum inadmissible.
The underlying reason for the information loss is that each decoupled PDB could select a different member state which minimizes the heuristic value, whereas h HF , ex ensures that the same member state is chosen by all PDBs.
This happens even in H -max, where we are only taking the maximum out of a set of PDBs.
Proposition 6.
h H -max F , na¨ıve ≤ h H -max F , ex and there are cases where the inequality is strict.
Proof Sketch.
We show that h H -max F , na¨ıve and h H -max F , ex differ only on the order of the min and max operations, and the claim then follows with the max-min inequality.
Note that the same example can be used to show that the sum of multiple heuristics also incurs an information loss.
Furthermore, the sum is not admissible, as each heuristic may include the price of leaf states from the same leaf.
Proposition 7.
h H -sum F na¨ıve is not admissible.
Proof.
Consider the sum of two PDB heuristics h 1 and hcomputed for a decoupled state s F with two member states [ s F ] = { s 1 , s 2 } .
Assume h 1 ( s 1 )
=
h 2 ( s 1 ) = 1 , h 1 ( s 2 ) =
h 2 ( s 2 ) = ∞ , and h ∗ ( s 1 )
= 2 .
Furthermore price ( s F , s 1 )
= 10 and price ( s F , s 2 )
= 0 .
Then, h HF , na¨ıve ( s F ) = 11 + 11 = 22 > h
∗F ( s F ) = 12 .
Hardness of the Explicit Decoupled Additive PDBs
After ruling out the na¨ıve computation, we consider to compute h HF , ex .
However, computing this turns out to be an NPcomplete problem, as it requires ﬁnding the member state that minimizes the heuristic value for the entire PDB collection.
This is also true for the special cases H -max and
H -sum.
In the following, we prove this result for H -sum and explain how it transfers to H -max and detecting dead ends.
Deﬁnition 3 (Decoupled Additive PDBs Problem) .
Given a planning task Π with factoring F , a reachable decoupled state s F , a bound B ∈ R + ∪ {∞} , and a set of additive
PDBs H , decide whether h H -sum F , ex ( s F ) < B .
We require s F to be reachable to show that this is not only hard for decoupled states with arbitrarily deﬁned pricing functions, but that such states can be encountered during the search.
Also, note that we consider H as a set of PDBs, and not patterns.
Therefore, the size of the input is proportional to the number of abstract states in the pattern collection.
Thus, the corresponding problem for explicit search can be computed in polynomial time simply by looking up the value of s in all PDBs and adding the corresponding values.
However, the same is not true in decoupled search:
Theorem
Decoupled PDBs NP
Proof Sketch.
Membership: Guess a member state s ∈ [ s F ] , test in polynomial time if price ( s F , s )
+ h H -sum ( s ) < B .
Hardness: Reduction from 3-SAT.
Given any 3-CNF formula φ and clauses { C 1 , . . .
, C m } , we construct a planning task and decoupled state s F s.t.
h H -sum F , ex ( s F )
=
if φ is satisﬁable, and h H -sum F , ex ( s F ) = ∞ otherwise.
Our construction has a leaf L i per clause
C i , that represents assignments over the 3 propositions in C i .
In s F , each member state corresponds to assignments satisfying all clauses, but assignments to each proposition may be different in each leaf.
Then, the PDB collection contains a PDB per pair of clauses, which identiﬁes as dead-end any state containing an inconsistent assignment among those clauses.
Therefore, there exists a member state s ∈
[ s F ] for which price ( s F , s )
+ h H -sum ( s ) <
∞ iff φ is satisﬁable.
Note that in our construction action costs are irrelevant, so exactly the same argument applies to h H -max F , ex , and to the problem of deciding whether s F is a dead end.
Corollary 2.
h HF , ex cannot be computed in polynomial time in the size of the leaf state spaces in F and the abstract state spaces of PDBs in H unless P = NP.
Practical Implementation
Solving an NP -complete problem for every decoupled state evaluation may seem completely impractical.
Yet, as shown in the evaluation, our algorithm that solves the problem exactly is competitive with the polynomial approximations introduced later in this section.
It computes h HF , ex by enumerating the member states.
If done in a clever way, many member states can possibly be skipped, namely if their partially computed heuristic is higher than the current best estimate.
The algorithm, shown in Algorithm 1, recursively (via index i ) enumerates the member states of a decoupled state.
This is done by incrementally constructing a member state (parameter s ), from the center state of s F and all combinations of reached leaf states.
Along with s , we incrementally compute its price p s in s F .
Furthermore, we compute the heuristic value
h s = h H ( s ) .
This heuristic evaluation can be done only at the bottom of the recursion in the “else” case, or—as done in the algorithm—incrementally as soon as a heuristic can be computed on the partial state s
∪ s L .
The incremental computation uses a restriction H ≤ i of H that contains only those h whose affected leaves have already been treated during the recursion, formally H ≤ i = [Equation] [Equation] The ﬁnal heuristic value
[Equation] (a Input: Heuristics H =
{ H 1 , . . .
H n } , dec. state s F Output: h HF , ex ( s F ) 1 h min ← ∞ 2 L = (cid:104) L 1 , . . . , L n (cid:105) // order leaves 3 enumerate( 0, s C ( s F ), 0 ) 4 return h min 5 def enumerate( i , s , p s ) : for s L ∈ S L i : prices ( s F ) [ s L ] < ∞ do p s L ← prices ( s F )
[ s L ] h s ← max H ∈H (cid:80) h ∈ H ≤ i h ( s ∪ s L ) if p s + p s L + h s ≥ h min thencontinue // pruning if i < n then enumerate( i + 1, s ∪ s L , p + p s L ) else h min ← min( h min , p + p s L + h s ) global variable) is initialized to ∞ and updated at the bottom of the recursion.
The incremental heuristic computation of the algorithm allows pruning , i.e., skipping a recursive call, if the lower bound on the heuristic value of s , i. e., p s + p s L + h s , already exceeds the current minimum value h min .
Note that this includes cases where h s is a dead end.
(If all member states are dead ends, then h min = ∞ is never changed).
Since the order of leaf factors inﬂuences the pruning by determining at which level in the recursion an h ∈ H can be computed (leaves that are not affected by any heuristic can be skipped), we experimentally evaluate two different such orders.
We also considered encoding the computation of h HF , ex as MIP, but found Algorithm 1 to always perform better.
Polynomial-time Approximations
Given that the admissible combination of multiple PDBs is
NP -hard in general, we propose polynomial-time approximations of h HF , ex .
An important part is to approximate the maximum over H by considering each additive subset H independently.
That is, we swap the min and max operators: max H ∈H min s ∈ [ s F ] price ( s F , s )+ (cid:80) h ∈
H h ( s ) .
By Proposition 6, this is a lossy but admissible approximation of h HF , ex .
For each additive subset H , we consider two special cases for which the estimate can be computed in polynomial time by imposing restrictions on the PDBs considered by H .
Case 1: leaf-disjoint PDBs Let H
=
h 1 , . . .
, h n } be a set of additive PDBs.
We say that two heuristics
h 1 , h 2 are leaf-disjoint if they do not affect the same leaves, i. e., L h 1 ∩
L h 2 = ∅ .
If all heuristics in H are pairwise leaf-disjoint, we can simply sum up the estimates and obtain h H -sum F , ex :
Proposition 8.
Let H =
{ H } , where H is a set of additive
PDBs.
If all heuristics in H are pairwise leaf-disjoint, then h H -sum F , na¨ıve = h H -sum F , ex .
Proof Sketch.
We can move the sum in h H -sum F , ex outward because all PDBs are leaf-disjoint, so we can minimize the sum of prices and heuristic separately for each h on the subset of leaves affected only by h , i. e., over the partial member states induced by L h .
Note that the computation is also possible in polynomial time because it only adds estimates of separately computed single-PDB heuristics, which can be done in polynomialtime as discussed in the previous section.
The “leaf disjointness” of PDBs in H can be enforced easily both when using the CPDB and the SCP heuristics.
For the former, we do not consider two patterns to be disjoint additive if they have any leaf variable in common, so the maximal disjoint-additive subsets are restricted.
For the latter, we skip, during computation, any PDB in H if it affects a leaf affected by any non-skipped PDB ordered earlier in the SCP computed over H .
Case 2: single-leaf PDBs The second case limits each
PDB to affect at most a single leaf.
This means we can partition H into subsets H
= H L 1 ∪ · · · ∪ H L n where heuristics in each H L i affect only leaf L i .
Then the sum over H L i corresponds to the leaf-disjoint case detailed before, so it is admissible.
We can compute the heuristic for each H L i efﬁciently because it sufﬁces to consider only a single leaf L i .
The heuristic value of H is deﬁned as:
[Equation]
Here, s C ( s F ) ∪ s L is a partial state deﬁned on at least all variables of the pattern of h and can thus be used by heuristic h .
Computing Equation 1 is polynomial-time because in contrast to the explicit decoupled heuristic, it only requires iterating over all reached leaf states of each leaf once.
Since all heuristics only affect a single leaf, the sum over all leaves is admissible and corresponds to h H -sum F , ex :
Proposition 9.
Let H =
{ H } , where H is a set of additive PDBs each affecting at most one leaf.
Then Equationequals h H -sum F , ex .
Proof Sketch.
As each h ∈ H affects only a single leaf, we can compute h H -sum F , ex separately per leaf and sum up these minimum values across leaves.
This is possible because each h ∈ H L can be computed using only the center state s C ( s F ) and a leaf state of L , as all variables of the pattern are part of such a partial state.
Experiments
We implemented our techniques in the Fast Downward planner (Helmert 2006).
In particular, we build upon the code base for decoupled search (Gnad 2021) and adapted code from the Scorpion planner (Seipp 2018) to compute SCPs.
We compute single PDB heuristics using the simple greedy algorithm of Fast Downward.
For the CPDB heuristic, we compute patterns using the hill-climbing (HC) approach by Haslum et al.
(2007) for 900s.
For the SCP heuristic, we compute patterns by running the multiple CEGAR algorithm by Rovner, Sievers, and Helmert (2019) for 100s, systematically generating all patterns up to size 2 (Pommerening, R¨oger, and Helmert 2013) for 100s, and running
HC for 500s.
We then compute a set of diverse heuristic orders for these PDBs for 200s, each optimized using dynamic greedy ordering for 2s (Seipp, Keller, and Helmert 2020).
We use EXP to denote computing the explicit decoupled heuristic using Algorithm 1.
For single PDBs, we also evaluate the efﬁcient computation of decoupled PDBs ( dPDB ).
For combining multiple PDBs, we evaluate the leaf disjoint (LD) and single leaf (SL) approximations.
For CPDB-LD, we adapt HC to use CPDB-LD to optimize the pattern collection for the right heuristic.
With SCP-LD, there is nothing analogous we could do in the pattern generation, but we modify the order optimization of the SCP computation to use
SCP-LD computation.
For the SL approximation, we restrict all pattern generation algorithms to single-leaf patterns.
As baseline, we consider explicit A ∗ search (E).
Besides the “pure” variant (pE), we consider a variant that computes the factoring (fE) which allows evaluating the impact of restricting pattern generation.
For decoupled search (D), we consider three types of factorings: forks (F) and inverted forks (IF)
(Gnad, Poser, and Hoffmann 2017), and LP-based strategies for general star factorings that maximize leaf mobility (MM) (Schmitt, Gnad, and Hoffmann 2019).
We also include results for LM-cut (Helmert and Domshlak 2009).
We run all planners on the benchmarks from the optimal sequential track of all IPCs, a set comprised of 1827 tasks distributed over 65 domains.
We conduct experiments on Intel Xeon Silver 4114 CPUs using Downward Lab (Seipp et al. 2017) to limit each planner to 1800s and 3.5 GiB. We evaluate planners by the number of state expansions, search time in seconds (excluding preprocessing time of heuristics), and the number of solved tasks (coverage).
We never mix results for the three factoring methods, and for each method, we only consider tasks in which it ﬁnds a non-trivial factoring.
The additional material (Sievers, Gnad, and Torralba 2022) also contains results obtained on the Autoscale 21.
benchmarks (Torralba, Seipp, and Sievers 2021) and full perdomain coverage results.
The code, benchmarks and experimental data are published online (Sievers et al. 2022).
First, we focus our attention to single PDB heuristics to compare EXP and dPDB for computing decoupled PDBs.
Figure 2a plots search time of EXP against dPDB for factorings F and MM; with IF, there are nearly no differences.
We observe that the efﬁcient computation can indeed lead to a signiﬁcant speed-up and comes at no risk.
Therefore, we always use dPDB when combining multiple PDBs with the LD approximation (which needs to compute decoupled
PDBs) in the following.
Next, we report results for combining multiple PDBs using the CPDB and SCP heuristics.
Table 1 shows coverage.
First, consider the results for explicit search in the ﬁrst four columns.
Differences between pE and fE are only due to fE computing the factoring, and we compare fE against LD and
SL to evaluate the impact of restricting PDBs.
We see that the restriction leads to a loss in coverage most of times, but it increases for some combinations.
Investigating this further for CPDBs, we found that the restriction to LD has no effect on heuristic quality for all three factorings. We conjecture [Table] (E)
[Table] SL [Table] that this is due to HC only generating patterns containing a single goal variable and its predecessors in the causal graph, thus the goal determines which leaves a pattern affects.
The restriction to SL always results in worse heuristics with the exception of a few tasks.
When looking at SCPs, the picture changes: LD has a strongly negative impact, which is, however, mostly attributed to the two domains miconic and wookworking.
With the SL restriction, coverage decreases with IF and MM and increases with F. A closer look at heuristic quality, as demonstrated by expansion plots in Figure 2b comparing unrestricted SCP against LD and SL, reveals that restricting PDBs can be both beneﬁcial and bad.
LD reduces the number of heuristics that SCP can combine, which potentially removes good heuristics, but which also allows later ordered heuristics to contribute more to the SCP, which can be beneﬁcial if these heuristics are better than the skipped ones.
SL restricts the generated heuristics and therefore has unpredictable effects on techniques that combine these heuristics.
Generally speaking, we see that SCP does not suffer from the SL restriction as much as CPDB does, which conﬁrms that SCP is a stronger technique for combining arbitrary sets of PDBs than CPDBs, which rely on the simpler disjoint-additive criterion.
We now turn to decoupled search.
In the ﬁrst four columns of that block, we report results for the explicit decoupled heuristic computation (EXP).
The ﬁrst column is without pruning (NP), the others with pruning, using the nonincremental (NI) variant as well as two incremental ones with two different (precomputed) leaf factor orderings: FD uses the order of leaf factors in Fast Downward; AFF orders leaves by decreasing number of PDBs affecting them.
We observe that pruning always improves coverage, and both incremental variants fare better than the non-incremental one, with the AFF ordering having a clear edge in particular with [Figure] [Figure] [Figure]
D S C P L D ( l o w e [Figure] r
[Figure] SCP. Since AFF prefers enumerating leaf states of leaves which are affected by many PDBs, we can partially compute many heuristic values early on, allowing for more pruning.
We next compare EXP to the two polynomial approximations.
For CPDBs, using SL mostly decreases coverage, which is in line with the results for explicit search which showed that using SL means a severe information loss for
CPDBs.
With LD, however, coverage increases with all factorings.
As observed for the explicit search counter part, the expansions are mostly the same, which means that LD beneﬁts from an accelerated heuristic computation while computing the same information.
For SCP, we again have a different picture, in line with the results for explicit search: LD has a substantially negative effect on coverage and SL can even have a signiﬁcant positive impact (F and MM).
Comparing expansions in the two left-most plots of Figure 2c, we observe that while heuristic quality decreases in more cases than it increases, the reduced search time more often than not compensates this, as evidenced in the two right-most plots of the same ﬁgure.
Finally, we compare our results with decoupled PDBbased heuristics to their explicit counterparts and decoupled
LM-cut, the state-of-the-art in optimal decoupled search.
While the decoupled variants in general cannot compete with their explicit counterparts on the IF and MM factorings, the CPDB-LD and SCP-SL approximations with F solve more tasks than all explicit variants.
Decoupled LMcut solves 299 (F), 198 (IF) and 700 (MM) tasks and is thus better than all CPDB variants; however, SCP-SL solves more tasks with F (304) and MM (709).
Conclusions
Abstraction heuristics are the state of the art in optimal planning as heuristic search.
For decoupled search, the only previous way of using heuristics was via a task compilation depending on the decoupled state, which made using abstraction heuristics practically infeasible. Our paper introduces the explicit decoupled heuristic, which enumerates the member states of the decoupled state, as an alternative way of using arbitrary heuristics for decoupled search. Furthermore, we show how to efﬁciently compute pattern database heuristics for decoupled states.
We show that admissibly combining arbitrary additive pattern collections for a decoupled state without losing information is NP -complete.
While our algorithm that exactly solves this problem is competitive empirically, we propose two efﬁcient approximations based on imposing restrictions on the pattern collections, which are preferable in most settings, and outperform decoupled search with the LM-cut heuristic in some settings.
In future work, we also want to consider other types of abstractions besides projections.
We think that many of our results hold for general partial abstractions, which can also be obtained using the merge-and-shrink framework, for example.
Furthermore, the two approximative cases of the explicit decoupled heuristic we presented in this work can be generalized to settings where patterns (or abstractions) are restricted not to a single, but several leaves.
These cases will require a more general handling, e.g., using cost-partitioning techniques that also take the pricing function of decoupled states into account.
Acknowledgements
Silvan Sievers has received funding for this work from the European Research Council (ERC) under the European
Union’s Horizon 2020 research and innovation programme (grant agreement no. 817639).
Moreover, this work was partially supported by the Wallenberg AI, Autonomous Systems and Software Program (WASP) funded by the Knut and Alice Wallenberg Foundation.
Finally, this work was also partially supported by TAILOR, a project funded by the
EU Horizon 2020 research and innovation programme under grant agreement no. 952215.