How to solve sokoban levels in 3.3.[0|1] ?

taken from www.nethack.de

Thanks to all nethackers who provided me with the solutions of the levels I forgot to include in the first version of this spoiler file. I didn't test all these solutions, because I already solved the levels on myself. If you find your solution below, it's because we had the same idea, or because that's the only possible solution.

Boulders are represented by characters A, B, ... to make it possible to identify them. If I have to refer to a position on the map, I use the coordinates shown on top and left of the map in (X,Y) format, for example, the starting position on level 1 is (7,5).

There are other solutions for sure, I haven't counted the number of moves needed for my solution. If someone has a better or faster one, please let me know.

I do know that the levels have other internal numbers than the ones I use, but starting with level 4 sounds not very intuitive to me... for me, level 1 is the first one you will see in your game and level 4 is the last one with the reward.

levelversion Aversion B
1 level 1, version A
+----+  +---+
|....|  |...|
|.A..+--+.B.|
|.C......D..|
|..+-+@+-+E.|
+------+-+.--+
|..^^^<|.....|
|..+---|F....|
++^|   |.G...|
 |^+---+.H...|
 |..^^^^I.J..|
 |..+--------+
 +--+
level 1, version B
+------+ +----+
|>|@...+-+....|
|^|+.AB....C..|
|^||..DE|.F.G.|
|^||....|.....|
|^|+----+H----|
|^|    |......|
|^+----+......|
|..^^^^IJKL...|
|..+---+......|
+--+   +------+
2 level 2, version A
+---------+       +---------+
|....|....+-+     |.........|
|..AB|CD...@|     |.........|
|.....E...+-+     |.........|
|....|....|       |....<....|
+-.--+-----+      |.........|
|..F.|.....|      |.........|
|.GH.|I.J.K|      |.........|
|..L.....M.|      |.........|
|.NOP|Q..R.+---------------+|
|....|..S.T.^^^^^^^^^^^^^^^.|
+---------------------------+
level 2, version B
 +--+          +---------+
++.@+------+   |.........|
|..........|   |.........|
|.A+---+B-.|   |.........|
|..|...|.C.|   |....>....|
|.D.E....F-|   |.........|
|.G..H..|..|   |.........|
|.----I.++.|   |.........|
|..J...K.|.++  |.........|
|.--+L-...M.+-----------+|
|...|..N-.O.^^^^^^^^^^^^.|
|..P......+--------------+
+---+..|..|
    +-----+
3 level 3, version A
+------------------+
|........|...|.....|
|.AB..-CD|.-.|.....|
|..|.E.F.|GH.|.....|
|-.|..-..|.-.|..<..|
|...+-.......|.....|
|...|.I.-...+|.....|
|.J.|K.|...++|.....|
|-L.|..+----------+|
|..M....^^^^^^^^^^.|
|...|.@+-----------+
+------+
level 3, version B
  +------+
+-+.|....|
|...A....+---------+
|.-.BC-DE|.|.......|
|.FG-......|.......|
|.-..H.|...|.......|
|....-I+-J-|.......|
|..KL..M...|...<...|
|.--...|...|.......|
|....-N+---|.......|
+-+..O.+----------+|
  |..P@^^^^^^^^^^^.|
  +----------------+
4 level 4, version A
+------------------------+
|@......^^^^^^^^^^^^^^^^.|
|.......+--------------+.|
+------.+----+         |.|
 |...........|         |.|
 |.A.B.C.D.E.|         |.|
+-------.----|         |.|
|...F.G..H.I.|         |.|
|...J........|         |.|
+----.-------+   +-----|.|
 |..K.L.M...|  +-|.....|.|
 |.....N....|  |.+.....|.|
 |.O.P...Q.++  +-|.....|.|
+------.---+   |.+.....+.|
|..R.....|     +-|.....+-+
|........|     |.+.....|
|...+----+     +-|.....|
+---+            +-----+
level 4, version B
  +----------------------+
  |..^^^^^^^^^^^^^^^^^^..|
  |..+-----------------+.|
