Sliding Puzzle Online: Rules, Method and Solving Tips
A sliding puzzle is a frame of numbered tiles with one empty square: you slide the tiles one at a time until they read 1, 2, 3… in order. Below you will find the rules, a simple method for solving it in 3x3 and then 4x4, and a plain explanation of the positions that have no solution at all.
A free game in a few seconds, no sign-up needed.
What is the sliding puzzle game called?
Most people just say sliding puzzle or slide puzzle. Depending on the size of the frame, it is also called the "8 puzzle" (a 3x3 frame with eight tiles) or the "15 puzzle" (a 4x4 frame with fifteen tiles). In French it is called taquin. The idea is the same whatever the size.
What are the rules of a sliding puzzle?
- The frame holds numbered tiles and exactly one empty square.
- You can only move a tile that is next to the empty square, by sliding it into the gap. No diagonals, no jumping.
- The goal: put the tiles in order from 1 up to the last number, row by row, with the empty square in the bottom right corner.
The catch is that you cannot move one tile without disturbing others. Every move undoes a little of what you just built, so most of the thinking is about where the empty square should be before you move.
What is the trick to sliding puzzles?
The most common method is to work row by row, treating the empty square as a tool rather than an obstacle.
- Top row: place 1, then 2, then 3 (and 4 on a 4x4). For the last tile of the row, you often need to park it just below its spot, then bring it up with the empty square.
- Next rows: same idea, one row at a time. Once a row is finished, you leave it alone.
- Last two rows: change approach and go column by column, from left to right. Few tiles remain, so you place the top and bottom tile of a column together.
- The final tiles: circle the empty square around a small group of tiles until everything falls into place.
A few habits help: bring the empty square next to the tile before you move it, avoid disturbing a finished row, and take a moment to look at the position instead of sliding tiles at random.
Is every sliding puzzle solvable?
No: half of all possible positions have no solution. If you simply drop the tiles in random places, you land on an impossible position about one time in two. That is why a sliding puzzle game must scramble by sliding tiles away from the finished position: that guarantees a solution exists.
To see why, count inversions. Write the tiles out row by row, leaving out the empty square. An inversion is a pair of tiles where the larger number comes before the smaller one. A horizontal slide does not change that list. On a 3x3, a vertical slide moves a tile past two others, so the inversion count changes by 0 or 2, never by 1: its parity stays the same for the whole game. On a 4x4, the tile passes three others and the parity flips on every vertical slide, which is why the row of the empty square is added to the rule.
- 3x3 frame (odd width): the position is solvable when the number of inversions is even.
- 4x4 frame (even width): add the row number of the empty square, counted from the bottom (1 for the bottom row). The position is solvable when inversions + empty-square row is odd.
A 3x3 example: start from the finished position 1 2 3 / 4 5 6 / 7 8 _ and swap the last two tiles: 1 2 3 / 4 5 6 / 8 7 _. There is exactly one inversion (8 before 7), which is odd, so no sequence of slides can reach the finished position. The same happens on a 4x4 if you swap tiles 14 and 15 in the finished position.
We checked these rules with a program: on a 3x3, out of the 362,880 ways to place eight tiles and the empty square, exactly 181,440 can be reached from the finished position, and they are exactly the ones with an even number of inversions. On a 4x4, that gives 10,461,394,944,000 solvable positions (half of 16!).
What is the difference between the 8 puzzle and the 15 puzzle?
| 8 puzzle | 15 puzzle | |
|---|---|---|
| Frame | 3x3 | 4x4 |
| Tiles | 8 | 15 |
| Solvable positions | 181,440 | 10,461,394,944,000 |
| Method | Top row, then columns | Top two rows, then columns |
The 8 puzzle has few enough positions for a computer to explore all of them: the script we used shows that any solvable 3x3 position can be solved in 31 moves or fewer. On a 4x4 there are far too many positions to go through by hand, and the row-by-row method becomes the standard tool.
How do you play the sliding puzzle online on Kognify?
On Kognify, the Sliding Puzzle is a free game: you slide the tiles back into the correct order, with numbered levels to move forward step by step. Our free online puzzle games offer more challenges of the same kind, and the guide to number puzzles online covers games built around digits. If you are starting out with logic games, see beginner logic games, or browse all Kognify games.
Frequently asked questions
What is the sliding puzzle game called?
It is called a sliding puzzle or slide puzzle. The 4x4 version is the 15 puzzle, the 3x3 version is the 8 puzzle, and in French the game is called taquin.
What is the trick to sliding puzzles?
Work row by row and use the empty square as a tool: finish the top row, then the next, then finish the last two rows column by column. Once a row is done, leave it alone.
Is every sliding puzzle solvable?
No. Half of all positions are impossible to solve, because the parity of the inversion count never changes during play. Swapping just two tiles in the finished position is enough to create an unsolvable puzzle.
What is the difference between the 8 puzzle and the 15 puzzle?
The 8 puzzle is played on a 3x3 frame with eight tiles, the 15 puzzle on a 4x4 frame with fifteen tiles. The rules are identical; the size mostly changes how many moves a solution needs.
Is the Kognify Sliding Puzzle free?
Yes, the Sliding Puzzle is one of the free games on Kognify, and you can play it in your browser.
Ready for a sliding puzzle online?
Slide the tiles and put them back in order: the Sliding Puzzle is free on Kognify.
🎮 Play the Sliding Puzzle →