Sokoban Level 2a

From NetHackWiki
Revision as of 00:32, 24 May 2012 by 95.149.230.215 (talk) (Strategy: clarify link now that the solution has changed)
Jump to navigation Jump to search

This level of Sokoban is often considered one of the hardest levels of the 8. There are 16 boulders and 12 holes.

0 boulder
^ hole
@ starting position/downstairs
< upstairs
 ----          -----------
--.@--------   |.........|
|..........|   |.........|
|.0-----0-.|   |.........|
|..|...|.0.|   |....<....|
|.0.0....0-|   |.........|
|.0..0..|..|   |.........|
|.----0.--.|   |.........|
|..0...0.|.--  |.........|
|.---0-...0.------------+|
|...|..0-.0.^^^^^^^^^^^^.|
|..0......----------------
-----..|..|
    -------


Strategy

The following solution solves the level without putting any boulders in an immobile position. Faster solutions exist. Finding and writing them up is left as an exercise to the reader. You can watch a ttyrec of an older version of this solution, or a faster one involving jumping down a hole.

All boulders are replaced by letters so they can be referred to. Moving the boulders is shortened to r for right, l for left, u for up, d for down. An asterisk is used to denote the last move filled a hole (and thus removed the boulder from the game). So N ddrr* means move boulder N two times down and two times to the right into a hole.

Make some room in the bottom:

 ----          ----------- P rrru
--.@--------   |.........| O rr*
|..........|   |.........| N dlll ll
|.A-----B-.|   |.........|
|..|...|.C.|   |....<....|
|.D.E....F-|   |.........|
|.G..H..|..|   |.........|
|.----I.--.|   |.........|
|..J...K.|.--  |.........|
|.---L-...M.------------+|
|...|..N-.O.^^^^^^^^^^^^.|
|..P......----------------
-----..|..|
    -------

Create a pathway in the upper right:

 ----          ----------- B dd
--.@--------   |.........| C l
|..........|   |.........| M l
|.A-----B-.|   |.........| F u
|..|...|.C.|   |....<....| B ll
|.D.E....F-|   |.........| K d
|.G..H..|..|   |.........|
|.----I.--.|   |.........|
|..J...K.|.--  |.........|
|.---L-...M.------------+|
|...|.P.-....^^^^^^^^^^^.|
|.N.......----------------
-----..|..|
    -------

Clear the lower half, using the 'loop' above M and the 2x3 turning space in the lower left. (Notice how the end is always 'lllrrrrrrruurdrrrrrr*', with the number of 'r's depending on the number of filled holes.)

 ----          ----------- M rdrr r*
--.@--------   |.........| N rrrr rrru urdr rrr*
|..........|   |.........| K ddll lllr rrrr rruu rdrr rrr*
|.A-----.-.|   |.........| L ddll lrrr rrrr uurd rrrr rr*
|..|...|CF.|   |....<....| P rdrr uurd rrrr rrr*
|.D.E.B...-|   |.........| I drdd drru urdr rrrr rrr*
|.G..H..|..|   |.........|
|.----I.--.|   |.........|
|..J.....|.--  |.........|
|.---L-K.M..------------+|
|...|.P.-....^^^^^^^^^^^.|
|.N.......----------------
-----..|..|
    -------

Now it depends on whether you want to be able to have all the boulders freely moving after you finish the level. In this solution all boulders can be moved freely. Create a pathway on the right, enter the middle room and remove boulder B and restore the pathway on the left:

 ----          ----------- C d
--.@--------   |.........| F l
|..........|   |.........| A u
|.A-----.-.|   |.........| G r
|..|...|CF.|   |....<....| D u
|.D.E.B...-|   |.........| E r
|.G..H..|..|   |.........| B ddd
|.----..--.|   |.........| D d
|..J.....|.--  |.........| A d
|.---.-.....------------+|
|...|...-..........^^^^^.|
|.........----------------
-----..|..|
    -------

Use the large loop around the entire level to clean more boulders:

 ----          ----------- B rddd rruu rdrr rrrr rrr*
--.@--------   |.........| E rddd rddd rruu rdrr rrrr rrrr*
|..........|   |.........| C lllr dddr dddr ruur drrr rrrr rrrr*
|.A-----.-.|   |.........| H rrdd dddr ruur drrr rrrr rrrr r*
|..|...|F..|   |....<....| J rrrr dddr ruur drrr rrrr rrrr rr*
|.D..E..C.-|   |.........|
|..G.H..|..|   |.........|
|.----..--.|   |.........|
|..J..B..|.--  |.........|
|.---.-.....------------+|
|...|...-..........^^^^^.|
|.........----------------
-----..|..|
    -------

The level is now finished:

 ----          -----------
--.@--------   |.........|
|..........|   |.........|
|.A-----.-.|   |.........|
|..|...|F..|   |....<....|
|.D.......-|   |.........|
|..G....|..|   |.........|
|.----..--.|   |.........|
|........|.--  |.........|
|.---.-.....------------+|
|...|...-................|
|.........----------------
-----..|..|
    -------

Next level

After this level, you will face either of the following levels:

Sokoban Level 3a
  --------
---.|....|
|...0....|----------
|.-.00-00|.|.......|
|.00-......|.......|
|.-..0.|...|.......|
|....-0--0-|...<...|
|..00..0...|.......|
|.--...|...|.......|
|....-0|---|.......|
---..0.-----------+|
  |..0@^^^^^^^^^^^.|
  ------------------
Sokoban Level 3b
--------------------
|........|...|.....|
|.00..-00|.-.|.....|
|..|.0.0.|00.|.....|
|-.|..-..|.-.|..<..|
|...--.......|.....|
|...|.0.-...-|.....|
|.0.|0.|...--|.....|
|-0.|..-----------+|
|..0....^^^^^^^^^^.|
|...|.@-------------
--------