+--+.|                 |.|
|..|A++  +----+        |.|
|.....+--|.B..|        |.|
|.CD..|..|..E.|        |.|
++..FG|...HI.++        |.|
 |J..K...|L..|   +-----|.|
 |.MN.|..|..O| +-|.....|.|
 |.P.Q+--|.R.| |.+.....|.|
 |.......|..++ +-|.....|.|
 +--+.S..|.++  |.+.....+.|
    +--.-+.|   +-|.....+-+
     |.T...|   |.+.....|
     |@.|..|   +-|.....|
     +-----+     +-----+

level 1, version A

mapsolution
           1
  12345678901234
 1+----+  +---+
 2|....|  |...|
 3|.A..+--+.B.|
 4|.C......D..|
 5|..+-+@+-+E.|
 6+------+-+.--+
 7|..^^^<|.....|
 8|..+---|F....|
 9++^|   |.G...|
10 |^+---+.H...|
 1 |..^^^^I.J..|
 2 |..+--------+
 3 +--+
  • push A right one square
  • push C up one square
(A and C are now next to each other)
  • push D right one square to line up with B and E
  • move around and push D to the left until it is under A on position (4,4)
  • push E down until you can enter the lower right room, position (11,8)

the map now looks like this:

mapsolution
           1
  12345678901234
 1+----+  +---+
 2|....|  |...|
 3|.CA.+--+.B.|
 4|..D........|
 5|..+-+>+-+..|
 6+------+-+.--+
 7|..^^^<|..@..|
 8|..+---|F.E..|
 9++^|   |.G...|
10 |^+---+.H...|
 1 |..^^^^I.J..|
 2 |..+--------+
 3 +--+
  • push H one square left
  • finish the following boulders : I, J, E, G, H, F, B, D, C

one boulder (A) remains.
The two scrolls at (3,12) and (4,12) are always scrolls of earth.


level 1, version B

mapsolution
           1
  123456789012345
 1+------+ +----+
 2|>|@...+-+....|
 3|^|+.AB....C..|
 4|^||..DE|.F.G.|
 5|^||....|.....|
 6|^|+----+H----|
 7|^|    |......|
 8|^+----+......|
 9|..^^^^IJKL...|
10|..+---+......|
 1+--+   +------+

  • push A down next to D
  • push B right to (11,3) next to C
  • push H down to (10,8)
  • push J up one square
  • finish I
  • push L one square up and finish K
  • finish J, H and L

the map now looks like this:

mapsolution
           1
  123456789012345
 1+------+ +----+
 2|>|<...+-+....|
 3|^|+......BC..|
 4|^||.ADE|.F.G.|
 5|^||....|.....|
 6|^|+----+.----|
 7|^|    |......|
 8|@+----+......|
 9|.............|
10|..+---+......|
 1+--+   +------+
  • push C one square down in between F and G
  • push B left to (6,3) on top of A
  • push G down, then left to (10,5)
  • finish G
  • finish C and F the same way as G
  • move B right to (11,3), then down and left to (10,5), then finish it
  • move A one square up and finish it the same way as B

two boulders (D, E) remain.
The two scrolls at (2,10) and (3,10) are always scrolls of earth.


level 2, version A

mapsolution
           1         2
  12345678901234567890123456789
 1+---------+       +---------+
 2|....|....+-+     |.........|
 3|..AB|CD...@|     |.........|
 4|.....E...+-+     |.........|
 5|....|....|       |....<....|
 6+-.--+-----+      |.........|
 7|..F.|.....|      |.........|
 8|.GH.|I.J.K|      |.........|
 9|..L.....M.|      |.........|
10|.NOP|Q..R.+---------------+|
 1|....|..S.T.^^^^^^^^^^^^^^^.|
 2+---------------------------+
  • push E left to (3,4)
  • push L right to (9,9)
  • push R right to (11,10)
  • finish T, S, M, R, K, J, L
  • finish N, O, P, G, E
  • push F left one square
  • finish H
  • push F up into the upper room, move around it, finish it
  • finish A

five boulders (B, C, D, I, and Q) remain.


level 2, version B

mapsolution
           1         2
  12345678901234567890123456
 1 +--+          +---------+
 2++.@+------+   |.........|
 3|..........|   |.........|
 4|.A+---+B-.|   |.........|
 5|..|...|.C.|   |....>....|
 6|.D.E....F-|   |.........|
 7|.G..H..|..|   |.........|
 8|.----I.++.|   |.........|
 9|..J...K.|.++  |.........|
