Sliding Puzzle
Slide the numbers into the empty square until they run in order from the top left. Half of all arrangements of this puzzle can never be finished no matter how you slide, so every shuffle is checked by counting inversions first — the board you are given is always solvable. It also shows the Manhattan distance left, which is a lower bound on the moves you still need.
Board size
0
Moves
0:00
Time
32
Distance left
—
Best
Tap any tile touching the empty square to slide it
Tap a tile further along the same row or column and the whole run slides at once
Put the numbers in order from the top left and leave the empty square at the end. Half of all arrangements of this puzzle can never be finished no matter how you slide, so every shuffle here is checked first and repaired by swapping two tiles when it fails. Every board you are given is solvable.
Distance left adds up how many steps each tile still has to travel to reach its home square. One slide changes it by exactly one, so you can never finish in fewer moves than that number — it is a lower bound.
What this game does
- 3×3, 4×4 and 5×5 boards
- Unsolvable boards are never dealt
- Tap further along the row to slide several tiles at once
- Undo one move at a time
- Distance left shows how far from done you are
- Best time saved per board size
Other games
These are for fun, not diagnostic tests. Scores shift with your screen, mouse and how tired you are.