V0.115 · SLIDING PUZZLE SPECIALIST

15 Puzzle and Sliding Puzzle Online

The Sliding Puzzle is the classic one-gap number puzzle: every numbered tile stays inside a square frame, one space is empty, and a move slides a neighboring tile into that gap. The familiar 4×4 version is usually called the 15 Puzzle because it contains tiles 1 through 15. This specialist also includes a faster 3×3 board and a longer 5×5 challenge while keeping the same rule on every size.

The important implementation detail is that these boards are not made by randomly permuting the numbers. A random permutation can create an impossible position. Instead, every Practice and Daily board begins in the solved state and is scrambled by a deterministic sequence of legal tile moves. Because every scramble is reachable by legal play, every served position has a verified route back to the goal.

Play the classic 4×4 →Open Daily Sliding Puzzle →

Choose 3×3, 4×4 or 5×5

ModeBoardWhat it emphasizesBenchmark
Easy3×3Short planning loops and efficient tile cyclesExact minimum moves
Classic4×4The traditional 15 Puzzle and layer-by-layer planningVerified solvable
Challenge5×5Longer spatial planning with more interaction between rows and columnsVerified solvable

The 3×3 board is small enough that the application can exhaustively search the complete reachable state space and report the true shortest solution length for the starting position. That value is displayed as a minimum, not as a vague “par.” The larger boards deliberately do not claim an exact minimum. Their generator preserves a known legal solution path, and the independent verifier replays it, but a scramble path is not automatically the shortest route. The UI therefore says Verified instead of presenting an unproved number as optimal.

Tap a whole line, not only the neighboring tile

On a physical sliding puzzle you normally move the tile immediately beside the gap. That still works here. For touch screens, the specialist also accepts a tap anywhere in the same row or column as the empty square. Every tile between the chosen tile and the gap slides one position, in order. A three-tile line slide counts as three moves, because three numbered tiles actually changed cells.

This control is useful on 4×4 and 5×5 boards where repeatedly targeting a small neighboring tile becomes tedious. It does not alter the puzzle rules or create teleporting moves. The engine decomposes the tap into the exact sequence of legal adjacent slides. Keyboard play is also available: Arrow keys or WASD move the gap by one square, and Ctrl/Cmd+Z undoes the previous input action.

Why some randomly shuffled 15 Puzzles are impossible

A sliding puzzle has a parity constraint. On odd-width boards such as 3×3 and 5×5, a reachable state has the correct inversion parity relative to the solved order. On an even-width board such as 4×4, the blank row and the inversion count interact. That is why simply shuffling the numbers and putting an empty cell at the end can silently produce a position that no legal sequence can solve.

The V0.115 generator avoids that problem by construction. It starts solved and performs only legal moves. The independent verification script then checks the resulting tile inventory, the formal solvability rule, and the stored reverse path. A board must pass all of those checks to count as valid in QA.

How Practice seeds work

Practice is deterministic when a seed is present in the URL. The seed chooses the same board size contract and reproduces the same legal scramble every time. This makes a board shareable and testable without requiring a server-side game record. Opening Practice without a seed generates one and stabilizes the URL so reloading does not quietly replace the current puzzle with another position.

The generator does more than walk a fixed number of arbitrary moves. It avoids an immediate reversal when possible, prefers states that have not already appeared in the current scramble, and checks a minimum Manhattan-distance threshold before accepting the final board. The stored reverse sequence is then available to verification code as a concrete legal route to the goal.

Move count, timer and local bests

A move is one numbered tile sliding into the empty square. If a line tap shifts four tiles, the counter increases by four. The timer measures active solving time. Pressing Pause stops it, and hiding the browser tab also pauses active timing so a user is not penalized for switching away. Restart returns to the original deterministic scramble and resets the current timer and move count.

Local bests are stored separately by board size and prefer fewer moves; time breaks a tie between equal move counts. Recent solves record the board size, moves, elapsed time and, for 3×3, the proven optimal distance. These are personal browser-local records only. There is no fabricated global rank, percentile, intelligence score or comparison with unknown players.

Undo and autosave

Undo restores the state before the previous tap or key action. When a line tap moved several tiles, one Undo returns the whole input action because the history stores the complete prior board and move counter. This makes touch interaction convenient without changing the underlying move accounting.

An unfinished board is autosaved in local storage together with its move count, input history, timer state and pause state. Returning to the same seeded Practice board or the same Daily date restores that state. There is no account sync in this public build, so clearing site storage can remove those records.

A practical way to solve the classic 15 Puzzle

A common approach is to solve stable layers rather than chasing individual numbers directly toward their final squares. Build the top row while preserving enough room to cycle the last two tiles into place. Then solve the left side of the next unsolved region and reduce the remaining workspace. Near the end, the puzzle becomes a smaller rotation problem where moving the gap around a short loop changes the order without disturbing completed sections.

The move counter helps compare repeated attempts on the same seed, but a low number is not the only meaningful goal. A first clean completion, a faster second solve, or learning how to preserve completed rows can each be useful practice targets. On 3×3, the exact minimum gives a rigorous efficiency reference. On larger boards the application stays conservative and does not claim optimality it has not proved.

Separate Daily mode

Daily Sliding Puzzle uses the same deterministic generator with a date-derived seed. The 2026 schedule rotates among Easy, Classic and Challenge boards, with Classic appearing most often. The Daily board has its own completion history, streak and restore state. It remains separate from the platform’s frozen Today’s 6 sequence, so adding this specialist does not modify older Daily scores, archives or the existing twelve-game rotation source.

Measurement boundary. Sliding Puzzle move and time records describe performance on these puzzle boards. They are not IQ tests, diagnostic measures, attention assessments or medical claims.
Start with 3×3 →Try 5×5 Challenge →