Home / Brain Teasers / Sliding Puzzle

Sliding Puzzle

The sliding puzzle, popularized as the 15-puzzle in the 1870s, is a single-player game played on a square frame holding fifteen numbered tiles and one empty space. Sam Loyd's famous (and unsolvable) prize version drove a worldwide craze in 1880. You slide tiles into the gap to sort the numbers into sequence.

Brain Teasers Medium 1 Player

Sliding Puzzle Rules

The board is a 4×4 grid containing tiles numbered 1 to 15 plus one empty square. The tiles begin in a scrambled arrangement, and you can only move a tile that sits directly next to the empty space.

On each move you slide an adjacent tile into the gap, which shifts the empty square to where that tile was. There is no lifting or jumping — every change is one slide at a time.

You win when the tiles read 1 through 15 left to right, top to bottom, with the empty square in the bottom-right corner. Only half of all random scrambles are solvable, a fact tied to the parity of the arrangement.

Sliding Puzzle Strategy & Tips

Solve top-down, left-to-right

Lock in the top row first (1, 2, 3, 4), then the second row, before touching the bottom half. Once a tile is placed correctly, avoid disturbing it.

Use the corner trick for row ends

When placing the last two tiles of a row, set up the rightmost tile above its target and the next tile below it, then rotate them in together. This avoids the deadlock of placing them one by one.

Finish the last two rows as columns

After the top two rows are done, solve the bottom 4×2 region column by column, pairing the two tiles in each column and rotating them into place.

Think in cycles, not single slides

Moving one tile to a target usually means circling the empty square around a group of tiles. Plan the loop you need before you start sliding so you don't undo progress.

Frequently Asked Questions

Are all 15-puzzle scrambles solvable?

No. Exactly half of the 16!/2 arrangements can be solved. Solvability depends on the parity of tile inversions combined with the row of the blank square.

What is the maximum number of moves to solve the 15-puzzle?

The hardest solvable positions require 80 single-tile moves to reach the goal, a result proven by computer search.

Why was Sam Loyd's puzzle impossible?

Loyd offered a prize for swapping just the 14 and 15 tiles from a solved board. That single swap flips the parity, making the position mathematically unsolvable.

How do I solve a sliding puzzle without getting stuck?

Work in order — complete the top rows first, then solve the bottom two rows by columns. Place the last two tiles of any row or column using a rotation rather than forcing them individually.