Sliding Puzzle Game and Solver: Play the 15 Puzzle Online
Play the sliding puzzle online, free: slide the numbered tiles into order, with the gap last. The 15 puzzle on a 4 × 4 board, or 3 × 3 and 5 × 5, with hints, and a solver for any sliding puzzle you set up.
Ad AwaCut Bulk background remover Remove the background from 500 photos at once
AwaCut removes the background from a whole folder of photos at once, right on your own computer. No uploadsNo credits$29 a year, unlimited images Try 10 photos free → awacut.comHow to play the sliding puzzle: the rules
- The board holds numbered tiles and one empty cell, the gap.
- Slide a tile next to the gap into it. Tiles move only along their row or column, never jump.
- Put the tiles in order, 1 in the top left corner, row by row, with the gap in the bottom right corner.
- Each tile slid is one move. Fewer moves and less time are better.
The 8 puzzle, the 15 puzzle and the 24 puzzle
The puzzle is named after its tiles. Each size can be shuffled into this many positions that can be solved:
- 8 puzzle3 × 3, at most 31 moves181,440
- 15 puzzle4 × 4, at most 80 moves10,461,394,944,000
- 24 puzzle5 × 5, the shortest solutions are still hard to find7.8 × 10²⁴
How to solve a sliding puzzle
Row by row, then the last two rows by columns
Put the top row in order and leave it alone: the puzzle left is one row shorter. Do the same with the next rows. When two rows are left, finish them column by column, from left to right, until a 2 × 2 corner is left, which you turn until it fits.
The last two tiles of a row
The last two tiles of a row cannot be put in one by one. Place the last tile in the row's corner, the one before it just under it, then bring the gap round and slide the two up together. The same trick finishes each column of the last two rows.
Stuck? Press Hint on the game: it shows the tile to slide next, from wherever the board stands.
Which sliding puzzles can be solved
Count the pairs of tiles in the wrong order, reading the board row by row. On a board 3 or 5 wide, the puzzle can be solved when that count is even. On a board 4 wide, add the gap's row, counted from the bottom: the puzzle can be solved when the total is odd. Sliding never changes the answer, which is why a board taken apart and put back with two tiles swapped can never be solved. The solver above checks it before it starts.
The history of the 15 puzzle
Noyes Palmer Chapman, a postmaster in Canastota, New York, made the puzzle in the 1870s, and in 1880 it became a craze in the United States and Europe. In 1879 the mathematicians William Johnson and William Story proved that half of its positions cannot be solved. Sam Loyd later claimed to have invented it, and told of a $1,000 prize for the 14-15 puzzle, a prize no one could ever win.
Questions
Can every sliding puzzle be solved?
No. Exactly half of all the ways to place the tiles can be solved. The other half, such as the 15 puzzle with only 14 and 15 swapped, can never be put in order. A puzzle shuffled by sliding, like ours, can always be solved.
How many moves does the 15 puzzle take?
Any 15 puzzle that can be solved takes at most 80 moves, a limit proved by computer in 1999. The 8 puzzle takes at most 31.
What is the trick to solving a sliding puzzle?
Solve it row by row: the top row first, then the next, until the last two rows, which you finish column by column, left to right. Each tile is placed with the gap, never by force.
Who invented the 15 puzzle?
Noyes Palmer Chapman, a postmaster in Canastota, New York, in the 1870s. It swept the United States and Europe in 1880.
What is the 14-15 puzzle?
The 15 puzzle with every tile in place except 14 and 15, swapped. Sam Loyd said he offered $1,000 to whoever solved it. No one could: it is one of the positions that cannot be solved.
How do I solve my own sliding puzzle?
In the solver above, swap the tiles until they match your puzzle, by dragging one onto another or tapping both, and press Solve. It plays the solution on your board, one tile sliding at a time, and Pause, Back and Next let you follow it move by move.
More puzzle games
Tower of Hanoi
Move the tower one disk at a time, 3 to 8 disks, with hints, the formula and the algorithm.
Sudoku
Easy to expert sudoku with notes and hints, and a solver that fills any sudoku cell by cell.
Killer Sudoku
Sudoku with cages and their sums, easy to expert, and a solver for any killer sudoku you draw.
Nonogram
Nonograms from 5×5 to 20×20, a picture to fill from its clues, and a solver for any nonogram's clues.
Minesweeper
Easy to hard minesweeper you never have to guess on, the patterns, and a solver for any field you copy.