Difference between revisions of "Sokoban Level 2a"

From NetHackWiki
Jump to navigation Jump to search
(Strategy: - fixed error in section 4 that makes boulder A immovable)
m (typo)
 
(25 intermediate revisions by 19 users not shown)
Line 1: Line 1:
This level of [[sokoban]] is often considered one of the hardest levels of the 8. There are 16 [[boulder|boulders]] and 12 [[pit|pits]].
+
'''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 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 '''N ddrr*''' means move boulder '''N''' two times down and two times to the right into a pit.
+
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.
  
Make some room in the bottom:
+
<div class="ttymap">
   ----          ----------- '''P''' rrru
+
   ----          -----------
  --.@--------  |.........| '''O''' rr*
+
  --.@--------  |.........|
  |..........|  |.........| '''N''' dlll ll
+
  |..........|  |.........|
 
  |.A-----B-.|  |.........|
 
  |.A-----B-.|  |.........|
  |..|...|.C.|  |....<....|
+
  |..|...|.C.|  |....&lt;....|
 
  |.D.E....F-|  |.........|
 
  |.D.E....F-|  |.........|
 
  |.G..H..|..|  |.........|
 
  |.G..H..|..|  |.........|
Line 37: 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.
  
Create a pathway in the upper right:
+
'''B''' dd
   ----          ----------- '''B''' dd
+
'''C''' l
  --.@--------  |.........| '''C''' l
+
 
  |..........|  |.........| '''M''' 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'''.
  |.A-----B-.|  |.........| '''F''' u
+
 
  |..|...|.C.|  |....<....| '''B''' ll
+
'''P''' rrru
  |.D.E....F-|  |.........| '''K''' d
+
'''O''' rr*
  |.G..H..|..|  |.........|
+
'''N''' d
 +
'''M''' l
 +
 
 +
<div class="ttymap">
 +
   ----          -----------
 +
  --.&gt;--------  |.........|
 +
  |..........|  |.........|
 +
  |.A-----.-.|  |.........|
 +
  |..|...|C..|  |....&lt;....|
 +
  |.D.E...BF-|  |.........|
 +
  |.C..H..|..|  |.........|
 
  |.----I.--.|  |.........|
 
  |.----I.--.|  |.........|
 
  |..J...K.|.--  |.........|
 
  |..J...K.|.--  |.........|
  |.---L-...M.------------+|
+
  |.---L-..M@.------------+|
 +
|...|.P.-....^^^^^^^^^^^.|
 +
|......N..----------------
 +
-----..|..|
 +
    -------
 +
</div>
 +
 
 +
Clear enough space around the bottom-right shape so I can walk around it.
 +
 
 +
'''F''' u
 +
'''B''' ll
 +
'''K''' d
 +
 
 +
<div class="ttymap">
 +
  ----          -----------
 +
--.&gt;--------  |.........|
 +
|..........|  |.........|
 +
|.A-----.-.|  |.........|
 +
|..|...|CF.|  |....&lt;....|
 +
|.D.E.B...-|  |.........|
 +
|.C..H..|..|  |.........|
 +
|.----I.--.|  |.........|
 +
|..J...@.|.--  |.........|
 +
|.---L-K.M..------------+|
 
  |...|.P.-....^^^^^^^^^^^.|
 
  |...|.P.-....^^^^^^^^^^^.|
  |.N.......----------------
+
  |......N..----------------
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
 +
 +
Finish the bottom half (M, N, K, L, P, I and J).
 +
 +
'''M''' rdrr r*
 +
'''N''' llll lrrr rrrr uu
  
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.)
+
<div class="ttymap">
   ----          ----------- '''M''' rdrr r*
+
   ----          -----------
  --.@--------  |.........| '''N''' rrrr rrru urdr rrr*
+
  --.&gt;--------  |.........|
  |..........|  |.........| '''K''' ddll lllr rrrr rruu rdrr rrr*
+
  |..........|  |.........|
  |.A-----.-.|  |.........| '''L''' ddll lrrr rrrr uurd rrrr rr*
+
  |.A-----.-.|  |.........|
  |..|...|CF.|  |....<....| '''P''' rdrr uurd rrrr rrr*
+
  |..|...|CF.|  |....&lt;....|
  |.D.E.B...-|  |.........| '''I''' drdd drru urdr rrrr rrr*
+
  |.D.E.B...-|  |.........|
 
  |.G..H..|..|  |.........|
 
  |.G..H..|..|  |.........|
 
  |.----I.--.|  |.........|
 
  |.----I.--.|  |.........|
 
  |..J.....|.--  |.........|
 
  |..J.....|.--  |.........|
  |.---L-K.M..------------+|
+
  |.---L-K.N..------------+|
  |...|.P.-....^^^^^^^^^^^.|
+
  |...|.P.-@....^^^^^^^^^^.|
  |.N.......----------------
