# Klotski Puzzle 1

Klotski is a sliding-blocks puzzle game very similar in nature to rush-hour/unblock me. In a given puzzle, a certain number of blocks labeled Z, A, B, C, .... are given. The goal is to move the Z block into the goal area in the fewest number of possible moves.

Each move consists of choosing a certain letter, and then moving the block corresponding to that letter in one of the four main directions (up, down, left, right) as many times as you like. At every point in a move, the block must be moving into adjacent empty spaces only.

In some Klotski puzzles, there are several parts to some blocks which are not connected. Imagine that they are joined by an invisible rigid bar; that is, if one A moves up, all A's must move up as well. For a move to be valid, all such parts of a block must be able to simultaneously make the move.

As an example, consider the following puzzle:

The Z pieces will always be marked in red, while the goal area will always be marked in gold. One solution to this puzzle would be BrZruBlAdCdZur(using d=down, u=up, l=left, r=right):

Br (moving both B blocks to the right once)

Zru (moving the Z block right once and up once)

Bl (moving the B block left once)

Ad (moving the A block down once)

Cd (moving the C block down once)

Zur (moving the Z block up once, and right once into the goal)

The puzzles I post here definitely have solutions with the given # of moves, but that won't necessarily be optimal.

Anyway, here's a puzzle! Note that the invisible-bar analogy still holds over multiple grids.

• Let me see if I understand this correctly : Am I supposed to find a 15-move sequence which solves both boards simultaneously? Commented Mar 14, 2015 at 21:48
• Precisely, yes. For instance, a first move Zd is possible, but Zr is not as it would be illegal on the right board. Commented Mar 14, 2015 at 23:47