Slide the tiles into order, 1, 2, 3 … with the gap in the bottom-right corner. Click a tile next to the gap, or use the arrow keys.
The 15-puzzle swept America in 1880. It was invented by Noyes Chapman, a postmaster in New York, though Sam Loyd later claimed it as his own.
In 1879 William Johnson and William Story proved that exactly half of all arrangements can never be solved. Count the pairs of tiles that are in the wrong order: every slide changes that count in a predictable way, so swapping just two tiles can never be undone. That is why Loyd's prize was safe.
The 8-puzzle has 181,440 reachable arrangements, and none needs more than 31 moves. A* is the same search used for route finding in maps and games.