Worst-Case Solution Quality Analysis When Not Re-Expanding Nodes in Best-First Search

Richard Anthony Valenzano, Nathan R. Sturtevant, Jonathan Schaeffer

Abstract

In heuristic search, algorithms like A* often rely on node re-expansions to guarantee optimality when dealing with inconsistent heuristics or weighted evaluation functions. However, re-expansions can lead to exponential runtime overhead. This paper provides the first formal theoretical bound on solution quality for Best-First Search with no re-expansions (NR-BFS). We demonstrate that suboptimality is bounded by the total heuristic inconsistency along an optimal path, a value that is quadratic relative to the optimal solution cost for admissible heuristics.

The Challenge of Inconsistent Heuristics

Standard best-first search algorithms like A are designed to find the shortest path. When a heuristic is consistent (satisfying the triangle inequality), A is guaranteed to find the optimal path to a node upon its first expansion. However, many state-of-the-art heuristics are inconsistent. Furthermore, practitioners often use Weighted A (WA), which intentionally introduces inconsistency to accelerate the search process.

When a search encounters inconsistency, it may discover a superior path to a node that has already been expanded. To maintain optimality, the algorithm must re-expand that node. In worst-case scenarios, such as those represented by Martelli’s graphs, this requirement results in an exponential explosion in the number of expansions. To mitigate this, a "no re-expansion" policy (NR-BFS) is frequently adopted. While NR-BFS significantly improves search speed, it sacrifices the guarantee of optimality. Prior to this research, no general theoretical bounds existed to quantify the potential suboptimality of NR-BFS solutions.

Formalizing the Suboptimality Bound

The authors introduce a formal framework for NR-BFS and define a critical metric: Heuristic Inconsistency ($INC_H$). For any edge $(p, c)$, inconsistency is defined as the amount by which the parent's heuristic value exceeds the child's heuristic plus the edge cost:

$$INC_H(p, c) = \max(0, H(p) - H(c) - \kappa(p, c))$$

The core theoretical contribution is the proof that the cost of a solution found by NR-BFS ($C$) is at most the optimal cost ($C^*$) plus the sum of inconsistencies along an optimal path. For admissible heuristics, this bound is quadratic ($O((C^*)^2)$), establishing a mathematical "floor" for the performance of the no-re-expansion approach.

Example of a worst-case graph construction where NR-BFS suboptimality matches the theoretical bound.

To prove the tightness of this bound, the authors developed a method to construct synthetic graphs where NR-BFS performs exactly as poorly as the theory predicts. As shown in the figure above, specific edge costs and heuristic values can be engineered to force the algorithm into the maximum possible suboptimality.

Empirical Performance and the Re-Expansion Overhead

The theoretical analysis was validated using Martelli’s graphs and extensive pathfinding benchmarks on $512 \times 512$ grid maps. The results highlight a stark contrast between the necessity of re-expansions for optimality and the efficiency gains of NR-BFS.

Impact of heuristic weighting on node re-expansions and search efficiency.

As illustrated in the table above, as the heuristic weight increases, the percentage of time spent on re-expansions grows drastically. At a weight of 10, standard WA* spends 91% of its effort re-expanding nodes. By switching to NR-BFS, this overhead is eliminated. In practical grid-based pathfinding, the observed suboptimality was far lower than the theoretical worst case—increasing from 12% to only 18%—suggesting that worst-case paths are rare in standard environments.

Conclusion and Future Directions

This work provides a foundational theoretical limit for NR-BFS, proving that suboptimality is directly tied to heuristic inconsistency. While the quadratic bound is conservative compared to average-case performance, it offers a rigorous guarantee for researchers designing custom evaluation functions. Future work will focus on developing tighter, domain-specific bounds and extending this framework to pure Greedy Best-First Search, which currently falls outside the scope of this analysis.

Summary updated

BibTeX
@inproceedings{valenzano2014worst,
  author = {Richard Anthony Valenzano and Nathan R. Sturtevant and Jonathan Schaeffer},
  title = {{Worst-Case Solution Quality Analysis When Not Re-Expanding Nodes in Best-First Search}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2014},
  doi = {10.1609/aaai.v28i1.8850},
}
Figure