How to play klotski
- Find the big block and the exit. The red 2×2 block starts at the top. The gap in the bottom edge of the wooden frame is the exit; the puzzle is solved when the big block sits right above it.
- Slide one block at a time. Drag any block with your finger or mouse. A block can slide into empty squares and even turn a corner in one drag, but it can never jump over another block or rotate.
- Or tap, then choose a direction. Tap a block to select it (dots show where it can go), then tap an arrow or an empty square. On a keyboard, the arrow keys move the selected block.
- Count your moves. Moving the same block again straight away does not add a move, so a long slide or an L-shaped slide counts as one. Try to match the fewest-moves number shown above the board.
- Undo, reset or ask for a hint. Undo steps back, Reset returns to the start, and Hint plays the next move of a shortest solution from your current position.
Why the classic takes 81 moves (and how moves are counted)
Klotski numbers only make sense once you agree what a “move” is. We ran a breadth-first search over the classic layout three times, once per rule:
- 81 moves — one block moved any distance, including around a corner, is one move. This is the usual rule and the one this game uses.
- 90 moves — every straight slide counts, so an L-shaped slide is two moves.
- 116 moves — every square a block travels counts.
The search treats blocks of the same shape as interchangeable. From the classic start, 25,955 different positions can be reached, and in 964 of them the big block is already at the exit. The position farthest from any solution needs 93 moves — our level 12, “Longest road”, starts there. Want to see every move? Step through the 81-move klotski solution.
Klotski strategy that actually helps
- Work backwards from the exit: the big block needs a 2×2 hole directly below it, so ask which blocks must leave that area and where they can go.
- The wide block is the usual blocker. In the classic layout it sits right under the big block; most of the early moves exist only to get it out of the way.
- Keep the two empty squares together. Two separate gaps move small blocks around; a 1×2 gap is what lets tall and wide blocks move at all.
- Use the small blocks as filler. They can go almost anywhere, so park them in corners you won’t need soon.
- Expect to move the big block sideways and even upwards. On the longer layouts it has to step aside to let blocks pass.
- Repeat good patterns. Once you find a short sequence that moves the big block one row down, you will use it again later in the solve.
All levels
4 levels are traditional layouts with well-known names (齐头并进, 指挥若定, 兵分三路, 横刀立马); for each, our search gives the same fewest-moves count that is widely published. The other 8 are our own layouts, picked from the search so the difficulty climbs steadily. Tap a level number to open it.
| Level | Start | Name | Fewest moves | Straight / squares | Positions |
|---|---|---|---|---|---|
| 1 | First stepsoriginal | 8 | 9 / 9 | 86,968 | |
| 2 | Open doorsoriginal | 13 | 13 / 17 | 86,968 | |
| 3 | Narrow passoriginal | 23 | 27 / 34 | 25,955 | |
| 4 | Crossbeamsoriginal | 32 | 34 / 43 | 81,462 | |
| 5 | The long way roundoriginal | 43 | 48 / 56 | 25,955 | |
| 6 | Gatekeepersoriginal | 53 | 57 / 64 | 81,340 | |
| 7 | Side by side齐头并进 · Qí tóu bìng jìntraditional layout | 60 | 66 / 85 | 25,955 | |
| 8 | The commander指挥若定 · Zhǐ huī ruò dìngtraditional layout | 70 | 79 / 100 | 25,955 | |
| 9 | Three roads兵分三路 · Bīng fēn sān lùtraditional layout | 72 | 77 / 92 | 25,955 | |
| 10 | The classic opening横刀立马 · Héng dāo lì mǎtraditional layout | 81 | 90 / 116 | 25,955 | |
| 11 | Deep retreatoriginal | 88 | 96 / 121 | 25,955 | |
| 12 | Longest roadoriginal | 93 | 101 / 126 | 25,955 |
Where klotski comes from
Sliding block puzzles with one big block and an exit are played around the world under different names. In China the same 4×5 board is 华容道 (Huarong Dao), after the story in which Cao Cao escapes along the Huarong path; the blocks are often labelled with his name and those of the generals who block his way. The word klotski is generally traced to the Polish word for wooden blocks.
Klotski is different from the 15 puzzle, where numbered square tiles are put in order. If you enjoy klotski, try our general sliding block puzzle with other board sizes and exits, or a packing puzzle such as the 8×8 wooden block puzzle and the tetromino puzzle.