Elsevier

Artificial Intelligence

Volume 291, February 2021, 103405
Artificial Intelligence

Dynamically improved bounds bidirectional search

https://doi.org/10.1016/j.artint.2020.103405Get rights and content

Abstract

This paper presents a bidirectional search algorithm that dynamically improves the bounds during its execution. It has the property that it always terminates on or before the forward search meets the backward search. Computational experiments on the pancake problem, the sliding tile puzzle, and the topspin problem demonstrate that it is capable of solving problems using significantly fewer node expansions than A or state-of-the-art bidirectional algorithms such as MMϵ and GBFHS.

Introduction

When bidirectional heuristic search (BHS) was first introduced by Pohl [15] in the early 1970s, there was optimism that it could significantly outperform unidirectional search. While there have been a number of success stories for BHS, overall the computational results have been disappointing in comparison with unidirectional search, in particular, in comparison with unidirectional A. This paper presents a BHS algorithm, Dynamically Improved Bounds Bidirectional Search (DIBBS), that improves upon previous BHS algorithms.

Pohl's algorithm, Bidirectional Heuristic Path Algorithm (BHPA) [15], essentially performs two interleaved A searches, one in the forward direction, which we denote as FA, and one in the backward direction, which we denote as BA. One shortcoming of BHPA is that some nodes may be expanded twice, once in each direction. Kaindl and Kainz [12] proved that because of this shortcoming, BHPA may need to expand nearly all of the nodes that are expanded by FA and by BA. In such cases, BHPA is inferior to A. They also proved that if all the f-values (defined in the next section) are distinct, then BHPA must expand at least as many nodes as either FA or BA expands. We prove, theoretically and demonstrate computationally, that DIBBS is capable of breaking through this theoretical barrier. Holte et al. [10], [11], [19] recently introduced a family of “meet in the middle” algorithms which also are capable of breaking through this theoretical barrier, but their approach is quite different than the approach taken here.

In 1989, Kwa [14] presented BS, which improved upon BHPA by eliminating the necessity of expanding any nodes in both directions. While this was an important theoretical advance, computational results continued to be disappointing. We prove that DIBBS, like BS, never expands a node in both directions. In fact, DIBBS goes one step better — it terminates before the first node is eligible to be expanded in both directions. Loosely speaking, DIBBS terminates on or before the two searches meet (defined to mean that a node that has been expanded in one direction is eligible to be expanded in the opposite direction). The “meet in the middle” algorithms by Holte et al. [11] mentioned above, when using a consistent heuristic, also have this property, but again their approach is quite different than the approach taken here.

In the same paper where Kaindl and Kainz [12] demonstrated some of the shortcomings of BHPA, they also laid the foundation for improving BHS algorithms. They developed a BHS algorithm that dynamically improves the bounds provided by the heuristics during the search. In 2004, Auer and Kaindl [1] built two BHS algorithms based on this foundation. The first, Max-BS, uses the improved bounds as the priority function in one of the search directions, but not the other. It does not use the improved bounds for pruning. The second, BiMax-BSF, uses the improved bounds for pruning in both directions, but does not use them in the priority function. Our work further builds on the foundation laid by Kaindl and Kainz. First, we show how to refine and improve the dynamic bounds. Second, we show how to seamlessly build the dynamic bound improvement method into a new priority function that permits DIBBS to fully utilize the improved bounds for pruning in both directions and in the priority function.

More recently, Barker and Korf [2] investigated the limitations of front-to-end BHS algorithms. They arrived at two main conclusions. First, “Adding a weak heuristic to a bidirectional bruteforce search cannot prevent it from expanding additional nodes.” Second, “With a strong heuristic, a bidirectional heuristic search expands more nodes than a unidirectional heuristic search.” In addition, they conjectured that the possible contribution of Kaindl and Kainz's BHS algorithm was to avoid generating nodes with f equal to the cost of an optimal path. We demonstrate computationally that DIBBS can overcome their second conclusion and their conjecture.

One might guess that Barker and Korf's pessimistic pronouncements might have stifled further research on BHS algorithms, but it actually had the opposite effect. In their paper, they postulated the existence of a balanced BHS algorithm that never expands nodes deeper than the solution midpoint, even though such an algorithm did not exist at the time. Holte et al. [10] filled the void by developing the MM algorithm that is guaranteed to meet in the middle. Sharon et al. [19] modified MM to create MMϵ, which exploits knowledge about the smallest cost of an edge. A detailed analysis of both algorithms is presented in Holte et al. [11]. Computational results presented in these papers established that it is possible for BHS algorithms to expand fewer nodes than either bidirectional bruteforce search or unidirectional heuristic search. See [21] for a recent survey of bidirectional heuristic search.

MM and MMϵ spawned a flurry of research, resulting in several new BHS algorithms and a deeper understanding of the minimum number of nodes that must be expanded by a BHS algorithm. Eckerle et al. [7] began investigating the minimum number of nodes that must be expanded. They extended the assumptions from undirectional heuristic search to define Deterministic, Expansion-based, Black Box (DXBB) bidirectional algorithms. They characterized pairs of nodes that must be expanded by any DXBB BHS algorithm. Chen et al. [5] continued this vein of research by proving that the minimum number of node expansions for a DXBB BHS algorithm can be determined by finding a Minimum Vertex Cover (MVC) in an auxiliary bipartite graph called GMX. They also developed a BHS algorithm, named Near-Optimal Bidirectional Search (NBS), that makes use of this knowledge. They proved that NBS will never expand more than twice the number of nodes as the size of a MVC of GMX and that no DXBB BHS algorithm can provide a stronger guarantee than this. Shaham et al. [17] constructed an efficient algorithm for finding an MVC of GMX. They also created Fractional MM (fMM), which allows flexibility in choosing the meeting point of the forward and backward searches. Shaham et al. [18] extend the theory regarding the minimum number of node expansions to the case where the cost of the smallest edge is known and constructed the Meet at the Threshold (MT) algorithm that controls the meeting point of the forward and backward search via a threshold parameter. Shperberg et al. [20] created the Dynamic Vertex Cover Bidirectional Search (DVCBS) algorithm, which, similar to NBS, uses information about GMX to guide the search, but unlike NBS, does not have a theoretical guarantee about its worst case performance. Barley et al. [3] created an algorithm named Generalized Breadth-First Heuristic Search (GBFHS), which has great flexibility in controlling where the forward and backward searches meet.

