Office Break Games
Level 1 Loading Dock 0 moves 0 pushes 0/0

How to play Sokoban

You are the keeper, drawn in red. Every crate in the warehouse has to end up on a goal, one of the diamonds marked on the floor, and crates can be pushed but never pulled. One shove into a corner can make a level impossible.

Controls

Arrows / WASD
Walk, and push the crate in front of you
Click / tap a floor square
Walk there by the shortest route (it never pushes anything)
Tap a crate next to you
Push it one square
Swipe
One step in the swipe’s direction; phones also get an on-screen pad
U / Z / Ctrl+Z
Undo — as many moves as you like (a tapped walk undoes in one go)
R twice
Restart the level
Enter / Space
Next level after a clear

How to play Sokoban

You are the keeper, drawn in red. Every crate in the warehouse has to end up on a goal, one of the diamonds marked on the floor, and crates can be pushed but never pulled. One shove into a corner can make a level impossible.

There are 24 levels, from Loading Dock (one crate, two pushes) to Quarter End (107 moves at best). Clear one to unlock the next. There is no clock, and undo has no limit.

Rules

  • Walk up, down, left or right. Walk into a crate and you push it one square, as long as the square beyond is empty floor.
  • You can push one crate at a time and never pull. A crate pushed into a corner without a goal can never be delivered. One pushed flat against a wall can only slide along it until the wall ends, so make sure a goal lies on the way.
  • The level is clear when every crate stands on a goal. A delivered crate turns solid, with the diamond showing through.
  • Every step is a move, walking included. The fewest moves the level can be solved in, found by an exhaustive solver, is shown in your stats as Fewest possible.
  • A clear scores 1,000, minus 5 for every move over that number, and never less than 500.
  • Your run score adds up your best result on each level, so replaying can only raise it. Progress and the level in hand are saved in this browser.

Controls

Arrows / WASD
Walk, and push the crate in front of you
Click / tap a floor square
Walk there by the shortest route (it never pushes anything)
Tap a crate next to you
Push it one square
Swipe
One step in the swipe’s direction; phones also get an on-screen pad
U / Z / Ctrl+Z
Undo — as many moves as you like (a tapped walk undoes in one go)
R twice
Restart the level
Enter / Space
Next level after a clear

Tips

  • Before each push, ask where that crate goes next. A corner is a trap unless it holds a goal.
  • Keep a way back round. If a push shuts you into a pocket, it is usually the wrong push.
  • The first five levels are a tutorial, small enough to solve by trial. Use them to learn what a stuck crate looks like.
  • In the level grid, a cleared level gets a small diamond, filled in once you match the fewest moves. A hollow one still has points to win.

Sokoban strategy

Every step counts

The target beside the board is the fewest moves, not the fewest pushes, and walking counts as moves. A clean solution keeps the keeper close to the work. Before each push, ask where you will be standing afterwards and how far you must walk to reach the next crate. Pushing one crate several squares in a straight line is cheap, because you never leave its side. Switching between crates repeatedly is where most extra moves go.

Recognise dead positions early

Corners without goals are the obvious trap, but there are others. Two crates side by side against a wall, with no goals there, can never be pulled apart. A two-by-two block filled with any mix of crates and walls freezes every crate in it, which is fatal unless each of those crates is on a goal. A crate on a wall can only slide along that wall, so it needs a goal somewhere on that stretch. When you see one of these, undo at once; continuing only wastes time.

Plan the delivery order

Look at the goals as a group before moving. If a goal sits in a dead end, the crate for it must go in first, and every later crate has to reach its goal without passing through the squares the earlier ones now block. Sometimes the right first move is to park a crate in an open square out of the way, then fetch it once the path behind it is clear. Parking costs moves, so do it once, not twice.

Replaying for a better score

A clear is worth 1,000 minus 5 for each move over the fewest possible, with a floor of 500. That floor arrives at 100 extra moves, so on long levels a messy first clear may score the minimum. Your run keeps only your best result per level, and undo is free, so replaying is pure upside. Tapping a floor square always walks the shortest route, which is a safe way to cut wasted steps between pushes.

About Sokoban

Sokoban, Japanese for “warehouse keeper”, was created by Hiroyuki Imabayashi and published by Thinking Rabbit in Japan in 1982. The rules fit in two sentences, yet deciding whether a level can be solved is PSPACE-complete, and AI researchers use it as a test problem.

All 24 levels are our own. Apart from the five tutorial levels, drawn entirely by hand, we drew each room and a program placed the crates: it pulls them backwards from the goals and keeps the start that needs the most pushes. Each result was checked by eye. A move-optimal solver then found the fewest moves for every level, the target you are scored against.

Questions

Are these the original Sokoban levels?

No. All 24 were designed for this site. A solver checked that each one can be cleared and found its shortest solution.

How is the score calculated?

1,000 points per cleared level, minus 5 for every move beyond the fewest possible, never less than 500. Your run score adds up your best on each level, up to 24,000; we set Expert at 5,000 points and Pro at 22,000.

Can you undo in Sokoban?

Yes, as far back as you like, and it costs nothing: only the moves in your final solution count. A tapped walk undoes in one go.

Is my progress saved?

Yes, in this browser: the levels you have cleared, your best moves on each, and the level you are in the middle of, saved after every step.