Difference between revisions of "Sokoban Level 2a"

From NetHackWiki
Jump to navigation Jump to search
(cleanup)
m (Strategy: fixed one mistake)
Line 85: Line 85:
 
  Kddlllllrrrrrrruurdrrrrr*
 
  Kddlllllrrrrrrruurdrrrrr*
 
  Lddlllrrrrrrruurdrrrrrr*
 
  Lddlllrrrrrrruurdrrrrrr*
  Prdlllrrrrrrruurdrrrrrrr*
+
  Pldlllrrrrrrruurdrrrrrrr*
 
  Idrdddlllllrrrrrrruurdrrrrrrrr*
 
  Idrdddlllllrrrrrrruurdrrrrrrrr*
  

Revision as of 22:00, 28 August 2006

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

0 boulder
^ pit
@ 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 blocks in an immobile position. Faster solutions which do not necessarily leave every boulder free might exist.

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 pit (and thus removed the boulder from the game). So Nddrr* means move boulder N two times down and two times to the right into a pit.

 ----          -----------
--.@--------   |.........|
|..........|   |.........|
|.A-----B-.|   |.........|
|..|...|.C.|   |....<....|
|.D.E....F-|   |.........|
|.G..H..|..|   |.........|
|.----I.--.|   |.........|
|..J...K.|.--  |.........|
|.---L-...M.------------+|
|...|..N-.0.^^^^^^^^^^^^.|
|..P......----------------
-----..|..|
    -------

Make some room in the bottom.

Prrru
Orr*
Ndlllll
 ----          -----------
--.@--------   |.........|
|..........|   |.........|
|.A-----B-.|   |.........|
|..|...|.C.|   |....<....|
|.D.E....F-|   |.........|
|.G..H..|..|   |.........|
|.----I.--.|   |.........|
|..J...K.|.--  |.........|
|.---L-...M.------------+|
|...|.P.-....^^^^^^^^^^^.|
|.N.......----------------
-----..|..|
    -------

Create a pathway in the upper right.

Bdd
Cl
Ml
Fu
Bll
Kd
 ----          -----------
--.@--------   |.........|
|..........|   |.........|
|.A-----.-.|   |.........|
|..|...|CF.|   |....<....|
|.D.E.B...-|   |.........|
|.G..H..|..|   |.........|
|.----I.--.|   |.........|
|..J.....|.--  |.........|
|.---L-K.M..------------+|
|...|.P.-....^^^^^^^^^^^.|
|.N.......----------------
-----..|..|
    -------

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

Mrdrrr*
Nrrrrrrruurdrrrr*
Kddlllllrrrrrrruurdrrrrr*
Lddlllrrrrrrruurdrrrrrr*
Pldlllrrrrrrruurdrrrrrrr*
Idrdddlllllrrrrrrruurdrrrrrrrr*
 ----          -----------
--.@--------   |.........|
|..........|   |.........|
|.A-----.-.|   |.........|
|..|...|CF.|   |....<....|
|.D.E.B...-|   |.........|
|.G..H..|..|   |.........|
|.----..--.|   |.........|
|..J.....|.--  |.........|
|.---.-.....------------+|
|...|...-..........^^^^^.|
|.........----------------
-----..|..|
    -------

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.

CdFl

Enter the middle room and remove boulder B.

AuGrDuEr
Bddd

Restore pathway in the left.

DdAd
 ----          -----------
--.@--------   |.........|
|..........|   |.........|
|.A-----.-.|   |.........|
|..|...|F..|   |....<....|
|.D..E..C.-|   |.........|
|..G.H..|..|   |.........|
|.----..--.|   |.........|
|..J..B..|.--  |.........|
|.---.-.....------------+|
|...|...-..........^^^^^.|
|.........----------------
-----..|..|
    -------

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

Brdddlllllrrrrrrruurdrrrrrrrrr*
Jrrrrlllllrrrrrrruurdrrrrrrrrrr*
Erdddrdddlllllrrrrrrruurdrrrrrrrrrrr*
Hrrdddddlllllrrrrrrruurdrrrrrrrrrrrr*
Grrrrdddddlllllrrrrrrruurdrrrrrrrrrrrrr*
 ----          -----------
--.@--------   |.........|
|..........|   |.........|
|.A-----.-.|   |.........|
|..|...|F..|   |....<....|
|.D.....C.-|   |.........|
|.......|..|   |.........|
|.----..--.|   |.........|
|........|.--  |.........|
|.---.-.....------------+|
|...|...-................|
|.........----------------
-----..|..|
    -------