The classic sliding puzzle that has challenged minds for over a century. Arrange the numbers in order by sliding tiles!
How to Play: Click on any tile adjacent to the empty space to slide it into that space. The goal is to arrange all tiles in ascending order from left to right, top to bottom, with the empty space in the bottom-right corner.
The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, or Mystic Square) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle was "invented" by Noyes Palmer Chapman, a postmaster in Canastota, New York, who is said to have shown friends, as early as 1874, a precursor puzzle consisting of 16 numbered blocks that were to be put together in rows of four, each summing to 34.
Mathematical Significance: The 15-puzzle is often used in computer science to teach state space search algorithms. It's also used in AI research as a benchmark problem for heuristic search algorithms. Determining whether a given configuration is solvable involves checking the parity of the permutation.
For a 4x4 puzzle (15-puzzle):
1. Count the number of inversions in the tile arrangement.
2. Find the row number of the empty space (counting from bottom).
3. If the grid width is odd, the puzzle is solvable if the number of inversions is even.
4. If the grid width is even, the puzzle is solvable if:
- The blank is on an odd row from the bottom and number of inversions is even, OR
- The blank is on an even row from the bottom and number of inversions is odd.
Solve the puzzle one row at a time from top to bottom. Complete the first row, then the second, and so on.
Start by solving the corners, then work on the edges, and finally the middle pieces.
Arrange tiles in a snake-like pattern from the top-left corner to the bottom-right.
Use specific move sequences (algorithms) to position individual tiles without disturbing already placed ones.
| Puzzle Size | Number of Tiles | Possible States | Optimal Solution Length | Difficulty Level |
|---|---|---|---|---|
| 3x3 (8-puzzle) | 8 | 181,440 | 31 moves max | Easy |
| 4x4 (15-puzzle) | 15 | 10^13 (approx) | 80 moves max | Medium |
| 5x5 (24-puzzle) | 24 | 10^25 (approx) | 205 moves max | Hard |
| 6x6 (35-puzzle) | 35 | 10^41 (approx) | ?? moves max | Expert |
Classic 15-Puzzle: The standard puzzle with numbers 1-15 and one empty space. The goal is to arrange numbers in ascending order.
Picture 15-Puzzle: Instead of numbers, the puzzle uses pieces of a picture that must be arranged to form the complete image.
Word 15-Puzzle: Tiles contain letters that must be arranged to form words or sentences.
15-Puzzle with Forbidden Moves: A variation where certain moves between tiles are not allowed, adding additional constraints.
| Puzzle Size | Moves | Time |
|---|---|---|
| 3x3 Puzzle | 74 | 00:58 |
| 4x4 Puzzle | - | - |
| 5x5 Puzzle | - | - |
Only 50% of random configurations are solvable! Our puzzle generator ensures all puzzles are solvable. The solvability depends on permutation parity.