Introduction
In the field of heuristic search and graph traversal, algorithms frequently encounter a "memory wall." Standard search techniques like Breadth-First Search (BFS) or A* must store every visited state in a "Closed list" to prevent redundant expansions. As state spaces grow into the billions, the random-access memory (RAM) required to maintain these lists exceeds the capacity of even high-end workstations.
This paper presents Delayed Duplicate Detection (DDD), a novel approach that overcomes memory limitations by offloading state storage to high-capacity hard disks. By restructuring duplicate detection as a sequential sorting task rather than a random-access hash table lookup, DDD enables the exhaustive search of massive state spaces that were previously computationally unreachable.
The Challenge of Disk-Based Search
The primary obstacle to using hard disks for search is the disparity between sequential and random access speeds. While disks offer massive storage at low cost, their high latency makes the random-access patterns required by traditional hash tables prohibitively slow.
To address this, the authors combine two key strategies:
- Frontier Search: This technique reduces memory overhead by storing only the "Open list" (the current search boundary) and using "used-operator bits" to prevent immediate backtracking.
- Delayed Duplicate Detection: Instead of checking for duplicates immediately upon generation, the algorithm appends new states to a large file on disk. Once a search level is complete, the file is sorted. Sorting brings identical states together, allowing a single linear scan to identify and merge duplicates.
Empirical Evaluation: Sliding-Tile Puzzles
The efficacy of DDD was first tested on various configurations of sliding-tile puzzles. By transforming the duplicate detection process into a sequential-access task, the authors were able to perform the first complete exhaustive search of the 2x7 "Fourteen Puzzle."
As shown in the data above, the total state space for the 2x7 puzzle reaches approximately 43.5 billion states. Traditional RAM-based methods would fail to store such a massive Closed list, but DDD successfully navigated the space by treating the disk as a high-bandwidth sequential medium.
Scaling to the 4-Peg Towers of Hanoi
The algorithm was further evaluated using the 4-peg Towers of Hanoi (also known as Reve’s Puzzle). This problem is significantly more complex than the standard 3-peg version. The search aimed to verify a long-standing conjecture regarding the optimal number of moves required to solve the puzzle for various disk counts.
The exhaustive search reached up to 18 disks, encompassing over 68.7 billion states. This massive computation took nearly six days and required 30 gigabytes of disk space. Crucially, the search verified the optimal solution lengths for all tested disk counts, providing empirical support for the existing mathematical conjectures.
Key Insights: The Sequential Advantage
Beyond enabling larger searches, DDD offers a surprising performance benefit even when the data fits within RAM. Standard hash tables often suffer from frequent CPU cache misses due to their random data distribution. In contrast, the sort-and-scan approach of DDD maintains high cache locality.
On a 440 MHz Sun Ultra 10, a frontier search using DDD completed a problem in 9.6 minutes, nearly twice as fast as a standard BFS (17.5 minutes). This demonstrates that sequential processing is inherently more efficient for modern hardware architectures, regardless of the storage medium.
Conclusion and Future Directions
Delayed Duplicate Detection represents a significant shift in how search algorithms handle large-scale data. By prioritizing sequential bandwidth over random-access latency, the authors successfully explored state spaces of unprecedented size. While current implementations focus on Breadth-First Search, future work involves extending these disk-based techniques to best-first algorithms like A* and Dijkstra’s, potentially opening new frontiers in automated planning and combinatorial optimization.
Summary updated