How it works
Arrange 1–15 in row order, with the empty square at the bottom right. Only a tile directly above, below, left or right of the gap can move. Every puzzle is produced by legal moves from a solved board, so it is solvable.
A useful example
If the last row is 13, 14, empty, 15 while the other rows are solved, tap 15 once. It slides left, leaving the empty square in the final position. That is one move.
Work on the top row first, then build the next row while protecting the completed area. A tile in the right position may need to move temporarily; fewer moves are an optional personal challenge, not a timed requirement.
Progress lasts in this tab. Leaving or reloading starts afresh. No sign-up, payments, uploads or leaderboard.
All games ↗Check a 4×4 board without trying every possible move
Use this check for the stated goal: 1–15 in row order, with the gap at bottom right. It tests reachability, not the shortest solution. A board must contain each number 1–15 and one gap exactly once.
- Read rows from top left to bottom right, leaving the gap out of the number list.
- Count inversions: a larger number appearing before a smaller number contributes one pair. Count pairs, not just misplaced tiles.
- Number the rows from 0 at the top to 3 at the bottom. Add the inversion count to the gap’s row number.
- For this 4×4 goal, an odd sum is reachable; an even sum is not. Do not mix this zero-based top-row convention with a rule counting rows from the bottom.
Complete counterexample: keep the first three rows in order and make the last row 13, 15, 14, gap. Only 15-before-14 is inverted: 1 inversion + gap row 3 = 4, even. Legal slides cannot reach the goal from that arrangement. For the solved board, 0 + 3 = 3, odd.
Check a vertical move: from the solved board, slide 12 down into the gap. Now the gap is in row 2 and 13, 14 and 15 precede 12: 3 inversions + 2 = 5, still odd. Both the inversion parity and gap row changed; their combined parity stayed invariant.
Paper record: goal ___; valid tiles/gap ___; row-order list ___; inversion pairs ___; gap row counted from zero ___; sum ___; reachable/not reachable ___. A repeated tile, missing gap or non-number is an invalid board, not an unsolvable permutation. The game shuffles through legal moves from the goal; this exercise does not add a custom-board input or promise an optimal solver.