On the Optimal Efﬁciency of A ∗ with Dominance Pruning
Submission #
Abstract
A well known result is that, given a consistent heuristic and no other source of information, A ∗ does expand a minimal number of nodes up to tie-breaking.
We extend this analysis for A ∗ with dominance pruning, which exploits a dominance relation to eliminate some nodes during the search.
We show that the expansion order of A ∗ is not necessarily optimally efﬁcient when considering dominance pruning with arbitrary dominance relations, but it remains optimally efﬁcient under certain restrictions for the heuristic and dominance relation.
Introduction
Heuristic best-ﬁrst search algorithms are a fundamental tool for problem solving whenever the problem can be modeled as ﬁnding paths in graphs.
Heuristic functions guide the search towards the goal by estimating the distance from any given state to the goal.
Whenever an optimal solution of minimum cost is required, A ∗ search is often the algorithm of choice (Hart et al. 1968).
This is well supported by the well known result that, given a consistent heuristic h and no other source of information, A ∗ does expand a minimal number of nodes up to tie-breaking among all algorithms that guarantee ﬁnding the optimal solution (Dechter and Pearl 1985).
Dominance pruning is a technique to eliminate nodes during the search if they can be proven to be dominated by another state (Hall et al. 2013; Torralba and Hoffmann 2015).
This exploits an additional source of information in the form of a dominance relation (cid:22) , which compares two states to determine whether one can be proven to be as close to the goal as the other.
This type of dominance appears naturally on problems that have to deal with resources, (i.e., removing states that have strictly less resources than another), and can also be applied on other kinds of problems (e.g., in gridworlds being at a central square can sometimes be proven better than being at a corner if the set of reachable squares in one step is strictly larger).
This can be exploited by any search algorithm to reduce the number of nodes explored while retaining any solution optimality guarantees.
This has been mainly used in the context of cost-optimal planning, as an enhancement for the A ∗ algorithm.
In this paper, we address the question of whether the expansion order of A ∗ is good to minimize the number of expansions when dominance pruning is used.
Prioritizing the expansion of states with lower f -value is not necessarily an obvious choice anymore, since states that are more promising according to the heuristic function, are not necessarily better according to the dominance relation.
Furthermore, previous results proving the optimal efﬁciency of A ∗ are no longer valid due to having a new source of information.
Indeed, we show that there are cases where A ∗ with dominance pruning is not optimally efﬁcient, and that different expansion orderings, or even expanding some states that could be pruned lead to a globally higher number of expansions in some cases.
However, these cases can be attributed to “inconsistencies” in the information provided by the heuristic function and the dominance relation.
We extend the notion of consistent heuristics to consistent heuristic and dominance relation pairs, and prove that A ∗ with dominance pruning is indeed optimally efﬁcient, meaning that there is a tie-breaking for A ∗ that is guaranteed to expand the lowest number of nodes among all algorithms with admissible heuristics and dominance pruning. We also analyze which tie-breaking strategies remain optimally efﬁcient up to the last f -layer, i.e., when we ignore the expansions of nodes with an f -value equal to the solution cost.
This is relevant because when consistent heuristics are used, the choice of tie-breaking rule in A ∗ is only relevant for the last layer, since all nodes with an f -value lower than the optimal solution cost must be expanded regardless of the expansion order.
Therefore, most implementations of A ∗ choose tie-breaking strategies in favor of nodes with lower h -value, which are expected to ﬁnd a solution faster in the last f -layer.
We show that with dominance pruning this is no longer the case, as tie-breaking strategies in favor of nodes with lower g -value are preferable up to the last layer.
Background
A transition system (TS) is a tuple Θ = (cid:104) S, L, T, s I , S G (cid:105) where S is a ﬁnite set of states , L is a ﬁnite set of labels each associated with a label cost c ( l ) ∈ R + 0 ,
T ⊆ S × L × S is a set of transitions , s I ∈ S is the start state , and S G ⊆ S is the set of goal states . We write s l −→ t as a shorthand for ( s, l, t ) ∈ T .
A plan for a state s is a path from s to any s G ∈ S G .
We use h ∗ ( s ) ( g ∗ ( s ) ) to denote the cost of a cheapest plan for s (path from s I to s ).
A plan for s is optimal iff its cost equals h ∗ ( s ) . The sum f ∗ ( s ) = g ∗ ( s )+ h ∗ ( s ) is the cost of an optimal plan from s I passing through s .
We denote F ∗ to the optimal solution cost for s I , F ∗ = f ∗ ( s I ) = h ∗ ( s I ) .
To deal with tasks with 0 -cost actions, we deﬁne a modiﬁed cost function c (cid:15) so that all 0 -cost actions are assigned a cost of (cid:15) , where (cid:15) is a tiny constant such that the sum of arbitrarily many (cid:15) will still be lower than any other action cost greater than 0 . We deﬁne g (cid:15) , h ∗ (cid:15) , f (cid:15) , . . . as the functions above under this new cost function.
A heuristic h : S (cid:55)→ R +0 ∪{∞} is a function that estimates goal distance.
It is admissible if it never overestimates the real cost, i.e., h ( s ) ≤ h ∗ ( s ) for all s ∈ S , and consistent if for any s l −→ t it holds that h ( s ) ≤ h ( t ) + c ( l ) .
Best-ﬁrst search algorithms maintain an open and a closed list with all nodes that have been seen so far.
A search node n s characterizes a path from the initial state to the ﬁnal state of the path, s , where the g -value g ( n s ) is the cost of the path. We write n s l −→ n t as a shorthand for s l −→ t and g ( n t ) = g ( n s ) + c ( l ) .
The open list is initialized with the initial state that has a g -value of 0 .
At each step, a node is selected from the open list for expansion.
When a node is expanded, it is removed from open and all the successors are generated and inserted into the open list.
The closed list keeps all nodes that have been expanded to avoid duplicates so that a node is not expanded if another node with the same state and a lower or equal g -value has already been expanded.
A ∗ always selects for expansion a node with minimum f -value where f ( n s ) =
g ( n s ) + h ( s ) .
Since the behavior of A ∗ is not uniquely deﬁned, we say that it is a family of algorithms, one per possible tie-breaking rule.
Optimal Efﬁciency of A ∗
The seminal work by Dechter and Pearl (1985) analyzes the optimal efﬁciency of A ∗ in great depth, considering several degrees of optimal efﬁciency.
They consider the heuristic as part of the input to the algorithm, so that a problem instance is a tuple (cid:104) Θ , h (cid:105) .
An instance is consistent if it has a consistent heuristic h .
An algorithm is admissible if it is guaranteed to return an optimal plan for Θ , whenever h is admissible. Toprove optimal efﬁciency of an algorithm, it is necessary to make assumptions about the considered family of algorithms. In their paper, Dechter and Pearl deﬁne a family of algorithms that use only a few primitive functions, such as expansion and heuristic functions. Eckerle et al.
(2017) reﬁne this by making explicit the assumption that all these functions are deterministic, and black box, deﬁning the family of Deterministic, Expansion-based, Black Box (DXBB) algorithms. We also assume that the transition relation can only be accessed in a forward manner, as a function that given a state returns its successors.
If backward search is possible, A ∗ does not guarantee optimal efﬁciency (Chen et al. 2017). Deﬁnition 1 ( UDXBB Algorithm) .
A algorithm is Unidirectional, Deterministic, Expansion-based, Black Box ( UDXBB ) if it is deterministic and it has access to the state space Θ via exactly the following functions:
• Start: returns the initial state s I .
• Is-goal: given a state s returns true iff s is a goal state. • Expand: given a state s returns a set of successor states expand ( s ) = { t | s l −→ t } .
• Cost: given a state and a successor state returns the cost of reaching it ( cost ( s, t ) =
min c ( l ) s l −→ t ).
They deﬁne a hierarchy with several degrees of optimality, based on comparing the sets of nodes expanded by different families of algorithms over a set of instances.
Let
N ( A, I ) be the set of expanded nodes by
algorithm A on instance I .
A family of algorithms
A is X-optimally efﬁcient over another B relative to an instance set I if:
• Type 0: ∀ I ∈
I , ∀ B ∈ B , ∀ A ∈ A , N ( A, I ) ⊆
N ( B, I ) .
• Type 1: ∀ I ∈ I , ∀ B ∈ B , ∃ A ∈ A , N ( A, I ) ⊆
N ( B, I ) .
Type 2: ∀ I ∈
I , ∀ B ∈ B , ∀ A ∈ A , N ( B, I ) (cid:54)⊂ N
( A, I ) .
• Type 3: ∀ B ∈ B , ∀ A ∈ A , ( ∃ I 1 ∈
I , N ( A, I 1 ) (cid:54)⊆ N ( B, I 1 ))
=
⇒ ( ∃ I 2 ∈ I , N ( B, I 2 ) (cid:54)⊆ N ( A, I 2 )) Among other results, Dechter and Pearl proved that, on consistent instances A ∗ is 1 -optimal, meaning that for any admissible UDXBB algorithm X , there exists a tie-breaking for A ∗ that expands a subset of the nodes expanded by X .
They also show that no family of algorithms can be 0optimal, meaning that there is no way to set the tie-breaking strategy to guarantee a minimal number of node expansions. Dominance Pruning Dominance pruning is a technique that makes use of a dominance relation as an additional source of information.
A relation (cid:22) ⊆ S × S is a dominance relation if, whenever s (cid:22) t , then h ∗ (cid:15) ( t ) ≤ h ∗ (cid:15) ( s ) . We say that a node n t prunes another n s if n s (cid:54) = n t , g ( n t ) ≤ g ( n s ) and s (cid:22) t .
We deﬁne A ∗ with dominance pruning (A ∗ pr ) as the vanilla A ∗ algorithm with a simple modiﬁcation.
Anytime that a node n s is selected for expansion, skip it if there exists another node n t in open or closed such that n t prunes n s . Nodes pruned this way are removed from open but they are neither expanded nor inserted into the closed list 1 . Therefore, pruned nodes are “forgotten” and no other node can be pruned due to being dominated by another node.
This is necessary to correctly handle the case where there are only two nodes that prune each other, since in that case any of the two nodes could be pruned, but at least one of them must be expanded to ﬁnd a solution. In this work, we assume that the dominance relation is provided as an instance-dependent function.
In practice, it can also be automatically obtained from a model of the problem, even though in this work we assume that the model is not available to the search algorithm. A common way to deﬁne a dominance relation is based on identifying resources (Hall et al. 2013), i.e. variables for which there exists a total order for their values such that larger values enable more actions.
Furthermore, there are other more advance methods that ﬁnd pre-orders on arbitrary abstract state spaces (Torralba and Hoffmann 2015). In both cases, the dominance relations that have been used in the literature are: • Pre-order relations: they
are reﬂexive ( s (cid:22) s for all s ) and transitive ( s (cid:22) t ∧ t (cid:22) u = ⇒ s (cid:22) u ). • Cost-simulation relations: whenever s (cid:22) t , for all s l −→ s (cid:48) , either s (cid:48) (cid:22) t or ∃ t l (cid:48)
−→ t (cid:48)
s.t.
c ( l (cid:48) ) ≤ c ( l ) and s (cid:48) (cid:22) t (cid:48) .
Even though one can deﬁne dominance relations that do not satisfy these properties, they are naturally obtained in most cases. In particular, the property of cost-simulation is related to the way automatic methods prove that the obtained relation is a dominance relation without having access to h ∗ . Deﬁnition of Optimal Efﬁciency Following Dechter and Pearl, we are interested in the optimal efﬁciency of algorithms in regards of node expansions on concrete families of instances.
In this section, we generalize their framework by considering the additional information of a dominance relation.
This requires deﬁning what consistent instances are in this case, as well as deﬁning the different notions of optimal efﬁciency, and the families of algorithms that we will consider.
Consistent Instances
A problem instance is a tuple (cid:104) Θ , h, (cid:22)(cid:105) , where Θ is a transition system, h is an admissible heuristic for Θ , and (cid:22) is a dominance relation for Θ .
We say that an instance is consistent if both the heuristic and dominance relation are consistent on their own, and they are consistent with each other, meaning that they fulﬁll the following properties.
Deﬁnition 2.
An instance I = (cid:104) Θ , h, (cid:22)(cid:105) is consistent if:
(i) h is consistent.
(ii) (cid:22) is a transitive cost-simulation.
(iii) (cid:22) is consistent with h : s (
cid:22) t =
⇒ h ( t ) ≤ h ( s ) .
Condition (ii) ensures that the information provided by (cid:22) is consistent in two different ways.
First, (cid:22) must be transitive, because if we do know that s (cid:22) t and t (cid:22) u , then h ∗ ( u ) ≤ h ∗ ( t ) ≤ h ∗ ( s ) so s (cid:22) u can be deduced.
Second, for a dominance relation to be consistent, we require it to be a cost-simulation relation so that whenever n t prunes n s , then if n s or any of its successors would prune n u , then n t or some of its successors prune n u as well.
Condition (iii) requires (cid:22) and h to not contradict each other on their comparison for any two states s and t .
Note that this does not render (cid:22) uninformative, since comparing states based on their heuristic value is no substitute for dominance analysis.
In particular, even if (cid:22) always agrees with h , its role is to identify cases where the relative heuristic evaluation of both states is provably correct.
A question is whether these conditions are extremely rare or they can be expected to happen in practice.
The ﬁrst two conditions are indeed quite common: most heuristics that come from an optimal solution to a relaxation of the problem are indeed consistent; and typical approaches to compute dominance relations in planning are guaranteed to return transitive cost-simulation relations (Torralba and Hoffmann 2015; Torralba 2017).
An analysis of whether heuristics are consistent with respect to a dominance relation (cid:22) is beyond the scope of this paper since that would require to consider concrete heuristic functions and dominance relations.
However, in practice, it is reasonable to expect that most consistent heuristics will fulﬁll this property.
For example, consider a resource-based dominance relation that identiﬁes that states having more resources (fuel or money for example) are preferred.
A heuristic inconsistent with such a relation would return a higher heuristic estimate for a state with more resources, everything else being equal, which seems unlikely.
Indeed, for several families of heuristic functions in domain-independent planning, they have been shown to be consistent with symmetry equivalence relations (Shleyfman et al. 2015), which are a special case of dominance relation.
Types of Optimality
We extend the optimality criteria considered by Dechter and
Pearl in several ways.
Deﬁnition 3 (n-optimally efﬁcient) .
Let N ( A, I ) be the set of expanded nodes by
algorithm A on instance I .
A family of algorithms A is n -optimally efﬁcient over another B relative to an instance set I if for any algorithm B ∈ B and instance
I ∈
I , there exists A ∈
A such that | N ( A, I ) | ≤ | N ( B, I ) | .
This deﬁnition of n-optimality is a relaxed variant of the 1 -optimality deﬁnition by Dechter and Pearl, which requires the number of expansions by A to be lower or equal than that of B , instead of requiring it to be a subset ( N ( A, I ) ⊆
N ( B, I ) ).
Our criteria is slightly weaker since being optimally efﬁcient only requires having an overall minimum number of expansions, which implicitly assumes that all expansions are equally time consuming.
We say that 1 / n -optimality is strict if A is 1 / n -optimally efﬁcient over B , but B is not over A .
Finally, we also consider being optimal up to the last layer, i.e., where only nodes with an f -value lower than the optimal solution cost are taken into account.
That is, we replace N ( X, I ) by N (cid:48)
( X, I )
where N (cid:48)
( X, I ) = { n ∈
N ( X, I ) | f ( n ) <
F ∗ } .
This is related to the notion of non-pathological instances introduced by Dechter and Pearl, which are those instances where A ∗ does not expand any node n with f ( n ) =
F ∗ .
However, paradoxically, nonpathological instances are very unlikely to occur in practice.
For that reason, we prefer to directly refer to this as optimality up to the last layer, simply ignoring the effort that the algorithms will made in the last f -layer, which most of the times strongly depends on the tie-breaking.
Families of Algorithms
We introduce a new family of algorithms that extends
UDXBB with dominance pruning.
[Figure]
Deﬁnition 4 ( UDXBB pr ) .
UDXBB pr is a family of algorithms that extends UDXBB with the ability to perform dominance pruning, i.e., to discard any node n s if another node n t has been generated such that n t prunes n s .
Note that UDXBB pr algorithms cannot access the dominance relation directly or indirectly, i.e., they are not allowed to perform inference based on the fact that h ∗ ( t ) ≤
h ∗ ( s ) whenever s (cid:22) t .
Proposition 1.
UDXBB pr is strictly 1-optimal over
UDXBB on all instances.
Proof.
1 -optimality follows trivially from the fact that
UDXBB is contained in UDXBB pr , since UDXBB pr algorithms could choose not to prune any node if they desire so.
To show this to be strict, it sufﬁces to show an instance where there are nodes n s , n t with f ( n t ) ≤ f ( n s ) ≤ F ∗ such that n t prunes n s .
It is very easy to construct such example, e.g. see the instances in Figures 2, and 3.
In this section, we show that A ∗ pr is optimally efﬁcient on consistent instances over all algorithms that use heuristics and dominance pruning. Figure 1 summarizes the results that we study in this paper. Thorough the paper, we assume consistent instances, i.e., that the heuristic function and dominance relation are consistent.
Our theoretical analysis concludes that, in terms of node expansions using dominance pruning is strictly better than not using dominance, and that on consistent instances the expansion order of A ∗ is n-optimally efﬁcient, meaning that there exist some tiebreaking of A ∗ that expands a minimum number of expansions.
We begin by showing some counter-examples on instances that do not satisfy our consistency criteria to highlight why consistency is required. Then discuss how to characterize the states that must be expanded to ﬁnd a solution and prove it to be optimal; prove our main result; and discuss what tie-breaking strategies are more appropriate for
A ∗ with dominance pruning. Counter-examples due to Inconsistencies We begin considering the two things that characterize A ∗ pr algorithms from the set of UDXBB pr algorithms, and that may cause A ∗ pr to not be optimally efﬁcient in inconsistent instances:
I
A
B
C
B’
C’ . . .
G 1 {+
 [Figure]+} (a)
