How to Play Sliding Puzzle

Slide tiles into the one empty cell until the numbers read in order with the gap at the bottom right. Only a tile next to the gap can move, and it moves into it. Solve it by finishing the top row, then the left column, then repeating on what is left — never disturbing a finished row — until a 3 × 3 corner remains that you can see the end of.

The rules, step by step

  1. 1Read the frameA square frame holds numbered tiles and one empty cell. A 3 × 3 frame holds eight tiles, a 4 × 4 holds fifteen and a 5 × 5 holds twenty-four.
  2. 2Slide a tile into the gapOnly a tile orthogonally next to the empty cell can move, and it moves into that cell. Tiles are never lifted, rotated or removed.
  3. 3Push a whole line at onceClicking a tile further along the gap's own row or column slides every tile between them one cell. Each tile that moves counts as one move.
  4. 4Sort the numbers into reading orderThe puzzle is finished when the tiles read 1, 2, 3 and so on left to right and top to bottom, with the empty cell at the bottom right.
  5. 5Only a solvable frame is dealtHalf of all arrangements cannot be sorted. Every deal here is tested against the inversion-parity rule and repaired if it falls in the wrong half.
  6. 6Nothing can be lostThere is no way to make a solvable frame unsolvable by playing, so there is no losing move — only longer and shorter routes home.

Try it — the rules above, running

Moves0Home2/15Time0:00Best—Puzzle#1

New puzzle deals a fresh frame at the size you last chose — only ever one that can be solved — Undo walks back the last 40 slides — a line push is one of them however many tiles it carried — and Hint lights up one tile to slide. A tile in line with the gap takes every tile between them along with it, and each tile that moves counts one move. The three-dot menu holds the 3 × 3, 4 × 4 and 5 × 5 frames, today’s shared puzzle and the solve-it-for-me helper.

Your statistics · 4 × 4

Played
0
Won
0
Win rate
0%
Streak
0
Best streak
0
Best time
—
Fewest moves
—

A puzzle is recorded when it ends — sorted, abandoned for another, or handed to the helper. Only a frame you sorted without help counts as a win, so the fewest-moves record is your own.

This frame

Fifteen tiles and 10,461,394,944,000 reachable arrangements. Ten and a half trillion positions is far past what a search in a browser tab could hold, so the helper solves this frame the way a person does — top row, left column, then the last 3 × 3 corner exactly, averaging 84 moves.

Every deal is a pure function of its number, so puzzle #1 is the same arrangement on any device — and it is dealt from the solvable half of the arrangements, never the other one.

Keyboard

Arrows
Slide a tile that way
U
Undo one move
H
Hint
N
New puzzle
Esc
Stop the helper
F
Full screen

What are the rules of a sliding puzzle?

  • One cell in the frame is empty; every other cell holds a numbered tile.
  • A tile may move only into the empty cell, and only from a cell touching it edge-on.
  • On this board, clicking a tile further along the gap's row or column pushes the whole line.
  • The puzzle is solved when the tiles read in order with the gap in the bottom-right cell.
  • Half of all arrangements are unsolvable, so a well-built deal is always checked first.

What is the row-and-column method?

  1. 1Solve the top rowPlace its tiles left to right, all but the last two, then stage and rotate the final pair. The row is now off limits.
  2. 2Solve the left columnThe same procedure turned a quarter turn: all but the bottom two, then the bottom pair staged and rotated together.
  3. 3Repeat on the smaller frameWhat is left is one row shorter and one column narrower. Alternate rows and columns so the remaining block stays as square as possible.
  4. 4Stop at the 3 × 3 cornerEight tiles and a gap can be finished by eye — and on this page by exact search, which is where the shortest-move hint comes from.

How do you finish the last two tiles of a row?