Although the DXBB assumptions do not explicitly state that hf is only used in the forward direction and hb is only used in the backward direction, the analysis in [7] implicitly assumes this. Furthermore, DIBBS assumes that the heuristics are consistent, whereas DXBB algorithms do not. DIBBS does not satisfy these assumptions, so it is not subject to the theoretical minimum number of node expansions provided by the MVC of GMX. In fact, in Sections 5 and 6 it is shown that DIBBS often is capable of solving problems while expanding fewer nodes than in a MVC of GMX. It should be emphasized that while DIBBS shares information between the forward and backward searches, it is a front-to-end algorithm, which means that the heuristics are only evaluated from a node to either the start node or the goal node. This is in contrast with front-to-front algorithms, where the heuristics are evaluated from a node to every other node in the frontier of the opposite search direction. Front-to-front evaluations dynamically improve the bounds, but at a very high computational cost. DIBBS dynamically improves the bounds with very little additional computational cost. This paper only addresses front-to-end BHS algorithms.

After this paper was accepted for publication, the authors were made aware of a paper by Sadhukhan [16], in which a similar algorithm was presented. This paper provides more mathematically rigorous proofs of the correctness of the algorithm, a proof that no node is expanded twice, a more careful analysis of which nodes will not be expanded, and more computational testing, including a computational investigation of the minimum number of nodes that must be expanded.

Section snippets

Notation and assumptions

Given an undirected graph G=(V,E) with nonnegative edge costs, a start node s, and a goal node t, the problem is to find a lowest cost path from s to t, where the cost of a path is the sum of the cost of the edges on the path. In order to simplify the presentation and analysis of the algorithm, we assume that there is at least one path from s to t. We now present the definitions that will be used in this paper.s=the start nodet=the goal/target nodeP=a path from s to t that includes node vc(u,v)=

Properties of fd

This section develops several theoretical properties of fd that will be needed to prove the correctness of DIBBS. The first proposition introduces a useful alternative formula for computing fd.

Proposition 1

Let P be a path from s to t that includes v. Then

  • 1.

    fd(P,v)=2gd(P,v)+hd(v)hd(v)

  • 2.

    fd(v)=2gd(v)+hd(v)hd(v).

Proof

fd(P,v)=fd(P,v)+gd(P,v)hd(v)=gd(P,v)+hd(v)+gd(P,v)hd(v)=2gd(P,v)+hd(v)hd(v),which proves the first part of the proposition. The second part follows from the first part since the term hd(v)h

Bidirectional search algorithm

This section presents the bidirectional algorithm and its properties. Capital letters Gd and Fd are used in the algorithm instead of gd and fd, respectively, in order to distinguish between values computed by the algorithm and values computed by the original mathematical definition. The Expand Backward function, which is analogous to the Expand Forward function, is not shown here.

Dynamically Improved Bounds Bidirectional Search (DIBBS) Algorithm

Gd(v)=,Fd(v)= for d=f,b and vV

Gf(s)=0,Ff(s)

Computational experiments

This section presents computational experiments with DIBBS on the pancake problem, the sliding tile puzzle, and on the topspin problem. Note that Sadhukhan [16] only reported results for BAE for the sliding tile puzzle. The primary purpose of these experiments is a proof of concept to demonstrate the following claims in practice.

  • 1.

    DIBBS is capable of solving certain problems while expanding fewer nodes than either FA or BA.

  • 2.

    DIBBS can overcome Barker and Korf's [2] second conclusion that with a

Minimum number of node expansions

One way to establish the quality of an algorithm is to prove that it possesses desirable theoretical properties. This was done in Theorem 12, where it was shown that DIBBS terminates on or before the two searches meet, and Theorem 13, where it was shown that it is theoretically possible for DIBBS to expand fewer nodes that either FA or BA. A second way to establish the quality of an algorithm is to compare it directly to existing algorithms via computational experiments, as was done in

Analysis of computational results

There are several ways that BHS algorithms can improve upon FA or BA. We want to investigate how these factors contributed to the overall success of DIBBS.

  • 1.

    One larger search replaced by two smaller searches. To illustrate this point, suppose the graph has a uniform branching factor of b, all edges have unit cost, and heuristics are not used. Then the time complexity of Dijkstra's algorithm is O(bC), whereas the time complexity of Dijkstra's bidirectional algorithm is O(bC/2), because nodes

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgements

The authors thank two anonymous reviewers for their thoughtful comments, resulting in a significantly improved manuscript. The second author was supported in part by the Air Force Office of Scientific Research under Grant No. FA9550-19-1-0106. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the United States Government, or the Air Force Office of Scientific Research.

References (22)

  • Ariel Felner

    Position paper: using early goal test in A

  • View full text