Difference between revisions of "Sokoban Level 2a"

From NetHackWiki
Jump to navigation Jump to search
m (style)
(cleanup)
Line 1: Line 1:
This version of the second level of [[sokoban]] is often considered one of the hardest. There are 16 boulders and 12 holes.
+
This level of [[sokoban]] is often considered one of the hardest levels of the 8. There are 16 [[boulder|boulders]] and 12 [[pit|pits]].
 
  0 boulder
 
  0 boulder
 
  ^ pit
 
  ^ pit
Line 22: Line 22:
  
 
== Strategy ==
 
== Strategy ==
The following solution solves the level without putting any blocks in an immobile position. Faster solutions which do not leave every boulder free exist.
+
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 referenced 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 '''Prrru''' means move boulder '''P''' three times to the right and once up.
 
  
 +
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.
 
   ----          -----------
 
   ----          -----------
 
  --.@--------  |.........|
 
  --.@--------  |.........|
Line 40: Line 39:
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 
+
Make some room in the bottom.
first make some room in the bottom
 
 
  Prrru
 
  Prrru
 
  Orr*
 
  Orr*
Line 60: Line 58:
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 
+
Create a pathway in the upper right.
make a pathway in the upper right
 
 
  Bdd
 
  Bdd
 
  Cl
 
  Cl
Line 83: Line 80:
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 
+
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.)
 
 
 
 
  Mrdrrr*
 
  Mrdrrr*
 
  Nrrrrrrruurdrrrr*
 
  Nrrrrrrruurdrrrr*
Line 107: Line 102:
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 
 
 
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.
 
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
+
Create a pathway on the right.
 
  CdFl
 
  CdFl
enter the middle room and remove boulder B
+
Enter the middle room and remove boulder '''B'''.
 
  AuGrDuEr
 
  AuGrDuEr
 
  Bddd
 
  Bddd
restore pathway in the left
+
Restore pathway in the left.
 
  DdAd
 
  DdAd
  
Line 133: Line 126:
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 
+
Use the large loop around the entire level to clean more boulders.
using the large loop around the entire level to clean more boulders
 
 
  Brdddlllllrrrrrrruurdrrrrrrrrr*
 
  Brdddlllllrrrrrrruurdrrrrrrrrr*
 
  Jrrrrlllllrrrrrrruurdrrrrrrrrrr*
 
  Jrrrrlllllrrrrrrruurdrrrrrrrrrr*

Revision as of 19:39, 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*
Prdlllrrrrrrruurdrrrrrrr*
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.-|   |.........|
|.......|..|   |.........|
|.----..--.|   |.........|
|........|.--  |.........|
|.---.-.....------------+|
|...|...-................|
|.........----------------
-----..|..|
    -------