The 8-Puzzle — IDA* with the Manhattan Heuristic

IDA* is a depth-first search bounded by f = g + h. Watch it prune branches where f > threshold, raise the threshold, and find the optimal solution path.

step 0

Current board (blank slides)

g (moves so far)0
h (Manhattan)0
f = g + h0
threshold0
tile just moved tile blank
Path from start: (none yet)

IDA* iterations (threshold rises)

Goal: 1 2 3 / 4 5 6 / 7 8 _
Press Step to begin. IDA* starts with threshold = h(start), runs a bounded DFS, and raises the threshold when no solution fits.
Self-contained visualization. The heuristic is the admissible Manhattan distance (sum of each tile's grid distance to its goal cell, blank excluded). Because h never overestimates, the first solution IDA* reaches is optimal. See junior.md and professional.md for the admissibility and optimality proofs.