Sokoban Deadlock Guide: Spot and Avoid Every Stuck Position

Sokoban Deadlock Guide: Spot and Avoid Every Stuck Position

Created Aug 12, 2026

A deadlock is the one thing in Sokoban that turns a solvable level into an unsolvable one, and it happens silently โ€” the game doesn't warn you, the crate doesn't glow red, and you can keep playing for another ten pushes before you realize the level died several moves ago. This guide covers the five deadlock shapes that account for almost every stuck position you'll run into in Sokoban, how to spot each one before it forms rather than after, and how to build the habit of checking a landing tile before you commit to the push that sends a crate there.

What a Deadlock Actually Is

A deadlock is a crate position from which no legal sequence of pushes can ever get that crate onto a target. It doesn't matter how many moves you have left or how clever your next idea is โ€” once a crate is in a true deadlock position, that specific crate is permanently stuck, and unless the level allows you to restart or undo far enough back, the level is unsolvable from that point forward. The reason deadlocks are so dangerous in Sokoban is the same reason the genre is hard in general: you can never pull a crate back toward you, so a bad push can't be corrected by reversing it, only by undoing before anything else changes.

The Five Deadlock Shapes

Corner deadlock

A crate pushed onto a tile with walls on two adjacent sides โ€” an actual corner โ€” can only be pushed in the two directions those walls don't block, and both of those directions lead back into the crate's own approach, not forward. Unless that exact corner tile happens to be a target, the crate can never move again. This is the fastest deadlock to create and the easiest to avoid: never push a crate toward a corner tile unless you've confirmed it's a target first.

Wall deadlock

A crate pushed flush against a wall can only travel in the two directions running parallel to that wall โ€” never toward it or away from it, since the wall blocks that. If no target exists anywhere along the full line that wall runs, the crate is stuck the moment it touches that wall, even though it technically still has legal pushes available. The pushes just never lead anywhere useful. Before pushing a crate against any wall, trace that wall's entire line and confirm a target sits somewhere on it.

2x2 cluster deadlock

When two crates end up adjacent to each other and something completes a square โ€” a wall on two more sides, or two more crates โ€” none of the crates in that 2x2 block can move without immediately colliding with another crate in the same block. This one is sneaky because it can happen in open floor with no wall involved at all, purely from crate-to-crate adjacency. Before pushing a crate next to another crate, check whether that adjacency, combined with anything already nearby, would complete a 2x2 square.

Frozen deadlock

A frozen deadlock is a variation on the corner and wall deadlocks where a crate isn't literally boxed into a corner, but every direction it could move is blocked by some combination of walls and other crates that themselves can't move. The crate is technically not touching two walls, but its entire set of legal pushes is occupied. This shape is easy to miss because it doesn't look like a corner at a glance โ€” it only becomes obvious once you try to find a push and realize every option is already taken by something immovable.

Corridor deadlock

In a narrow, one-tile-wide corridor, a crate can only be pushed along the length of the corridor, never sideways. If the corridor has no target inside it and no branch point before the crate's current position, pushing the crate any further into the corridor removes your ability to ever redirect it. The fix is to plan a corridor crate's full route before entering the corridor at all โ€” once you're a few tiles in, there's often no way back out in a useful direction.

Checking a Landing Tile Before You Push

The single habit that prevents almost every deadlock is simple to state and hard to make automatic: before you push a crate, look at the exact tile it will land on and ask whether that tile is a corner, is flush against a wall with no target on its line, or would create a 2x2 adjacency with another crate. If the answer to any of those is yes, and the landing tile isn't itself a target, don't make that push. Find a different crate to move, or find a different approach angle that sends this crate to a different tile instead.

This check takes a few seconds and it's the entire difference between a level you solve cleanly in Sokoban and one where you get most of the way through and then discover, several pushes later, that nothing works anymore. Do the check before every push that isn't obviously safe, not just the ones that feel risky.

Deadlocks That Only Appear Later

Not every deadlock is visible the moment it forms. A crate can sit in a perfectly fine position on its own, and only become a corridor or frozen deadlock once a second crate moves into a spot that removes its last option. This is why checking a landing tile in isolation isn't quite enough on harder levels โ€” you also need to ask whether the push you're about to make removes the last available option for a crate that was fine a moment ago. Whenever you push a crate near another crate that hasn't been solved yet, re-check that crate's remaining options immediately afterward.

Recovering Before It's Too Late

The moment you suspect a push might have created any of the five deadlock shapes, stop and undo it before making another move. Sokoban keeps an instant undo for your last action specifically for this reason โ€” use it the instant something looks wrong, not several pushes later once you've built more of the room on top of a bad position. Waiting to see if it "works out" almost never pays off, because a genuine deadlock doesn't resolve itself; it only gets buried under more moves that make the actual mistake harder to spot.

A Practical Pre-Push Checklist

  • Is the landing tile a corner? Only safe if that corner is a target.
  • Is the landing tile against a wall? Confirm a target exists somewhere on that wall's full line.
  • Would this push put two crates adjacent to each other? Check whether a wall or other crates would complete a 2x2 block.
  • Does this push remove another crate's last remaining option? Re-check nearby unsolved crates, not just the one you're moving.
  • Am I entering a narrow corridor? Plan the crate's entire route through it before the first push inside.

Running through this list before committing to a push in Sokoban becomes fast with practice, and it catches the deadlock shapes long before they cost you a restart.

Why Deadlocks Feel Invisible the First Time

New players tend to only recognize a deadlock once they've tried every remaining push and none of them work โ€” by which point it can be hard to even identify which earlier push caused it. Experienced players catch deadlocks before they happen because they're evaluating the landing tile, not the push itself. The push is almost always legal; the problem is never whether you're allowed to make it, only where it leaves the crate afterward. Training yourself to evaluate outcomes rather than legality is the entire skill.

Frequently Asked Questions

What is a Sokoban deadlock?

A crate position from which no legal sequence of pushes can ever place that crate on a target, even though individual pushes from that position may still be legal.

What are the main deadlock shapes to watch for?

Corner deadlocks, wall deadlocks with no target on the line, 2x2 cluster deadlocks, frozen deadlocks where every option is blocked by immovable objects, and corridor deadlocks in narrow one-tile passages.

How do I avoid creating a deadlock?

Check the landing tile before every push โ€” corner, wall without a target, or an adjacency that would complete a 2x2 block are all warning signs. If any apply, don't make that push.

Can a deadlock happen in open floor with no walls nearby?

Yes. A 2x2 cluster deadlock only needs two crates to end up adjacent with something else completing the square, which can happen away from any wall.

What should I do the moment I suspect a deadlock?

Undo immediately. Sokoban supports instant undo of your last action, and using it right away is far more reliable than trying to push your way out of a position that's already dead.

Does a deadlock always end the level immediately?

Not always visibly โ€” you can often keep making legal pushes elsewhere in the room. But the level as a whole becomes unsolvable the moment any single crate reaches a true deadlock position.

Related Guides