CpsSpeedTest
CpsSpeedTest Editorial TeamLast updated: October 2026
Permutation Parity & Row Algorithms

15 Sliding Puzzle

The classic 15-puzzle invented by Noyes Chapman in 1874. Slide numbered tiles to restore sequential 1–15 order using algorithmic row-by-row techniques.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Sliding Puzzle

Get the numbers in order.

The Mathematics of Permutation Inversion Parity

The 15-Puzzle is a classical permutation puzzle consisting of a 4×4 frame with 15 numbered square tiles and one blank space. Proven by mathematicians Johnson and Story in 1879, exactly half (50%) of all randomly placed initial permutations are mathematically unsolvable. A state is solvable if and only if the parity of its permutation inversions matches the row distance of the empty blank square. Every puzzle on this platform is guaranteed 100% solvable.

15 Tiles
4x4 Matrix Frame
10.4 Trillion
Solvable States (16! / 2)
80 Moves
God's Number Diameter
Row-by-Row
Standard Solving Algorithm

Because moving a single tile merely permutes elements within an alternating symmetric group, solving the puzzle requires systematic invariant preservation rather than random moves.

How to Solve the 15-Puzzle Algorithmically in 6 Steps

1

Understand Grid Layout & Empty Space

The board consists of a 4x4 grid with 15 numbered square tiles (1 to 15) and one empty blank space. Tiles slide orthogonally into the open slot.

2

Solve the First Row in Order (1, 2, 3, 4)

Slide tiles 1, 2, and 3 into their final top slots. To place tile 4, position it in the top-right corner with 3 beneath it and cycle them into place.

3

Complete the Second Row (5, 6, 7, 8)

Follow the identical technique for row two: position 5, 6, and 7 sequentially, then train-cycle tile 8 into the rightmost slot.

4

Solve the Bottom-Left Columns (9 and 13)

Work vertically for the bottom two rows. Place tile 9 in the bottom-left slot, position tile 13 directly beside it, and rotate them into position.

5

Align the Next Column Pair (10 and 14)

Position tile 10 in the third column and tile 14 beneath it, rotating them cleanly into place without disturbing solved rows.

6

Cycle the Final 2x2 Sub-Grid (11, 12, 15)

Rotate the remaining three tiles around the empty slot until 11, 12, and 15 lock into their ascending home coordinates.

Sequential Lookahead & Working Memory

Moving tile 4 into place requires planning a 5-step detour that temporarily disrupts other tiles. This prospective memory planning strengthens the prefrontal cortex and suppresses short-sighted moves.

Algorithmic Decomposition & Invariants

The row-by-row method teaches players to lock completed sub-problems permanently (invariants) and solve remaining sections within reduced coordinate frames, mirroring recursive computer science algorithms.

Spatial Orientation & Mental Rotation

Navigating empty space through dense tile clusters exercises the parietal lobe, developing acute 2D spatial awareness and pathfinding reflexes.

Inhibition Control & Patience

Random sliding without strategy results in endless circular loops. The puzzle instills disciplined problem-solving restraint and systematic execution.

Row-by-Row Algorithm Breakdown & Sub-Goal Strategy

StageTarget TilesKey Technical ManoeuvreRemaining State Space
Stage 1: Top Row1, 2, 3, 4Direct placement of 1,2,3; 2-tile train cycle for 3 and 4Reduces board from 4x4 to 3x4
Stage 2: Second Row5, 6, 7, 8Identical train cycle for tiles 7 and 8Reduces board from 3x4 to 2x4
Stage 3: Left Columns9, 13, 10, 14Vertical pairing: rotate 9 and 13 into column 1Reduces board to final 2x2 corner
Stage 4: Final 2x211, 12, 15Simple circular cycle around the remaining blank slot100% Puzzle Solved

15-Puzzle Move Efficiency & Speed Tiers

Evaluating solving efficiency and speed on standard scrambled configurations:

🌱
200+ Moves / > 3 Min
Trial & Error

