8 puzzle · 3×3 board

3×3 slide puzzle

Eight tiles and one gap. The fastest sliding puzzle there is, and the best one to learn the method on.

0:000

Tap or drag a tile next to the empty space to slide it. Arrow keys work too. Every shuffle is solvable.

About the 3×3 puzzle

What is the 3x3 slide puzzle called?

The 3×3 slide puzzle is called the 8 puzzle, because it has eight numbered tiles and one empty cell. It is the smallest sliding puzzle that is still interesting to solve, and the one most often used in computer science courses to teach search algorithms.

How many moves does a 3x3 slide puzzle take?

At most 31 moves. Every solvable 8 puzzle position can be solved in 31 single-tile slides or fewer, and exactly two positions need the full 31. A typical shuffled board is solvable in about 22 moves. A person solving by hand usually takes 40 to 80 moves.

How many positions does the 8 puzzle have?

The 8 puzzle has 9! = 362,880 possible arrangements, and exactly half of them, 181,440, can be solved. The other 181,440 can never be reached by sliding tiles, no matter how many moves you make.

How do you solve a 3x3 slide puzzle?

Place tiles 1, 2 and 3 in the top row first and never move them again. Then put 4 and 7 into the left column. The remaining four cells hold tiles 5, 6 and 8 plus the gap; slide them around that 2×2 square until they fall into place. If they will not, the puzzle is unsolvable, which cannot happen with a board shuffled by legal moves.