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.
How 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
The Tower of Hanoi game online, 3 to 8 disks, with hints, the formula and the algorithm.
Sudoku
Free sudoku online, easy to expert, a new puzzle at every press, with notes and hints.
Killer Sudoku
Killer sudoku online, easy to expert, cages and their sums, with hints.
Nonogram
Nonograms online from 5×5 to 20×20, a picture to fill from its clues, and a nonogram solver.
Minesweeper
Minesweeper online, easy to hard, never a guess, the patterns, and a minesweeper solver.
Animal Sudoku
The picture sudoku for kids: a cat, a frog, an elephant and 21 more animals where the numbers would be.
Dino Sudoku
A T-Rex, a triceratops, a volcano and a dino egg: a dinosaur puzzle that grows from 4×4 to 9×9.
Fruit Sudoku
Apples, bananas and dragon fruit fill the rows: a fruit puzzle game, from a quick 4×4 up.
Flower Sudoku
Tulips, sunflowers and irises, no two alike in a row: a flower puzzle in full bloom.
Ocean Sudoku
A whale, a crab, a seahorse and a starfish: the sea in a sudoku, from 4×4 to 9×9.
Vehicle Sudoku
A bus, a plane, a sailboat and a fire engine on the grid: the car puzzle game for road-trip fans.
Vegetable Sudoku
Carrot, broccoli, corn and tomato in every row: a vegetable puzzle from the garden patch.
Mushroom Sudoku
A morel and 23 more from the forest floor, told apart by shape: a mushroom puzzle for walkers.
Bird Sudoku
A flamingo, a toucan, an owl and a parrot, each in its own place: a bird puzzle to fly through.
Bug Sudoku
A ladybug, a bee, a butterfly and a snail crawl through the rows: the bug sudoku.
Music Sudoku
Piano, guitar, drum and trumpet: a band of 24 instruments, each playing once per row.
Bakery Sudoku
Croissants, cupcakes, donuts and pretzels: a food puzzle fresh from the oven.
Robot Sudoku
Twenty-four friendly robots, each one built differently: a robot puzzle from 4×4 to 9×9.
Zodiac Sudoku
All twelve signs, from Aries to Pisces: your star sign in a sudoku.
Christmas Sudoku
A tree, a snowman, a reindeer and the presents: the Christmas puzzle for December evenings.
Thanksgiving Sudoku
A turkey, a pumpkin, pecan pie and a squirrel: the Thanksgiving puzzle for the whole table.
Valentine Sudoku
Roses, a love letter, a teddy bear and a ring: a Valentine's Day puzzle for two.
Sports Sudoku
Football, basketball, tennis and a trophy: 24 balls and pieces of gear, one per row.
Gym Sudoku
Dumbbells, kettlebells and a punching bag: a workout for the brain, between sets.
Tools Sudoku
A hammer, a drill, pliers and a toolbox: a DIY puzzle for the workshop.
Letter Sudoku
Letter sudoku online: an alphabet sudoku with letters in place of numbers, and one row spells a hidden word.