Accidentally dismantles completed rows. Struggles with the last two tiles in a row and slides without clear sub-goals.

⚡
120 – 199 Moves / 1–3 Min
Algorithmic Solver

Understands row-by-row mechanics. Smoothly executes the corner train cycle and reaches the final 2x2 without frustration.

🔥
70 – 119 Moves / 30–60 Sec
Speedcuber Tier

Fluid, rapid finger slides. Pairs tiles in transit and solves columns with minimal circular displacement moves.

👑
< 70 Moves / < 30 Sec
Grandmaster Tier

Near God's Number efficiency. Sub-second state evaluation, phenomenal hand speed, and flawless algorithmic execution.

4 Proven Tips to Master Sliding Tile Puzzles

1Never Place the Last Row Tile Directly

Placing tile 3 and trying to push tile 4 in blocks the path. Place 4 in slot #3, place 3 beneath it in slot #7, then rotate them together clockwise.

2Lock Completed Rows Inviolably

Once Row 1 is solved (1, 2, 3, 4), pretend it no longer exists. Never move those tiles again; solve the rest of the puzzle in the remaining 3x4 grid.

3Work Vertically for Bottom Rows

For the final two rows, solving horizontally is extremely difficult. Instead, solve vertically: pair 9 and 13 as a column, then 10 and 14.

4Guide the Empty Space Rather Than the Tiles

Advanced solvers think about steering the empty hole around the board to pull desired tiles toward their targets, minimizing wasted maneuvers.

Frequently Asked Questions About Sliding Puzzle

What are the rules and objective of the classic 15 Sliding Puzzle?

The puzzle features a 4x4 frame containing 15 numbered square tiles (1 through 15) and one empty space. You can slide any tile horizontally or vertically adjacent to the empty spot into that space. The goal is to arrange the tiles into ascending order from 1 to 15, reading left-to-right, top-to-bottom, leaving the empty space in the bottom-right corner.

What is the mathematical 'Inversion Parity' theorem of the 15-Puzzle?

Proven by mathematicians William Woolsey Johnson and William E. Story in 1879, exactly 50% of all random 15-puzzle permutations are mathematically impossible to solve. A configuration is solvable if and only if the parity (even/odd) of tile inversions matches the row distance of the empty blank square. Our engine guarantees that every shuffled board is 100% solvable.

What is the standard step-by-step method to solve a sliding puzzle?

The universal technique is the row-by-row method: 1) Solve Row 1 in order (1, 2, 3, 4). 2) Solve Row 2 in order (5, 6, 7, 8). 3) For the remaining bottom two rows, solve the columns from left to right (placing 9 and 13, then 10 and 14). 4) Cycle the remaining four tiles (11, 12, 15, and blank) into their final slots.

How do you place the last two tiles in a row (e.g., 3 and 4)?

Trying to slide the last tile directly into place blocks previous tiles. Instead, place tile 4 where tile 3 belongs, place tile 3 directly beneath it, and then cycle them together as a 2-tile train into the corner.

Who invented the 15-Puzzle and what is its history?

The puzzle was invented around 1874 by Noyes Palmer Chapman, a postmaster in Canastota, New York. It became an international craze in 1880 after being popularized by puzzle promoter Sam Loyd, who famously offered a $1,000 prize to solve an intentionally impossible 14-15 inverted configuration.

What is the theoretical maximum number of moves needed to solve any 15-puzzle?

In 2005, computer scientists proved that the diameter of the 15-puzzle state space is 80 moves. Any solvable 15-puzzle board can be solved in 80 moves or fewer from any legal starting permutation.

How does solving sliding puzzles build algorithmic planning skills?

Sliding puzzles require sequential dependency planning. Because moving a piece into position often temporarily displaces previously aligned tiles, players develop spatial lookahead, state preservation, and working memory manipulation.

Explore More Logic & Spatial Puzzles

Continue challenging your spatial reasoning, recursive logic, and working memory across our suite: