Sokoban-Lettres

Strategy

Spotting and avoiding deadlocks

By — updated on

A box can be pushed, never pulled. One push too many is enough for a letter never to reach its target again. These positions are called deadlocks, or dead squares. Recognising them before you push is the skill that separates a laborious game from a smooth one.

Why a deadlock is final

To move a box, Sokko has to stand on the side opposite the direction you want. A box pressed against a wall can therefore never move away from it: there is no free square behind it to push from. If that box is not already on its target, and no target lies along that wall, the level can no longer be won. Undoing or starting over becomes the only way out.

The three deadlocks the game detects

Sokoban-Lettres checks every misplaced box after every push and recognises three families of lost positions.

The corner

A box blocked both vertically and horizontally, by a wall or the edge of the grid, can no longer move in any direction. It is the most common deadlock and the easiest to avoid: no box should ever enter a corner that does not hold its target.

The dead wall

A box pushed against a wall can only slide along that wall from then on. If the whole row, or the whole column, up to the walls that close it is lined by a wall and contains no target, the box will never reach its destination. The game detects this on rows and columns alike.

The two-by-two square

Four squares forming a two-by-two block, all taken by walls, edges or boxes, lock each other in place: each box blocks its neighbours’ pushes. The deadlock is flagged as soon as at least one of those squares is not a target.

What happens when a deadlock is detected

A box sitting on a target is never considered stuck, even in a corner: it is already where it belongs.

The deadlock the game does not flag

A fourth family exists: the freeze. Two boxes side by side along a wall, or a box wedged between a wall and another box that cannot move either, can lock up without forming a corner or a square. Sokoban-Lettres does not detect this case. We would rather say so plainly: detection covers the most common lost positions, not all of them. Before pushing a box against another near a wall, check that one of the two can still be freed.

Read the grid before you push

The safest method is to mark the forbidden squares mentally as soon as a level opens: every corner without a target, and every wall edge without a target. Those squares must never receive a box. On a medium-sized grid they are often a third of the free squares, which cuts down the moves that are really playable and makes the order of play clearer.

Sokoban-Lettres adds one difficulty: the right box has to reach the right target, since the targets spell a word from left to right. A box that is in no danger can still become useless if it closes the corridor another letter needed. The advanced strategies cover the order of play, and the glossary defines every term used here.

When a deadlock happens anyway

Undoing costs a life, just like a hint; resetting the grid is free and puts everything back to zero, timer included. If you spotted the deadlock early, starting over is often better value than undoing a long string of moves. The rules for lives and hints are explained in hints and lives.