This is the one step that traps people. Suppose the top row needs 3 and 4 in its last two cells. Do not put the 3 on its home cell: the 4 then has to enter the row from the left, and the 3 is standing in the only doorway. Instead put the 3 in the corner cell where the 4 belongs, and the 4 directly below it. Bring the gap to the cell where the 3 belongs, slide the 3 left into it, then slide the 4 up. Both land home in two moves, and the rest of the frame is untouched.

The same shape applies to a column, rotated: the second-to-last tile goes into the bottom corner, the last tile goes to its right, and two slides finish the column. Learning this one manoeuvre is the difference between solving a 4 × 4 frame reliably and going round in circles on its last row.

Why can you not just do the rows from top to bottom?

Because two rows is not a frame you can work in. Once everything above them is frozen, look at the cell directly under the left-hand end of the frozen row: it has exactly one free neighbour, the cell to its right. The gap can only arrive through that neighbour, which pushes whatever was in the pocket out into it — and the gap can only leave the same way, which pulls that tile straight back in. A tile that is not already in the pocket can never be put there, and a tile that is already there can never be taken out.

So a two-row strip has to be finished a column at a time, both of its tiles staged and rotated in together, exactly like the last two of a row. The simpler route is not to create the strip at all: alternate a row with a column, and stop while three rows and three columns are still free. That leaves a 3 × 3 block — eight tiles and a gap, which is the one size a person can finish by looking at it and the one size small enough for this page to search outright.

  • Wrong — top row, second row, third row, then fight the bottom row.
  • Right — top row, left column, next row, next column, stop at a 3 × 3 block.
  • Either way — a finished cell is a wall. If a manoeuvre needs to move through one, the manoeuvre is wrong, not the puzzle.

How do you win more often?

  • Finish a row, then treat it as a wallThe whole method rests on never disturbing what is done. Once the top row is home, work only in the rows below it; the puzzle you are left with is genuinely smaller, which is what makes progress possible at all.
  • Place the last two tiles of a row togetherPut the second-to-last tile in the corner cell and the last one directly below it, then rotate both home with two slides. Placing the second-to-last tile directly on its home cell is the classic deadlock: it blocks the only route the last tile has.
  • Stop taking rows while three of them still remainRows alone do not finish the job, and this is why: freeze a row and the cell directly below its left-hand end has one free neighbour left. The gap can only reach that cell through the one beside it, pushing whatever sits there out — and it can only leave the same way, pulling the tile straight back. Alternate a row with a column so you land on a 3 × 3 block instead, which has room to turn in and is small enough to finish by eye.
  • Park the gap on the far side of the tile you want to moveA tile travels one cell per move and only towards the gap, so the gap has to arrive on the correct side before anything useful happens. Plan the gap's path and the tile's together rather than chasing the tile and hoping: that is exactly what this page's helper does, and it is why its routes average 84 moves on the fifteen-tile frame rather than wandering into the hundreds.
  • Use a line push when the whole row is already rightPushing three tiles at once costs three moves, the same as three separate slides, but it costs one click and no thought. Use it to travel; use single slides when the order inside the line matters.

Common questions about sliding puzzle

Why can I not get the last two tiles of a row into place?
Because you placed the second-to-last one on its home cell first, and it now blocks the last tile's only route in. Stage the pair in the corner instead and rotate them home together.
Is there a fastest way to solve a sliding puzzle?
There is a shortest solution for every position, but finding it is only practical on the 3 × 3 frame. The row-and-column method is not shortest; it is the one a person can execute reliably.
Do you need to think ahead in a sliding puzzle?
Mostly about the gap rather than the tiles. Each tile moves one cell per move and only towards the gap, so the useful question is always where the gap has to be next.
Does it matter where the empty cell starts?
Not for how you play, but it is part of the arithmetic. On an even-width frame such as 4 × 4 the test for solvability counts the inversions plus the gap's row from the bottom; on 3 × 3 and 5 × 5 the gap's position drops out and only the inversions matter. Where it has to finish is fixed either way: the bottom-right cell.

Ready to stop reading? Play sliding puzzle on the full board, with controls and statistics tailored to that game.