I
A
B
C ...
G h= h= h= h= h= [Figure]
could be avoided with a different pruning or expansion order strategies.
In (a) h = 0 for all states, whereas in (b) and (c) each node is labeled with its heuristic value.
A node is pruned whenever possible, and sometimes not pruning a node may lead to less overall expansions. The expansion order of A ∗ may not be optimally efﬁcient anymore when considering dominance pruning. Figure 2 shows examples where A ∗ pr does expand more nodes than necessary for these two reasons. The example in Figure 2a illustrates a state space and dominance relation (cid:22) for which pruning a node whenever possible is not an optimal strategy, independently of the expansion order (for simplicity we set h = 0 for all states).
After expanding the initial state I , one can prune node B because it is dominated by A .
However, if B is pruned, B (cid:48) won’t be generated under any expansion order so C (cid:48) and all its arbitrarily many successors will be expanded.
Our second example, illustrated in Figure 2b, shows a case where it is good to prune nodes whenever possible but the expansion order of A ∗ leads to a sub-optimal number of expansions.
The optimal expansion order is (cid:104) I, A, B, G (cid:105) .
C does not need to be expanded even though f ( C ) <
F ∗ because C will be pruned ( C (cid:22) B and g ( B ) ≤ g ( C ) ).
However, A ∗ pr will expand C after expanding the initial state I , since f ( C ) < f
( A ) and B has not been generated yet.
All these scenarios can be attributed to “inconsistencies” within the dominance relation (cid:22) or between (cid:22) and the heuristic function h .
In Figure 2b the dominance relation and heuristic do not agree on the comparison between B and C .
The dominance relation proves that B is at least as close to the goal as C , but the heuristic function estimates that C is closer to the goal.
In the case of Figure 2a, the dominance relation is inconsistent because the information that A is closer to the goal than B is lost after one expansion and neither A nor any of its successors could be used to prune B (cid:48) or C (cid:48) .
Solution Sets
We ﬁrst identify which states need to be expanded to prove optimality by any search that does not have access to any additional information, other than a heuristic function h and the ability to prune nodes.
Traditionally, this is done by identifying must-expand states that must be expanded for every algorithm to prove optimality, or must-expand pairs as done in the bidirectional search setting (Eckerle et al. 2017).
However, in our case there are many choices that can be made for dominance pruning, so now the difference between must-expand nodes and the nodes that belong to any concrete solution is not restricted to the last f -layer.
We deﬁne instead solution sets, which take into consideration all nodes that must be expanded by any UDXBB pr algorithm to ﬁnd a solution, including the last f -layer.
Let
S be a set of nodes.
We use [ S ] to denote the set extended with its immediate successors, i.e., [ S ]
=
S ∪ { n s (cid:48) | n s → N s (cid:48) , n s ∈ S} .
The intuition is that, if S is the set of nodes that have been expanded at some point during the execution of a UDXBB algorithm, then [ S ] is the set of nodes that have been generated. In other words, if S represents the contents of the closed list, then the open list is [ S ] \ S . Deﬁnition 5 ( UDXBB pr Solution Set) .
Let I be an instance.
A set of nodes S is a UDXBB pr solution set for I if:
(a) ∀ n s ∈ S \ { n s I } , ∃ n t ∈ S , n t l −→ n s .
(b) ∃ n s ∈
[ S ] , s ∈ S G and g ( n s ) =
F ∗ , (c) ∀ n s ∈ [ S ] \ S , f ( n s ) ≥ F ∗ or ∃ n t ∈ S , n t prunes n s .
Condition (a) requires that every expanded node in S was generated by expanding one of its parents.
Condition (b) requires that an optimal solution was found.
Condition (c) ensures that the solution found is proven to be optimal, because all nodes in the open list after expanding S have a large enough f -value or are pruned by dominance.
Theorem 1.
Let I be any admissible instance.
Then, expanding a solution set is a necessary and sufﬁcient condition for admissible UDXBB pr algorithms, i.e., for any A in UDXBB pr , N ( A, I ) is a solution set.
Proof Sketch.
If (a), (b), and (c) hold, then an optimal solution has been found due to (a) and (b), and the stopping condition holds, since all states remaining in the open list have an f -value greater or equal to the incumbent solution.
If (a) does not hold, then a state has been expanded without being in open, which is impossible in any UDXBB algorithm.
If (b) does not hold, then an optimal solution has not been found.
If (c) does not hold, then there exists some s in the open list that may lead to a solution cost lower than F ∗ , so the solution was not proven to be optimal.
We remark that the proof above relies on the fact that
UDXBB pr algorithms are not allowed to use dominance relations for anything except dominance pruning. Otherwise, the criteria (c) of a solution set could be made weaker, increasing the set of possible solution sets.
A ∗
pr is Optimally Efﬁcient on Consistent Instances
Before proving our main result of this section, we analyze some properties that hold for consistent instances. An important one is that, whenever h and (cid:22) are consistent with each other, nodes with larger f -value cannot prune nodes with lower f -value.
Lemma 1.
Let I be a consistent instance.
Let n s , n t be any two nodes such that n t prunes n s .
Then, f ( n t ) ≤ f ( n s ) .
Proof.
Since n t prunes n s , it holds that g ( n t ) ≤ g ( n s ) and s (cid:22) t .
By consistency, h ( t ) ≤ h ( s ) , so f ( n t ) ≤ f ( n s ) .
Next, we show that pruning is transitive.
Lemma 2.
If (cid:22) is transitive, n u prunes n t and n t prunes n s , then n u prunes n s .
Proof.
By the assumption it follows that g ( n u ) ≤ g ( n t ) ≤ g ( n s ) , and s (cid:22) t (cid:22) u .
Therefore, g ( n u ) ≤ g ( n s ) and, by transitivity of (cid:22) , s (cid:22) u .
So n u prunes n s .
Next, we show that all states in the smallest solution set must be expanded only with its optimal g -value.
Lemma 3.
Let I be a consistent instance.
Then, there exists a solution set S for I of minimum size such that for all n s ∈
S , g ( n s ) =
g ∗ ( s ) .
Proof.
Assume the contrary.
Then, some n s has been expanded with a sub-optimal value, g ∗ ( s ) < g ( n s ) .
Therefore, a predecessor along the optimal path from s I to s has not been expanded.
Let n t be the ﬁrst such predecessor.
By consistency of h , we know that f -values monotonically increase along a path, so f ( n t ) ≤ f ∗ ( n s ) < f
( n s ) .
As n t (cid:54)∈ S .
By condition (c) of a solution set, n t was pruned, i.e., ∃ n u ∈ S s.t. n u prunes n t .
As (cid:22) is a cost-simulation, then n u has some successor that would prune n s , so there must be a node in S that prunes n s .
Therefore, S \ { n s } is also a solution set, contradicting the fact that S is of minimum size. We next show that pruning a node whenever possible is an optimally efﬁcient strategy because there exists a solution set S of minimum size that does not contain any node that can be pruned by another node in [ S ] , unless both nodes prune each other. To show this, ﬁrst we consider the following procedure: Algorithm 1: Replace
Input: S 0 , n s ∈ S 0 , n t ∈ [ S 0 ] where S 0 is a solution set and n t prunes n s Output: Solution set S i that does not contain n s S 1 :=
( S 0 ∪ { n t } ) \ { n s } ; i = 1 ; while ∃ n s i ∈ S i , (cid:54) ∃ n u i ∈ S i , n u i l −→ n s i do Choose such an n s i with minimum g -value ; Choose n t i in [ S i ] such that n t i prunes n s i ; [Equation]
n s i } ; i = i + 1 ; return S i ; Lemma 4.
Let S 0 be a solution set for a consistent instance.
Let n s ∈ S 0 , n t ∈ [ S 0 ] such that n t prunes n s .
Then, the algorithm terminates resulting in a solution set S k such that: • |S k | ≤ |S 0 | • If n t ∈ S 0 then |S k | < |S 0 | • n s (cid:54)∈ S k • n t ∈ S k
Proof.
First, note that the size of the solution set cannot increase during the process, i.e., |S i +1 | ≤ |S i | because a node is removed at each iteration ( n s is contained in S 0 and all n s i are always contained in S i ) and at most one node is added.
If n t ∈ S 0 then |S 1 | = |S 0 | − 1 , since n s was removed and no node was added, so in that case |S k | ≤ |S 1 | <
|S 0 | . Properties (b) and (c) of a solution set are preserved by all intermediate S i . This is because n s i is replaced by n t i such that n t i prunes n s i . By Lemma 1, f ( n t i ) ≤ f ( n s i ) , by the deﬁnition of dominance, if s i ∈ S G then t i ∈ S G , and if n s i prunes some n u ∈ [ S i ] then by Lemma 2 n t i prunes n u as well.
If n t i was not present on S i , then its immediate successors belong to [ S i +1 ] . However, property (c) still holds since there exists some node in S i +1 that prunes them.
Assume the opposite: there exists some n t i l −→ n t (cid:48) such that f ( n t (cid:48) ) <
F ∗ and there does not exist n v (cid:48) in S i +1 such that n v (cid:48) prunes n t (cid:48) . As n t i was not present in S i , and f ( n t (cid:48) ) ≤ f ( n t i ) ≤ F ∗ , then there is n v ∈ S i such that n v prunes n t i .
As the dominance relation is a cost-simulation relation, there exists n v l (cid:48) −→ n v (cid:48) such that n v (cid:48) prunes n t (cid:48) , so n v (cid:48)
(cid:54)∈ S i . Then, there must exist n w ∈ S i such that n w prunes n v (cid:48) , and by transitivity, n w prunes n t (cid:48) .
As n w (cid:54)∈ S i +1 , then n w = n s i , but then by transitivity n t i prunes n t (cid:48) , reaching a contradiction.
The termination condition for the while loop requires S i to satisfy property (i) too, so if the algorithm terminates, a solution set of size not larger than S 0 is returned.
The algorithm is guaranteed to terminate. Note that all nodes n s i removed in the loop are descendants of n {+s which were present in S 0 (since their parent was included in S 
 but it is not in S i ).+}
Since S 0 has ﬁnite size, the procedure must end in a ﬁnite number of iterations. Finally, it remains to be proven that, at every iteration, there exists some n t i in [ S i ] such that n t i prunes n s i . Note that n s i is a descendant of n s that has no parent in S i . Since all nodes in S 0 have a parent, and all n t i added along the way too, this means that the parent of n s i was some n s j removed in a previous iteration j < i , being replaced by n t j .
Since (cid:22) is a cost-simulation relation, n t j must have a successor n t i that prunes n s i .
Lemma 5.
Let S be a solution set of minimum size for a consistent instance.
Then there do not exist n s , n t in S such that n t prunes n s .
Proof.
Assume that n t prunes n s .
By Lemma 4, using the procedure above, we can construct another solution set S (cid:48) such that |S (cid:48)
| < |S| , contradicting that S has minimum size.
Lemma 6.
Let I be a consistent instance.
Then, there exists a solution set S of minimum size for I such that there does not exist any n s ∈ S and n t ∈ [ S ] such that n s prunes n t and n t does not prune n s .
Proof.
Assume the opposite, let S be a solution set such that there exist n s ∈ S and n t ∈ [ S ] where n s prunes n t and n t does not prune n s . By Lemma 5 n t (cid:54)∈ S . By condition (c) of a solution set we know that either f ( n t ) ≥ F ∗ or there exists n u ∈ S such that n u prunes n t .
Case 1: There exists n u ∈ S such that n u prunes n t .
By transitivity, n u prunes n s , so one can construct a minimal solution set with Lemma 4 of smaller size, contradicting that
S is a solution set of minimal size. Case 2: f ( n t ) ≥ F ∗ . Then, by Lemma 1, f ( n s ) ≥ f ( n t ) ≥ F ∗ . If f ( n t ) > F ∗ , we can remove n s and all its descendants from S 0 to obtain a smaller solution set, contradicting the fact that it is a solution set of minimal size.
Therefore, f ( n s ) = f ( n t ) = F ∗ .
Note that a solution set of minimum size only contains a node with f ( n s ) = F ∗ when n s is on the solution path returned by the algorithm. This path can be replaced by a path to the goal of the same length and cost that goes through n t .
{+We do this using the following procedure: Let S 
 = S be a solution set of minimum size that does not satisfy the property. Let n s ∈ S+} i and n t (cid:54)∈ S i such that n t prunes n s and n s does not prune n t .
