What is a slide puzzle?
A slide puzzle is a flat grid of tiles with exactly one empty space. Tiles can only move by sliding into that space, never by lifting. The goal is to arrange the tiles in order, usually reading left to right, top to bottom. The best-known version is the 15 puzzle, a 4×4 grid with fifteen numbered tiles, invented in the 1870s and popularised by Sam Loyd.
Is slide puzzle the same as sliding puzzle and 15 puzzle?
Yes. Slide puzzle, sliding puzzle, sliding tile puzzle and sliding block puzzle all describe the same family of games. 15 puzzle, fifteen puzzle and Game of Fifteen name the 4×4 version specifically. The 3×3 version is the 8 puzzle, and the 5×5 version is the 24 puzzle; the number is always the count of tiles, which is one less than the number of cells.
How many moves does it take to solve a slide puzzle?
It depends on the board size. Any 3×3 position can be solved in at most 31 moves. Any 4×4 position can be solved in at most 80 moves; that figure was proven by exhaustive computer search and is known as God's number for the 15 puzzle. For 5×5 the exact maximum is not known: the hardest known positions need at least 152 moves, and no position needs more than 208. A human solving by hand typically uses two to four times the optimal count.
Can every slide puzzle be solved?
No. Exactly half of all possible tile arrangements can be solved, and the other half can never be reached by sliding. The test is a parity count: list the tiles in reading order and count the inversions, meaning pairs where a larger number comes before a smaller one. On an odd-width board (3×3, 5×5) the position is solvable when that count is even. On an even-width board (4×4, 6×6) add the row of the empty square counted from the bottom, starting at 1; the position is solvable when the total is odd. The solved board itself scores 0 + 1 = 1.
What is the best strategy for a slide puzzle?
Solve it in layers and never break a finished layer. Complete the top row first, then the left column, and treat what remains as a smaller puzzle. Repeat until only a 2×2 corner is left, then rotate the last three tiles into place. Place the last two tiles of each row together rather than one at a time. This method works identically on 3×3, 4×4, 5×5 and larger boards.