Puzzle

Sliding Puzzle

🎮 Single Player📱 Mobile Friendly⚡ Instant Load

Sliding Puzzle challenges you to arrange scrambled numbered tiles in ascending order. The 4x4 grid contains 15 numbered tiles and one empty space. You can slide any tile adjacent to the empty space into that space, gradually moving tiles to their correct positions. The tiles are scrambled randomly at the start of each game using an algorithm that guarantees solvability. Not all tile permutations are solvable in a sliding puzzle — only half of all possible arrangements can be solved. Our shuffling algorithm ensures that only solvable permutations are generated, so every game can be completed with the correct sequence of moves.

The sliding puzzle has a rich history: it was invented in 1874 by Noyes Chapman and became a worldwide craze in the 1880s. The mathematical theory behind it involves permutation parity: a solvable puzzle must have an even number of inversions (pairs of tiles in the wrong order). We calculate this parity during shuffling and adjust the arrangement if necessary to ensure solvability. The game tracks your total moves and elapsed time, and saves your best performance (fewest moves to solve) in localStorage. The optimal solution for a scrambled 15-puzzle typically requires between 50 and 80 moves. Professional solvers can complete any solvable puzzle in under 100 moves using the "fringe method" — solving the top two rows first, then the bottom two rows using a specific algorithm. The game uses HTML5 Canvas for rendering, with smooth slide animations that make tile movements feel fluid and responsive.

Controls

Click/TaporArrow Keysto play