Choose such an n s , n t pair with minimal g (cid:15) -value.
Apply the procedure of Lemma 4 to obtain a new S
i +1 without n s , replacing it by n t .
Note that this procedure always ends because the minimal g (cid:15) -value of the selected n s is larger at every iteration, and it cannot get larger than F ∗ .
Now we are ready to prove our main result.
Theorem 2.
A ∗ pr is n -optimal on consistent instances over UDXBB pr .
Proof.
We show that there exists a solution set S of minimum size for which there exists a tie-breaking strategy under which A ∗ pr with h and (cid:22) expands exactly S .
By Lemma 6, we choose a solution set so that there does not exist any n s ∈ S and n t ∈
[ S ] such that n s prunes n t and n t does not prune n s .
Assume a tie-break policy that prefers expanding nodes in S over any other node, and prefers pruning nodes not in S .
Formally, our tie-breaking strategy selects for expansion
any node not in S such that it can be pruned.
If no such node exists, it selects a node (with minimal f value) from S such that it cannot be pruned.
We show that this tie-breaking always succeeds.
Otherwise, the open list does not contain any node with minimal f value that is outside S and can be pruned or that it is in S and cannot be pruned.
Then, the node selected for expansion either: (A) it is in S but can be pruned due to some node in open or closed; (B) it is not in S and cannot be pruned.
Case (A).
There exists n t that prunes some n s ∈ S .
By Lemma 5, we know that n t (cid:54)∈ S .
As n t is in the open list after having expanded a subset of S , n t ∈ [ S ] and, by our choice of solution set with Lemma 6, it follows that n s prunesn t .
By Lemma 1, f ( n t ) =
f ( n s ) , so our tiebreaking strategy would have selected n t instead, reaching a contradiction.
Case(B).Let n s be a node that is expanded by A ∗ pr
but it is not in S .
If f ( n s ) = F ∗ , then a node along the optimal solution contained in S should have been chosen instead.
If f ( n s ) < F ∗ , by condition (c) of a solution set, there exists n t ∈ S such that n t prunes n s .
Again, if n t is in open or closed, n s will be pruned reaching a contradiction.
Otherwise, there must be an ancestor along the path from s I to n t in open with its optimal g -value.
Such an n u ∈ S , must have f ( n u ) ≤ f ( n t ) ≤ f ( n s ) , so according to our tie-breaking strategy n u would have been chosen for expansion instead of n s (note that n u cannot be pruned by the same argument as in case (A)). Corollary 1. A ∗ pr is strictly n -optimal over A ∗ on consistent instances. Proof.
This follows directly from the fact that A ∗ pr is n -optimal over UDXBB pr and UDXBB pr is strictly 1optimal over the family of UDXBB algorithms, which contains all algorithms if the family of A ∗ algorithms.
Optimal Tie-Breaking Strategies
For A ∗ with consistent heuristics the tie-breaking strategy is only relevant in the last f -layer. Ideally, once the minimum f -value in the open list is equal to F ∗ , only nodes on a path to the goal will be selected for expansion. Often, practical implementations choose a tie-breaking strategy that prefers nodes with lowest h -value, aiming to ﬁnd the goal as quickly as possible in the last layer.
In domain-independent planning, where a factored model of the state space is available to offer additional information to the algorithm, some other strategies have been suggested.
They use additional (possibly inadmissible) heuristic functions that estimate plan length instead of plan cost (Asai and Fukunaga 2017; Corr ˆ ea et al.
, signiﬁcantly improving the performance, specially in domains with 0 -cost actions.
A ∗ pr , however, is more sensitive to the choice of tiebreaking strategy, since it may matter along previous layers.
This brings up the question of what is a good tiebreaking strategy for A ∗ pr .
We deﬁne A ∗ g < , pr as A ∗ pr with a tie-breaking strategy that always prefers a state with minimum g -value.
Theorem 3.
A ∗ g < , pr is 1-optimal efﬁcient up to the last layer over A ∗ pr on consistent instances.
Proof Sketch.
Let S to be a solution set for A ∗ pr , and let S (cid:48) be the subset of nodes in solution set up to the last layer,
S (cid:48)
= { n s ∈ S
| f
( n s ) <
F ∗ } .
We show that there is an expansion order compatible with A ∗ g < , pr that expands all nodes in S (cid:48) before expanding any other node.
For this, the same proof from Theorem 2 applies up to case (B).
For case (B), we know that f ( n s ) < F ∗ and, by the same argument as in the proof of Theorem 2, some n u ∈ S must remain in the open list with f ( n u ) ≤ f ( n t ) ≤ f ( n s ) .
At this point the tie-breaking matters since whenever f ( n u ) =
f ( n s ) , the tie-breaking policy should allow selecting n u over n s .
Note
I
A
B
A
B
A
B
G h= h= h= h= h= h= h= h=0       (cid:22) : { ( B 2 , A 2) , ( B 3 , A 3) }
A ∗ h < , pr : (cid:104) I, B 1 , B 2 , B 3 , A 1 , A 2 , A 3 , G (cid:105)
[Figure]
that, since n u is an ancestor of n t , g ( n u ) ≤ g ( n t ) , and since n t prunes n s , g ( n u ) ≤ g ( n t ) ≤ g ( n s ) .
Then, expanding n u instead of n s is still valid according to the g < tie-breaking strategy.
However, the same is not true for every tie-breaking strategy for A ∗ .
For example, let A ∗ h < , pr be the family of A ∗ pr algorithms with a tie-breaking strategy that always prefers a state with minimum h -value.
As argued above this is the tiebreaking preferred by most implementations of A ∗ without dominance pruning, but it cannot guarantee anymore that the number of expansions up to the last layer will be minimal.
Theorem 4.
A ∗ h < , pr is not optimally efﬁcient up to the last layer on consistent instances.
Proof Sketch.
Figure 3 shows a counter-example of a consistent instance where all tie-breaking strategies compatible with A ∗ h < , pr expand a node that A ∗ g < , pr would not expand.
After expanding I and B 1 , the open list contains two nodes:
B 2 and A 1 , both with an f -value of 3 .
At this point, Ahas not been generated yet so B 2 cannot be pruned.
However, A ∗ h < , pr will expand B 2 and B 3 (and in general the entire plateau of states with f = 3 underneath B 2 ), before expanding A 1 .
Note that this happens for nodes with f = 3 < 4 =
F ∗ , i.e. nodes before the last f -layer.
Corollary 2.
A ∗ g < , pr is strictly 1 -optimally efﬁcient up to the last layer over A ∗ h < , pr on consistent instances.
Proof Sketch.
1 -optimality follows directly from Theorem 3, since A ∗ h < , pr is contained in A ∗ g < , pr .
The fact that optimality is strict follows from Theorem 4. Conclusions We analyzed the optimal efﬁciency of A ∗ with dominance pruning.
Assuming a consistent heuristic is not sufﬁcient, because there may be inconsistencies in the dominance relation as well, which could lead A ∗ to expand more nodes than necessary.
We deﬁne a new criteria of consistency for heuristic and dominance relation pairs, which ensures that A ∗ with dominance pruning will be optimally efﬁcient in terms of the number of expanded nodes.
We also show that among the tie-breaking strategies of A ∗ , those expanding nodes with lower g value are to be preferred to minimize the number of expansions up to the last layer. This contrast with common strategies chosen for A ∗ , which favor nodes with lowest hvalues with the aim to minimize expansions in the last layer.
As in the optimal efﬁciency result for A ∗ , our analysis is based only on the number of state expansions and it ignores the actual runtime. There are of course other algorithms which may outperform A ∗ according to different performance measures.
For example, the IDA ∗ algorithm (Korf 1985) and other extensions like Budgeted Tree
Search (Helmert et al. 2019; Sturtevant and Helmert 2020) outperform A ∗ in terms of memory usage. Other algorithms like EPEA ∗ (Goldenberg et al. 2014) aim to minimize the number of nodes generated, which is arguably more relevant to runtime that the number of nodes expanded. However, they need access to additional domain-speciﬁc knowledge. Finally, other algorithms may outperform A ∗ in terms of runtime, e.g., when the beneﬁts of reducing the number of node expansions does not compensate the overhead of computing the heuristic.
In our case, this could be more severe since checking dominance pruning may require a quadratic cost in the number of generated states in the worst case.
Nevertheless, for concrete problems and/or dominance relations it may be possible to perform the pruning more efﬁciently (e.g., dividing states in classes so that each state needs to be compared only against a small subset of alternatives), and one could extend rational algorithms that reason about when it is worth to compute the heuristic (Barley et al. 2014; Karpas et al. 2018) to consider dominance as well. Finally, in this work we extended the basic framework with the ability of dominance pruning using a dominance relation, but it could also be extended in other ways. For example, if backward search is possible, there are a variety of bidirectional heuristic search algorithms that can outperform A ∗ in terms of node expansions (Eckerle et al. 2017;
Chen et al. 2017).
One could consider several extensions of this paradigm regarding different forms of dominance, e.g., introducing variants that make use of more general forms of dominance (Torralba 2017), or alternative methods to exploit this information.
This may open new avenues of research on how to use dominance relations beyond dominance pruning in order to make the most of them.