10|.--+L-...M.+-----------+|
 1|...|..N-.O.^^^^^^^^^^^^.|
 2|..P......+--------------+
 3+---+..|..|
 4    +-----+
  • push P right three squares and up one square next to N
  • finish O
  • push N down, then left to (3,12)
  • push M left one square
  • push B down two squares
  • push C left one square
  • push F up one square
  • push B left two squares
  • push K down two squares

the map now looks like this:

mapsolution
           1         2
  12345678901234567890123456
 1 +--+          +---------+
 2++.<+------+   |.........|
 3|..........|   |.........|
 4|.A+---+.-.|   |.........|
 5|..|...|CF.|   |....>....|
 6|.D.E.B...-|   |.........|
 7|.G..H..|..|   |.........|
 8|.----I.++.|   |.........|
 9|..J.....|.++  |.........|
10|.--+L-@.M..+-----------+|
 1|...|.PK-....^^^^^^^^^^^.|
 2|.N.......+--------------+
 3+---+..|..|
 4    +-----+
  • push M right one square, then down to (11,11)
  • finish M
  • push N right to (10,12), up to (10,10)
  • finish N the same way as M
  • push K down one square, then left to (3,12)
  • finish K the same way as N
  • push P right one square, down one square, right to (10,12)
  • finish P
  • push L down two squares, then left to (3,2)
  • finish L the same way as K
  • push I down one square, right one square, down to (8,12)
  • push I right to (10,12), finish it
  • push J right to (8,9), down to (8,12), finish it just like I

the map now looks like this:

mapsolution
           1         2
  12345678901234567890123456
 1 +--+          +---------+
 2++.<+------+   |.........|
 3|..........|   |.........|
 4|.A+---+.-.|   |.........|
 5|..|...|CF.|   |....>....|
 6|.D.E.B...-|   |.........|
 7|.G..H..|..|   |.........|
 8|.----..++.|   |.........|
 9|........|.++  |.........|
10|.--+.-.....+-----------+|
 1|...|...-.........@.^^^^.|
 2|.........+--------------+
 3+---+..|..|
 4    +-----+
  • push H one square left
  • push B down and right, then down to (8,12)
  • finish B
  • push C down one square, then left two squares to (7,6)
  • finish C like B
  • push F left, down, left to (7,6), finish it like C
  • push G right one square
  • push D up one square
  • push E right two squares to (7,6), finish it like F

level 3, version A

mapsolution
           1         2
  12345678901234567890
 1+------------------+
 2|........|...|.....|
 3|.AB..-CD|.-.|.....|
 4|..|.E.F.|GH.|.....|
 5|-.|..-..|.-.|..<..|
 6|...+-.......|.....|
 7|...|.I.-...+|.....|
 8|.J.|K.|...++|.....|
 9|-L.|..+----------+|
10|..M....^^^^^^^^^^.|
 1|...|.@+-----------+
 2+------+
  • push M left one square, move around it, finish it.
  • push J right one square
  • finish L
  • finish J
  • finish A, B
  • push D down to (9,6)
  • finish I
  • finish K (first push it down and left to (3,10))
  • push E up one square
  • push F right and up to (9,3)
  • push E down one square, then left one square to (5,4)
  • push E up one square, left two squares, finish it
  • push C down one square, left three squares to (5,4)
  • finish C the same way as E
  • push D right two squares, move around it, push it left to (8,6)
  • push D up two squares, then left to (5,4), finish it

level 3, version B

mapsolution
           1         2
  12345678901234567890
 1  +------+
 2+-+.|....|
 3|...A....+---------+
 4|.-.BC-DE|.|.......|
 5|.FG-......|.......|
 6|.-..H.|...|.......|
 7|....-I+-J-|.......|
 8|..KL..M...|...<...|
 9|.--...|...|.......|
10|....-N+---|.......|
 1+-+..O.+----------+|
 2  |..P@^^^^^^^^^^^.|
 3  +----------------+
  • push O left two squares to (4,11)
  • finish P and N
  • push L down one square to (5,9)
  • push O up one square to (4,10)
  • finish L
  • push K right one square to (5,8) and finish it
  • push O right one square to (5,10), finish it

the map now looks like this:

