Game modes

Klotski — The Classic Sliding Block Puzzle Explained

Klotski is the sliding block puzzle where blocks of different sizes fight for space and one big block has to escape. Known as Huarong Dao in China and L'âne rouge in France, the classic layout takes at least 81 moves. Here is the game, the history, and the strategy.

Updated 2026-07-27 7 min read

Klotski is the other great sliding puzzle. Where the 15 puzzle gives you identical tiles and asks you to put them in order, Klotski gives you blocks of different sizes — one 2×2, a few 1×2s, some 1×1s — crammed on a small board, and asks you to walk the big block out through the exit. Same mechanic, sliding into empty space. Completely different game.

The classic layout

The standard Klotski board is 4 columns × 5 rows, with ten blocks and two empty cells:

Block Size Count
The hero (must escape) 2×2 1
Vertical guards 1×2 (tall) 4
Horizontal bar 2×1 (wide) 1
Pawns 1×1 4

The 2×2 block starts at the top centre. The exit is the gap at the bottom centre. Blocks slide — never rotate, never jump — into the two empty cells, and the puzzle is solved the moment the big block reaches the exit.

It looks like it should take a dozen moves. The classic opening position requires at least 81 moves (counting each slide of one block as one move). That gap between how simple it looks and how long it takes is the whole charm of the game.

One puzzle, many names

Klotski is a rare case of a puzzle that was invented, apparently independently, in several places — and named in all of them:

The layouts differ slightly between traditions — Huarong Dao has several canonical openings with their own names — but the game is the same.

Klotski vs the 15 puzzle

Klotski 15 puzzle
Blocks Mixed sizes Identical 1×1 tiles
Goal Extract one block Sort all tiles
Empty cells 2 1
Unsolvable shuffles No — classic layouts are solvable Half of all arrangements
Hardest classic solve 81 moves 80 moves
Feel Manoeuvring in a traffic jam Sorting under constraint

The near-coincidence in the last-but-one row is a nice one: the hardest 15-puzzle position takes 80 single-tile moves, and classic Klotski takes 81 block moves. Both games sit right at the edge of what a patient human can do unaided.

How to actually solve it

Random pushing works for the first ten moves and then stops working. What helps:

1. Think in convoys, not blocks. The two empty cells are the real players. Every move is really a move of the holes. Watch where the holes travel; the blocks just fill in behind them.

2. The big block moves rarely. In an optimal solution the 2×2 block makes only a handful of moves. Almost the entire solution is rearranging the escort around it. If you find yourself moving the big block often, you are going in circles.

3. Learn the rotation. The core repeated manoeuvre in Klotski is walking a 1×1 pawn around a 1×2 guard — a little four-move rotation that swaps their positions. The full solution is this rotation performed again and again in different corners.

4. Do not fear undoing. Positions repeat. Klotski solutions famously look like going backwards half the time — blocks return to where they were three moves ago, one cell displaced. That is normal, not failure.

5. Reset without shame. The state space is small enough that you cannot ruin the puzzle permanently — every reachable position can still be solved. But human working memory is not small enough to know how, so starting fresh is often faster than untangling.

The computer's view

For a solver, Klotski is a light workout. The classic board has only tens of thousands of reachable positions — a plain breadth-first search finds the guaranteed-shortest solution in well under a second, no clever heuristics required. Compare the 15 puzzle, whose ten trillion states demand IDA* and pattern databases.

The interesting computer-science fact sits one level up: generalised sliding block puzzles — arbitrary boards, arbitrary blocks — are PSPACE-complete. Klotski the specific puzzle is easy for machines; Klotski the genre is provably as hard as puzzles get. There is more on this in our sliding block puzzle guide.

Try the sliding family

We build sliding tile puzzles — the 8, 15, 24 and 35 boards, with numbers or your own photos. If Klotski taught you to love the slide-into-the-gap mechanic, the tile branch of the family is the natural next stop: same physics, opposite goal. And when a board has you stuck, our sliding puzzle solver will show you the optimal way out.