The text area to the right shows the moves you have made in the current level.

The program uses browser cookies to preserve the state of the current level in each collection, but they are fragile and their capacity is limited (so only one level in each collection, for example). If you want to preserve the state of play more reliably, copy and paste the move list from this text area.

Each line is of the form “a-b”, meaning that the red bead at square “a” should be moved to square “b”. That defines the entire set of moves (apart from aimless wandering of the blue bead), since the program can compute the most efficient way to push the bead from “a” to “b”.

If you click “Done” without modifying the history, the level continues from where you left off. But if you modify the history then click “Done”, then the level restarts from the beginning, with the modified history in the “Redo” list. This lets you paste in and replay a previously saved history.

If you modify the history incorrectly, you might get error messages when you try to replay it.

Design Mode lets you design or modify a level, or a collection of levels. The built-in levels remain unchanged.

It starts out with a copy of the text describing the single level currently being played, then lets you edit and play the copy.

  • “#” is a wall
  • space or “-” is an empty passage
  • “.” is a target square
  • “$” is a red bead in a passage
  • “@” is a blue bead in a passage
  • “*” is a red bead on a target square
  • “+” is a blue bead on a target square
  • Any other line separates levels
Note that the edited text is volatile and will disappear when you stop using your design, unless you copy it and save it to some local file. This can also happen if you navigate away from this page.
Sokoban is a game of pushing things around a board so as to place them in designated spots.

A Sokoban level is constructed from walls and floors. In this version the walls are made from Rosa Christina marble and the floors are wood: mostly Hawaiian koa (paler), with some North American walnut (darker). Each floor has a solid perimeter wall, so nothing can fall into the endless ocean that surrounds it.

Scattered around the floor are several red glass beads and a single blue bead. The goal is to place each red bead on a walnut (darker) square. The only way to move a red bead is to push it with the blue bead. The blue bead can only push, and it can only push a single bead at a time. None of the beads can go through walls or other beads.

You tell the blue bead which red bead to move by clicking on the desired bead, which lifts it slightly off the floor. Then you indicate a destination square by clicking there. If the blue bead can move to the selected bead, and if it can push the bead to the destination, then the program shows an animation of this happening. Otherwise the red bead drops back onto the floor.

If you want more basic control, move the blue bead directly with the keyboard, using the arrow keys or the “WASD” (up, left, down, right) keys. On a francophone “AZERTY” keyboard, use “ZQSD” instead. Use “X”, “<”, and “>” for restart, undo, and redo. You can also move the blue bead to a vacant square (if there’s a clear path) by clicking on that square.

In most of the levels there are only a few ways to succeed, and many ways of getting stuck. Fortunately there’s an “Undo” button (you can also undo/redo with the mouse scroll-wheel or the keyboard). Those who know some complexity theory will be delighted to learn that Sokoban is believed to be NP-hard and PSPACE-complete. For the rest of you, that just means computers aren’t very good at playing it. Which, if you can play it well, is very reassuring.

Sokoban was invented in 1980 by Hiroyuki Imabayashi, and first published by Thinking Rabbit (with the Original 50 levels).

The Sasquatch and Microban levels were designed by David W. Skinner.

For more information about Sokoban, including high score lists, see the Sokoban project.

This version was implemented by me, Andrew Birrell.