Difference between revisions of "Sokoban Level 2a"

From NetHackWiki
Jump to navigation Jump to search
(Strategy: Fix 0 → O)
(Strategy: Mediawiki unhelpfully deleted initial empty spaces, added nbsp (nonbreaking space) instead.)
Line 27: Line 27:
  
 
Make some room in the bottom:
 
Make some room in the bottom:
  ----          ----------- '''P''' rrru
+
   ----          ----------- '''P''' rrru
 
  --.@--------  |.........| '''O''' rr*
 
  --.@--------  |.........| '''O''' rr*
 
  |..........|  |.........| '''N''' dlll ll
 
  |..........|  |.........| '''N''' dlll ll
Line 43: Line 43:
  
 
Create a pathway in the upper right:
 
Create a pathway in the upper right:
  ----          ----------- '''B''' dd
+
   ----          ----------- '''B''' dd
 
  --.@--------  |.........| '''C''' l
 
  --.@--------  |.........| '''C''' l
 
  |..........|  |.........| '''M''' l
 
  |..........|  |.........| '''M''' l
Line 59: Line 59:
  
 
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.)
 
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.)
  ----          ----------- '''M''' rdrr r*
+
   ----          ----------- '''M''' rdrr r*
 
  --.@--------  |.........| '''N''' rrrr rrru urdr rrr*
 
  --.@--------  |.........| '''N''' rrrr rrru urdr rrr*
 
  |..........|  |.........| '''K''' ddll lllr rrrr rruu rdrr rrr*
 
  |..........|  |.........| '''K''' ddll lllr rrrr rruu rdrr rrr*
Line 75: Line 75:
  
 
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 pathway in the left:
 
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 pathway in the left:
  ----          ----------- '''C''' d
+
   ----          ----------- '''C''' d
 
  --.@--------  |.........| '''F''' l
 
  --.@--------  |.........| '''F''' l
 
  |..........|  |.........| '''A''' u
 
  |..........|  |.........| '''A''' u
Line 91: Line 91:
  
 
Use the large loop around the entire level to clean more boulders:
 
Use the large loop around the entire level to clean more boulders:
  ----          ----------- '''B''' rddd rruu rdrr rrrr rrr*
+
   ----          ----------- '''B''' rddd rruu rdrr rrrr rrr*
 
  --.@--------  |.........| '''J''' rrrr dddr ruur drrr rrrr rrr*
 
  --.@--------  |.........| '''J''' rrrr dddr ruur drrr rrrr rrr*
 
  |..........|  |.........| '''E''' rddd rddd rruu rdrr rrrr rrrr r*
 
  |..........|  |.........| '''E''' rddd rddd rruu rdrr rrrr rrrr r*
Line 107: Line 107:
  
 
The level is now finished:  
 
The level is now finished:  
  ----          -----------
+
   ----          -----------
 
  --.@--------  |.........|
 
  --.@--------  |.........|
 
  |..........|  |.........|
 
  |..........|  |.........|

Revision as of 08:40, 2 January 2010

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 exist. Finding and writing them up is left as an exercise to the reader.

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 N ddrr* means move boulder N two times down and two times to the right into a pit.

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 right. (Notice how the end always is 'lllrrrrrrruurdrrrrrr*', with the amount of 'r' depending on the amount of filled pits.)

 ----          ----------- 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 pathway in 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*
--.@--------   |.........| J rrrr dddr ruur drrr rrrr rrr*
|..........|   |.........| E rddd rddd rruu rdrr rrrr rrrr r*
|.A-----.-.|   |.........| H rrdd dddr ruur drrr rrrr rrrr r*
|..|...|F..|   |....<....| G rrrr dddd drru urdr rrrr rrrr rrrr *
|.D..E..C.-|   |.........|
|..G.H..|..|   |.........|
|.----..--.|   |.........|
|..J..B..|.--  |.........|
|.---.-.....------------+|
|...|...-..........^^^^^.|
|.........----------------
-----..|..|
    -------

The level is now finished:

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

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....^^^^^^^^^^.|
|...|.@-------------
--------