Skip to content

Sokoban

Push boxes through three deterministic warehouse puzzles with touch controls, full keyboard play, exact undo, and visible corner-deadlock recovery.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Move the worker with Arrow keys, WASD, or the four on-screen direction buttons; walk beside a box before pushing it toward the marked goal.
  2. 2.Press U or choose Undo after a legal move, including a corner deadlock; use R or the shared Restart control to reset the complete three-level run.
  3. 3.Clear each fixed board, choose Next level after the first two, and finish the third to earn the exact 1,000-point completion score.

About Sokoban

Sokoban is a compact warehouse puzzle about position, access, and irreversible pushes. You control a worker on a square grid and must place every box on a marked goal. The worker can walk through open floor and can push one box into an empty floor cell. A box cannot be pulled, pushed through a wall, or pushed into another box. Those small rules create the central challenge: before each push, you must consider both where the box will land and whether the worker can still reach the side needed for the next push.

This version contains three small, deterministic layouts authored specifically for this product. They are not presented as classic, official, historical, or externally sourced Sokoban levels. Straight Start introduces the direct push. Upper Turn requires moving around a box after lifting it toward the top wall. Wall Detour places an interior wall between the worker and the first useful pushing position, so the route begins by walking around that obstruction. Every Restart returns to the same first layout, which makes the rules easy to learn and the result straightforward to reproduce.

The controls support pointer, touch, and keyboard play. Tap the four on-screen direction buttons on a narrow phone, or use Arrow keys or WASD on a keyboard. Each legal step moves the worker by one orthogonal cell. When a box occupies that destination, the same input attempts to push it one additional cell. If the cell beyond is a wall or another box, nothing moves and the move counter does not change. Press U or choose Undo to restore the complete position before the latest legal move. Press R or use the shared Restart control to begin the full three-level run again.

Undo stores exact snapshots of the worker position, box positions, and current-level move count. It does not try to infer a reverse move, so reversing a push never behaves like an illegal box pull. This distinction matters after a mistake. If a box enters a non-goal corner, the game identifies the position as deadlocked and pauses directional movement. The final push remains visible, and Undo stays available to restore the previous playable position. Restart is always another recovery path. A box resting on an actual goal is excluded from corner-deadlock detection because that placement is successful rather than trapped.

Each layout has one box and one goal, allowing the interaction to focus on the movement rule instead of visual clutter. Clearing Straight Start awards 300 points, and clearing Upper Turn adds another 300. Wall Detour awards the final 400, bringing a completed three-level run to exactly 1,000 points. Points are fixed by level; they do not depend on speed, device performance, input method, or animation timing. A cleared intermediate level freezes until you choose Next level, and the completed third level freezes permanently until Restart. This makes a score stable once earned and prevents repeated input from awarding a level twice.

The board uses letters and shape styling instead of external artwork. P marks the player, B marks a box, and a centered dot marks an uncovered goal. Accessible labels announce walls, floor, goals, boxes, and the player independently of those visible marks. All seven columns fit within the game card, and the mobile buttons remain available instead of requiring swipe gestures. The shared game shell stores the best score locally when browser storage is available and provides the site-wide double-Escape boss key.

All puzzle processing happens in the current browser tab. There is no upload, account request, networked opponent, runtime level download, random generator, sound asset, or new dependency. The layouts and validation rules are bundled with the client component. The game does not claim to measure intelligence, planning ability, cognition, dexterity, health, or workplace performance. The 1,000-point result is only a product-defined completion marker for these three authored boards.

Use this Sokoban game when you want a short, auditable push-box sequence with meaningful recovery controls. The fixed layouts are suitable for learning how push-only movement differs from ordinary pathfinding: walking is reversible in many positions, while a careless push may remove the access needed to continue. Check the destination and the space behind the box before committing, use Undo when the corner warning appears, and advance through all three warehouses to complete the run.

Methodology & sources

Each authored 7-by-7 board is parsed into immutable wall and goal sets plus initial player and box cells. A directional action moves one orthogonal cell, or pushes exactly one box when the following cell is in bounds, not a wall, and not occupied by another box. Before every legal action, the implementation records an exact snapshot for Undo. A non-goal box with a blocked vertical neighbor and a blocked horizontal neighbor is classified as corner-deadlocked; directional actions pause, but Undo restores the prior snapshot. Level awards are 300, 300, and 400, producing a fixed terminal score of exactly 1,000.

Frequently asked questions

Can I pull a box or push two boxes at once?
No. A move may push exactly one box into an empty floor or goal cell. Boxes cannot be pulled, moved through walls, or pushed into one another.
What happens when a box is stuck in a corner?
A box in a non-goal corner triggers a visible deadlock and pauses movement. Undo restores the position before the trapping push, while Restart begins the run again.
Are these official or classic Sokoban levels?
No. All three compact layouts and their scores are deterministic fixtures authored for this product, not an imported or historically attributed level set.
Does the score measure planning or cognitive ability?
No. The score is only a fixed completion marker for these three boards and must not be interpreted as an assessment, benchmark, or health result.

Mini Games guides

View all