Felt & Wood
Back to games

Sokoban

Lv 1

Moves 0

·
·
·

Swipe the board or use the pad below.

How to Solve Sokoban: Push Planning and Deadlock Prevention

Learn Sokoban rules, reverse planning, crate order, player access, tunnel tactics, and the deadlocks that make otherwise simple levels fail.

What you can and cannot do

Sokoban is a warehouse puzzle in which you move a worker through a fixed arrangement of walls, floor tiles, crates, and goals. The worker moves one square at a time horizontally or vertically. Walking into a crate pushes it one square in the same direction, but only if the square beyond is empty floor or an unoccupied goal.

You cannot pull a crate, push two crates together, move through walls, or move diagonally. The level is solved when every crate occupies a goal.

| Element | Behaviour | |---|---| | Wall | Neither player nor crate can enter | | Floor | Player or crate may occupy it | | Goal | Must eventually contain a crate; player may cross it | | Crate | Can be pushed from behind into an empty square | | Crate on goal | Correctly placed for now, but may still be moved |

Walking moves matter because they determine which side of a crate you can reach. Yet pushes are the important strategic currency: a walk is usually reversible, while one bad push can make a level impossible. Undo restores the previous position, so use it to test plans, but learn to recognise failure before making a long sequence.

Deadlocks, reverse planning, and crate order

Inspect dead squares before moving

The simplest deadlock is a crate in a corner that is not a goal. With walls on two perpendicular sides, the player can never stand beyond the crate to push it out. Mark every such corner mentally at the start.

Walls create broader dead zones. A crate pushed against a wall may move only along that wall; if no goal lies on the reachable segment, it can never finish. Two crates can also freeze each other against walls or in a two-wide pocket. These static deadlocks can often be identified without moving anything.

Not every dangerous square looks like a corner. A crate may be movable but still cut the player off from the side needed for its next push. Before each push, ask:

  1. Where will the crate land?
  2. Where will the player stand?
  3. Can the player get around to another useful side?
  4. Does the push close a corridor needed by another crate?

Plan backward from goals

Forward thinking asks where a crate can go. Reverse thinking asks where it must come from. For each goal, imagine the final push: the crate must be on the adjacent square, and the player must be one more square behind it. If either required square is a wall, approach from that direction is impossible.

Continue this reasoning backward to identify likely crate-goal assignments. A goal at the end of a narrow corridor may be reachable by only one crate or from only one direction. Handle constrained goals first; flexible central goals can accept whichever crate remains.

This method prevents a common trap: pushing the nearest crate onto the nearest goal, then discovering that the remaining crate cannot turn into the last corridor.

Preserve player access

A crate does not need only a path to a goal. The player needs a sequence of support squares behind it. A wide open route for the crate may still fail if walls prevent the player from switching sides.

Before beginning several pushes in one direction, locate the square where the crate must turn. To change from pushing right to pushing up, the player eventually needs access below the crate. Make sure that route remains open. Sometimes the correct first move pushes a crate away from its goal solely to create room for the worker to circle around.

Keep central spaces and junctions open as long as possible. Parking a crate in a doorway divides the board and may strand the player or another crate. If a doorway must be crossed by several crates, establish their order before filling anything beyond it.

Respect tunnels and crate order

In a one-cell-wide tunnel, the player cannot pass a crate and the crate cannot turn. Once pushed deeply inside, it usually has only one useful direction. If several crates must enter the same tunnel, the one destined for the farthest goal often goes first.

The same principle applies to rooms with a single entrance. Filling the near goal first may block the far goal. Work from the deepest destination outward, while confirming the player has space for each final push.

Crate order is often the real puzzle. If crate A blocks the route for crate B, moving A to its goal may be premature. Use temporary parking squares that are open, non-corner locations with access from several sides. A good parking move preserves options; a bad one merely relocates the deadlock.

Separate walking plans from pushing plans

When a position becomes confusing, ignore ordinary walking and list only intended pushes. For example: push the left crate up twice, move around, push it right once, then approach the second crate. For every listed push, verify that the player can reach its support square without moving another crate accidentally.

This push-level plan makes dependencies visible. If the route to a support square crosses a tile that another crate will occupy, reverse the order. It also helps minimise pushes, although the shortest solution is less important than a safe one.

Treat goals as floor until they are safely final

Goals do not lock crates in place. You may need to push a crate off a goal to open access or assign that goal to another crate. Avoid the psychological trap of protecting every early placement.

A crate is truly finished when it is on a goal and never blocks a needed path, support square, or turning point. Goals in corners are often safe final destinations. Goals in the middle of corridors are frequently temporary.

Mistakes that create irreversible deadlocks

Pushing before surveying the board. One push can be irreversible. Identify non-goal corners, narrow tunnels, constrained goals, and doorways first.

Planning only the crate’s route. The worker must reach the correct side before every push. Trace support-square access alongside the crate path.

Filling the nearest goal first. Goal order is determined by geometry, not distance. Solve deep or single-entry goals before accessible ones.

Using a corridor as storage. A parked crate can split the level into disconnected areas. Keep junctions open until all traffic through them is complete.

Assuming a crate on a goal is finished. It may block a route or occupy the only goal another crate can reach. Judge the whole remaining position.

Pushing two crates together. Adjacent crates near a wall can become mutually frozen. Preserve at least one usable pushing side and space to separate them.

Continuing after a known deadlock. Extra walking cannot rescue a crate in a non-goal corner. Undo promptly, identify the decisive push, and try a different order.

Frequently asked questions

Can crates be pulled in Sokoban?
No. The player can only push one crate at a time. This irreversible movement is why you must plan where the player will stand after every push.
Does every crate need its own goal?
Yes. A level is complete when every crate is on a goal. Crates and goals occur in matching numbers, so covering one goal with the wrong crate may block the route for another.
Is putting a crate on a goal always good?
No. A crate on a goal can still obstruct a corridor, a turning square, or access to another goal. Treat it as finished only when it can remain there without blocking the rest of the solution.
What should I do after pushing a crate into a corner?
If the corner is not a goal, the crate is normally deadlocked and the level must be undone or restarted. Use Undo immediately rather than spending moves around an unsalvageable position.