# Klotski's eighty-one moves

By Soddoo Editorial Team

[Original article](https://soddoo.com/blog/klotskis-eighty-one-moves/)

The classic Klotski board looks close to solved. The large square block begins only a few rows from the exit, and two empty cells leave visible room underneath it.

That distance is misleading. Every smaller block must be rearranged around the large one, often moving away from the position that seems useful.

The optimal solution takes 81 moves when one move means sliding a single block any uninterrupted distance available to it. An [optimal Klotski solver](https://computerpuzzle.net/english/klotski/index.html) confirms that count for the standard hard layout.

Counting individual cells instead of block slides produces a different total. Any comparison between solutions needs to state which convention it uses.

The 81-move path also explains why casual trial and error stalls. Progress cannot be measured only by the large block's distance from the exit.

Useful moves create circulation space. A narrow vertical block may need to cross the board so two horizontal blocks can trade levels, after which the empty cells can return to the large block's lower edge.

## The empty cells do the work

Klotski has no piece that can jump or rotate. Every change depends on the two empty cells, which act less like unused space and more like a resource that must be carried around the board. A block can move only when those cells have reached the correct side of it.

That makes apparently wasteful slides necessary. Moving the target block upward may be the only way to send the empty cells around a pair of guards. Sliding a small block away from the exit may let the empty cells change from a horizontal pair into a vertical pair. The board has not moved closer to the final picture, but its space has become useful in a new direction.

The shapes matter because they control how that space travels. A one-by-one soldier can slip through gaps and help separate the empty cells. A horizontal block needs both cells on one side before it can change rows. A vertical block creates the same demand along a column. Solving the puzzle means coordinating these local requirements until the empty cells arrive beneath the hero at the same time.

## What the move count measures

The 81-move result depends on treating one uninterrupted slide as one move. Under that convention, moving a block by two cells is no more expensive than moving it by one. A solver can therefore compare changes in arrangement rather than the distance covered by a finger or cursor.

The convention also reveals repeated structural tasks. Space must be opened, transferred around a large piece, and closed again after another block passes. Several sections of an optimal solution can look like earlier sections in reverse, but one important block has changed sides in between.

An optimal path is useful even when a player is not chasing the minimum. It shows that temporary retreat is part of the puzzle rather than evidence that the attempt has failed. A position can be closer in the state graph while the hero looks farther from the exit.

The practical goal for a first solve is therefore not to count downward from 81. It is to recognize which pair of blocks must exchange places next and then route the empty cells to make that exchange possible.

[Klotski](/klotski/) counts each block slide as one move and includes several layouts. The [Klotski manual](/how-to-play/klotski/) recommends solving in phases: open a lane, rotate the smaller pieces, then bring the target block down.

Those phases give a stalled attempt a diagnosis. If no block can trade levels, the problem is circulation space, not the hero's final route.

One more opening square can matter more than one row of apparent progress.