15-Puzzle is the legendary 4×4 sliding-tile puzzle. Slide numbered tiles into the empty space to arrange them from 1 to 15 in order.
Click or tap a tile next to the empty space to slide it. Arrange tiles 1-15 in order to win.
About 15-Puzzle
The 15-puzzle is the original sliding-tile puzzle and one of the most-studied puzzles in mathematics. The 4×4 grid contains 15 numbered tiles and one empty space. You can only move tiles by sliding them into an empty adjacent cell. The goal is to arrange the tiles in numerical order from 1 (top-left) to 15 (bottom-right), with the empty space at the bottom-right. Half of all possible random arrangements are unsolvable due to a parity invariant — our puzzle generator only produces solvable starting positions. Strong players solve a random 15-puzzle in 50-80 moves; the worst possible position requires exactly 80 moves to solve optimally.
How to Play 15-Puzzle
- Click any tile that sits adjacent (up/down/left/right) to the empty space. The tile slides into the empty spot.
- You can also use arrow keys to slide a tile into the empty space (the arrow points in the direction the empty space moves).
- Continue sliding tiles until all 15 tiles are arranged in numerical order, with the empty space at the bottom-right.
- The game tracks your move count and time. Lower numbers are better.
- Press Shuffle to scramble the board and start a new game.
Tips and Strategy
- Solve the top-left corner first. Place the 1, then the 2, then the 3 — never disturb them again.
- Solve the top-right two tiles (3 and 4) together, since they constrain each other.
- Use the bottom-up rotation trick to place pairs of tiles without disturbing the row above.
- Solve row by row from top to bottom, then column by column on the bottom two rows.
- When solving the last 2 rows, work in 2×2 blocks. The right column constrains the placement.
- If you find yourself stuck, the puzzle is still solvable — back up and try a different sequence.
- Practice the basic 3-cycle (rotating three tiles in a 2×2 area). This is the building block of all advanced solutions.
History and Origin
The 15-puzzle was invented around 1874 in New York. By 1880 it had become a worldwide craze comparable to the Rubik’s Cube fad of the 1980s. Sam Loyd, a famous American puzzle promoter, claimed credit for inventing it and offered $1,000 for solving an unsolvable position — a stunt that boosted sales but the prize was never paid because the puzzle is mathematically unsolvable in that configuration. The mathematics of the 15-puzzle (proving exactly half of arrangements are unsolvable) was worked out by mathematicians William Johnson and William Story in 1879.
Variations and Game Modes
Variants include the 8-puzzle (3×3 grid with 8 tiles), the 24-puzzle (5×5), letter versions, picture sliding puzzles, and timed speedrun modes. Klotski uses similar mechanics but with different-shaped pieces.
Frequently Asked Questions
How do you solve the 15-puzzle?
Solve it row by row from top to bottom. First place tiles 1-4 in the top row, then 5-8, then 9-12. Finally solve the bottom two rows together using 2×2 rotations. Practice the basic 3-cycle move.
Is every 15-puzzle solvable?
No. Only half of all possible arrangements are solvable, due to a mathematical parity invariant. Our generator only produces solvable starting positions.
What is the minimum number of moves to solve any 15-puzzle?
The worst-case 15-puzzle position requires exactly 80 moves to solve optimally. The average solvable position needs about 50 moves. The minimum is 0 (already solved).
How is the 15-puzzle different from the Rubik’s Cube?
The 15-puzzle is 2D with one empty space; the Rubik’s Cube is 3D with rotational moves. The 15-puzzle has 16!/2 ≈ 10^13 valid positions; the Rubik’s Cube has about 4×10^19. Both teach systematic problem-solving.
Can I use arrow keys to play?
Yes. The Up arrow slides a tile from below into the empty space (i.e., the empty space moves up). Down/Left/Right work analogously.
Does the timer affect anything?
No. The timer is for your own benchmarking. There is no time limit and no penalty for taking your time.
What is a “3-cycle” in the 15-puzzle?
A 3-cycle is a sequence of moves that rotates three tiles within a 2×2 area while leaving everything else unchanged. It is the fundamental tool for solving the puzzle without disturbing already-placed rows.
Why is solving the bottom-right corner the hardest?
Because every other tile must be placed first, the bottom-right corner has the least flexibility. The last two rows must be solved together using interlocking moves.