Puzzles Guides About Contact All puzzles →
All guides
Method Crate Push 9 min read

Sokoban: planning and deadlocks

Sokoban is the only puzzle on this site where a single move can lose the level without telling you. Learning to see those moves before you make them is most of the skill.

Level Method Puzzle Crate Push About 9 minutes

You push, and that is all

You can walk anywhere the walls allow. When you walk into a crate, it moves one square in the direction you were already going — provided the square beyond it is empty. You can never pull a crate, never move two at once, and never step through one.

Two things follow immediately, and they shape everything else:

  • To push a crate in some direction, you must be able to stand on the opposite side of it. Half of planning a level is checking you can actually reach the square you need to stand on.
  • Moves are not reversible. Walking back to where you came from does not put the crate back. A crate you have pushed into the wrong place may have to be pushed all the way around a loop, or may be gone for good.

That second point is why this puzzle has an undo button and the others mostly do not.

Deadlock one: the corner

A crate touching two walls that meet cannot be pushed at all. To move it along one wall you would need to stand inside the other, which you cannot do.

Level lost

Perfectly fine

The same square, twice. On the left there is no mark under the crate, so the level is already unwinnable even though nothing looks wrong yet. On the right the corner is the mark, so parking a crate there is exactly right.

This is the deadlock that catches everyone, because it usually happens two or three moves before you notice. The habit to build is small: before any push, look at the square the crate is going to land on. If it is a corner and it is not a mark, do not make that push.

The board warns you

Crate Push checks for the deadlocks on this page after every move and tells you when a crate can no longer reach any mark. It is deliberately a warning rather than a block — you are allowed to wander into a lost position, and undo will take you back out. Learning to see it yourself first is more satisfying than being stopped.

Deadlock two: the wall you cannot leave

A crate flat against a straight wall can still be pushed — but only sideways, along that wall. It can never come off it, because pushing it away from the wall would mean standing inside the wall.

The crate can travel left and right along the top wall for as long as you like. It can never come down. If no mark sits on that wall, the level is lost the moment the crate arrives there.

So the rule extends: a crate against a wall is safe only if there is a mark on that same wall, and only if the crate can reach it without a blocking obstacle in the way. Check the stretch of wall, not just the square.

The same logic applies to any dead-end corridor one square wide. Push a crate into one and it can only continue to the end.

Deadlock three: crates against each other

Crates block each other exactly as walls do, so all the patterns above reappear with a crate playing the part of the wall. The most common is a two-by-two square of crates: none of the four can be pushed, because each is blocked by the other three.

Four crates in a block. Each one needs the square behind it clear and the square in front empty; here every direction is blocked by another crate. Unless all four happen to sit on marks, the level is over.

Also fatal, and less obvious: a crate wedged between a wall and another crate, and two crates side by side against the same wall. The general check is the one from the first section — can I stand behind this crate, and is the square in front of it empty? — asked of every crate in the group.

A practical rule while playing: keep crates apart. Two crates that never come within one square of each other can never form these patterns at all.

Solve it backwards from the marks

Playing forwards means searching a large space with no feedback. Planning backwards from the marks is far quicker, and it is what experienced solvers do without thinking about it.

Pick a mark and ask: what is the last push that could put a crate here? A crate arriving from the left had to be pushed rightwards, which means you had to be standing to its left. Now ask the same question of that square, and keep walking the route backwards until you reach a crate's actual starting position.

Working back from the mark on the right: the final push must come from the left, so the crate travels along this row, so you need clear access to the square to its left for the whole run. Anything blocking that access has to be dealt with first — and that is your real first move.

This also settles the question people find hardest, which is what order to do the crates in. A crate whose route passes through a square another crate needs must be handled first. Marks in corners and dead ends should usually be filled early, because a crate parked there afterwards will block the approach to everything behind it.

  1. Find each crate's route. Work backwards from a mark until you reach a crate. If no route exists, you have the wrong pairing — try another mark.
  2. Check you can stand where you need to. A route is only real if you can reach the pushing side at every step.
  3. Order the routes. A crate that would sit across another's path goes last. A mark that blocks an approach gets filled early.
  4. Only then start pushing. The first move of a well-planned level is often clearing a route rather than touching a crate at all.

Getting out of trouble

Everyone loses levels. When it happens, resist restarting straight away — you learn more by undoing back to the branch point and taking the other option, since you already know where this one leads.

  • Undo generously. Full history is kept for the whole level. Going back fifteen moves costs nothing.
  • Count the pushes, not the steps. Walking around is free. Two solutions with the same pushes are the same plan, and your best result is stored per level.
  • If a level will not yield, look for the crate you have been avoiding. Awkward levels usually have one crate that must move early and feels wrong to touch.

All twelve levels here are hand-built and each has been machine-checked to have at least one solution, so a level that feels impossible is a level you have not cracked yet rather than a broken one.

Take the first level slowly

Plan the route backwards before your first push. Arrow keys move, Ctrl+Z undoes, and the board will warn you if a crate becomes stranded.

Open the levels