SuperDevTools

15 puzzle: sliding tile puzzle online

Size
Show

Moves 0

Time 00:00

Click or tap a tile in line with the empty square: it slides, along with any tiles between it and the gap. With a keyboard, the arrow keys push a tile into the gap. On a touch screen, swipe.

Best scores

SizeGames wonFewest movesBest time
3 × 30––
4 × 40––
5 × 50––
6 × 60––

Saved on this device, nothing is sent. A game where you used a hint or the solution does not count.

The 15 puzzle in your browser

This 15 puzzle works with a mouse, a finger or a keyboard, with no sign-up. Pick a size from 3 × 3 (8 tiles) to 6 × 6 (35 tiles) and play with “Numbers” or a “Picture”: the sample picture or a photo from your device, cropped to a square and cut up on the spot. Nothing is uploaded.

Rules and controls

  1. The tiles are shuffled and one square is empty. Your goal is to put 1, 2, 3… back in order, row by row, with the gap in the bottom right corner.
  2. Click or tap any tile in the same row or column as the gap. It slides, along with every tile between it and the gap.
  3. With a keyboard, select the board first. The left arrow pushes the tile on the right of the gap to the left, and so on. On a phone, swipe in the direction you want.
  4. The “Moves” counter adds 1 for each tile that moves, so pushing a row of 3 tiles in one go counts as 3 moves. The clock starts with your first move.

Your current game comes back on your next visit. “Best scores” keeps the fewest moves and the best time for each size, leaving out games where you had help.

A little history

The sliding puzzle appeared in the late 19th century and swept the United States around 1880, when it became the craze of the day. Its exact origin is still debated, and accounts from the time do not agree.

Why half of all positions cannot be solved

Take a solved 4 × 4, pull out tiles 14 and 15 and swap them by hand. No series of slides will ever fix it. The reason is parity. Every slide moves the gap by one square and, at the same time, flips the parity of the tile order from even to odd or back. To get back to the bottom right corner, the gap always takes an even number of steps, so the order flips an even number of times. A single swap of two tiles flips it once, which is impossible to reach. On a 4 × 4, only half of the 16! arrangements, 10,461,394,944,000 positions, can be solved. This game checks the parity of every shuffle and swaps two tiles if it is wrong, so every game can be solved.

How to solve a 4 × 4

  1. Build the top row: 1 and 2 first, then 3 and 4 together. Trick: park the 3 in the corner where the 4 belongs, with the 4 just below it, then slide the 3 one step left and move the 4 up.
  2. Build the second row (5 to 8) the same way without breaking the first one.
  3. Two rows are left. Stop working row by row and go column by column: 9 and 13, then 10 and 14, and finally cycle 11, 12 and 15 around until they fall into place.

Hints and the solver

On 3 × 3 and 4 × 4, “Hint” shows the next move and “Show solution” plays the rest. On 3 × 3 it is always the shortest solution (31 moves at most). On 4 × 4, if the shortest is not found within 3 seconds, a longer row-by-row solution is played and the message says so.

FAQ

Can I get an impossible game?

No, every shuffle is checked before it is shown.

Is my picture uploaded?

No. It is cut up in the browser; a smaller copy stays on your device so you can resume the game.

What are the small numbers for?

On a plain sky, two tiles look alike: the small corner number tells them apart.

How many moves does it usually take?

A random 3 × 3 can be solved in about 20 moves at best, a 4 × 4 in about 50. By hand, expect two or three times as many.