Advertisement
Loading...
Level 1 / 20EasyFirst Push
Moves: 0Pushes: 0Boxes: 0/1
📦
👤
Tip: Simply push the box up onto the goal.
0 / 20 levels completed
Advertisement
Loading...

How to Play Sokoban

1

Understand the Grid

The game board shows walls (dark squares), floor tiles (light beige), goal squares (orange dots), your character (blue circle), and boxes (brown crates). Your mission is to push every brown box onto an orange goal square to turn it green. The level is complete when all boxes are green.

2

Move and Push

Use the arrow keys or WASD on keyboard to move your character in any of the four directions. Walk into a box to push it — the box moves one square in the same direction as your movement. You cannot pull boxes, and you cannot push a box into a wall or another box. Plan your approach carefully before pushing.

3

Use Undo Freely

If you make a bad push, press U or Ctrl+Z to undo your last move, or click the Undo button. You can undo as many moves as you like all the way back to the start. If a box gets stuck in a corner with no goal there (the game will warn you), undo until the box is free or press R to restart the entire level.

4

Track Progress and Optimize

Your move count and push count are displayed at the top. Completing a level saves your best score to the browser. Try replaying levels to beat your best move count — this is where Sokoban's replay value shines. Use the Level Select panel to jump to any level and the goal highlight toggle (H key) to make target squares more visible.

Frequently Asked Questions

What is the difference between moves and pushes in Sokoban?

Moves count every step your character takes, whether you are just walking around or pushing a box. Pushes count only the steps where your movement displaces a box — so pushes will always be less than or equal to moves. Competitive Sokoban players often try to minimize both counters independently, and the two metrics can lead to very different optimal solution paths. Minimizing moves is generally easier to reason about for beginners; minimizing pushes often requires more sophisticated planning because you need to minimize how many times each box changes direction.

What is a deadlock and how do I avoid it?

A deadlock occurs when a box reaches a position where it can no longer be pushed to any goal square. The simplest and most common deadlock is a corner deadlock: a box wedged into a corner formed by two walls, with no goal square at that corner. Once a box is in a corner deadlock, the level cannot be completed and you must undo or restart. To avoid deadlocks, never push a box into a corner unless there is a goal there, and be cautious about pushing boxes along walls — a box stuck between a wall on one side and another box on the perpendicular side can be just as trapped as a corner deadlock.

Is my progress saved between browser sessions?

Yes. The game uses your browser's localStorage to save which levels you have completed and your best move and push scores for each completed level. This data persists across browser sessions as long as you use the same browser on the same device and do not clear your browser data. The data is stored locally on your device and is never uploaded to any server — there are no accounts or logins required. If you want to reset your progress, clearing your browser's site data for this page will erase the saved state.

Why can't I push two boxes at once?

This is one of the fundamental rules of Sokoban and the source of most of its strategic depth. When your character pushes a box, that box must be able to slide one square in the direction of the push. If another box occupies that destination square, the push is blocked — you cannot chain-push multiple boxes simultaneously. This rule forces players to carefully sequence their pushes so that boxes arrive at goals one at a time without blocking each other's paths. The inability to move multiple boxes at once is what makes Sokoban a planning puzzle rather than an action game.

How do the keyboard shortcuts work?

Arrow keys and WASD both move your character in the four cardinal directions. U or Ctrl+Z (Cmd+Z on Mac) undo the last move. R restarts the current level to its initial state. H toggles the goal-highlight feature, which brightens the orange target squares so they are easier to see. The question mark key (?) toggles the keyboard controls reference panel. You can also click the control buttons below the game grid for the same actions, and the on-screen D-pad appears automatically on smaller screens for mobile play.

What is the best strategy for harder levels?

For medium and hard levels, the most important skill is working backwards from the solution. Look at each goal square and ask: which direction must the box approach this goal from? That approach direction determines where you need to be standing to make the final push, which in turn constrains how you reach that position. For levels with multiple boxes, identify the most constrained box — usually the one with the fewest valid approach directions — and solve it first. Use the unlimited undo feature aggressively to explore different push sequences without fear of permanently ruining a level. If you feel completely stuck, try the goal-highlight toggle (H key) to make targets more visible and mentally walk through the end-state you need to create.