Symmetry Detection and Breaking in Cost-Optimal Numeric Planning
Abstract
One of the main difﬁculties affecting the use of domain- independent numeric planning is the complexity of the search problem.
The exploitation of structural symmetries in a search problem can constitute an effective method of pruning search branches that may lead to exponential improvements in performance.
Over a decade now, symmetry breaking techniques have been successfully used within both optimal and satisﬁcing classical planning.
In this work, we show that symmetry detection methods applied in classical planning with some effort can be modiﬁed to detect symmetries in linear numeric planning.
The detected symmetry group, thereafter, can be used almost directly in the A ∗ -based symmetry breaking algorithms such as DKS and Orbit Space Search.
We empir- ically validate that symmetry pruning can yield a substantial reduction in the search effort, even if algorithms are equipped with a strong heuristic, such as LM-cut.
Introduction
Deterministic planning is the problem of ﬁnding a sequence of actions that brings the actor from a given to some desired state.
While the formalisms to describe this paradigm may vary, it seems reasonable to assume that richer models can capture ﬁner aspects and thus, represent the problem with higher ﬁdelity.
For example, in classical planning, the variables of the problem are restricted to ﬁnite domains, whereas the numeric variant of planning encompasses both continuous and ﬁnite variable ranges.
Satisﬁcing planners that can manage numeric ﬂuents were designed at the beginning of the century (Hoffmann 2003), yet, it seems that the progress was slowed due to the theoretical undecidability of even simplest, yet still meaningful, numeric formalisms (Helmert 2002).
In recent years, however, there seems to have been a surge of interest in planning with numeric ﬂuents, resulting in the development of multiple heuristics for both optimal and satisﬁcing settings (Aldinger and Nebel 2017; Scala et al. 2016; Scala, Haslum, and Thi´ebaux 2016; Scala et al.
2017; Piacentini et al.
2018; Scala et al.
Kuroiwa et al.
Unfortunately, having a good heuristic is not enough to assemble an efﬁcient planner, e.g., A ∗ can expand an exponential number of states even when equipped with an almost perfect heuristic (Helmert and R¨oger 2008).
Partially to account for this deﬁcit, pruning methods were developed for classical planning (Fox and Long 2002;
Coles and Coles 2010; Nissim, Apsel, and Brafman 2012;
Wehrle and Helmert 2012; Holte and Burch 2014), and in the past decade, the use of symmetry-based pruning methods has shown its potential within the context of forward search (Pochter, Zohar, and Rosenschein 2011; Domshlak,
Katz, and Shleyfman 2013;
Wehrle et al. 2015; Gnad et al.
In particular, symmetry reduction methods such as
DKS and Orbit Space Search (OSS) were effectively applied in a wide range of classical planning domains, often substantially reducing the expanded state-space size, with a signiﬁcant increase in planning performance (Domshlak, Katz, and Shleyfman 2012, 2015).
In classical planning, symmetry reduction methods compute equivalence classes of states, where the equivalence relation of these classes is based on a precomputed symmetry group.
The search exploits these classes by replacing all states in this class with some representative state.
Domshlak et al.
have shown that given a “path” where each consequent state was replaced by a representative state, one may efﬁciently reconstruct a corresponding path in the original state space.
Hence, the expanded search tree must contain at most one representative of each class at all times.
In this work, we show that the graph-based symmetry detection method proposed by Pochter et al.
can be adapted for the numeric setting.
We extend the notion of structural symmetries proposed by Shleyfman et al.
(2015) to account for linear numeric formulas and demonstrate the equivalence of the obtained symmetries.
We also established that from the theoretical standpoint computing these numeric symmetries is not harder than computing the symmetries for classical planning.
By grounding these symmetries to the state space level, we enable the use of both DKS and OSS practically as is.
Finally, our experimental evaluation demonstrates that in presence of symmetries in the planning task the symmetry breaking algorithms compete favorably with A ∗ , even if equipped with a strong heuristic such as numeric LM-cut.
Preliminaries
We consider a fragment of numeric planning restricted to the FDR formalism (B¨ackstr¨om and Klein 1991; B¨ackstr¨om and Nebel 1995; Helmert 2009) with the addition of numeric state variables, where the conditions and effects on numeric variables are restricted to linear formulas, and unsurprisingly called linear numeric planning task ( LT ).
Formally, LT is de- ﬁned as a 4-tuple Π = (cid:104)V , A , s I , G (cid:105) , where V = V p ∪ V n , with V p is being a ﬁnite sets of propositional variable, where each variable v ∈ V p is associated with a ﬁnite domain of values D ( v ) , and V n is a set of numeric variables.
Numeric variables v ∈ V n have rational values, i.e., D ( v ) =
Q .
If Π does not have any numeric state variable ( V n = ∅ ), we have a classical (FDR) planning task Π FDR .
Assignment of a valid value d to a variable v ∈ V is called a fact and denoted by (cid:104) v, d (cid:105) .
For a subset of variables V ⊆ V we deﬁne its joint domain to be D
[ V ] = × v ∈ V D ( v ) .
The state space is S
= D
[ V ] .
A state s ∈ S is a full assignment over all variables, and can be seen as a tuple (cid:104) s p , s n (cid:105) , where s
p ∈ D
[ V p ] and s n ∈ D
[ V n ] ; s [ v ] indicates the value of the variable v ∈ V over the state s .
s I is a state.
Note that s , s p , and s n may be presented via vector representation, or as a set of facts s =
s p ∪ s n .
In the latter case, there are no two facts that involve the same variable, and | s | = |V| .
The value of a variable v in s is given by s [ v ] = d , and is equivalent to (cid:104) v, d (cid:105) ∈ s .
A partial state is a subset s pt ⊆ s of some s ∈ S .
A linear expression ξ has the form ξ = (cid:80) v ∈ V w ξv v + w ξ 0 , where V ⊆ V n , with ∀ v ∈ V, w ξv ∈ Q , and w ξ 0 ∈ Q .
The value of ξ in a state s is given by the expression s [ ξ ] = (cid:80) v ∈ V w ξv s [ v ] + w ξ 0 .
For simplicity, we assume that there is always a variable v 0 ∈ V n such that for each state s it holds s [ v 0 ]
= 1 .
This assumption allows a more convenient expression ξ = (cid:80) v ∈ V w ξv v .
We assume that there are no redundant factors in the condition representation, i.e., for all v ∈ V it holds w v (cid:54) = 0 .
Ξ is the set of all linear expressions in Π .
The set of all constants that appear in ξ is denoted by nums ( ξ ) , and the set of all variables that appear in ξ is denoted by vars ( ξ ) .
Similarly, for a partial state s pt we denote by vars ( s pt ) ⊆
V the variables involved in s pt .
Conditions can be either propositional or numeric.
A propositional condition ψ is a partial state over the variables vars ( ψ ) ⊆
V p .
We say that ψ is satisﬁed by s , s | = ψ , if ψ ⊆ s p .
A propositional condition ψ has the form ξ ≥ 0 , where ξ is a linear expression.
In this case, we say that ψ is satisﬁed by s if ξ [ s ] ≥ 0 holds.
The set of conditions Ψ is satisﬁed by s , if for each ψ ∈ Ψ it holds that s | = ψ .
The goal condition G = G p ∪ G n is a union over sets of propositional and numeric conditions, respectively.
Action a = (cid:104) pre ( a ) , eﬀ ( a ) , cost ( a )
(cid:105) ∈
A has preconditions pre ( a ) =
pre p ( a ) ∪ pre n ( a ) , effects eﬀ ( a ) =
eﬀ ( a ) p ∪ eﬀ n ( a ) , and cost cost ( a ) ∈ R 0+ .
pre p ( a ) is a partial state over propositional variables and pre n ( a ) is a set of linear numeric conditions.
The set of all numeric conditions of the task is denoted by Ψ n , i.e., Ψ n = G n ∪ (cid:83) a ∈A pre n ( a ) .
a is applicable to s if s | = pre ( a ) .
Similarly, the propositional effect eﬀ p ( a ) is a partial state on a subset of V p .
The effect eﬀ n ( a ) is a set of numeric effects of the form ( v += ξ ) , where v ∈ V n and the value of ξ ∈ Ξ .
We assume that assignment effect v := ξ and subtractive effect v − = ξ + c are normalized to the additive forms v += ξ − v and v += − ξ − c , and one action has at most one effect on the same numeric variable.
The result of applying a in s is denoted by s (cid:74) a (cid:75)
=
s (cid:48) p ∪ s (cid:48) n , where the resulting state is deﬁned as s (cid:48) p [ v ] = eﬀ p ( a )[ v ] for v ∈ vars ( eﬀ p ( a )) , s [[ a ]][ v ] =
s [ v ] + ξ [ s ] if ( v += ξ ) ∈ eﬀ n ( a ) , and s [[ a ]][ v ] =
s [ v ] otherwise.
A ( s ) is the set of all actions applicable to s .
An s -plan is an action sequence π that can be applied successively in s and results in a goal state s ∗ | =
G .
A plan for Π is an s
I -plan.
The cost of an s -plan π is the sum of all its action costs and an optimal s -plan has minimal cost among all possible s -plans.
A state transition graph is a labeled digraph T Π
= (cid:104)S , E (cid:105) , whose vertexes S are the states of Π , the set of labeled arcs
E = {(cid:104) s, s (cid:74) a (cid:75) ; a (cid:105) | s ∈ S , a ∈ A ( s ) } is induced by the actions of Π , where cost ( s, s (cid:74) a (cid:75) ; a )
= cost ( a ) .
A plan for Π is equivalent to a path from s I to s ∗ in T Π .
Structural Symmetries and PDG
This subsection deﬁnes the notion of structural symmetries (Shleyfman et al. 2015), which captures previously proposed concepts of symmetries in classical planning.
In short, structural symmetries relabel a given planning task.
Variables are mapped to variables, values to values (preserving the (cid:104) var, val (cid:105) structure), and actions are mapped to actions.
In this work, we follow the deﬁnition of structural symmetries for FDR planning tasks as deﬁned by Wehrle et al.
For a planning task Π FDR =
(cid:104)V , A , I, G (cid:105) , let P be the set of Π ’s facts, and let P V :
= {{(cid:104) v, d (cid:105) | d ∈ D ( v ) }
| v ∈ V} be the set of sets of facts attributed to each variable in V .
We say that a permutation σ : P ∪ A → P ∪ A is a structural symmetry if the following holds:
σ ( P V ) =
P V , 2.
σ ( A ) =
A , and, for all a ∈ A , σ ( pre ( a )) =
pre ( σ ( a )) , σ ( eﬀ ( a )) =
eﬀ ( σ ( a )) , and cost ( σ ( a ))
= cost ( a ) .
σ ( G ) =
G .
We deﬁne the application of σ to a set X by σ ( X ) :
= { σ ( x ) | x ∈ X } , where σ is applied recursively up to the level of action labels and facts.
For example, let s be a partial state, since s can be represented a set of facts, applying σ to s results in a partial state s (cid:48) , s.t. for all facts (cid:104) v, d (cid:105) ∈
s it holds that σ ( (cid:104) v, d (cid:105) )
= (cid:104) σ ( v ) , d (cid:48) (cid:105) ∈ s (cid:48)
and s (cid:48)
[ σ ( v )]
=
d (cid:48) .
This implies that σ uniquely deﬁnes the values of each variable, i.e., if d ∈ D ( v ) , we can write σ ( d ) =
d (cid:48) , where d (cid:48)
∈ D ( σ ( v )) .
Note that the set of all structural symmetries of an FDR task is a ﬁnite set of bijections closed under composition.
Thus, we have that structural symmetries form a group over the task Π FDR , denoted by Aut (Π FDR ) .
Symmetries and Problem Description Graphs
The problem description graph (PDG) was introduced by
Pochter et al.
(2011), and later on reformulated by Domshlak et al.
(2012), and Shleyfman et al.
Deﬁnition 1.
Let Π FDR be a FDR planning task.
The problem description graph PDG Π
FDR is the colored digraph (cid:104) N, E, col (cid:105) with nodes N
[Equation]
N V [Equation] (cid:91)
[Equation]
where N V = { n v | v ∈ V} , N D ( v ) = { n dv | d ∈ D ( v ) } , and col ( n ) =   if n
[Equation]
N
[Equation]
N
[Equation]
and edges
E = (cid:91)
[Equation]
where E v = { ( n v , n dv ) | d ∈ D ( v ) } , E pre a = { ( n a , n dv ) | (cid:104) v, d
(cid:105) ∈ pre ( a ) } , and E eﬀ a
= { ( n dv , n a ) | (cid:104) v, d
(cid:105) ∈ eﬀ ( a ) }} .
In their work, Pochter et al. observed that PDG symmetry is a symmetry of T Π that is induced by a graph automorphism of the PDG of Π FDR .
In what follows, we will denote by Aut ( PDG (Π FDR ))
the automorphism group of the PDG of the task Π FDR .
Shleyfman et al.
(2015), in turn showed that every structural symmetry of Π FDR corresponds to a PDG symmetry in the sense that they induce the same transition graph symmetry, i.e., the groups Aut ( PDG (Π FDR )) and Aut (Π FDR ) are isomorphic, namely Aut ( PDG (Π FDR ))
=
Aut (Π FDR ) .
Group homomorphism f is a function between two groups f : Γ → ˆΓ that respects the group operations.
i.e., given σ, σ (cid:48) ∈ Γ it holds f ( σ ◦ σ (cid:48) )
=
f ( σ ) ◦ f
( σ (cid:48) ) .
Isomorphism is a bijective (one-to-one and onto) homomorphism.
Note that all isomorphsims are invertible, where the inverse is also an isomorphism.
When the groups Γ and ˆΓ are isomorphic, we write Γ = ˆΓ .
If homomorphism f : Γ → ˆΓ is injective (oneto-one)
we say that Γ is a subgroup of ˆΓ and write Γ ≤ ˆΓ .
Symmetries of the State Transition Graph
A symmetry of a transition graph T Π
=
(cid:104)S , E (cid:105) with actions
A is a permutation σ of S ∪ A mapping states to states and actions to actions such that
– (cid:104) s, s (cid:48) ; a
(cid:105) ∈
E iff (cid:104) σ ( s ) , σ ( s (cid:48) ); σ ( a ) (cid:105) ∈ E , – cost ( σ ( a ))
=
cost ( a )
and – s is a goal state iff σ ( s ) is a goal state for all states s , s (cid:48) and actions a
Symmetries are also called (goal-stable)
automorphisms They are closed under composition and inverse, forming the automorphism
group Aut ( T Π ) of the transition graph.
Each subgroup Γ of symmetries induces an equivalence relation
∼ Γ on states S : s ∼ Γ s (cid:48)
iff σ ( s ) =
s (cid:48) for some σ ∈ Γ .
States in the same equivalence class are called symmetric .
The following (immediate) result is the formal basis for exploiting symmetries for planning:
Theorem 1.
Let Π be a planning task, let s be one of its states, let π be a sequence of actions of Π , and let σ be a symmetry of T Π .
Then π is a plan for s iff σ ( π ) is a plan for σ ( s ) , and the two plans have the same cost.
Note that the deﬁnition of symmetries of a state transition graph depends only on the notion of actions applicable to states, s
= s (cid:74) a (cid:75) , and the notion of goal state, thus it ﬁts multiple formalisms that support this dynamic.
Particularly, this deﬁnition match not only the transition graph induced by an FDR task but also the one induced by an LT .
A PDG Π FDR symmetry is a symmetry of T Π FDR that is induced by a color preserving graph automorphism of
PDG Π FDR .
The group Aut ( PDG (Π FDR ))
=
Aut (Π FDR ) induces a subgroup of Aut ( T Π FDR ) , which in turn deﬁnes an equivalence relation over the states S of Π FDR .
In the following section we deﬁne a numeric versions of PDG and structural symmetries that obey the same relation, i.e., induce a symmetry group of the state transition graph.
Symmetries in Numeric Domains
Shleyfman and Jonnson (2021) show that determining whether two states are symmetric in a transition system induced by an FDR planning task is PSPACE-hard.
This result automatically grants us that PSPACE-hardness also holds for numeric planning, since it, trivially, contains the FDR formalism.
What is more troublesome, is the fact that the presence of numeric ﬂuents makes the search space inﬁnite, which may lead to a lot of unpleasant properties of its symmetry group.
Consider, for example, that the permutation group of a countable number of elements, contains an uncountable number of symmetries, inﬁnitely many of which have inﬁnite order.
Since identifying the whole symmetry group of the transition task is infeasible, we would like to obtain a manageable subgroup and use it for symmetry breaking in the search over the state space.
To this end, we extend the Structural Symmetries and the PDG by numeric ﬂuents.
Then, we show that Numeric Structural Symmetries (NSS) can be mapped into symmetries of the state transition graph (Thm. 2), and that the symmetry group of the numeric version of PDG is isomorphic to the NSS group of the task (Thm. 3).
For the ﬂowchart of the proof of the grounding process see Figure 1.
We exploit the grounded, effectively computed subgroup Γ Π of Aut ( T Π ) by plugging it into the symmetry breaking searches DKS (Domshlak, Katz, and Shleyfman 2012),
OSS (Domshlak, Katz, and Shleyfman 2015).
Let us give here a motivational example.
Suppose we have a planning task where homogeneous trucks deliver various cargo across a city, where the city map is represented via digraph.
A truck T in this task is represented with three variables: loc ( T ) the locations of the truck (ﬁnite domain variable), fuel ( T ) the amount of fuel in the truck, and load ( T ) the current load of the truck (both numeric variables).
Since the trucks are homogeneous, we would like to have a symmetry σ to capture this information, i.e., given two trucks
T 1 and T 2 a map that replaces only the labels of the trucks should induce an automorphism of the transition graph.
In what follow we would like to capture this behavior.
Instead of saying that T 1 is symmetric to T 2 , we want a bijection that switches between the variables associated with T 1 and T 2 , as follows: σ ( loc ( T 1 ))
=
loc ( T 2 ) , σ ( fuel ( T 1 ))
=
fuel ( T 2 ) , σ ( load ( T 1 ))
=
load ( T 2 ) , and vise versa.
[Table] [Table]
[Table] [Table] [Table] [Table]
[Table] [Table] [Table] [Table]
[Table] [Table] [Table] [Table]
[Table] [Table] [Table] [Table]
[Table] [Table] [Table] [Table]
[Table] [Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table] [Table]
[Figure] [Figure]
Numeric Structural Symmetries
For an LT Π = (cid:104)V , A , I, G (cid:105) .
We say that a permutation σ over V ∪ A ∪ (cid:16)(cid:70) v ∈V p D ( v ) (cid:17) is a numeric structural symmetry (NSS) if the following holds:
σ ( V p ) =
V p , σ ( V n ) =
V n , 2.
for all v ∈ V p
holds
σ ( D ( v
=
D ( σ ( v )) , 3.
σ ( A ) = A .
We deﬁne an application of σ to a partial state s pt over the propositional variables vars ( s pt ) , as σ ( s pt )[ σ ( v )] := σ ( s pt [ v ]) for all v ∈ vars ( s pt ) .
Note that by points 1 andthe result of this application, σ ( s pt ) , is also a partial state.
Let ξ = (cid:80) v ∈ V w ξv v be a linear formula over the variables V ⊆ V n .
We deﬁne the application of σ to ξ to be σ ( ξ )
= (cid:80) v ∈ V w ξv σ ( v ) .
The application of σ to condition ξ ≥ 0 is deﬁned as σ ( ξ ) ≥ 0 .
The application of σ to numeric effect v += ξ ∈ eﬀ n ( a ) is written as σ ( v ) += σ ( ξ ) , where v ∈ V n .
Using these notations we establish the following conditions on σ .
for all a ∈ A , σ ( pre n ( a ))
=
pre n ( σ ( a )) , σ ( pre p ( a ))
= pre p ( σ ( a )) , σ ( eﬀ p ( a ))
=
eﬀ p ( σ ( a )) , σ ( eﬀ n ( a ))
=
eﬀ n ( σ ( a )) , and cost ( σ ( a ))
= cost ( a ) .
σ ( G n ) =
G n and σ ( G p )
=
G p .
Note that immediate consequence of this deﬁnition is that for any structural symmetry σ , it holds that σ (Ξ)
=
Ξ .
Note also that that for two structural symmetries σ 1 , σthe composition σ 1 ◦ σ 2 is also a structural symmetry.
• This is straightforward for properties 1, 3, and 5: σ 1 ◦ σ 2 ( X ) =
σ 1 ( σ 2 ( X ))
=
σ 1 ( X ) =
X where X ∈ {V n , V p , A , G n , G p } .
• Property 4 holds for each a ∈ A since for each h ∈ { pre n , pre p , eﬀ n , eﬀ p , } we have σ 1 ◦ σ 2 ( h ( a ))
=
σ 1 ( σ 2 ( h
( a )))
=
σ 1 ( h ( σ 2 ( a )))
=
h ( σ 1 ( σ 2 ( a )))
=
h ( σ 1 ◦ σ 2 ( a )) .
By replacing a by v ∈ V p and h by D , we get property 2.
The check for cost is trivial and repeats the previous point.
A well-known result in group theory (Herstein 1975) states that a ﬁnite set closed under an operation forms a group.
Here we denote the group of all structural symmetries as
Aut (Π) .
This deﬁnition leads us to the observation below.
Theorem 2.
There is a natural injection from Aut (Π) to
Aut ( T Π ) , i.e., for each σ ∈ Aut (Π) there is a unique ˜ σ ∈
Aut ( T Π ) .
Proof.
Let T Π
= (cid:104)S , E (cid:105) be a transition system induced by a LT Π = (cid:104)V , A , s I , G (cid:105) , and let σ ∈ Aut (Π) be a structural symmetry.
For a state s = s p ∪ s n ∈ S
we deﬁne the application of ˜ σ to s as ˜ σ ( s p ∪ s n ) =
˜
σ ( s p ) ∪ ˜ σ ( s n ) , where ˜ σ ( s p )
=
{ σ ( (cid:104) v, d v (cid:105) )
| (cid:104) v, d v (cid:105) ∈ s p } = {(cid:104) σ ( v ) , σ ( d v ) (cid:105) | (cid:104) v, d v (cid:105) ∈ s p } , ˜ σ ( s n ) = {(cid:104) σ ( v ) , q v (cid:105) | (cid:104) v, q v (cid:105) ∈ s n } and ˜ σ ( a ) =
σ ( a ) for a ∈ A .
By properties 1-3, we have that ˜ σ is a permutation over S ∪ A , and the map σ (cid:55)→ ˜ σ is injective.
Let (cid:104) s, s (cid:48) ; a (cid:105) ∈ E , and let σ be a structural symmetry.
We aim to show that (cid:104) ˜ σ ( s ) , ˜ σ ( s (cid:48) );
˜ σ ( a ) (cid:105) ∈ E .
Let us decouple the states s and s (cid:48) to their propositional and numeric components s p ∪ s n and s (cid:48) p ∪ s (cid:48) n , respectively.
The proof of the propositional part was already done by Shleyfman et al.
but we present it here for the sake of completeness.
Note that by deﬁnition of ˜ σ we have ˜ σ ( s ) p = σ ( s p ) .
Let ψ be a partial assignment over the propositional variables such that s p | = ψ , note that set wise it can be written as ψ ⊆ s p .
By applying σ to both sides we have σ ( s p ) | = σ ( ψ ) , thus ˜ σ ( s ) | = σ ( ψ ) .
This claim grants us: s | = pre p ( a ) implies that ˜ σ ( s ) | = pre p (˜ σ ( a )) , and s (cid:48)
| = eﬀ p ( a ) implies that ˜ σ ( s (cid:48) )
| = eﬀ p (˜ σ ( a )) .
Since σ is a permutation over V p , its application to the unaffected variables V p \ vars ( eﬀ p ( a )) can be written as V p \ vars ( eﬀ p (˜ σ ( a ))) , and since s (cid:48)
[ v ] =
s [ v ] for each v ∈ V p \ vars ( eﬀ p ( a ))
we have that ˜ σ ( s (cid:48) )
[ v ] =
˜ σ ( s )[ v ] for each v ∈ V p \ vars ( eﬀ p (˜ σ ( a ))) , resulting in ˜ σ ( s ) (cid:74) ˜
σ ( a ) (cid:75) p
= ˜
σ ( s (cid:48) )
p .
Note, that the fact that for any partial assignment ψ , it holds s p | = ψ ⇐⇒ ˜
σ ( s ) p | = σ ( ψ ) which directly implies that s p | =
G p ⇐⇒ ˜
σ ( s ) p | =
G p .
We aim to show that ˜ σ ( s ) (cid:74)
˜
σ ( a ) (cid:75) n = ˜
σ ( s (cid:48) )
n .
Let ψ ∈ Ψ n be a numeric condition ψ : (cid:80) v ∈ V v · w ψv ≥ 0 such that s n | = ψ .
By deﬁnition of ˜ σ we have s [ v ] =
˜ σ ( s )
[ σ ( v )] , thus (cid:88) v ∈ V s [ v ] · w ψv = (cid:88) v ∈ V ˜ σ ( s )
[ σ ( v )] · w ψv ≥ 0 implies that s n | = ψ ⇐⇒ ˜
σ ( s ) n | = σ ( ψ ) .
This statement combined with the previous paragraph has two immediate consequences:
s | =
G ⇐⇒ ˜
σ ( s ) | = G , and 2.
s |
= pre ( a ) ⇐⇒ ˜
σ ( s ) |
=
pre ( σ ( a )) .
Now, to show that (cid:104) ˜ σ ( s ) , ˜ σ ( s (cid:48) )
; ˜ σ ( a ) (cid:105) ∈ E , it is enough ensure that for any v ∈ V n it holds that s (cid:48)
[ v ] =
˜ σ ( s (cid:48) )
[ σ ( v )] .
Here we have two cases, either v is affected by eﬀ n ( a ) or not.
If v is not affected, i.e., v / ∈ vars ( eﬀ n ( a )) , then since σ is a permutation it holds that σ ( v ) is not affected by eﬀ n ( σ ( a )) , i.e., σ ( v ) / ∈ vars ( eﬀ n ( σ ( a ))) .
Thus, s (cid:48)
[ v ] = s [ v ] =
˜ σ ( s )
[ σ ( v )]
=
˜ σ ( s (cid:48) )
[ σ ( v )] .
Otherwise, let v += ξ be the numeric effect of a on v .
Let ξ = (cid:80) v (cid:48)
∈
V w ξv v .
By deﬁnition we have that σ ( v ) += σ ( ξ ) ∈
eﬀ n ( σ ( a )) .
Thus, s
[Equation]
[ v ] = s [ v ] + (cid:88)
[Equation]
since s [ v ] =
˜ σ ( s )
[ σ ( v )] for each v ∈ V n by deﬁnition of ˜ σ .
Hence, we have that ˜ σ is a symmetry of the transition graph T Π , since it satisﬁes the following three requirements:
– (cid:104) s, s (cid:48) ; a
(cid:105) ∈
E iff (cid:104) σ ( s ) , σ ( s (cid:48) ); σ ( a ) (cid:105) ∈ E , – cost ( σ ( a ))
= cost ( a ) , and – s is a goal state
iff σ ( s ) is a goal state.
This result establishes that structural symmetries induce transition graph symmetries.
Next, we show how to compute these symmetries using a variation of the problem description graph modiﬁed for numerical planning.
Numeric Problem Description Graph
As the state transition graph T Π of a planning task Π is usually too large to be given explicitly, symmetries must be inferred from a compact description.
Pochter et al. introduced a method for deducing some symmetries of the planning task from automorphisms of a certain graphical structure, the problem description graph (PDG) of Π .
Later, Domshlak et al.
slightly modiﬁed the deﬁnition, mainly to add support for general-cost actions.
As observed by Pochter et al.
, every automorphism of the PDG of Π induces an automorphism of
T Π , and the former can be found using off-the-shelf tools for the discovery of automorphisms in explicit graphs, such as bliss (Junttila and Kaski 2007).
Note that in contrast to the propositional FDR the transition system deﬁned by its numeric counterpart may be inﬁnite.
We group numeric elements of conditions and effects into a set of linear formulas.
Recall, that Ξ denotes the set of all linear formulas that appear in Π (both in conditions and in effects).
For each v ∈ V n , we deﬁne W
[Equation]
v ) =
[Equation]
Q | ∃ ξ ∈ Ξ : w ξv ∈ nums ( ξ ) } , the set of all numeric coefﬁcients associated with v .
Let C Π be the set of unique costs of actions and constants in numeric variables in the task Π , i.e.
[Equation]
We deﬁne a function ord : C Π → [ |C Π | ] to be an order preserving function with respect to the lexicographic order over the set C Π , i.e., for c 1 , c 2 ∈ C Π holds that c 1 ≤ c 2 implies that ord ( c 1 ) ≤ ord ( c 2 ) .
The main properties of the function ord that we are interested in are
1. for c 1 , c 2 ∈ C Π it holds c 1 = c
2 iff ord ( c 1 ) =
ord ( c 2 ) , 2.
for each c ∈ C Π it holds that ord ( c ) ≤ |C Π | .
In the following deﬁnition, the function ord allows us to distinguish between the task constants while operating within a reasonable number of vertex colors.
Deﬁnition 2.
Let Π
= (cid:104)V , A , s I , G (cid:105) be a LT .
The numeric problem description graph ( NPDG Π ) of Π is the colored digraph (cid:104) N, E, col (cid:105) with nodes (e.g., Figure 2)
N = N V p ∪ N V n ∪ N A ∪ N Ξ ∪ { n G } ∪ (cid:91) v ∈V
N D ( v ) , where
N V x = { n v | v ∈ V x } for x ∈ { p, n } ,
N A = { n a , | a ∈ A} , ∀ v ∈ V p : N D ( v ) =
{ n vd | d ∈ D ( v ) } , ∀ v ∈ V n : N D ( v ) = { n vw | w ∈ W ( v ) } ,
N Ψ n = { n ≥ ξ | ψ : ξ ≥ 0 ∈ Ψ n } and
N + = { n + ξ | ∃ ξ ∈ Ξ , a ∈ A : v += ξ ∈ eﬀ n ( a ) } , with N Ξ = N Ψ n ∪ N + , edges
E = E V p ∪ E V n ∪ E Ξ ∪ E A ∪ E G , where
E V p =
(cid:83) v ∈V p { ( n v , n vd ) | d ∈ D ( v ) } ,
E V n = (cid:83) v ∈V n { ( n v , n vw ) | w ∈ W ( v ) } ,
E Ξ = (cid:83) n ξ ∈ N Ξ { ( n vw ξv , n ξ ) | v ∈ V n , w ξv ∈ nums ( ξ ) } ,
E A =
(cid:83) a ∈A (cid:16) E pre n a ∪ E pre p a ∪ E eﬀ p a ∪ E eﬀ n a (cid:17) , with
E pre n a = { ( n ≥ ξ , n a ) | ψ : ξ ≥ 0 ∈ pre n ( a ) } ,
E pre p a = { ( n vd , n a ) | (cid:104) v, d (cid:105) ∈
pre p ( a ) } ,
E eﬀ n a = { ( n a , n + ξ ) , ( n + ξ , n v ) | v += ξ ∈ eﬀ n ( a ) } ,
E eﬀ p a = { ( n a , n vd ) | (cid:104) v, d (cid:105) ∈ eﬀ p ( a ) } , E G = { ( n ≥ ξ , n G ) | ξ ≥ 0 ∈ G n } ∪ { ( n dv , n G ) | (cid:104) v, d (cid:105) ∈
G p } , and node colors col ( n ) =
  ord ( cost ( a )) if n = n a ∈ N A , ord ( w ) if n = n xw ∈ (cid:83) v ∈V n N D ( v ) , |C Π | +if n ∈ N Ξ , |C Π | +if n = n G , otherwise .
Theorem 3.
Aut ( NPDG Π ) and Aut (Π) are isomorphic.
Proof.
Let Π be a numeric planning task, with the corresponding NPDG Π = (cid:104) N, E, col (cid:105) .
We start with the deﬁnition of the map f : Aut ( NPDG Π ) → Aut (Π) that we aim to prove to be a bijection.
Let f ( α ) =
l − 1 ◦ α ◦ l ∈ Aut (Π) , where the map l : V ∪ A ∪   (cid:71) v ∈V p
D ( v ) 
 → N is given by l ( x ) (cid:55)→ n x , with a slight abuse of notation l ( (cid:104) v, d (cid:105) )
= n vd .
Note that f is a homomorphism, i.e., f ( α ) ◦ f ( β ) =
f ( α ◦ β ) .
First, we need to show that f is well-deﬁned ,
i.e., f ( α ) ∈ Aut (Π) .
Since α ∈ Aut ( NPDG Π ) is color-, edge- and degree-preserving we have that the vertex sets
N V p , N V n , N A , N Ψ n , N + , (cid:83) v ∈V p N D ( v ) , (cid:83) v ∈V n N D ( v ) , and { n G } are all preserved under α .
Speciﬁcally, N V p , N V n , and (cid:83) v ∈V p N D ( v ) are preserved since, while being of the same color, each n ∈ N V n has zero neighbors of color 0 , each n ∈ N V p has at least one neighbor of color 0 and an indegree of magnitude zero, while n ∈ (cid:83) v ∈V p N D ( v ) has at v p
F
T x  v− 3 − y − ≥≥≥
+=
[Figure]
G least one neighbor of color 0 and an in-degree that is at least one.
All other sets differ due to different colors.
Note also that since α is edge preserving we have that if α ( n v ) = n u then α ( N D ( v ) )
=
N D ( u ) .
Vertices in N + must differ from the ones in N Ψ n under α , since each n ∈ N + has at least one outgoing neighbor of color 0 , and the vertices in N Ψ n has none of these.
Hence, we have that f ( α ) obeys the properties 1-3 of the deﬁnition of NSS.
Property 5 is preserved also due to edge preservance and the fact that α ( n G ) = n G .
Note that if (cid:104) v, d (cid:105) ∈
G p then, by construction of NPDG Π , we have that ( n vd , n G ) ∈
E , thus ( α ( n vd ) , α ( n G ) = n G ) ∈ E , which means that f ( α )( (cid:104) v, d (cid:105) )
∈
G p .
Now, let ψ : ξ ≥ 0 ∈ G n .
Then, ( n ≥ ξ , n G ) ∈ E , and once again ( α ( n ≥ ξ ) , n G ) ∈ E .
Note that for each v ∈ vars ( ξ ) there is w ξv ∈ nums ( ξ ) , and by construction of NPDG Π there are edges ( n v , n vw ξv ) , ( n vw ξv , n ≥ ξ ) ∈
E .
Since α is edge preserving, we have the path ( α ( n v ) , α ( n vw ξv )) , ( α ( n vw ξv ) , α ( n ≥ ξ )) , ( α ( n ≥ ξ ) , n G ) ∈
E , thus the summand w ξv f ( α )( v ) is a part of the expression f ( α )( ξ ) ≥ 0 , since α ( n vw ξv ) and n vw ξv must be of the same color, v and f ( α )( v ) have the same multiple in ξ and f ( α )( ξ ) , respectively.
And since α is in-degree preserving, the number of summands in ξ is equal to the number of summands in f ( α )( ξ ) .
Hence, f ( α )( ξ ) is well-deﬁned in terms of NSS, and f ( α )( ξ ) ≥ 0 ∈ G .
Therefore, f ( α )( G ) ⊆ G .
To show the converse we need to recall that α − 1 ∈ Aut ( NPDG Π ) and f is a homomorphism.
To prove property 4, we need to show that f ( α )( h ( a ))
=
h ( f ( α )( a )) for each h ∈ { pre n , pre p , eﬀ n , eﬀ p , cost } .
This property on preconditions is obtained exactly as Property 5, where the node n G is replaced with the nodes n a and n f ( α )( a ) .
The proof for effects is similar, but requires us to look at the nodes n + ξ , where the only outgoing edge is pointed towards a node that represents a numeric variable.
We omit the full proof here, since it repeats almost verbatim the one given in the previous paragraph.
For the injectivity of f , consider α, β ∈ Aut ( NPDG Π ) :
[Equation]
where the last implication follows from the fact that l is bijective.
To show that f is injective, we need to show that α ( n ) = β ( n ) for all n ∈ N .
Thus, assume in contradiction that there is n ∈ N such that α ( n ) (cid:54) =
β ( n ) .
These n is either n G or lies in N Ξ ∪ (cid:83) v ∈V n N D ( v ) .
Since n G has its own color, it is a ﬁxed under permutations in Aut ( NPDG Π ) .
Since f is well-deﬁned we have that f ( α ) , f ( β ) ∈ Aut (Π) , thus for n vw ∈ (cid:83) v ∈V n N D ( v ) we have
[Equation]
and
[Equation]
n
[Equation]
Lastly, to show that f is surjective , we need to prove that f − 1 ( σ ) is in Aut ( NPDG Π ) , when σ is an NSS.
We extend this inverse as follows
[Equation]
The extended function f − 1 ( σ ) is well-deﬁned, i.e., all vertices that involve σ in their indices do exist in NPDG Π .
To show this, we note that by deﬁnition σ is a permutation on variables, actions, and σ ( (cid:104) v, d (cid:105) )
∈ D ( σ ( v )) .
Moreover, for each n vw there is ξ ∈ Ξ , such that w ∈ nums ( ξ ) .
We saw that for an NSS it holds that σ (Ξ)
=
Ξ .
Hence, σ ( ξ ) ∈ Ξ , thus, wσ ( v ) is a summand in σ ( ξ ) .
Lastly, to show that n † σ ( ξ ) ∈ NPDG Π , note that σ (Ξ)
=
Ξ and NSS preserves linear conditions and effects.
Next, note that, by construction, f − 1 is a homomorphism, since for σ, σ (cid:
) ∈ Aut (Π) it holds f − 1 ( σ ◦ σ (cid:48) )
=
f − 1 ( σ ) ◦ f − 1 ( σ (cid:48) ) .
Moreover, for the identity element id Π ∈
Aut (Π) it holds that e := f − 1 ( id Π ) is an identity element in Aut ( NPDG Π ) .
Let α := f − 1 ( σ ) , it is invertible, hence, a permutation since:
[Equation]
Next, we need to show that α is edge- and colorpreserving.
We begin with color preservation.
• α ( N V p ) =
N V p , α ( N V n ) =
N V n , and α ( N A )
=
N A since σ ( V p ) =
V p , σ ( V n ) =
V n and σ ( A ) =
A , respectively.
All vertices in N V are of the same color.
On action vertices, n a ∈ N A , the colors are preserved due to col ( α ( n a ))
= col ( n σ ( a ) ) =
ord ( cost ( σ ( a )))
=
ord ( cost ( a )) =
col ( n a ) .
• For a variable v ∈ V p we have σ ( D ( v ))
=
D ( σ ( v )) .
Thus, α ( N D ( v ) ) =
N D ( σ ( v )) .
Thus, α ﬁxes the color on the propositional domains vertices.
• Let v ∈ V n , and n vw ∈ N D ( v ) , then col ( α ( n vw )) =
col ( n σ ( v ) w ) = ord ( w ) =
col ( n vw ) .
• Note that for n † ξ ∈ N Ξ it holds that α ( n † ξ ) = n † σ ( ξ ) ∈ N Ξ , and all vertices in N Ξ are of the same color.
Trivially, col ( α ( n G )) =
col ( n G ) .
Thus, we have that α is color preserving vertex permutation.
The last property for α being a color-preserving automorphism, is edge-preservance, ( n, n (cid:48) )
∈
E ⇐⇒ ( α ( n ) , α ( n (cid:48) ))
∈ E .
The “ ⇒ ” part of this property follows from a meticulous application of NSS properties 1-5 to
[Equation]
We omit the full proof here since it is straightforward and repetitive.
Overall, the edges of NPDG Π correspond to element membership in sets, e.g., the edge ( n vd , n G ) corresponds to (cid:104) v, d (cid:105) ∈ G , ( n vw , n + ξ ) to w v ∈ nums ( ξ ) and u += ξ ∈ eﬀ n ( a ) for some a ∈ A and v ∈ V n .
This part of the proof is similar to the proofs of Thm. 5 in Sievers et al.
and Thm. 4.4 in Shleyfman (2020).
Brieﬂy, the edges in E V p are preserved due to properties 1 and 2, E Ξ and E A are preserved due to properties 3-4, and
E G is preserved due to property 5.
E Ξ is preserved since σ (Ξ) =
Ξ .
The “ ⇐ ” part holds since α is invertible.
To summarise, in this section we proved that the groups
Aut ( NPDG Π ) and Aut (Π) are isomorphic, i.e., structurally identical, and that there is an injection that maps these groups into a subgroup of Aut ( T Π ) , we name this group Γ Π .
The generators of Γ Π are the ones used by DKS and OSS for symmetry breaking.
Note that if we have the generators of
Aut ( NPDG Π ) , we can compute the generators of Γ Π in linear time.
In the next section we discuss the computational complexity of computing the generators of Aut ( NPDG Π ) .
Computational Complexity
The graph isomorphism (GI) decision problem that gets as input two ﬁnite graphs and determines if these graphs are isomorphic.
This problem is neither known to be NPcomplete nor tractable.
Since many related problems appeared to be polynomial-time equivalent to the GI problem (Mathon 1979), it gave its name to a complexity class.
As usual for complexity classes within the polynomialtime hierarchy, a problem X is called GI-hard if there is a polynomial-time reduction from GI to X .
A problem X lies in GI if it can be reduced to the GI problem.
A problem X is GI-complete if it both lies in GI and GI-hard, i.e., polynomial-time equivalent to the GI problem.
Shleyfman (2019) showed that computing the generators for the groups of Structural Symmetries and the automorphisms of PDG is GI-hard.
Since Numeric Planning contains FDR in the trivial case when V n = ∅ , and in this case NPDG and PDG are equivalent, computing the automorphism group of NPDG and NSS is also GI-hard .
Shleyfman and Jonsson (2021), in turn, proved that computing the generators for the automorphism group of a colored is GI-complete.
Since NPDG is a colored graph, the problem of computing generators of its automorphism group lies in GI.
Thus, we have that the computation of generators of NPDG and NSS is GI-complete .
Note that while the computation on solutions to the GI problem is suspected to have a quasi-polynomial complexity (Babai 2015, 2016), there are some off-the-shelf symmetry detection packages such as bliss (Junttila and Kaski 2007) or Saucy (Darga, Sakallah, and Markov 2008), that while being a worst-case exponential in time, perform well in practice.
For the experimental evaluation of the method proposed in this paper, we chose bliss .
Experimental Evaluation
We implement the symmetry detection method in Numeric
Fast Downward (Aldinger and Nebel 2017).
All experiments are run on an Intel Xeon Gold 6148 processor with a 30minutes time limit and 4 GB memory limit using GNU parallel (Tange 2011).
We evaluate A*, DKS and OSS using the blind heuristic, operator-counting heuristic with LM-cut and state equations constraints, h LM-cut, SEQ LP (Kuroiwa et al.
2021), for SCT domains, which is a subset of LT , and LMcut heuristic adapted for LT planning, h LM-cut(Kuroiwa, Shleyfman, and Beck 2022), for LT domains.
We only show instances where symmetries are detected, since the overhead of detecting no symmetries is usually less than 5 sec.
Symmetries in classical planning vary from domain to domain, and where the G RIPPER has a symmetry group that is exponential in the number of balls in the rooms, the
B LOCKSWORLD domain has no symmetries at all due to a speciﬁc order imposed on the blocks in the task. The efﬁciency of symmetry-breaking techniques can be attributed to the vast variety of domains that were introduced to classical planning, within the setting of International Planning Competitions that were held during the last three decades. As a sanity check, we performed some preliminary experiments on the G RIPPER domain, where the balls have ho-
[Table]
88237 D EPOTS
[Table]
S
[Table]
61358 G ARDENING (63) 3.
G ARDENING -
[Table]
181086 D ELIVERY
[Table]
ROVER
[Table]
66909 S
[Table]
116 S
[Table] [Table]
[Table]
Linear h LM
[Table]
cut
FO
[Table]
S
[Table]
R OVER -M ETRIC
[Table]
TPP-M ETRIC (40) 8.
15190 Z ENOTRAVEL -L
INEAR
[Table]
8628 B ARMAN
[Table]
4208 B ARMAN -U NIT (15)
[Table]
mogeneous weights, and the gripper-robot has a load.
In this setting, the numeric approaches were consistent with the classical ones.
From the 20 G RIPPER problems we have, A ∗ , DKS, OSS equipped with blind heuristics solved 7 , 20 , 20 , respectively.
The same algorithms equipped with numeric LM-cut solved 6 , 20 , 20 , in the same order.
This results are in line with these reported by Domshlak et al.
for classical planning.
We do not include this results in Table 1, since we ﬁnd these domains too simplistic.
Instead of G RIPPER we introduce a new domain D ELIVERY .
In this domain multiple robots equipped with multiple arms and a tray deliver objects in a building, represented by a digraph.
In addition, we introduced a D EPOTS -S YM domain, a variation of the previously existing D EPOTS SCT domains, where the weights of the packages and the capacities of the trucks are “standardized” by replacing what seems to be arbitrarily chosen numbers by some standard upper bounds.
For example, the packages were all given weights in the range { 4 , 6 , 8 , 10 , 12 } , while the truck got capacities in the range { 10 , 20 , 40 } .
This allowed us to obtain a more symmetric domain while still having a meaningful numeric behavior.
One may even argue that D EPOTS -S YM is closer to reality than D EPOTS due to standardization.
We also introduced a linear numeric version of the B ARMAN domain.
This domain comes with unit-cost actions, and actions that have costs only if a drink was poured from the dispenser.
Interestingly enough, since the B ARMAN domain has a lot of delete-effects, on the unit-cost version of the domain the blind version of OSS out-performs all other conﬁgurations, including those that use LM-cut.
One of the curious behaviors that can be spotted in Table 1, is that OSS performs better than DKS .
This was not the case on the classical domains, where the algorithms performed on par.
We attribute this difference to the fact that DKS stores both original and canonical states, while
OSS operates only on canonical states, and thus requires less memory.
The fact that numeric states require signiﬁcantly more memory may play a key role in this behavior.
Conclusion
In this paper, we extended the notions of structural symmetries and problem description graphs from classical to numeric linear planning.
This allowed us to use symmetrybreaking forward search techniques in the numeric setting.
Our experiments demonstrate that these techniques solve more problems than the current state-of-the-art.
In the future, one may consider looking for a larger symmetry group.
Acknowledgements
This work is partially supported by the Natural Sciences and
Research Council of Canada.
Alexander Shleyfman is also partially supported by the Israel Academy of Sciences and
Humanities program for Israeli postdoctoral researchers.