Introduction
Bi-directional search is a pathfinding strategy that simultaneously explores from a start node and a goal node. Theoretically, this approach reduces the search space significantly compared to uni-directional search because the search frontiers grow exponentially; two smaller search "circles" should meet much sooner than one large circle reaches the opposite side.
However, early implementations, such as Pohl’s Bi-directional Heuristic Path Algorithm (BHPA), often failed to realize these gains. In complex state spaces, the forward and backward searches frequently "missed" each other, resulting in two independent search trees that only intersected after expanding nearly as many nodes as a single-direction search—a phenomenon known as "passing in the night."
The Bi-directional Heuristic Front-to-Front Algorithm (BHFFA)
To address this inefficiency, this paper introduces the Bi-directional Heuristic Front-to-Front Algorithm (BHFFA). The core innovation is a dynamic guiding mechanism that makes the two search fronts "aim" at each other rather than at fixed start and goal points.
In BHFFA, the heuristic value $h$ for a node is calculated relative to the entire opposite search front. For a node $n$ in the forward front $S$, the algorithm identifies a node $m$ in the backward front $T$ that minimizes the total estimated path cost:
$$h_s(n) = \min_{m \in T} [H(n, m) + g_t(m)]$$
Where $H(n, m)$ is the heuristic distance between nodes $n$ and $m$, and $g_t(m)$ is the cost already incurred to reach $m$ from the goal. This effectively turns the search into a game of "aiming at a moving target," forcing the two frontiers to actively converge.
Experimental Evaluation
The algorithm was benchmarked using the 15-puzzle, the standard challenge for heuristic search in the 1970s. The authors compared BHFFA against Pohl’s original uni-directional and bi-directional algorithms across 10 puzzle configurations using four heuristic functions ($f1$ to $f4$) of increasing accuracy.
Results and Discussion
BHFFA demonstrated superior performance in terms of search success and path quality. Out of 320 test cases, BHFFA solved 240, compared to 203 for Pohl’s algorithm. When using the most accurate heuristic ($f4$), BHFFA expanded 32% fewer nodes than the uni-directional baseline and consistently found shorter paths.
However, this efficiency in node expansion comes at a high computational cost. Calculating the front-to-front heuristic requires $O(N_s \times N_t)$ comparisons, where $N$ is the number of nodes in each front. In practice, BHFFA was approximately 35 times slower per node than uni-directional search. To mitigate this, the authors employed pruning techniques, limiting the size of the open node sets (e.g., to 50 or 100 nodes). While pruning makes the algorithm non-admissible—meaning it may not find the absolute shortest path—it makes the algorithm viable for real-world problems where finding a near-optimal path quickly is the priority.
Conclusion
The BHFFA represents a major conceptual shift in bi-directional search by making the heuristic search "social." By forcing search fronts to target one another, the algorithm avoids the inefficiencies of earlier methods. While the computational overhead of the $N^2$ heuristic calculation remains a bottleneck, the reduction in node expansion proves the value of dynamic, front-to-front guidance in complex search spaces.
Summary updated