Sokoban

Sokoban
is a puzzle video game in which the player pushes boxes around in a warehouse, trying to get them to storage locations. The game was designed in 1981 by Hiroyuki Imabayashi, and first published in December 1982.
Gameplay
The game is played on a board of squares, where each square is a floor or a wall. Some floor squares contain boxes, and some floor squares are marked as storage locations.
The player is confined to the board and may move horizontally or vertically onto empty squares (never through walls or boxes). To move a box, the player walks up to it and pushes it to the square beyond. Boxes cannot be pulled, and they cannot be pushed to squares with walls or other boxes. The number of boxes equals the number of storage locations. The puzzle is solved when all boxes are placed at storage locations.
Selected official releases
Development
Sokoban was created in 1981 by Hiroyuki Imabayashi. The first commercial game was published in December 1982 by Thinking Rabbit, a software house based in Takarazuka, Japan. Sokoban was a hit in Japan where it sold more than 400,000 copies before being released in the United States. In 1988, Sokoban was published in US by Spectrum HoloByte for the IBM PC, Commodore 64, and Apple II as Soko-Ban.
Implementations
Implementations of Sokoban have been written for numerous computer platforms, including almost all home computer and personal computer systems. Different versions also exist for video game consoles, mobile phones, graphing calculators, digital cameras and electronic organizers.
Scientific research
Sokoban can be studied using the theory of computational complexity. The problem of solving Sokoban puzzles was first proved to be NP-hard. Further work showed that it was significantly more difficult than NP problems; it is PSPACE-complete. This is of interest for artificial intelligence (AI) research because solving Sokoban can be compared to the automated planning required by some autonomous robots.
Sokoban is difficult not only because of its large branching factor, but also because of its large search tree depth. Some level types can even be extended indefinitely, with each iteration requiring an exponentially growing number of moves and pushes. Skilled human players rely mostly on heuristics and are usually able to quickly discard a great many futile or redundant lines of play by recognizing patterns and subgoals, thereby drastically reducing the search effort.
Some Sokoban puzzles can be solved automatically by using a single-agent search algorithm, such as IDA*; enhanced by several techniques that make use of domain-specific knowledge. This is the method used by Rolling Stone, a Sokoban solver developed by the University of Alberta GAMES Group. Festival was the first automatic solver to solve all 90 levels in the widely used XSokoban test suite. However, the more complex Sokoban levels are out of reach even for the best automated solvers.
Variants
Several puzzles can be considered variants of the original Sokoban game in the sense that they all make use of a controllable character pushing boxes around in a maze.
Alternative tilings: In the standard game, the mazes are laid out on a square grid. Several variants apply the rules of Sokoban to mazes laid out on other tilings. Hexoban uses regular hexagons, and Trioban uses equilateral triangles.
Multiple pushers: In the variant Multiban, the puzzle contains (and often requires) more than one pusher. In the game Sokoboxes Duo, strictly two characters are required to solve the puzzle, who can either take turns or work together.
Alternative goals: Several variants adjust the requirements for completing a level. For example, in Block-o-Mania the boxes have different colours, and the goal is to push them onto squares with matching colours. Sokomind Plus implements a similar idea, with boxes and target squares uniquely numbered. In Interlock and Sokolor, the boxes also have different colours, but the goal is to move them so that similarly coloured boxes are adjacent. In CyberBox, each level has a designated exit square, and the goal is to reach that exit. In a variant called Beanstalk, the elements of the level must be pushed onto a target square in a fixed sequence.
Additional game elements: Push Crate, Sokonex, Xsok, Cyberbox and Block-o-Mania all add new elements to the basic puzzle. Examples include holes, teleports, moving blocks and one-way passages.
Character actions: In Pukoban, the character can pull boxes in addition to pushing them.
Reverse mode: The player solves the puzzle backwards, from the end to the initial position by pulling instead of pushing boxes. Standard Sokoban puzzles can be played in reverse mode, and the reverse-mode solutions can be converted to solutions for the standard-mode puzzles. Therefore, reverse-mode gameplay can also be instrumental in solving standard Sokoban puzzles.
See also
Logic puzzle
Sliding puzzle
Transport puzzle
Motion planning
External links
Official Sokoban site (in Japanese)
The University of Alberta Sokoban page
References
1982 video games
ASCII Corporation games
Cancelled Atari Jaguar games
Commodore 64 games
DOS games
FM-7 games
GP2X games
Japanese inventions
Linux games
Logic puzzles
MacOS games
Maze games
MSX games
NEC PC-6001 games
NEC PC-8001 games
NEC PC-8801 games
NEC PC-9801 games
PSPACE-complete problems
Puzzle video games
SG-1000 games
Sharp MZ games
Sharp X1 games
X68000 games
Single-player video games
Thinking Rabbit games
Video games developed in Japan
Windows games
Windows Mobile Professional games
ZX Spectrum games