Blog ·

What is Sokoban?

A Sokoban puzzle seen from above, with olive brick walls around a pale sand floor, a worker in a gray shirt and blue jeans at the upper left, eight orange wooden crates (one darker, already on its spot) and small pink dots marking where the other crates must go
Image: Sokoban puzzle by Carlos Montiers Aguilera, graphics by Borgar Þorsteinsson (modified), CC BY 3.0, via Wikimedia Commons; one frame, scaled and widened by EverGamer

Sokoban is a puzzle game in which you push crates around a warehouse, seen from above, until every crate sits on a marked storage spot. You can push one crate at a time, you can never push two, and you can never pull. It was made by Hiroyuki Imabayashi and first sold by his company, Thinking Rabbit, in Japan in December 1982. Those three rules are the whole game, and they have kept people puzzling for more than 40 years.

What are the rules of Sokoban?

The official Sokoban site, run today by the Japanese company Falcon, puts the goal like this: you play Rabi-kun, a part-time worker, and move the warehouse's cargo to its storage spots "with as little effort as possible". Then it lists the rules:

  1. You can push one crate to move it.
  2. You cannot push two or more crates at once.
  3. You cannot pull a crate.

"That is all the rules of Sokoban," the page says. "As rules go, they are very simple." Its next line is the reason the game lasted: within those simple rules lies the depth of a real puzzle.

On the board What it is
Walls Fixed. Nothing passes through them
Floor Where you and the crates can move
Crates Move only when you walk into them, one square in the direction you walk
Storage spots The marked squares. Fill them all and the level is solved

The name tells you the setting. In Japanese, 倉庫番 (Sōko-ban) means "warehouse keeper", as Wikipedia's Sokoban article explains.

Who made Sokoban?

Hiroyuki Imabayashi tells the story himself in a greeting on the official site. Sokoban was born, he writes, in the spring of 1981. He had long been curious about a character whose move was pushing things, and he put it together as a puzzle in simple BASIC. The idea he wanted was that the very cargo you have to tidy away gets in the way of your tidying.

Writing the program was quick; making good levels was hard, because, he says, he had not yet seen how deep the game was. He made a few and invited friends home to try them, quietly enjoying the sight of them stuck. He had no plan to sell it until a salesman at a newly founded software distributor saw it that winter and told him, in effect, "It will sell, so make it." In 1982 he set up Thinking Rabbit and released Sokoban.

The official history page lists the first releases: Sokoban on cassette tape for NEC's PC-8801, Fujitsu's FM-7 and NEC's PC-8001mk2, all in December 1982 and all from Thinking Rabbit, with more Japanese computers in 1983 and Sokoban 2 in 1984. The site's footer reads "©1982 HIROYUKI IMABAYASHI" and "©2001 FALCON CO.,LTD.", and says the Sokoban and Thinking Rabbit names are Falcon's trademarks.

Why is Sokoban so hard?

Because a crate pushed into the wrong square can never come back. Since you cannot pull, a crate pushed into a corner is stuck there forever, and so is a crate pushed against a wall with no storage spot along it. Players call this a deadlock: the level looks open, but it can no longer be solved, and the only cure is to undo or start again. Good Sokoban levels are built around these traps, so the obvious first push is often the one that loses.

Computer scientists have shown that the difficulty is real, not just a feeling. In a 1997 University of Alberta technical report, Sokoban is PSPACE-complete, Joseph Culberson proved that a Sokoban level can be built to act as a simple computer, one that "has a solution if and only if" a matching Turing machine accepts its input. That puts Sokoban among the PSPACE-complete problems, a class believed to be even harder than the NP-complete puzzles people usually point to. In 2002, Robert Hearn and Erik Demaine strengthened the result, showing that Sokoban stays PSPACE-complete even with no walls inside the warehouse to help build the traps.

In plain words: there is no known shortcut that solves every Sokoban level quickly. A solver, human or program, has to search, which is exactly what makes a good level satisfying.

How many Sokoban games are there?

Many, and its creator helped renew the series in 2015. In his greeting he writes that over more than 30 years Sokoban was ported, by Thinking Rabbit and under license, to a great many machines, and that in 2015 it was renewed with fans and Falcon. The official lineup shows where it lives today:

The official site is in Japanese, and it does not offer a version to play in the browser.

What games are like Sokoban?

Box pushing became a building block of puzzle design, and our Sokoban page lists the games that follow it, among them RGCD's cat-themed C64 cartridge Boxymoxy, Steve Pavlina's laser-and-mirror puzzle Dweep, and Midnight Synergy's Wonderland series of push-and-switch tile puzzles.

How do you get better at Sokoban?

A few habits help on almost every level:

Sokoban is a classic of the 1980s. Our Sokoban page has the games inspired by it, and you can play Tectonic or browse the hub for more games and the classics behind them.

More from the blog