English

SYOJIN-Tools › 15 Puzzle

15 Puzzle: Slide the Tiles into Order

Pick a size and press Start. Click a tile next to the space (or use the arrow keys) to slide it. Put the numbers in order with the space last.

Can this layout be solved?

Next tool

Advertisement

On this page
  1. What the 15 puzzle is
  2. How to solve it, step by step
  3. Why some layouts cannot be solved
  4. Good times and moves
  5. Summary

What the 15 puzzle is

Fifteen numbered tiles sit in a 4 by 4 frame with one space. You slide tiles into the space until they read 1 to 15 in order. It became a craze in the 1880s and is still the classic sliding puzzle. The same idea at 3 by 3 is the 8 puzzle; at 5 by 5, the 24 puzzle.

How to solve it, step by step

  1. Top row first: place 1, 2, 3, then bring 4 under where it belongs and slide 3 and 4 in together.
  2. Second row the same way (5, 6, 7, then 8). Never break a finished row afterwards.
  3. The last two rows are solved column by column: place 9 and 13 together on the left, then 10 and 14, then turn the last three tiles around the space until they fit.

Stuck? Press Hint to light the next tile to move (3×3 and 4×4), or Auto solve to watch it finish.

Advertisement

Why some layouts cannot be solved

Exactly half of all layouts can never be solved. Count the inversions (pairs where a bigger number comes before a smaller one, reading row by row). On a 4 by 4 board, add the row of the space counted from the bottom: the layout is solvable only when that total is odd. A layout with just 14 and 15 swapped is the famous impossible one. Type any layout into the checker to see; shuffled puzzles on this page are always solvable.

Good times and moves

SizeShortest solution (any layout)A good first time
3×3at most 31 movesunder 1 minute
4×4at most 80 movesunder 3 minutes
5×5much longerunder 10 minutes

Fast solvers finish a 4×4 in well under 10 seconds with practice. Your best time and moves for each size stay in this browser.

Summary

Slide the tiles into order from 3×3 to 6×6, with numbers or your own photo, and use Hint, Auto solve or the checker when you need them. More puzzles: the word ladder and dots and boxes.

Advertisement