AI: Solve the 8 Puzzle
The 8 Puzzle consists of a 3x3 board with eight numbered tiles and an empty spot. A tile adjacent to the empty spot can slide into that spot. The goal of the puzzle is to order all of the tiles numerically, leaving the empty spot in the lower-right corner.
Some browsers may not be ready for this code, if you don't see working examples, please check my page on enabling ECMAScript6. Many of these algorithms are also used on my map searches page. It's all in Git at my GitHub repo.
Note: not all tile arrangments are guaranteed to be solvable.
Choose an Algorithm
- Nodes used in search
- Elapsed search time (ms)
- Path Cost
- Solution Path