mapsolution
           1         2
  12345678901234567890
 1  +------+
 2+-+.|....|
 3|...A....+---------+
 4|.-.BC-DE|.|.......|
 5|.FG-......|.......|
 6|.-..H.|...|.......|
 7|....-I+-J-|.......|
 8|......M...|...<...|
 9|.--...|...|.......|
10|....-.+---|.......|
 1+-+....+----------+|
 2  |...>...@.^^^^^^.|
 3  +----------------+
  • move to the top of G, push it down to (4,8), then right (5,8) and finish it
  • push F one suqare right and finish it the same way as G
  • push M to the right into the room (10,8), move around it and push it back left to (5,8)
  • finish M
  • push J up two squares to (10,5)
  • finish I
  • push H right and finish it
  • push A right two squares to (7,3)
  • push C down to (6,6)
  • walk clockwise around C, then push C to (7,6)
  • finish C

five boulders (A, B, D, E and J) remain


level 4, version A

mapsolution
           1         2
  12345678901234567890123456
 1+------------------------+
 2|@......^^^^^^^^^^^^^^^^.|
 3|.......+--------------+.|
 4+------.+----+         |.|
 5 |...........|         |.|
 6 |.A.B.C.D.E.|         |.|
 7+-------.----|         |.|
 8|...F.G..H.I.|         |.|
 9|...J........|         |.|
10+----.-------+   +-----|.|
 1 |..K.L.M...|  +-|.....|.|
 2 |.....N....|  |.+.....|.|
 3 |.O.P...Q.++  +-|.....|.|
 4+------.---+   |.+.....+.|
 5|..R.....|     +-|.....+-+
 6|........|     |.+.....|
 7|...+----+     +-|.....|
 8+---+            +-----+
  • push A one square left into the corner
  • push B one square left
  • push C one square left
  • push E one square right into the corner
  • push D one square right
  • finish G: push it to (9,8)->(9,5)->(8,5)->(8,2)
  • finish H and I the same way as G
  • push J two squares left to (3,9)
  • finish F the same way as G
  • push N three squares right to (11,12)
  • finish L, M and K
  • push N back to (8,12), then up to (8,11) and finish it
  • push R right to (8,15), then up and finish it
  • finish O, P and Q by the following strategy:
    • push them into the lowest room to (8,16)
    • push them left to (3,16)
    • push them up to (3,15)
    • push them right to (8,15)
    • push them all the way to the holes
  • finish J: (6,9)->(6,12)->(6,8)->(9,8) then just like G above
  • finish B, C, and D by first pushing them into the second lowest room like J, then back upwards to the holes.

two boulders (A and E) remain.

There is a Bag of Holding in one of the small chambers (17,12), (17,14) and (17,16).


level 4, version B

mapsolution
           1         2
  12345678901234567890123456
 1  +----------------------+
 2  |..^^^^^^^^^^^^^^^^^^..|
 3  |..+-----------------+.|
 4+--+.|                 |.|
 5|..|A++  +----+        |.|
 6|.....+--|.B..|        |.|
 7|.CD..|..|..E.|        |.|
 8++..FG|...HI.++        |.|
 9 |J..K...|L..|   +-----|.|
10 |.MN.|..|..O| +-|.....|.|
 1 |.P.Q+--|.R.| |.+.....|.|
 2 |.......|..++ +-|.....|.|
 3 +--+.S..|.++  |.+.....+.|
 4    +--.-+.|   +-|.....+-+
 5     |.T...|   |.+.....|
 6     |@.|..|   +-|.....|
 7     +-----+     +-----+
this one is NOT solveable without some sort of "cheating". The reason is that there are only two more boulders than holes, so you have to use all but two boulders. Boulders B, E and O can't be used by any means.

B is laying at a wall and can't be pushed down. Because you can't get to the right of B (moving diagonally through B and E or through E and the wall corner is not allowed), you have to push it to the right. But then you can't push E or O away from the wall.

(thanks to Paul Grzesina for this explanation)

There are many cheats you can use on sokoban:
  • scroll of earth
  • destroying a boulder
  • jumping behind a boulder
  • teleporting a boulder
  • ...
most of them are explicitly allowed in the code, but you suffer a luck penalty by using them, others might be an oversight by the programmer and are likely to be either removed or penalized in a next version.

I suspect that the next version fixes this level anyways...