Pora Games

Sokoban corner deadlocks: is this push safe?

Examine a corner push, find a route to the goal and test what a goal in the corner changes.

Look at position A below. The player stands to the right of the box. Predict what happens after one push left: can the box still reach the goal? Choose your answer before reading the explanation.

Two complete 7-column by 5-row Sokoban boards, A above B, with a hatched wall border and 15 floor cells. Coordinates start at the top left. Both have the player at (4,2) and box at (3,2). A has its goal at (6,2); B has its goal at (2,2). All other interior cells are empty. The text below gives every position and move.
A and B are original teaching diagrams for this guide. Only the goal changes in B.

Read the boards. Each has 7 columns and 5 rows. Coordinates are (column, row): columns increase from left to right, rows from top to bottom, starting at 1. Every cell in rows 1 and 5 and columns 1 and 7 is a wall. All 15 interior cells are floor. In A, the player is at (4,2), the box at (3,2) and the only goal at (6,2); the other interior cells are empty. A hatched square is a wall, a plain cell is floor, a person in a circle is the player, a crossed square is the box and an outlined diamond with a dot is the goal.

Make the predicted push. Left is legal: (2,2) is empty floor. The box moves from (3,2) to (2,2), and the player moves to (3,2). Now the box is in a corner with fixed walls above at (2,1) and to its left at (1,2). There is no goal under it. Sokoban allows one-box pushes; it has no pulling move.

Test all four directions. Pushing left or up would send the box into a wall. To push it right, the player would have to stand at (1,2), inside a wall. To push it down, the player would have to stand at (2,1), also a wall. No push is possible. Walking elsewhere cannot change either wall, so this box will never reach the goal at (6,2). A has become unsolvable: this is an off-goal corner deadlock.

Try the safe route from the original A. Walk down to (4,3), left to (3,3), left to (2,3), then up to (2,2). From there, push right three times: the box goes to (4,2), then (5,2), then the goal at (6,2). The player finishes at (5,2). In diagram directions, that is DLLURRR: D means down, L left, U up and R right. The route contains four walking moves and three pushes.

Check the useful boundary. The box started beside the top wall at (3,2), yet the safe route solves A by pushing along that wall. One wall alone does not prove a deadlock. The losing square here is an off-goal corner formed by two perpendicular fixed walls. Other kinds of deadlock need their own checks.

Self-check with position B. It has exactly the same walls, player at (4,2) and box at (3,2). Only the goal changes: it is at (2,2), and (6,2) is now plain floor. Will one push left lose this puzzle or finish it? Explain which detail changes your answer.

Check your answer. One push left finishes B: the box lands on the only goal at (2,2), and the player ends at (3,2). The box cannot leave the corner, but this one-box puzzle is complete. In a puzzle with more boxes, a box on a corner goal may still block access or another box. Check those routes as well.

Practise in Classic Sokoban. The play button below opens the game with a panda and cups. On the board you receive, treat each cup as a box and inspect its destination and the side you need to stand on before pushing. A and B are original exercises drawn for this guide.

Try it in the game

Classic Sokoban

Play now