Office Break Games
Level 1 0 moves fewest 3

How to play Klotski

Wooden blocks in four sizes fill a tray four squares wide and five tall, with a few squares left empty (just two in the classics). Slide them about until the big square block reaches the gate in the middle of the bottom edge and slips out. Blocks only slide; none can be lifted out.

Controls

Drag a block
Slide it along the free squares, round a corner too
Click / tap a block
Slide it if it has one place to go; otherwise pick it and show its spots
Click / tap a spot
Send the picked block there
Space / Shift+Space
Pick the next / previous block that can move
Arrows / WASD
Slide the picked block one square
U / Z / Ctrl+Z
Undo
R
Restart the level (press twice)
Enter / Space
Next level after a clear

How to play Klotski

Wooden blocks in four sizes fill a tray four squares wide and five tall, with a few squares left empty (just two in the classics). Slide them about until the big square block reaches the gate in the middle of the bottom edge and slips out. Blocks only slide; none can be lifted out.

There are 26 levels, ordered from the fewest moves to the most. Seven short warm-ups come first, then 19 classic Chinese Huarong Dao layouts, up to the famous Forget-me-not at 81 moves and a 138-move finale.

Rules

  • A move slides one block into empty space, as far as it can go along a free path, round a corner if it needs to. Sliding the same block again straight after counts as the same move.
  • The level is solved when the big block reaches the two squares above the gate.
  • Each level shows the fewest moves it can be solved in, found by a program that searched every position the blocks can reach. A clear scores 1,000 points, minus 5 for each move over that, never less than 500.
  • Your run score adds up your best result on each level, up to 26,000, so replaying can only raise it. We set Expert at 8,000 points and Pro at 23,000.
  • Every level is open from the start. Undo is unlimited and free: only the moves in your final solution count.

Controls

Drag a block
Slide it along the free squares, round a corner too
Click / tap a block
Slide it if it has one place to go; otherwise pick it and show its spots
Click / tap a spot
Send the picked block there
Space / Shift+Space
Pick the next / previous block that can move
Arrows / WASD
Slide the picked block one square
U / Z / Ctrl+Z
Undo
R
Restart the level (press twice)
Enter / Space
Next level after a clear

Tips

  • Watch the two empty squares, not the blocks. Every move shifts the gap somewhere, and most good moves bring the two gaps together into a space as long as a block.
  • The wide block under the big one is usually the real obstacle. Before the big block can drop, that block has to get out of its way, so plan where it will go first.
  • Small blocks are the cheapest to shuffle. Moving one round a corner into a pocket still counts as a single move.
  • The named levels are traditional layouts with fixed solutions. If you are stuck on one, try an easier level with a similar shape first.

Klotski strategy

Count moves the way the board does

A move is one block slid anywhere it can reach, so a small block that goes two squares down and one across is still one move, and so is a block you nudge twice in a row. The cheapest solutions lean on that: they move long blocks the full length of the gap and swing small ones round corners into pockets. Nudging a block one square, moving something else and then coming back to the first block costs two moves where one would have done.

Pair the gaps

With two empty squares, everything depends on where they are. Side by side, they let a wide block or the big block move sideways; one above the other, they let a tall block or the big block move down. Most of a solve is spent turning the gaps from one shape into the other where you need them, and every move that splits them far apart has to be paid back later.

Clear the way under the big block

In the classic layouts a wide block sits right under the big one, and the big block cannot get down until that block is out of the way. Work out where it can go, usually to one side once the tall blocks beside it have moved up, and play towards that from the start. Once the big block has dropped one row, the last stretch to the gate is usually short.

Replaying for a better score

A clear is worth 1,000 minus 5 for each move over the fewest possible, never less than 500, and your run keeps only your best per level. Undo is free, so when you find a better idea halfway through, step back to where it starts instead of restarting. The warm-ups are short enough to learn the moves for gaps and corners before you try Forget-me-not’s 81.

About Klotski

Sliding-block puzzles like this go back to the early 20th century, but nobody knows which version came first. Lewis W. Hardy copyrighted the Pennant Puzzle in Chicago in 1909, and John Harold Fleming patented a near-identical layout in England in 1934. In China the puzzle was recorded in the late 1930s and became Huarong Dao, after the pass where Cao Cao escaped in the Romance of the Three Kingdoms.

The name Klotski comes from the Polish word for wooden blocks; its first known use is a 1991 Windows version that went into Microsoft’s Windows Entertainment Pack. In France it is L’Âne rouge and in Japan Hakoiri Musume, the daughter in the box. Martin Gardner published an 81-move solution of the standard layout in Scientific American in 1964, and computers have since confirmed that 81 is the fewest.

Questions

What is the minimum number of moves in Klotski?

81 for the standard layout, Forget-me-not (横刀立马 in Chinese), counting a move as one block slid any distance, round corners included. Counted that way, every level here shows its own fewest.

Is Klotski the same as Huarong Dao?

Yes, the same puzzle: a 4 × 5 tray, a big 2 × 2 block and ten pieces in all. Huarong Dao names the big block Cao Cao and the others his enemies’ generals and soldiers. The named levels here are classic Huarong Dao layouts.

How is the score calculated?

1,000 points per cleared level, minus 5 for each move beyond the fewest possible, never less than 500. Your run score adds up your best on each of the 26 levels.

Is my progress saved?

Yes, in this browser: the levels you have cleared, your best moves on each, and the level you are in the middle of.