🎮 How to Play & Controls Guide
About Classic Sokoban (Warehouse Keeper / 倉庫番)
Sokoban (Japanese: 倉庫番, "warehouse keeper") is an iconic transport and spatial deduction puzzle designed in 1981 by Hiroyuki Imabayashi. Playing as a warehouse keeper navigating a maze of walls, you must push heavy crates onto designated golden target orbs under the strict physical constraint of "pushing only, never pulling". Featuring client-side instant execution, intelligent A* / BFS pathfinding, infinite undo history, and real-time multiplayer speed races across desktop and mobile!
Controls & Keybindings Guide
| Action | Keyboard Key | Mouse / Touch | Description |
|---|---|---|---|
| Move / Push Crate | ↑ ↓ ← → / W A S D | Swipe Up/Down/Left/Right | Moves keeper; pushes an adjacent box forward if space behind it is clear |
| Intelligent Auto-Walk | - | Click / Tap reachable empty tile | Built-in BFS pathfinder navigates keeper around obstacles automatically |
| Undo Move | Z | Tap "↩ Undo" button | Reverts your last action with unlimited history |
| Restart Level | R | Tap "🔄 Restart" button | Instantly resets warehouse layout and step counter |
| Deadlock Shake Warning | - | Visual Shake Alert | Triggers subtle screen shake when a crate enters an irreversible dead corner |
Core Mechanics & Victory Conditions
- Push Only, Never Pull (Irreversibility): The keeper must push from behind; pulling is physically impossible. Every push permanently alters accessibility topology!
- Single-Box Limit: You cannot push two consecutive boxes simultaneously. Two adjacent crates block all straight pushes.
- Full Target Seating: Push every single wooden crate onto a target orb. Boxes glow vibrant emerald green when seated, and filling all targets achieves instant Victory!
Four Pillars of Deadlock Prevention
- Corner Deadlock: A crate pushed into a non-target 90° corner formed by walls can never be retrieved, immediately rendering the puzzle unsolvable.
- Wall Deadlock: A crate pushed flush against a flat wall loses one degree of freedom and can only travel along the wall. If the wall has no target or exit bay, it is permanently stranded.
- 2×2 Block Deadlock: Any 2×2 cluster of obstacles (walls and crates) completely locks all involved crates permanently.
- Inside-Out Packing Order: Always fill the innermost, deepest targets first! Seating an outer target prematurely will block the access tunnel for interior destinations.
Real-Time Multiplayer Speed PK
- Identical Map Parity: Both contestants race on the exact same warehouse blueprint.
- Live Progress HUD: Track your opponent's completion percentage (0%~100%), move count, and pacing in real time.
- First to Complete Claims the Round: Master smooth pathfinding and forward planning to dominate the leaderboards.
Frequently Asked Questions (FAQ)
Is it possible to push two boxes if they are in a straight line?
No. The keeper can only push a single crate at a time. If two crates are aligned sequentially, the movement is blocked until you navigate around them and push one aside.
Where can I study the formal PSPACE-completeness proof and deadlock graph theory?
Explore our definitive masterclass monograph: 《Classic Sokoban Ultimate Guide & Graph Theory Pathfinding Masterbook》, featuring Culberson's complexity theorems, dead-square topological preprocessing, and reverse induction algorithms!