Sokoban tips
Sokoban solving tips: avoid deadlocks and plan push order
Solve Sokoban levels by avoiding irreversible deadlocks. Never push a crate into a non-dock corner, avoid lining two crates up in a 2x2 block, and work backward from the deepest target dock so earlier crates never block your path.
Three deadlocks to avoid on every level
Because Sokoban only allows pushing one crate forward and never pulling, a single bad push can make a level unsolvable. Spotting deadlocks before moving saves dozens of wasted steps.
Check the three deadlock shapes below whenever you approach a wall or another crate.
| Deadlock | What happens | How to avoid it |
|---|---|---|
| Corner trap | Crate sits against two adjacent walls with no dock | Keep crates at least one square away from non-dock corners |
| Wall trap | Crate sits along a flat wall with zero docks on that wall | Push along a wall only if a dock lies on that same line |
| 2x2 freeze | Two crates sit next to each other against a wall or other crates | Leave a one-square gap between crates while moving them |
Work backward from the deepest dock
Before your first push, look at the docks rather than the crates. If two or three docks sit inside an alcove or along a top shelf, decide which crate belongs in the backmost spot first.
Leaving a temporary parking square in the middle of the room often lets you walk around a crate and approach it from the opposite side. If a push cuts off your walking lane, press Z to undo immediately.
Common questions
What is a deadlock in Sokoban?
A deadlock is any board position where at least one crate can no longer reach a target dock, such as a crate pushed into a non-dock corner.
Should I optimize moves or pushes in Sokoban?
Start by solving the level cleanly with fewer pushes. Walking extra steps around a crate is often required to keep push routes open.
Can I undo a bad push in PCder Sokoban?
Yes. Press Z or Backspace (or click Undo) to step back one move at a time, or press R to reset the level.
Rules and sources
Examples checked against the game logic used on PCder. These tips explain decisions, not guaranteed outcomes.