There is one method for solving slide puzzles by hand. It does not depend on board size. Once you have it for the 3×3, you have it for the 4×4, 5×5, 6×6, and any larger size you find. This is the method.
The plan
For an N×N puzzle:
- Solve row 1 — place tiles 1, 2, …, N in the top row.
- Solve column 1 — place tiles N+1, 2N+1, …, in the first column below row 1.
- You now have an (N−1)×(N−1) puzzle. Recurse.
- Base case — when you reach a 2×2, the remaining tiles are either in place or you need to consult a parity check.
That is the whole algorithm. Three sentences. The rest is mechanics.
The mechanics: corners
Placing the first tiles of a row or column is easy. The trick is placing the last tile — the corner tile.
For the top-right corner of row 1 (tile N on an N×N puzzle):
- Don't try to slide tile N directly into the corner. It will not stay there.
- Place the previous tile (tile N−1) into the corner first.
- Place tile N directly under N−1.
- Now rotate the pair: move the empty into the corner (displacing N−1), slide N−1 down-and-left out of the way, slide N up into the corner, slide N−1 right.
The effect is that N−1 and N end up correctly placed without disturbing anything to their left.
This is the L-shaped corner manoeuvre. The same trick, mirrored, works on the bottom-left corner of column 1.
If you only remember one piece of slide-puzzle technique, remember this. Everything else falls out of it.
The mechanics: middles
For the interior of a row (tiles 1 through N−2 on the top row), placement is direct:
- Find the tile you want.
- Move it to a position adjacent to its destination.
- Use the empty cell to slide it into place.
You may have to nudge other unplaced tiles aside. That is fine — they are unplaced. As long as you do not disturb already-placed tiles to the left, the row builds up cleanly.
The rule that keeps you safe: never let the empty cell cross a placed tile. If the empty needs to travel from the right of the board to the left of a placed tile, you have to route the empty around the placed tile by going through unplaced cells.
Why "row, then column"
Two reasons:
- Mirror symmetry. The row-corner manoeuvre and the column-corner manoeuvre are exactly the same trick, mirrored. Learning one teaches you the other.
- The empty has room to work. After you solve row 1, the empty has the bottom (N−1) rows to manoeuvre in. After you solve column 1, it has an (N−1)×(N−1) area. The work area shrinks gracefully.
You could alternate (row 1, column 1, row 2, column 2, ...) but the natural rhythm is to do them in pairs at the outside, and recurse.
The recursion
When row 1 and column 1 are done, the remaining (N−1)×(N−1) puzzle holds tiles that need to go into a different goal configuration — the same numerical sequence, but in different positions. The good news: the method does not care. Solve the new top row, the new left column, recurse. Eventually you hit a 2×2 or a 3×3 base case.
For the 3×3 base case, the last three tiles can be cycled into place by repeated single moves. For a 2×2 base case (which can arise at the very end of large puzzles), the same applies.
Why this works on every size
The slide-puzzle family has a useful recursive property: solving a row-and-column reduces the puzzle to a smaller puzzle of the same kind. The mathematics is straightforward. After placing N tiles on row 1 (and never touching them again), the remaining game lives on an (N−1)-wide grid that is missing one row. After placing the leftmost column, it lives on an (N−1)×(N−1) grid.
You can apply this reduction at every step. The 6×6 reduces to a 5×5, which reduces to a 4×4, which reduces to a 3×3 endgame. The 3×3 endgame is the only one with a special-case technique; everything bigger reduces to it.
That recursive structure is why slide puzzles are often used to teach divide-and-conquer in programming courses. The proof of correctness is one paragraph; the implementation is the body of the algorithm.
How fast you get
A new solver, applying this method literally, takes:
Within a few games per size, those times drop by half. The method is the same; it is just motor memory of the corner manoeuvre.
What this method is not good for
Optimal solutions. A computer with a real solver will find sequences that are 30–50% shorter than the row-and-column method produces. Humans cannot run those algorithms in their heads.
Speed-solving competitions. Top human speed-solvers use the row-and-column method as a base but cut corners aggressively, doing partial placements that they un-do later. That is faster but harder to learn.
For everyone else — the row-and-column method is the method.