Memory-Based Heuristics for Explicit State Spaces

Nathan R. Sturtevant, Ariel Felner, Max Barer, Jonathan Schaeffer, Neil Burch

Introduction

Pathfinding is a fundamental challenge in domains ranging from GPS navigation to video game AI. While the A algorithm is the standard tool for finding shortest paths, its efficiency depends heavily on the quality of the heuristic function. Standard heuristics, such as Euclidean or octile distance, are often "blind" to obstacles like walls or dead ends, leading to excessive node expansion. This paper introduces True Distance Heuristics (TDHs)*, a class of memory-based heuristics that store actual distances between select states to provide highly accurate estimates for any start-goal pair.

Methods: Differential and Canonical Heuristics

The core idea of TDHs is to leverage available memory to store precomputed shortest-path distances. The authors propose two primary architectures:

  1. Differential Heuristics (DHs): A small set of "landmark" states is chosen. For each landmark $s$, the distance to every other state $a$ in the map is stored. Using the triangle inequality, the distance between any two points $a$ and $b$ is estimated as $h(a, b) = |d(a, s) - d(b, s)|$.
  2. Canonical Heuristics (CHs): These use a larger number of landmarks but store only the distances between the landmarks. Each state in the search space is mapped to its nearest landmark, and the heuristic "hops" between these points.
Comparison of memory storage patterns for (a) All-Pairs Shortest Path, (b) Differential Heuristics, and (c) Canonical Heuristics.

The authors introduce a unified framework, $CH(d, k)$, where $d$ is the number of nearby landmarks tracked per state and $k$ is the total number of landmarks. This allows developers to tune the heuristic based on specific memory constraints. While an all-pairs shortest path table for a 512x512 map would require over 21 billion entries, TDHs can achieve near-perfect accuracy using less than 1% of that memory by storing only a subset of distances.

Landmark Placement and Spatial Strategy

The effectiveness of TDHs depends significantly on where landmarks are placed within the state space. The authors found that placement strategies must be tailored to the specific heuristic type:

  • For Differential Heuristics: Landmarks are most effective when placed at the "periphery" or corners of the world. This maximizes the path lengths being compared, improving the accuracy of the triangulation.
  • For Canonical Heuristics: Landmarks should be distributed uniformly throughout the space to minimize the "radius" of the neighborhood each landmark represents.
A grid map (a) before and (b) after the placement of landmarks ($P_1-P_4$) used for distance estimation between points $A, B, C,$ and $D$.

Experimental Results

The researchers evaluated TDHs across grid maps, robotic arm simulations, and combinatorial puzzles, demonstrating significant performance gains:

  • Grid Maps: On maze-like maps, TDHs reduced node expansions by 29x compared to standard octile distance, resulting in real-world search speedups of up to 14x.
  • Robotic Arm: In a configuration space of 24.5 million states, TDHs provided a 13x speedup in finding optimal paths for a 3-jointed arm compared to standard joint-angle heuristics.
  • 8-Puzzle: Even in combinatorial spaces where Pattern Databases (PDBs) are common, a specialized Canonical Heuristic expanded 40x fewer nodes than the Manhattan distance heuristic.

Conclusion and Future Work

True Distance Heuristics offer a powerful way to convert memory into search speed. By storing a fraction of the true distance information, A* can be made significantly more "aware" of the global topology of a state space. While these methods require offline precomputation and assume the state space fits in memory, they provide a scalable alternative to traditional heuristics. Future work includes optimizing landmark placement mathematically and extending these techniques to dynamic environments where the map may change during search.

Summary updated

BibTeX
@inproceedings{sturtevant2009memory,
  author = {Nathan R. Sturtevant and Ariel Felner and Max Barer and Jonathan Schaeffer and Neil Burch},
  title = {{Memory-Based Heuristics for Explicit State Spaces}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2009},
}
Figure