Fifteen Puzzle illustration

Fifteen Puzzle

The 15-puzzle craze of 1880 came with a devilish prize: restore a board with just two tiles swapped. Nobody ever collected, because it is mathematically impossible — every slide is a permutation swap paired with a blank move, so the permutation parity plus the blank row always keeps the same evenness. This puzzle scrambles only with legal moves (always solvable), counts your moves, and the live parity panel shows the invariant that sorts all positions into two forever-separate worlds.

Runs 100% in your browser — simulations are computed locally on your device.

Notes

  • Exactly half of the 16!/2 ≈ 10 trillion arrangements are reachable.
  • Sam Loyd’s famous 14-15 swap has odd parity — no sequence of slides can fix it.
  • The invariant: permutation parity + blank’s row distance from home is always even.
  • Runs 100% in your browser — simulations are computed locally on your device.