Abstract
This paper introduces DEBFS (Direction-Optimizing External-Memory Breadth-First Search), a novel algorithm designed to construct massive search heuristics that exceed available RAM. By integrating direction-optimizing search logic with efficient external memory management, DEBFS achieves up to a 3x speedup over existing methods. The authors demonstrate the algorithm's scalability by constructing a 2.6 TiB Rubik’s Cube pattern database—the largest of its kind ever recorded.
Introduction
In Artificial Intelligence, search performance is often enhanced by Pattern Databases (PDBs), which store precomputed distances for simplified problem states. However, as problem complexity grows, PDBs frequently hit a "memory wall," exceeding the capacity of modern RAM. While external memory BFS algorithms utilize secondary storage (SSDs/HDDs), they typically rely on forward expansion, which becomes inefficient at the widest points of a search graph.
Standard Direction-Optimizing BFS (DOBFS) addresses this by switching to a backward search when unvisited states are fewer than frontier states. However, DOBFS traditionally performs poorly with external memory due to the high cost of random disk access. DEBFS overcomes this bottleneck through a combination of compact data structures and linear disk scanning.
Methodology
DEBFS adapts direction optimization for disk-based storage using several core innovations:
- The Changed List: To avoid loading the entire PDB, DEBFS maintains a bitmask (one bit per state) to track updates from the previous search level. This compact list is often small enough to reside in RAM.
- Bucket Partitioning: The state space is divided into manageable buckets. The algorithm processes one bucket's changed list at a time, allowing for linear scans of the disk-based PDB rather than random seeks.
- Smart Switching Logic: The algorithm monitors the effective branching factor, transitioning from forward to backward search when the number of states to be expanded significantly exceeds the number of remaining unvisited states.
Experimental Evaluation
The researchers evaluated DEBFS across several combinatorial puzzles, including the Rubik’s Cube, 16 Top Spin, 15 Pancake Puzzle, and Chinese Checkers. The primary benchmark was a comparison against WMBFS, the previous state-of-the-art external memory algorithm.
Results and Discussion
DEBFS demonstrated significant performance gains, particularly in state spaces that expand and contract rapidly. On the 12-edge Rubik’s Cube PDB, DEBFS was 2.42x faster than WMBFS. In the 16 Top Spin domain, speedups exceeded 2x. The algorithm's most notable achievement was the construction of a 2.6 TiB Rubik’s Cube PDB containing 5.8 trillion entries.
The "backward" phase of DEBFS provides a massive computational advantage through "short-circuiting": as soon as a single known predecessor is found for an unvisited state, the search for that state concludes. However, the algorithm's effectiveness is domain-sensitive. In Chinese Checkers, where the state space grows slowly, the speedup was negligible (0.99x), as the backward phase never became significantly more efficient than the forward phase.
Conclusion
DEBFS represents a significant advancement in building large-scale search heuristics. By turning random disk lookups into linear scans and utilizing a compact changed list, it successfully brings direction optimization to external memory search. Future work may involve exploring machine learning techniques to compress these massive databases, potentially allowing terabyte-scale PDBs to be utilized on consumer-grade hardware.
Summary updated