+
  |.........----------------
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
  
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:
+
'''K''' dd
   ----          ----------- '''C''' d
+
'''N''' rdrr rr*
  --.@--------  |.........| '''F''' l
+
'''L''' dd
  |..........|  |.........| '''G''' r
+
'''P''' r
  |.A-----.-.|  |.........| '''D''' u
+
 
  |..|...|CF.|  |....<....| '''E''' r
+
<div class="ttymap">
  |.D.E.B...-|  |.........| '''B''' ddd
+
   ----          -----------
  |.G..H..|..|  |.........| '''D''' d
+
  --.&gt;--------  |.........|
  |.----..--.|  |.........| '''A''' d
+
  |..........|  |.........|
 +
  |.A-----.-.|  |.........|
 +
  |..|...|CF.|  |....&lt;....|
 +
  |.D.E.B...-|  |.........|
 +
  |.G..H..|..|  |.........|
 +
  |.----I.--.|  |.........|
 
  |..J.....|.--  |.........|
 
  |..J.....|.--  |.........|
 
  |.---.-.....------------+|
 
  |.---.-.....------------+|
  |...|...-..........^^^^^.|
+
  |...|.@P-......^^^^^^^^^.|
 +
|....L.K..----------------
 +
-----..|..|
 +
    -------
 +
</div>
 +
 
 +
'''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*
 +
 
 +
<div class="ttymap">
 +
  ----          -----------
 +
--.&gt;--------  |.........|
 +
|..........|  |.........|
 +
|.A-----.-.|  |.........|
 +
|..|...|CF.|  |....&lt;....|
 +
|.D.E.B...-|  |.........|
 +
|.G..H..|..|  |.........|
 +
|.----..--.|  |.........|
 +
|........|.--  |.........|
 +
|.---.-.....------------+|
 +
|...|...-.........@.^^^^.|
 
  |.........----------------
 
  |.........----------------
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
 +
 +
Get into the space above B.
 +
 +
'''A''' u
 +
'''G''' r
 +
'''D''' u
 +
'''E''' r
  
Use the large loop around the entire level to clean more boulders:
+
<div class="ttymap">
   ----          ----------- '''B''' rddd rruu rdrr rrrr rrr*
+
   ----          -----------
  --.@--------  |.........| '''J''' rrrr dddr ruur drrr rrrr rrr*
+
  --.&gt;--------  |.........|
  |..........|  |.........| '''E''' rddd rddd rruu rdrr rrrr rrrr r*
+
  |.A........|  |.........|
  |.A-----.-.|  |.........| '''H''' rrdd dddr ruur drrr rrrr rrrr r*
+
  |..-----.-.|  |.........|
  |..|...|F..|  |....<....| '''G''' rrrr dddd drru urdr rrrr rrrr rrrr *
+
  |.D|...|CF.|  |....&lt;....|
  |.D..E..C.-|  |.........|
+
  |...@EB...-|  |.........|
 
  |..G.H..|..|  |.........|
 
  |..G.H..|..|  |.........|
 
  |.----..--.|  |.........|
 
  |.----..--.|  |.........|
  |..J..B..|.--  |.........|
+
  |........|.--  |.........|
 
  |.---.-.....------------+|
 
  |.---.-.....------------+|
  |...|...-..........^^^^^.|
+
  |...|...-...........^^^^.|
 
  |.........----------------
 
  |.........----------------
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
 +
 +
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:
  
The level is now finished:
+
<div class="ttymap">
   ----          -----------
+
   ----          -----------  
  --.@--------  |.........|
+
  --.&gt;--------  |.........|  
  |..........|  |.........|
+
  |.A........|  |.........|
  |.A-----.-.|  |.........|
+
  |..-----.-.|  |.........|  
  |..|...|F..|  |....<....|
+
  |.D|...|CF.|  |....&lt;....|  
  |.D.....C.-|  |.........|
+
  |.........-|  |.........|  
 
  |.......|..|  |.........|
 
  |.......|..|  |.........|
 
  |.----..--.|  |.........|
 
  |.----..--.|  |.........|
 
  |........|.--  |.........|
 
  |........|.--  |.........|
 
  |.---.-.....------------+|
 
  |.---.-.....------------+|
  |...|...-................|
+
  |...|...-.............@..|
 
  |.........----------------
 
  |.........----------------
 
  -----..|..|
 
  -----..|..|
 
     -------
 
     -------
 +
</div>
 +
 +
If you start from '''<''' or '''@''':
 +
'''A''' r
 +
 +
If you start from '''>'''
 +
'''C''' d
 +
'''F''' l
  
 
==Next level==
 
==Next level==
Line 154: Line 254:
 
  <nowiki>--------</nowiki>
 
  <nowiki>--------</nowiki>
 
|}
 
|}
 
+
{{nethack-360}}
 
[[Category:Sokoban|2a]]
 
[[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.