Difference between revisions of "Sokoban Level 2a"

From NetHackWiki
Jump to navigation Jump to search
m (style)
m (typo)
 
(34 intermediate revisions by 25 users not shown)
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.
+
'''Sokoban Level 2a'''  is one of two possible maps for the second level of [[Sokoban]] in ''[[NetHack]]''. It is also among the various possible maps for that level in variants of ''NetHack''; in [[Hack'EM]], the map is named '''"Old Reliable"'''.
0 boulder
 
^ pit
 
@ starting position/downstairs
 
< upstairs
 
  
 +
This level is often considered one of the hardest levels of the original set of 8. There are 16 [[boulder]] and 12 [[hole]]s, leaving 4 spare boulders.
 +
 +
{{upcoming|3.7.0|Like all Sokoban levels, this floor may be flipped vertically and/or horizontally.}}
 +
 +
<div class="ttymap">
 
   ----          -----------
 
   ----          -----------
 
  --.@--------  |.........|
 
  --.@--------  |.........|
Line 19: Line 20:
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
  
 +
== Strategy ==
 +
The following solution solves the level with only placing three boulders in an immovable position. See [[Special:PermanentLink/97945|this revision]] for a solution that solves the level without placing any boulders in an immovable position. Faster solutions exist. Finding and writing them up is left as an exercise to the reader. You can watch ttyrec of one solution  [http://alt.org/nethack/trd/?file=http://alt.org/nethack/userdata/t/tjraux02/ttyrec/2011-06-07.04:44:03.ttyrec.bz2 here], or a faster ttyrec [http://alt.org/nethack/trd/?file=http://alt.org/nethack/userdata/t/tjraux02/ttyrec/2011-06-07.01:02:37.ttyrec.bz2 here] which involves jumping down a hole,  or [https://youtu.be/rhQdWt9Rxl8 a YouTube video].
  
== Strategy ==
+
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.
The following solution solves the level without putting any blocks in an immobile position. Faster solutions which do not leave every boulder free 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.
+
The key to this level is being able to walk around the shape in the bottom right. '''F''', '''K''' and '''M''' prevent this in the starting layout, and '''P''' prevents you from getting near to that shape.
  
 +
<div class="ttymap">
 
   ----          -----------
 
   ----          -----------
 
  --.@--------  |.........|
 
  --.@--------  |.........|
 
  |..........|  |.........|
 
  |..........|  |.........|
 
  |.A-----B-.|  |.........|
 
  |.A-----B-.|  |.........|
  |..|...|.C.|  |....<....|
+
  |..|...|.C.|  |....&lt;....|
 
  |.D.E....F-|  |.........|
 
  |.D.E....F-|  |.........|
 
  |.G..H..|..|  |.........|
 
  |.G..H..|..|  |.........|
Line 36: Line 40:
 
  |..J...K.|.--  |.........|
 
  |..J...K.|.--  |.........|
 
  |.---L-...M.------------+|
 
  |.---L-...M.------------+|
  |...|..N-.0.^^^^^^^^^^^^.|
+
  |...|..N-.O.^^^^^^^^^^^^.|
 
  |..P......----------------
 
  |..P......----------------
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
 +
 +
Clear a space above '''F'''. I move '''B''' next to the bottom-right shape, but I'll move it away again soon.
 +
 +
'''B''' dd
 +
'''C''' l
 +
 +
Move '''P''' so that I can get past, '''N''' to give me space to put '''K''', and '''O''' and '''M''' so I can get up to '''F'''.
  
first make some room in the bottom
+
'''P''' rrru
  Prrru
+
  '''O''' rr*
  Orr*
+
  '''N''' d
  Ndlllll
+
  '''M''' l
  
 +
<div class="ttymap">
 
   ----          -----------
 
   ----          -----------
  --.@--------  |.........|
+
  --.&gt;--------  |.........|
 
  |..........|  |.........|
 
  |..........|  |.........|
  |.A-----B-.|  |.........|
+
  |.A-----.-.|  |.........|
  |..|...|.C.|  |....<....|
+
  |..|...|C..|  |....&lt;....|
  |.D.E....F-|  |.........|
+
  |.D.E...BF-|  |.........|
  |.G..H..|..|  |.........|
+
  |.C..H..|..|  |.........|
 
  |.----I.--.|  |.........|
 
  |.----I.--.|  |.........|
 
  |..J...K.|.--  |.........|
 
  |..J...K.|.--  |.........|
  |.---L-...M.------------+|
+
  |.---L-..M@.------------+|
 
  |...|.P.-....^^^^^^^^^^^.|
 
  |...|.P.-....^^^^^^^^^^^.|
  |.N.......----------------
+
  |......N..----------------
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
  
make a pathway in the upper right
+
Clear enough space around the bottom-right shape so I can walk around it.
Bdd
 
Cl
 
Ml
 
Fu
 
Bll
 
Kd
 
  
 +
'''F''' u
 +
'''B''' ll
 +
'''K''' d
 +
 +
<div class="ttymap">
 
   ----          -----------
 
   ----          -----------
  --.@--------  |.........|
+
  --.&gt;--------  |.........|
 
  |..........|  |.........|
 
  |..........|  |.........|
 
  |.A-----.-.|  |.........|
 
  |.A-----.-.|  |.........|
  |..|...|CF.|  |....<....|
+
  |..|...|CF.|  |....&lt;....|
 
  |.D.E.B...-|  |.........|
 
  |.D.E.B...-|  |.........|
  |.G..H..|..|  |.........|
+
  |.C..H..|..|  |.........|
 
  |.----I.--.|  |.........|
 
  |.----I.--.|  |.........|
  |..J.....|.--  |.........|
+
  |..J...@.|.--  |.........|
 
  |.---L-K.M..------------+|
 
  |.---L-K.M..------------+|
 
  |...|.P.-....^^^^^^^^^^^.|
 
  |...|.P.-....^^^^^^^^^^^.|
  |.N.......----------------
+
  |......N..----------------
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
  
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.)
+
Finish the bottom half (M, N, K, L, P, I and J).
  
  Mrdrrr*
+
  '''M''' rdrr r*
  Nrrrrrrruurdrrrr*
+
  '''N''' llll lrrr rrrr uu
Kddlllllrrrrrrruurdrrrrr*
 
Lddlllrrrrrrruurdrrrrrr*
 
Prdlllrrrrrrruurdrrrrrrr*
 
Idrdddlllllrrrrrrruurdrrrrrrrr*
 
  
 +
<div class="ttymap">
 
   ----          -----------
 
   ----          -----------
  --.@--------  |.........|
+
  --.&gt;--------  |.........|
 
  |..........|  |.........|
 
  |..........|  |.........|
 
  |.A-----.-.|  |.........|
 
  |.A-----.-.|  |.........|
  |..|...|CF.|  |....<....|
+
  |..|...|CF.|  |....&lt;....|
 
  |.D.E.B...-|  |.........|
 
  |.D.E.B...-|  |.........|
 
  |.G..H..|..|  |.........|
 
  |.G..H..|..|  |.........|
  |.----..--.|  |.........|
+
  |.----I.--.|  |.........|
 
  |..J.....|.--  |.........|
 
  |..J.....|.--  |.........|
  |.---.-.....------------+|
+
  |.---L-K.N..------------+|
  |...|...-..........^^^^^.|
+
  |...|.P.-@....^^^^^^^^^^.|
 
  |.........----------------
 
  |.........----------------
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
  
 +
'''K''' dd
 +
'''N''' rdrr rr*
 +
'''L''' dd
 +
'''P''' r
  
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.
+
<div class="ttymap">
 +
  ----          -----------
 +
--.&gt;--------  |.........|
 +
|..........|  |.........|
 +
|.A-----.-.|  |.........|
 +
|..|...|CF.|  |....&lt;....|
 +
|.D.E.B...-|  |.........|
 +
|.G..H..|..|  |.........|
 +
|.----I.--.|  |.........|
 +
|..J.....|.--  |.........|
 +
|.---.-.....------------+|
 +
|...|.@P-......^^^^^^^^^.|
 +
|....L.K..----------------
 +
-----..|..|
 +
    -------
 +
</div>
  
create a pathway on the right
+
'''K''' rruu rdrr rrr*
  CdFl
+
  '''P''' drru urdr rrrr rr*
enter the middle room and remove boulder B
+
  '''L''' lllr rrrr rruu rdrr rrrr*
  AuGrDuEr
+
  '''I''' drdd drru urdr rrrr rrr*
  Bddd
+
  '''J''' rrrr dddr ruur drrr rrrr rr*
restore pathway in the left
 
  DdAd
 
  
 +
<div class="ttymap">
 
   ----          -----------
 
   ----          -----------
  --.@--------  |.........|
+
  --.&gt;--------  |.........|
 
  |..........|  |.........|
 
  |..........|  |.........|
 
  |.A-----.-.|  |.........|
 
  |.A-----.-.|  |.........|
  |..|...|F..|  |....<....|
+
  |..|...|CF.|  |....&lt;....|
  |.D..E..C.-|  |.........|
+
|.D.E.B...-|  |.........|
 +
|.G..H..|..|  |.........|
 +
|.----..--.|  |.........|
 +
|........|.--  |.........|
 +
|.---.-.....------------+|
 +
|...|...-.........@.^^^^.|
 +
|.........----------------
 +
-----..|..|
 +
    -------
 +
</div>
 +
 
 +
Get into the space above B.
 +
 
 +
'''A''' u
 +
'''G''' r
 +
'''D''' u
 +
'''E''' r
 +
 
 +
<div class="ttymap">
 +
  ----          -----------
 +
--.&gt;--------  |.........|
 +
|.A........|  |.........|
 +
|..-----.-.|  |.........|
 +
  |.D|...|CF.|  |....&lt;....|
 +
|...@EB...-|  |.........|
 
  |..G.H..|..|  |.........|
 
  |..G.H..|..|  |.........|
 
  |.----..--.|  |.........|
 
  |.----..--.|  |.........|
  |..J..B..|.--  |.........|
+
  |........|.--  |.........|
 
  |.---.-.....------------+|
 
  |.---.-.....------------+|
  |...|...-..........^^^^^.|
+
  |...|...-...........^^^^.|
 
  |.........----------------
 
  |.........----------------
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
  
using the large loop around the entire level to clean more boulders
+
Finish B, E, H and G.
Brdddlllllrrrrrrruurdrrrrrrrrr*
 
Jrrrrlllllrrrrrrruurdrrrrrrrrrr*
 
Erdddrdddlllllrrrrrrruurdrrrrrrrrrrr*
 
Hrrdddddlllllrrrrrrruurdrrrrrrrrrrrr*
 
Grrrrdddddlllllrrrrrrruurdrrrrrrrrrrrrr*
 
  
   ----          -----------
+
'''B''' dddr dddr ruur drrr rrrr rrr*
  --.@--------  |.........|
+
'''E''' rddd rddd rruu rdrr rrrr rrrr r*
  |..........|  |.........|
+
'''H''' rrdd dddr ruur drrr rrrr rrrr r*
  |.A-----.-.|  |.........|
+
'''G''' rrrr dddd drru urdr rrrr rrrr rrrr*
  |..|...|F..|  |....<....|
+
 
  |.D.....C.-|  |.........|
+
The level is now finished, but you will still need to move the A or C blocks to walk between your finishing position (as well as the stairs up) and the stairs down. How to fix this depends on which direction you approach the blockage from as follows:
 +
 
 +
<div class="ttymap">
 +
   ----          -----------  
 +
  --.&gt;--------  |.........|  
 +
  |.A........|  |.........|
 +
  |..-----.-.|  |.........|  
 +
  |.D|...|CF.|  |....&lt;....|  
 +
  |.........-|  |.........|  
 
  |.......|..|  |.........|
 
  |.......|..|  |.........|
 
  |.----..--.|  |.........|
 
  |.----..--.|  |.........|
 
  |........|.--  |.........|
 
  |........|.--  |.........|
 
  |.---.-.....------------+|
 
  |.---.-.....------------+|
  |...|...-................|
+
  |...|...-.............@..|
 
  |.........----------------
 
  |.........----------------
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
 +
 +
If you start from '''<''' or '''@''':
 +
'''A''' r
 +
 +
If you start from '''>'''
 +
'''C''' d
 +
'''F''' l
 +
 +
==Next level==
 +
After this level, you will face either of the following levels:
  
[[Category:Dungeon branches]]
+
{| class="prettytable"
 +
|[[Sokoban Level 3a]]
 +
<nowiki>  --------</nowiki>
 +
<nowiki>---.|....|</nowiki>
 +
<nowiki>|...0....|----------</nowiki>
 +
<nowiki>|.-.00-00|.|.......|</nowiki>
 +
<nowiki>|.00-......|.......|</nowiki>
 +
<nowiki>|.-..0.|...|.......|</nowiki>
 +
<nowiki>|....-0--0-|...<...|</nowiki>
 +
<nowiki>|..00..0...|.......|</nowiki>
 +
<nowiki>|.--...|...|.......|</nowiki>
 +
<nowiki>|....-0|---|.......|</nowiki>
 +
<nowiki>---..0.-----------+|</nowiki>
 +
<nowiki>  |..0@^^^^^^^^^^^.|</nowiki>
 +
<nowiki>  ------------------</nowiki>
 +
|[[Sokoban Level 3b]]
 +
<nowiki>--------------------</nowiki>
 +
<nowiki>|........|...|.....|</nowiki>
 +
<nowiki>|.00..-00|.-.|.....|</nowiki>
 +
<nowiki>|..|.0.0.|00.|.....|</nowiki>
 +
<nowiki>|-.|..-..|.-.|..<..|</nowiki>
 +
<nowiki>|...--.......|.....|</nowiki>
 +
<nowiki>|...|.0.-...-|.....|</nowiki>
 +
<nowiki>|.0.|0.|...--|.....|</nowiki>
 +
<nowiki>|-0.|..-----------+|</nowiki>
 +
<nowiki>|..0....^^^^^^^^^^.|</nowiki>
 +
<nowiki>|...|.@-------------</nowiki>
 +
<nowiki>--------</nowiki>
 +
|}
 +
{{nethack-360}}
 +
[[Category:Sokoban|2a]]

Latest revision as of 11:19, 31 July 2023

Sokoban Level 2a is one of two possible maps for the second level of Sokoban in NetHack. It is also among the various possible maps for that level in variants of NetHack; in Hack'EM, the map is named "Old Reliable".

This level is often considered one of the hardest levels of the original set of 8. There are 16 boulder and 12 holes, leaving 4 spare boulders.

The following information pertains to an upcoming version (3.7.0). If this version is now released, please verify that it is still accurate, then update the page to incorporate this information.

Like all Sokoban levels, this floor may be flipped vertically and/or horizontally.
 ----          -----------
--.@--------   |.........|
|..........|   |.........|
|.0-----0-.|   |.........|
|..|...|.0.|   |....<....|
|.0.0....0-|   |.........|
|.0..0..|..|   |.........|
|.----0.--.|   |.........|
|..0...0.|.--  |.........|
|.---0-...0.------------+|
|...|..0-.0.^^^^^^^^^^^^.|
|..0......----------------
-----..|..|
    -------

Strategy

The following solution solves the level with only placing three boulders in an immovable position. See this revision for a solution that solves the level without placing any boulders in an immovable position. Faster solutions exist. Finding and writing them up is left as an exercise to the reader. You can watch ttyrec of one solution here, or a faster ttyrec here which involves jumping down a hole, or a YouTube video.

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.

The key to this level is being able to walk around the shape in the bottom right. F, K and M prevent this in the starting layout, and P prevents you from getting near to that shape.

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

Clear a space above F. I move B next to the bottom-right shape, but I'll move it away again soon.

B dd
C l

Move P so that I can get past, N to give me space to put K, and O and M so I can get up to F.

P rrru
O rr*
N d
M l
 ----          -----------
--.>--------   |.........|
|..........|   |.........|
|.A-----.-.|   |.........|
|..|...|C..|   |....<....|
|.D.E...BF-|   |.........|
|.C..H..|..|   |.........|
|.----I.--.|   |.........|
|..J...K.|.--  |.........|
|.---L-..M@.------------+|
|...|.P.-....^^^^^^^^^^^.|
|......N..----------------
-----..|..|
    -------

Clear enough space around the bottom-right shape so I can walk around it.

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

Finish the bottom half (M, N, K, L, P, I and J).

M rdrr r*
N llll lrrr rrrr uu
 ----          -----------
--.>--------   |.........|
|..........|   |.........|
|.A-----.-.|   |.........|
|..|...|CF.|   |....<....|
|.D.E.B...-|   |.........|
|.G..H..|..|   |.........|
|.----I.--.|   |.........|
|..J.....|.--  |.........|
|.---L-K.N..------------+|
|...|.P.-@....^^^^^^^^^^.|
|.........----------------
-----..|..|
    -------
K dd
N rdrr rr*
L dd
P r
 ----          -----------
--.>--------   |.........|
|..........|   |.........|
|.A-----.-.|   |.........|
|..|...|CF.|   |....<....|
|.D.E.B...-|   |.........|
|.G..H..|..|   |.........|
|.----I.--.|   |.........|
|..J.....|.--  |.........|
|.---.-.....------------+|
|...|.@P-......^^^^^^^^^.|
|....L.K..----------------
-----..|..|
    -------
K rruu rdrr rrr*
P drru urdr rrrr rr*
L lllr rrrr rruu rdrr rrrr*
I drdd drru urdr rrrr rrr*
J rrrr dddr ruur drrr rrrr rr*
 ----          -----------
--.>--------   |.........|
|..........|   |.........|
|.A-----.-.|   |.........|
|..|...|CF.|   |....<....|
|.D.E.B...-|   |.........|
|.G..H..|..|   |.........|
|.----..--.|   |.........|
|........|.--  |.........|
|.---.-.....------------+|
|...|...-.........@.^^^^.|
|.........----------------
-----..|..|
    -------

Get into the space above B.

A u
G r
D u
E r
 ----          -----------
--.>--------   |.........|
|.A........|   |.........|
|..-----.-.|   |.........|
|.D|...|CF.|   |....<....|
|...@EB...-|   |.........|
|..G.H..|..|   |.........|
|.----..--.|   |.........|
|........|.--  |.........|
|.---.-.....------------+|
|...|...-...........^^^^.|
|.........----------------
-----..|..|
    -------

Finish B, E, H and G.

B dddr dddr ruur drrr rrrr rrr*
E rddd rddd rruu rdrr rrrr rrrr r*
H rrdd dddr ruur drrr rrrr rrrr r*
G rrrr dddd drru urdr rrrr rrrr rrrr*

The level is now finished, but you will still need to move the A or C blocks to walk between your finishing position (as well as the stairs up) and the stairs down. How to fix this depends on which direction you approach the blockage from as follows:

 ----          ----------- 
--.>--------   |.........| 
|.A........|   |.........|
|..-----.-.|   |.........| 
|.D|...|CF.|   |....<....| 
|.........-|   |.........| 
|.......|..|   |.........|
|.----..--.|   |.........|
|........|.--  |.........|
|.---.-.....------------+|
|...|...-.............@..|
|.........----------------
-----..|..|
    -------

If you start from < or @:

A r

If you start from >

C d
F l

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

This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.6.0. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-360}} tag to the current version's tag or {{noversion}} as appropriate.