Difference between revisions of "Sokoban"

From NetHackWiki
Jump to navigation Jump to search
(15 new variants, not new levels (that made it sound like sokoban has 15 or 19 levels in slashem))
(Variants: copyedit and updates)
 
(93 intermediate revisions by 19 users not shown)
Line 1: Line 1:
{{wikipedia}}
 
 
{{level|Sokoban levels
 
{{level|Sokoban levels
 
  |branch=Sokoban
 
  |branch=Sokoban
Line 9: Line 8:
 
  |digwalls=no
 
  |digwalls=no
 
}}
 
}}
'''Sokoban''' (''warehouse keeper'' in Japanese) is a [[branch]] of the dungeon modeled on and named after a game where a character is navigated through a series of levels. The object is to move objects to cover goal squares. In the traditional game, the character must move only in the cardinal directions (north, south, east, and west) and push the objects from behind to move them. A player fails by getting objects stuck or boxing himself/herself in, as objects cannot be pulled, created, or destroyed.
 
  
Sokoban is reached by a second upstair in the Dungeons of Doom located on the level immediately below the Oracle level (and therefore between DL 6 and DL 10).
+
In ''[[NetHack]]'', '''Sokoban''' ("warehouse keeper" in Japanese) is a [[branch]] of the dungeon modeled on and named after a game where a character is navigated through a series of levels. The object is to move objects to cover goal squares.
  
In the case of [[NetHack]], the objects are [[boulder]]s and the goal squares are [[pit]]s or [[hole]]s, which block the way forward. There are four levels in each game and two versions of each, for a total of 8 different levels. Diagonal moves of the boulders are not allowed, although the player may move diagonally if there is space to do so, and may attack, fire or cast spells diagonally. At the end of the Sokoban dungeon branch is a [[treasure zoo]] guarding a [[bag of holding]] or [[amulet of reflection]] (equally likely chance) on a burnt [[Elbereth]] and a cursed [[scroll of scare monster]]. The levels are ascending in dungeon depth, i.e., the 2nd level is above the 1st etc. It is possible that the amulet of reflection will be cursed (with the same odds as any randomly generated amulet), but will still grant reflection. The bag of holding is always uncursed. Despite the cursed scroll of scare monster, some monsters may ignore this and pick up the amulet of reflection, so watch for this happening if the amulet is missing.
+
In the traditional ''Sokoban'' game, the character must move only in the cardinal directions (north, south, east, and west) and push the objects from behind to move them. Objects cannot be pulled, created, or destroyed, and a player must avoid failing the level by getting objects stuck or boxing themselves in.
  
NetHack Sokoban is complicated by the presence of [[monster]]s in the puzzles, so some concessions have been made. It is possible to create or destroy [[boulder]]s, and there is limited opportunity to move over boulders, but [[Luck]] penalties are assessed for each offense.
+
==Description==
 +
In the case of ''NetHack'', the objects are [[boulder]]s and the goal squares are [[pit]]s or [[hole]]s, which block the way forward. There are four levels in each game and two versions of each, for a total of 8 different levels. The levels are ascending in dungeon depth (i.e., the 2nd level is above the 1st etc); however, monster difficulty increases as if descending to lower dungeon levels.  
  
Adventurers who die in Sokoban will not leave [[bones]].
+
Sokoban in NetHack is further complicated by the presence of [[monster]]s in the puzzles, so some concessions have been made. While diagonal moves of the boulders are not allowed, although the player may move diagonally if there is space to do so, and may also attack, fire or cast spells diagonally. It is possible to fire or cast spells through boulders as well, with the exception of {{spell of|force bolt}} or a [[wand of striking]]; it is also possible to create or destroy boulders, and there is a limited possibility of moving over boulders, but [[Luck]] penalties are assessed for each offense.
  
All walls in Sokoban are undiggable and unphasable. The floor is undiggable only on the first level. All levels are no-teleport, and it is impossible (for the player only) to level-teleport between Sokoban levels.
+
At the end of the Sokoban dungeon branch is a [[treasure zoo]] guarding a [[bag of holding]] or [[amulet of reflection]], with an equal chance of each item.{{refsrc|dat/sokoban.des|530|version=NetHack 3.6.7}}{{refsrc|dat/sokoban.des|631|version=NetHack 3.6.7}}) The prize sits on a burnt [[Elbereth]] and a cursed [[scroll of scare monster]]. Both items follow the normal rules of generation for each - i.e., the amulet of reflection will have the same odds of being generated blessed, uncursed or cursed as any randomly generated amulet, while the bag of holding is always uncursed.{{refsrc|src/mkobj.c|892|version=NetHack 3.6.1}}{{refsrc|src/mkobj.c|939|version=NetHack 3.6.1}}
  
On each level, there is one randomly chosen ring, one randomly chosen wand, and four (stacks of) food items. Sokoban is an excellent place to stock up on comestibles.
+
If playing with text mode, you might want to change the [[Options#boulder|boulder symbol]] to {{lightgray|0}}.
  
Each level is fully mapped upon arrival. However, if you enter while [[hallucinating]], the boulders, traps, and other items will appear as you would normally perceive things while hallucinating.
+
{{upcoming|NetHack 3.7.0|Both prizes are no longer equally likely for each floor. Instead, floor 4a has a 75% chance for a bag of holding, and 4b has a 75% chance for an amulet of reflection.}}
  
== Levels ==
+
==Level descriptions==
The entrance to Sokoban (an upstairs [[staircase]]) is located between levels 6 and 10 inclusive in the [[Dungeons of Doom]], just below the [[Oracle]].
+
The entrance to Sokoban (an upstairs [[staircase]]) is located between levels 6 and 10 inclusive in the [[Dungeons of Doom]], one floor below the [[Oracle]]. Adventurers who die in Sokoban will not leave [[bones]]. All walls in Sokoban are undiggable and unphasable; the floor is undiggable only on the first level. All levels are no-teleport, and it is impossible for the player to level-teleport between Sokoban levels.
 +
 
 +
On each level, there is one random [[ring]], one random [[wand]], and four (stacks of) [[comestible]]s. Each level is fully mapped upon arrival.
 +
 
 +
{{upcoming|NetHack 3.7.0|Special levels, including Sokoban, may be flipped horizontally and/or vertically.}}
  
 
{|class="prettytable"
 
{|class="prettytable"
Line 268: Line 271:
  
 
==Sokoban and Luck==
 
==Sokoban and Luck==
It is possible to solve every Sokoban level just by moving boulders around in the normal fashion. However, there are some actions that are legal in NetHack but cheat the Sokoban mini-game in some way. Whenever you perform such an action, your [[Luck]] is penalized. The following actions incur penalties of -1 when done in Sokoban:
+
It is possible to solve every Sokoban level just by moving boulders around in the normal fashion. However, there are some actions that are legal in NetHack but cheat the Sokoban mini-game in some way. Whenever you perform such an action, your Luck is penalized, unless you have already filled in all of the original holes to complete the level. Assuming the level is still unsolved, the following actions incur penalties of -1 Luck when done in Sokoban:
  
*Jumping (to avoid the penalty, press escape when asked where)
+
*[[Jumping]]. (To avoid the penalty, press Escape when prompted where you want to jump.)
 
*Breaking a boulder.
 
*Breaking a boulder.
*Squeezing past a boulder (or walking over one, when polymorphed into a giant)
+
*Squeezing past a boulder (or walking over one, when [[polymorph]]ed into a giant).
*Casting stone-to-flesh on a boulder.
+
*Casting [[stone to flesh]] on a boulder.
 
*Polymorphing a boulder.
 
*Polymorphing a boulder.
*Reading a [[scroll of earth]].
+
*Reading a scroll of earth.
 
*Being pulled by a thrown iron ball.
 
*Being pulled by a thrown iron ball.
*Hurtling through the air due to Newton's 3rd Law. (i.e. throwing something while levitating)
+
*Hurtling through the air due to Newton's 3rd Law (i.e. throwing something while [[levitating]]).
  
Note that teleporting a boulder does ''not'' incur a luck penalty, but may move the boulder somewhere odd. Falling down a level onto a boulder, polymorphing a statue into a boulder (not the other way around), or bringing in a boulder as a [[polymorph]]ed [[giant]], do not entail a penalty, either.
+
{{upcoming|NetHack 3.7.0|Jumping, being pulled by a thrown iron ball, and hurtling no longer cause a Luck penalty (since they don't actually allow you to move diagonally).}}
  
In [[NetHack 3.6.0]] and later versions, performing any of these actions on a solved level (i.e., one where all traps are filled with boulders) does not incur a luck penalty.
+
The following actions do ''not'' incur a Luck penalty when done in Sokoban:
 +
 
 +
* Teleporting a boulder (though this may move the boulder somewhere odd).
 +
* Falling into a hole or pit.
 +
* Polymorphing a statue into a boulder.
 +
* Carrying in a boulder while in [[giant]] form, and then dropping it.
 +
* Digging your own pit or hole, or filling it with boulders.
  
 
==Strategy==
 
==Strategy==
The articles about the individual levels contain a full solution to all the levels. Some general strategy tips include:
+
The articles about the individual levels contain a full solution to all the levels; this section contains more general strategy tips.
  
*Puzzle
+
===Puzzle===
** Think ahead, the entire level is mapped and all the levels are solvable without 'cheating', barring some unfortunate monster generation.
+
* Think ahead. The entire level is mapped, and all the levels are solvable without "cheating", barring some unfortunate monster generation.
** If you want to try out something, push the boulders only in ways you can undo - never create a square of four boulders, or two neighbors against a wall.
+
* If you want to try out something, push the boulders only in ways you can undo—never create a square of four boulders, or two neighbors against a wall.
** Be careful, a typo may render a boulder immobile against the wall. Try to move diagonally or with the [[Travel|goto-key (underscore)]] whenever possible, as these commands will not push a boulder.
+
* Be careful; a typo may render a boulder immobile against the wall. Try to move diagonally or with the [[Travel|goto-key (underscore)]] whenever possible, as these commands will not push a boulder.
** If a pit is open, falling through it to the level below lets you get back to the stairs. This can be useful in certain situations where a boulder is pushed the wrong way.
+
* If a pit is open, falling through it to the level below lets you get back to the stairs. This can be useful in certain situations where a boulder is pushed the wrong way.
** [[Polymorphing]] into a creature with the [[phasing]] ability will not help. Instead, you get the message "The Sokoban walls resist your ability."
+
* [[Polymorph]]ing into a creature with the [[phasing]] ability will not help. Instead, you get the message "The Sokoban walls resist your ability."
** In [[SLASH'EM]], the [[doppelganger]] can [[liquid leap]] through the bars on the Sokoban levels, although one cannot traverse them by other means (e.g., as a snake).
+
* Remember, not all of the boulders have to be used, but also remember to keep enough to fill all the pits.
** Remember, not all of the boulders have to be used, but also remember to keep enough to fill all the pits.
+
* You can use a text editor or grid paper to try to work out the solutions before actually attempting them in-game.
** It's arguably [[cheating|degenerate]], but you can use a text editor or grid paper to try to work out the solutions before actually attempting them in-game.
+
 
*Monster-puzzle interaction
+
===Monster-puzzle interaction===
** Check whether there are monsters in front of the pits.
+
* Check whether there are monsters in front of the pits.
** Use a magic whistle for pets, or leave them behind one level, and visit their level every 74 turns or less to avoid them losing tameness points. Alternatively, known-cursed items can help keep pets out of the pit area.
+
* Use a magic whistle for pets, or leave them behind one level, and visit their level every 74 turns or less to avoid them losing tameness points. Alternatively, known-cursed items can help keep pets out of the pit area.
** Be aware of mimics imitating boulders. Unlike real boulders, mimics will not appear until they are in your line of sight, but a space containing a boulder may also contain a mimic mimicking a boulder, if that makes sense. You can move diagonally between mimicked boulders.
+
* Be aware of mimics imitating boulders. Unlike real boulders, mimics will not appear until they are in your line of sight, but a space containing a boulder may also contain a mimic mimicking a boulder, if that makes sense. You can move diagonally between mimicked boulders.
*Strategies for when a boulder got stuck
+
 
** If you must take a Luck penalty, do so as early as possible. Put away any [[gray stone]]s that might be [[luckstone]]s, unless you are sure that your natural Luck is positive. The sooner you take that Luck penalty, the more likely it will have timed out the next time you encounter a critical Luck-influenced event, such as needing to [[pray]].
+
{{upcoming|3.7.0|Displacement of peaceful monsters is now possible, making it much easier to move them out of the path that you plan to push boulders through.}}
** If you mistakenly moved a boulder between yourself and the stairs from the previous level, dig down to create a hole and fall through. (no penalty) Be sure to choose a safe place to dig. You may wish to use a spare boulder to fill the hole afterward.
+
 
** Destroy a boulder with a [[pick axe]], [[force bolt]], or [[wand of striking]] (count whether there are enough!) (luck penalty!)
+
===Stuck boulders===
** Drop everything in your inventory (including armor) and squeeze into the same square as a boulder. This will help you separate boulders stuck together, but not a boulder stuck against a wall. This way, you can also kill monsters trapped between boulders and holes which block the way. (luck penalty!)
+
* If you must take a Luck penalty, do so as early as possible. Put away any [[gray stone]]s that might be [[luckstone]]s, unless you are sure that your natural Luck is positive. The sooner you take that Luck penalty, the more likely it will have timed out the next time you encounter a critical Luck-influenced event, such as needing to [[pray]].
** [[Polymorph]] into a [[giant]] and step over boulders. You still cannot lift them, however; neither can monsters (pets). (luck penalty!)
+
* If you mistakenly moved a boulder between yourself and the stairs from the previous level, dig down to create a hole and fall through (no penalty). Be sure to choose a safe place to dig. You may wish to use a spare boulder to fill the hole afterward.
** Summon more boulders with a [[scroll of earth]], which can be found on the 1st sokoban level. Note that a non-cursed scroll will summon multiple boulders, possibly making the situation worse. (luck penalty!)
+
* Destroy a boulder with a [[pick-axe]], {{spell of|force bolt}}, or [[wand of striking]] (Luck penalty). Be careful not to destroy too many boulders.
** Dropping a wand of striking so that a monster picks it up, and positioning yourself between that monster and the boulder you want destroyed, can sometimes help you get rid of stuck boulders while avoiding the luck penalty.
+
* Drop everything in your inventory (including armor) and squeeze into the same square as a boulder. This will help you separate boulders stuck together, but not a boulder stuck against a wall. This way, you can also kill monsters trapped between boulders and holes which block the way (Luck penalty).
** If the boulder is stuck because of a monster behind it, you can shoot [[missile]]s past the boulder to kill the monster. Note, however, that [[unicorn]]s can be generated in Sokoban, and you risk a large [[luck]] penalty for killing a coaligned one. If you determine by whatever means that the unicorn behind a boulder is coaligned, you can toss gems to it to somewhat compensate for the inevitable luck hit. Sokoban is no-teleport, so the unicorn cannot leave of its own accord. Also note that you cannot kill unicorns with rocks, an easily accessible missile weapon. Other peaceful monsters may also be generated (but peaceful humans cannot). [[Force bolt]]s and [[wand of striking|wands of striking]] will destroy boulders, but other methods are safe. [[Pacifist]]s may want to strip naked and [[displace]] their [[pet]] onto the [[boulder]]. If you have a magic whistle, you can stand next to the boulder and apply the whistle until your pet appears on the other side of the boulder. Let your pet kill the obstructing monster and then use the whistle to get them out of the way.
+
* [[Polymorph]] into a [[giant]] and step over boulders (Luck penalty). You still cannot lift them, however; neither can monsters.
** Hit the boulder with a [[wand of teleport]] after you finish as many other boulders as possible. While the new location may not be better than the old one, it often can't be much worse, and you avoid any luck penalty.
+
* Summon more boulders with a [[scroll of earth]] (Luck penalty). Two scrolls can be found on the first Sokoban level. A non-cursed scroll will summon multiple boulders, possibly making the situation worse.
*Other
+
* Drop a wand of striking so that a monster picks it up, and position yourself between that monster and the boulder you want destroyed, in hopes that the monster will destroy the boulder for you; this incurs no Luck penalty.
** Upon completion, check under unmoved boulders for useful items.
+
* If the boulder is stuck because of a monster behind it, shoot [[projectile]]s or spells past the boulder to kill the monster. Be sure the monster in question is not peaceful - note that no peaceful humans can be generated in Sokoban.
** If you're pining for a Bag of Holding and at the upper limit of carrying capacity, don't pick up all that food sitting around--you can eat it off the floor when you need to. On the other hand, grab every scroll and wand you see so a monster can't pick them up and use them to your disadvantage.
+
** An [[aklys]] is the ideal choice, as it returns to your hand for repeated throwing, and can easily be obtained from the [[gnome (monster)|gnomes]] in the [[Gnomish Mines|Mines]]. Note that there's a 1% chance of it failing to return, so have a spare or some other solution available.
 +
** If the monster is a coaligned [[unicorn]], you risk a large Luck penalty for killing it; if you determine by whatever means that the monster is a coaligned unicorn, you can toss gems to it to compensate for the inevitable Luck hit. Sokoban is no-teleport, so the unicorn cannot leave of its own accord. Also, you cannot kill unicorns with rocks, an easily accessible missile weapon.
 +
** Force bolts and the wand of striking will destroy boulders, but other methods are safe. [[Pacifist]]s may want to strip naked and [[displace]] their [[pet]] onto the [[boulder]]. If you have a [[magic whistle]], you can stand next to the boulder and apply the whistle until your pet appears on the other side of the boulder. Let your pet kill the obstructing monster and then use the whistle to get them out of the way.
 +
* Hit the boulder with a [[wand of teleport]] (no Luck penalty) after you finish as many other boulders as possible. While the new location may not be better than the old one, it often can't be much worse.
 +
 
 +
===Items===
 +
* Upon completion, check under unmoved boulders for useful items.
 +
* The first level contains two guaranteed scrolls of earth; remember to #[[name]] them as such as soon as you find them. Some monsters will read scrolls of earth, especially [[nymph]]s that can pluck the scroll from your inventory; however, most monsters only have a {{frac|10}} chance of doing so unless they have a hard helm on.
 +
* Sokoban is an excellent place to stock up on comestibles and other loot. If you are dealing with [[encumbrance]] issues or otherwise trying to manage your inventory, simply leave the food items on the floor and eat them only when you need to. On the other hand, grab every scroll and wand you see; at the least, doing so means a monster will not be able to pick them up and use them to your disadvantage.
 
** Items can sometimes be generated over holes. Pushing a boulder over the hole will bury the item. If you wish to retrieve the item instead, you may:
 
** Items can sometimes be generated over holes. Pushing a boulder over the hole will bury the item. If you wish to retrieve the item instead, you may:
*** Kick the item away; it will fall down another hole and appear somewhere on the level below. This will destroy the item if it is fragile, and on the top level will wake the monsters in the zoo.
+
*** Kick the item away; it will usually fall down another hole and appear somewhere on the level below. This will destroy the item if it is fragile, and on the top level will wake the monsters in the zoo.
 
*** Repeatedly step on the space containing the item; it will eventually fall down with you, although not necessarily onto your space. This will never break the item.
 
*** Repeatedly step on the space containing the item; it will eventually fall down with you, although not necessarily onto your space. This will never break the item.
*** Turn on [[autopickup]] and step on the space containing the item; you will pick it up before you fall. Beware of [[loadstone]]s, both over the hole and on the levels below. You can use [[pickup_types]] and/or [[autopickup exception]] to limit yourself to only picking up the type of item you are trying to grab.
+
*** Turn on [[autopickup]] and step on the space containing the item; you will pick it up before you fall. Beware of [[loadstone]]s, both over the hole and on the levels below. You can use [[pickup_types]] or [[autopickup exception]] to limit yourself to only picking up the type of item you are trying to grab.
*** Use a grappling hook
+
*** Use a grappling hook.
**Monsters can attack you with the guaranteed [[wand]] if applicable. If you have not already found it, be careful clearing the [[zoo]], e.g. send your [[pet]] in without entering line of fire.
+
** Monsters can attack you with the guaranteed [[wand]] if applicable. If you have not already found it, be careful clearing the [[zoo]], e.g. send your [[pet]] in without entering line of fire.
** If you reach the end of level 4b without finding the amulet, it is probable that some {{white|@}} picked it up. Be sure to claim the amulet immediately after killing said monster, since you don't want your new amulet of reflection to become a snack for a [[rust monster]] or [[rock mole]]. Nothing will ever pick up the bag of holding, however.
+
* If you reach the end of the branch and do not see the prize, it is probable that some {{white|@}} found the amulet of reflection and picked it up. Be sure to claim the amulet immediately after killing said monster, since you don't want your new amulet of reflection to become a snack for a [[rust monster]] or [[rock mole]]. Nothing will ever pick up the bag of holding, however.
  
The first level of sokoban, once completed, is often used as a [[stash]] level, for several reasons:
+
===Stash location===
 +
The first level of Sokoban, once completed, is often used as a [[stash]] level, for several reasons:
 
* It is one of the locations which the [[Eye of the Aethiopica]] can teleport you to instantly.
 
* It is one of the locations which the [[Eye of the Aethiopica]] can teleport you to instantly.
* It is conveniently located, one level from the [[Oracle]], 2-8 levels from the [[Gnomish Mines]], and located in the top half of the [[Dungeons of Doom]], where shops and altars are likely.
+
* It is conveniently located one level from the [[Oracle]], 2-8 levels from the [[Gnomish Mines]], and located in the top half of the [[Dungeons of Doom]], where shops and altars are likely.
 
* It is relatively free of monsters, and a spawning ground for baby monsters rather than their larger versions.
 
* It is relatively free of monsters, and a spawning ground for baby monsters rather than their larger versions.
 
* There are spare boulders which can be used to further block off a [[safe area]].
 
* There are spare boulders which can be used to further block off a [[safe area]].
Line 328: Line 346:
 
* If there is an [[altar]] nearby, Sokoban can be used to control your [[Luck]] and avoid [[crowning]] during altar farming.
 
* If there is an [[altar]] nearby, Sokoban can be used to control your [[Luck]] and avoid [[crowning]] during altar farming.
  
The first level also contains two [[scroll of earth|scrolls of earth]]. Remember to #[[name]] them as such as soon as you find them. Note also that some monsters will read scrolls of earth. In particular, you may want to keep them in a container if there are [[nymph]]s around, as they can pluck the scroll from your inventory and then read it.
+
===Out-of-game practice===
 +
[http://github.com/hackedhead/nhss nhss] (originally by IanK of [http://iank.org/ iank.org]) is a C/terminal tool that sets up a Nethack-like environment (basic movement and boulder pushing only) that can be used to figure a level out before actually playing it, thus reducing the chances of rendering a level unsolvable. It can also record sessions and play them back step by step.
 +
 
 +
Unaffiliated but related to nhss, [http://www.electricmonk.nl/Miscellaneous/Nethack Nethack's Sokoban levels for various Sokoban implementations] (XSok, Sokoban++, YSokoban, Universal Sokoban format and Games 4 Brains Sokoban format) which you can use to practice the levels in other Sokoban games.
  
==nhss==
+
Even more unaffiliated with any of the above, [http://joshua.tejat.net/private/public/nh-soko.zip Nethack's Sokoban levels] for [http://www.nongnu.org/enigma/ Enigma].
[http://github.com/hackedhead/nhss nhss] (originally by IanK of [http://iank.org/ iank.org]) is a C/terminal tool that sets up a nethack-like environment (basic movement and boulder pushing only) that can be used to figure a level out before actually playing it, thus reducing the chances of rendering a level unsolvable. It can also record sessions and play them back step by step.
 
  
An unaffiliated online version, also called NHSS, is available [http://nhss.twonegatives.com/ here].
+
[https://play.google.com/store/apps/details?id=com.tbd.NetHack The Nethack Android port by gurr] with using [[Wizard mode]] can be done for practising on mobile. Use the [[Wizard_mode#Commands|level teleport option]], go to the entry to Sokoban, and use the recreate map option if the player needs to try again.  
  
Unaffiliated but related to nhss, [http://www.electricmonk.nl/Miscellaneous/Nethack Nethack's Sokoban levels for various Sokoban implementations] (XSok, Sokoban++, YSokoban, Universal Sokoban format and Games 4 Brains Sokoban format) which you can use to practice the levels in other Sokoban games.
+
Online web app links:
 +
*[http://nhss.twonegatives.com/ An unaffiliated version of nhss], also called NHSS
 +
*[https://nethackathon.org/annotate Annotate] - by disperse, meant as a companion web app for Nethack, allows Sokoboan practice among other things. It allows you flip the levels for practice with the level flipping introduced in [[NetHack 3.7.0]], and records user solutions.
 +
*[https://dispersemedia.com/sokoban/ An alternative domain link] to just the standalone Sokoban app by disperse.
 +
 
 +
==History==
 +
Sokoban first appears in [[NetHack 3.3.0]]. From this version to [[NetHack 3.4.3]], including some variants based on these versions, Luck penalties would apply for [[#Sokoban and Luck|most of the aforementioned actions]] minus jumping, even if the level was solved. In addition, the prize for the last Sokoban level did not have a cursed scroll of scare monster present, and depended on which final level map was generated: Sokoban Level 4a would always have a bag of holding, and Sokoban Level 4b would always have an amulet of reflection.
 +
 
 +
As of NetHack 3.6.0, the cursed scroll of scare monster appears on the prize square, and both final levels have a 50% chance of the prize being either the bag of holding or the amulet of reflection.
 +
 
 +
==Origin==
 +
{{wikipedia}}
 +
''Sokoban'' is a video game that was created in 1981 by Hiroyuki Imabayashi, with the first commercial release published in December 1982 by Thinking Rabbit, a software house based in Takarazuka, Japan. Sokoban was a hit in Japan, where it sold more than 400,000 copies before being released in the United States in 1988, where it was published by Spectrum HoloByte for the Commodore 64, IBM PC compatibles, Amiga, and Apple II as Soko-Ban.
 +
 
 +
The presence of three doors in the treasure zoo with a prize behind one of them, is possibly a reference to the [[wikipedia:Monty Hall Problem|Monty Hall Problem]].
 +
 
 +
==Variants==
 +
Most variants of ''NetHack'' attempt to improve upon the Sokoban experience in some form, on top of often adding new Sokoban levels:
  
Even more unaffiliated with any of the above, [http://joshua.tejat.net/private/public/nh-soko.zip Nethack's Sokoban levels] for [http://www.nongnu.org/enigma/ Enigma].
+
* Some variants, such as [[SporkHack]] and [[UnNetHack]], apply the [https://bilious.alt.org/?254 level-flipping patch] to Sokoban.
 +
* Variants that contain [[magic chest]]s place one at the beginning or end of Sokoban to aid players who use it as a stash level.
  
==SLASH'EM==
+
===SLASH'EM===
 
{{main|Sokoban (SLASH'EM)}}
 
{{main|Sokoban (SLASH'EM)}}
In [[SLASH'EM]], there are 15 new level variants, but otherwise Sokoban is the same as Vanilla, with a 50% chance of either a [[bag of holding]] or an [[amulet of reflection]] at the end. Given that ordinary [[sack]]s and [[oilskin sack]]s can be upgraded to a bag of holding in SLASH'EM, the latter is more desirable even than in Vanilla.
+
In [[SLASH'EM]], the rules are the same as in [[NetHack 3.4.3]], with 15 new possible levels - the final level has the usual {{frac|2}} chance of either a bag of holding or an amulet of reflection at the end, dependent on the level generated. Given that ordinary [[sack]]s and [[oilskin sack]]s can be upgraded to a bag of holding in SLASH'EM, the amulet is typically the more desirable prize.
  
Note that several public server versions of SLASH'EM include a patch adding the [[acid hound]], which corrodes the floor to create pits when killed, and can be very troublesome if they appear in Sokoban, as they may make solving the level without using a [[scroll of earth]] impossible.
+
Some of the new Sokoban levels have [[iron bars]] - a [[Doppelganger (starting race)|doppelganger]] character can [[liquid leap]] through them, though they will still incur a Luck penalty, and the bars cannot be crossed by any other means (e.g., by polyself into a small or slithy monster such as a [[snake]]).
  
==UnNetHack==
+
Several public server versions of SLASH'EM include a patch that adds the [[acid hound]], which corrodes the floor to create pits when killed; these can be very troublesome if they appear in Sokoban, as they may make solving the level impossible without using a scroll of earth.
 +
 
 +
===NetHack brass===
 +
[[NetHack brass]] does not change or add any layouts for Sokoban levels, but instead has a choice between the amulet of reflection, a [[cloak of magic resistance]], and a bag of holding as the prize item. All monsters will avoid stepping on or touching the items, preventing abuse via using pets to retrieve unchosen prizes.
 +
 
 +
Non-[[artifact]] items that provide [[magic resistance]] or [[reflection]] can wear out and disintegrate from resisting or reflecting enough times, making it a good idea to carry a spare source. The bag remains a good choice if you already have "permanent" and/or redundant options for both properties.
 +
 
 +
===GruntHack===
 +
{{main|Sokoban (GruntHack)}}
 +
[[GruntHack]] adds some new Sokoban levels, and offers a choice between the amulet of reflection, a cloak of magic resistance, and a bag of holding as the prize item, similar to NetHack brass. If one of the prize closet doors is opened or kicked down, the others will seal; a means of identifying the closet containing your item of choice, such as a [[potion of object detection]], is recommended.<!--Requesting wiztest to see if force bolts/digging destroys them.-->
 +
 
 +
GruntHack also implements player displacement of peaceful monsters, making herding them out of the path of boulders considerably easier.
 +
 
 +
===SporkHack===
 +
In [[SporkHack]], Sokoban is mostly unchanged from NetHack 3.4.3, though each final level has an equal probability of the prize being an amulet of reflection or a bag of holding. Sporkhack also has displacement for peaceful monsters.
 +
 
 +
===UnNetHack===
 
{{main|Sokoban (UnNetHack)}}
 
{{main|Sokoban (UnNetHack)}}
[[UnNetHack]] introduces Sokoban levels not available in Vanilla; additionally, any level can be mirrored.
+
UnNetHack introduces new Sokoban levels as well, and additionally shortens the branch to three levels&mdash;the vanilla maps for levels one and two may all be used to create level one.
 +
 
 +
From UnNetHack 4.1.1 onwards, cheating in Sokoban does not incur a Luck penalty. Instead, solving Sokoban without cheating is tracked as a new [[conduct]]. However, to compensate, the scrolls of earth typically found on the first level are not guaranteed. Since UnNetHack 6, solving Sokoban without cheating increases your Luck by 1 point.
  
Any UnNetHack Sokoban has only three levels -- the [[Vanilla]] maps for levels one and two may all be used to create level one.
+
The final level always has a [[bag of holding]], a cloak of magic resistance or [[Cloak of displacement|displacement, and an amulet of reflection, {{of|amulet|life saving|or=1|flying}}. When one of these objects is picked up, the other two are destroyed. If any of these items are in direct line of sight, they are temporarily and partially identified, allowing for a more informed decision.
  
From UnNetHack 4.1.1 onwards and on the un.nethack.nu public server, cheating in Sokoban does not incur a [[Luck]] penalty. Instead, solving Sokoban without cheating is tracked as a new conduct. However to compensate, the scrolls of earth typically found on the first level are removed.
+
===DynaHack===
 +
{{main|Sokoban (DynaHack)}}
 +
Sokoban in [[DynaHack]] has three floors and uses maps from both UnNetHack and SLASH'EM, among other variants. The random rings and wands that are normally scattered in Sokoban are instead placed within a [[sack]] on Sokoban's final level, with the standard prizes moved to [[Mines' End]], making the Sokoban branch more optional.
  
The final level always has a [[bag of holding]], a cloak of [[cloak of magic resistance|magic resistance]] or [[cloak of displacement|displacement]] and an amulet of [[amulet of reflection|reflection]], [[amulet of life saving|life saving]] or [[amulet of flying|flying]]. When one of these objects is picked up, the other two are destroyed.
+
The prize selection is derived from earlier versions of UnNetHack: the choices are a [[bag of holding]], a cloak of magic resistance or [[Cloak of displacement|displacement]], and an amulet of reflection, {{of|amulet|life saving|or=1|flying}}.  
  
==NetHack Fourk==
+
===NetHack Fourk===
 
{{main|Sokoban (NetHack Fourk)}}
 
{{main|Sokoban (NetHack Fourk)}}
NetHack Fourk introduces a number of additional Sokoban levels. Player feedback so far suggests that these are on average easier than the vanilla ones. Additionally, the luck penalty does not apply if you are carrying a non-cursed luckstone and can also be dodged via hallucination, at the cost of having a hallucinatory boulder drop on your head (which in some cases can even be useful).
+
Fourk gives a name to each Sokoban level, and contains quite a few quality-of-life changes which are non-exhaustively listed below:
  
==SporkHack==
+
* If a peaceful monster would spawn in Sokoban, it is generated hostile instead. Thus, it is safer to kill unknown monsters that are blocking boulder movements.
[[SporkHack]] can mirror the levels vertically and/or horizontally, but does not add new levels.
+
* Sokoban luck penalties can only lower luck to a minimum of -3, and .
 +
* Luck penalties do not apply when you have a non-cursed luckstone.
 +
* Luck penalties do not apply when you are hallucinating, but a boulder will hit you for 1d12 damage.
 +
* There are a number of additional Sokoban levels. Player feedback suggests that these are on average easier than the vanilla levels.
 +
* Two of the new final Sokoban levels have a sack which contains rings of {{= of|teleport control|and=1|polymorph control}} and a third random ring. If you already have either of those rings, you might receive other jewellery.
 +
* In the other final levels endings, if you already have reflection, the Soko prize will not be an amulet of reflection; if you already have a bag of holding, the prize is likely to be an amulet of reflection. In either case, or if you already have both items, the prize might be a simple [[oilskin sack]].
 +
* To help pacifists, completing Sokoban without cheating grants one [[experience level]].
 +
* To make Sokoban more skippable, [[Perseus]]'s statue always contains the [[shield of reflection]] and the sack.
  
==Trivia==
+
===FIQHack===
The presence of three doors in the treasure zoo, with a prize behind one of them, is probably a reference to the [https://en.wikipedia.org/wiki/Monty_Hall_problem Monty Hall Problem].
+
In [[FIQHack]], all pits on the first level of Sokoban are converted to holes, which will drop you back into the main dungeon. Additionally, if a peaceful monster would spawn in Sokoban, it is generated hostile instead; unicorns are also excluded from spawning in Sokoban to avoid creating scenarios where you must risk a major Luck penalty, so you can safely kill unknown monsters blocking your boulder movements.
  
== Encyclopedia entry ==
+
===xNetHack===
 +
[[xNetHack]] uses the same maps and layout for Sokoban as vanilla ''NetHack'', with the removal of flipped Sokoban levels that were introduced in the upcoming NetHack 3.7.0.
  
 +
===SpliceHack===
 +
[[SpliceHack]] adds a few new levels from other variants; for those that have an equal number of pits/holes and boulders, a hole or pit is removed in order to create a spare boulder and make them less difficult. SpliceHack also has different versions of levels 2a and 2b that replace the boulders with explosive monsters such as [[gas spore]]s and [[flaming sphere]]s.
 +
 +
===EvilHack===
 +
{{main|Sokoban (EvilHack)}}
 +
In [[EvilHack]], several levels from SLASH'EM, GruntHack, UnNetHack, and other variants are added.
 +
 +
On the final level, all three closets in the Sokoban zoo have a prize behind each door, but you will not be able to tell exactly what that prize is until you pick it up - you can learn the object type of the prize behind each door via some form of item detection, e.g. [[quaff]]ing a potion of object detection or reading a non-cursed [[scroll of magic detection]]. Like GruntHack, the doors are made impenetrable to prevent taking more than one prize: once one door is opened, the other two doors disappear and are replaced with a sealed wall; despite this, the doors can still be broken, e.g. by a giant. When you pick up one of the prizes, the other two will magically disappear regardless of whether or not the doors were opened.
 +
 +
There are two different items of each type that can spawn behind each door, with a 50% chance for each item. Those items are:
 +
 +
* Sokoban prize armor &ndash; [[gauntlets of protection]] or a [[helm of speed]]
 +
* Sokoban prize amulet &ndash; an amulet of reflection or an [[amulet of magic resistance]]
 +
* Sokoban prize tool &ndash; a bag of holding or a [[magic marker]]
 +
 +
Since magic markers do not generate randomly, Sokoban is potentially one of a few locations in the game where a marker can be found.
 +
 +
===GnollHack===
 +
In [[GnollHack]], Sokoban is largely the same as in NetHack 3.6.2 except for the top floor: there is an additional room accessible from the zoo where a mage resides. He sells items, teaches spells and provides other services (such as performing incantations) for a fee.
 +
 +
===Hack'EM===
 +
{{main|Sokoban (Hack'EM)}}
 +
[[Hack'EM]] imports several levels from SLASH'EM, SlashTHEM, Fourk and other variants, and all levels have been given Fourk-style names to make them easier to reference.
 +
 +
==Encyclopedia entry==
 
{{encyclopedia|
 
{{encyclopedia|
Sokoban (Japanese for "warehouse person") is a puzzle-type
+
Sokoban (Japanese for "warehouse keeper") is a transport puzzle
game where the player must push around treasure to a goal
+
in which the player pushes boxes around a maze, viewed from
area. It apparently won first prize in a Japanese programming
+
above, and tries to put them in designated locations.  Only one
contest.
+
box may be pushed at a time, not two, and boxes cannot be pulled.
|[ Xsokoban web site ]
+
As the puzzle would be extremely difficult to create physically,
 +
it is usually implemented as a video game.
 +
 
 +
Sokoban was created in 1982 by Hiroyuki Imabayashi, and was
 +
published by Thinking Rabbit, a software house based in
 +
Takarazuka, Japan.  Thinking Rabbit also released three sequels:
 +
Boxxle, Sokoban Perfect and Sokoban Revenge.
 +
|[ Wikipedia, the free encyclopedia ]
 
}}
 
}}
  
 
==External links==
 
==External links==
* [http://www.erimsever.com/sokoban.htm Sokoban Erim - a comprehensive collection of Sokoban resources]
+
* [https://web.archive.org/web/20200131120459/http://www.erimsever.com:80/sokoban.htm Sokoban Erim via Wayback Archive - a comprehensive collection of Sokoban resources]
  
{{nethack-360|offset=3}}
+
==References==
{{slashem-7E7|offset=2}}
+
<references/>
{{variant-343|offset=1}}
+
{{nethack-364|offset=1}}
 
{{featured}}
 
{{featured}}
 
[[Category:Sokoban| ]]
 
[[Category:Sokoban| ]]

Latest revision as of 15:47, 22 April 2024

Sokoban levels
Location Level 2–9 of
Sokoban
Bones No
Mappable Yes
Teleportable No
Diggable floor all but bottom level
Diggable walls No

In NetHack, Sokoban ("warehouse keeper" in Japanese) is a branch of the dungeon modeled on and named after a game where a character is navigated through a series of levels. The object is to move objects to cover goal squares.

In the traditional Sokoban game, the character must move only in the cardinal directions (north, south, east, and west) and push the objects from behind to move them. Objects cannot be pulled, created, or destroyed, and a player must avoid failing the level by getting objects stuck or boxing themselves in.

Description

In the case of NetHack, the objects are boulders and the goal squares are pits or holes, which block the way forward. There are four levels in each game and two versions of each, for a total of 8 different levels. The levels are ascending in dungeon depth (i.e., the 2nd level is above the 1st etc); however, monster difficulty increases as if descending to lower dungeon levels.

Sokoban in NetHack is further complicated by the presence of monsters in the puzzles, so some concessions have been made. While diagonal moves of the boulders are not allowed, although the player may move diagonally if there is space to do so, and may also attack, fire or cast spells diagonally. It is possible to fire or cast spells through boulders as well, with the exception of force bolt or a wand of striking; it is also possible to create or destroy boulders, and there is a limited possibility of moving over boulders, but Luck penalties are assessed for each offense.

At the end of the Sokoban dungeon branch is a treasure zoo guarding a bag of holding or amulet of reflection, with an equal chance of each item.[1][2]) The prize sits on a burnt Elbereth and a cursed scroll of scare monster. Both items follow the normal rules of generation for each - i.e., the amulet of reflection will have the same odds of being generated blessed, uncursed or cursed as any randomly generated amulet, while the bag of holding is always uncursed.[3][4]

If playing with text mode, you might want to change the boulder symbol to 0.

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

Both prizes are no longer equally likely for each floor. Instead, floor 4a has a 75% chance for a bag of holding, and 4b has a 75% chance for an amulet of reflection.

Level descriptions

The entrance to Sokoban (an upstairs staircase) is located between levels 6 and 10 inclusive in the Dungeons of Doom, one floor below the Oracle. Adventurers who die in Sokoban will not leave bones. All walls in Sokoban are undiggable and unphasable; the floor is undiggable only on the first level. All levels are no-teleport, and it is impossible for the player to level-teleport between Sokoban levels.

On each level, there is one random ring, one random wand, and four (stacks of) comestibles. Each level is fully mapped upon arrival.

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

Special levels, including Sokoban, may be flipped horizontally and/or vertically.
a b
1 Sokoban Level 1a
-------- ------
|<|>...---....|
|^|-.00....0..|
|^||..00|.0.0.|
|^||....|.....|
|^|------0----|
|^|    |......|
|^------......|
|..^^^^0000...|
|??-----......|
----   --------
Sokoban Level 1b
 ------  ----- 
 |....|  |...| 
 |.0..----.0.| 
 |.0......0..| 
 |..--->---0.| 
 |---------.---
 |..^^^<|.....|
 |..----|0....|
 --^|   |.0...|
  |^-----.0...|
  |..^^^^0.0..|
  |??----------
  ----         
2 Sokoban Level 2a
  ----          -----------
 --.>--------   |.........|
 |..........|   |.........|
 |.0-----0-.|   |.........|
 |..|...|.0.|   |....<....|
 |.0.0....0-|   |.........|
 |.0..0..|..|   |.........|
 |.----0.--.|   |.........|
 |..0...0.|.--  |.........|
 |.---0-...0.------------+|
 |...|..0-.0.^^^^^^^^^^^^.|
 |..0......----------------
 -----..|..|               
     -------               
Sokoban Level 2b
 -----------       -----------
 |....|....---     |.........|
 |..00|00...>|     |.........|
 |.....0...---     |.........|
 |....|....|       |....<....|
 |-.---------      |.........|
 |..0.|.....|      |.........|
 |.00.|0.0.0|      |.........|
 |..0.....0.|      |.........|
 |.000|0..0.----------------+|
 |....|..0.0.^^^^^^^^^^^^^^^.|
 -----------------------------
3 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....^^^^^^^^^^.|
 |...|.>-------------
 --------            
4 Sokoban Level 4a
 --------------------------
 |>......^^^^^^^^^^^^^^^^.|
 |.......----------------.|
 -------.------         |.|
  |...........|         |.|
  |.0.0.0.0.0.|         |.|
 --------.----|         |.|
 |...0.0..0.0.|         |.|
 |...0........|         |.|
 -----.--------   ------|.|
  |..0.0.0...|  --|.....|.|
  |.....0....|  |.+.....|.|
  |.0.0...0.--  |-|.....|.|
 -------.----   |.+.....+.|
 |..0.....|     |-|.....|--
 |........|     |.+.....|  
 |...------     --|.....|  
 -----            -------  
Sokoban Level 4b
   ------------------------
   |..^^^^^^^^^^^^^^^^^^..|
   |..-------------------.|
 ----.|    -----        |.|
 |..|0--  --...|        |.|
 |.....|--|.0..|        |.|
 |.00..|..|..0.|        |.|
 --..00|...00.--        |.|
  |0..0...|0..|   ------|.|
  |.00.|..|..0| --|.....|.|
  |.0.0---|.0.| |.+.....|.|
  |.......|..-- |-|.....|.|
  ----.0..|.--  |.+.....+.|
     ---.--.|   |-|.....|--
      |.0...|   |.+.....|  
      |>.|..|   --|.....|  
      -------     -------  

Sokoban and Luck

It is possible to solve every Sokoban level just by moving boulders around in the normal fashion. However, there are some actions that are legal in NetHack but cheat the Sokoban mini-game in some way. Whenever you perform such an action, your Luck is penalized, unless you have already filled in all of the original holes to complete the level. Assuming the level is still unsolved, the following actions incur penalties of -1 Luck when done in Sokoban:

  • Jumping. (To avoid the penalty, press Escape when prompted where you want to jump.)
  • Breaking a boulder.
  • Squeezing past a boulder (or walking over one, when polymorphed into a giant).
  • Casting stone to flesh on a boulder.
  • Polymorphing a boulder.
  • Reading a scroll of earth.
  • Being pulled by a thrown iron ball.
  • Hurtling through the air due to Newton's 3rd Law (i.e. throwing something while levitating).

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

Jumping, being pulled by a thrown iron ball, and hurtling no longer cause a Luck penalty (since they don't actually allow you to move diagonally).

The following actions do not incur a Luck penalty when done in Sokoban:

  • Teleporting a boulder (though this may move the boulder somewhere odd).
  • Falling into a hole or pit.
  • Polymorphing a statue into a boulder.
  • Carrying in a boulder while in giant form, and then dropping it.
  • Digging your own pit or hole, or filling it with boulders.

Strategy

The articles about the individual levels contain a full solution to all the levels; this section contains more general strategy tips.

Puzzle

  • Think ahead. The entire level is mapped, and all the levels are solvable without "cheating", barring some unfortunate monster generation.
  • If you want to try out something, push the boulders only in ways you can undo—never create a square of four boulders, or two neighbors against a wall.
  • Be careful; a typo may render a boulder immobile against the wall. Try to move diagonally or with the goto-key (underscore) whenever possible, as these commands will not push a boulder.
  • If a pit is open, falling through it to the level below lets you get back to the stairs. This can be useful in certain situations where a boulder is pushed the wrong way.
  • Polymorphing into a creature with the phasing ability will not help. Instead, you get the message "The Sokoban walls resist your ability."
  • Remember, not all of the boulders have to be used, but also remember to keep enough to fill all the pits.
  • You can use a text editor or grid paper to try to work out the solutions before actually attempting them in-game.

Monster-puzzle interaction

  • Check whether there are monsters in front of the pits.
  • Use a magic whistle for pets, or leave them behind one level, and visit their level every 74 turns or less to avoid them losing tameness points. Alternatively, known-cursed items can help keep pets out of the pit area.
  • Be aware of mimics imitating boulders. Unlike real boulders, mimics will not appear until they are in your line of sight, but a space containing a boulder may also contain a mimic mimicking a boulder, if that makes sense. You can move diagonally between mimicked 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.

Displacement of peaceful monsters is now possible, making it much easier to move them out of the path that you plan to push boulders through.

Stuck boulders

  • If you must take a Luck penalty, do so as early as possible. Put away any gray stones that might be luckstones, unless you are sure that your natural Luck is positive. The sooner you take that Luck penalty, the more likely it will have timed out the next time you encounter a critical Luck-influenced event, such as needing to pray.
  • If you mistakenly moved a boulder between yourself and the stairs from the previous level, dig down to create a hole and fall through (no penalty). Be sure to choose a safe place to dig. You may wish to use a spare boulder to fill the hole afterward.
  • Destroy a boulder with a pick-axe, force bolt, or wand of striking (Luck penalty). Be careful not to destroy too many boulders.
  • Drop everything in your inventory (including armor) and squeeze into the same square as a boulder. This will help you separate boulders stuck together, but not a boulder stuck against a wall. This way, you can also kill monsters trapped between boulders and holes which block the way (Luck penalty).
  • Polymorph into a giant and step over boulders (Luck penalty). You still cannot lift them, however; neither can monsters.
  • Summon more boulders with a scroll of earth (Luck penalty). Two scrolls can be found on the first Sokoban level. A non-cursed scroll will summon multiple boulders, possibly making the situation worse.
  • Drop a wand of striking so that a monster picks it up, and position yourself between that monster and the boulder you want destroyed, in hopes that the monster will destroy the boulder for you; this incurs no Luck penalty.
  • If the boulder is stuck because of a monster behind it, shoot projectiles or spells past the boulder to kill the monster. Be sure the monster in question is not peaceful - note that no peaceful humans can be generated in Sokoban.
    • An aklys is the ideal choice, as it returns to your hand for repeated throwing, and can easily be obtained from the gnomes in the Mines. Note that there's a 1% chance of it failing to return, so have a spare or some other solution available.
    • If the monster is a coaligned unicorn, you risk a large Luck penalty for killing it; if you determine by whatever means that the monster is a coaligned unicorn, you can toss gems to it to compensate for the inevitable Luck hit. Sokoban is no-teleport, so the unicorn cannot leave of its own accord. Also, you cannot kill unicorns with rocks, an easily accessible missile weapon.
    • Force bolts and the wand of striking will destroy boulders, but other methods are safe. Pacifists may want to strip naked and displace their pet onto the boulder. If you have a magic whistle, you can stand next to the boulder and apply the whistle until your pet appears on the other side of the boulder. Let your pet kill the obstructing monster and then use the whistle to get them out of the way.
  • Hit the boulder with a wand of teleport (no Luck penalty) after you finish as many other boulders as possible. While the new location may not be better than the old one, it often can't be much worse.

Items

  • Upon completion, check under unmoved boulders for useful items.
  • The first level contains two guaranteed scrolls of earth; remember to #name them as such as soon as you find them. Some monsters will read scrolls of earth, especially nymphs that can pluck the scroll from your inventory; however, most monsters only have a 110 chance of doing so unless they have a hard helm on.
  • Sokoban is an excellent place to stock up on comestibles and other loot. If you are dealing with encumbrance issues or otherwise trying to manage your inventory, simply leave the food items on the floor and eat them only when you need to. On the other hand, grab every scroll and wand you see; at the least, doing so means a monster will not be able to pick them up and use them to your disadvantage.
    • Items can sometimes be generated over holes. Pushing a boulder over the hole will bury the item. If you wish to retrieve the item instead, you may:
      • Kick the item away; it will usually fall down another hole and appear somewhere on the level below. This will destroy the item if it is fragile, and on the top level will wake the monsters in the zoo.
      • Repeatedly step on the space containing the item; it will eventually fall down with you, although not necessarily onto your space. This will never break the item.
      • Turn on autopickup and step on the space containing the item; you will pick it up before you fall. Beware of loadstones, both over the hole and on the levels below. You can use pickup_types or autopickup exception to limit yourself to only picking up the type of item you are trying to grab.
      • Use a grappling hook.
    • Monsters can attack you with the guaranteed wand if applicable. If you have not already found it, be careful clearing the zoo, e.g. send your pet in without entering line of fire.
  • If you reach the end of the branch and do not see the prize, it is probable that some @ found the amulet of reflection and picked it up. Be sure to claim the amulet immediately after killing said monster, since you don't want your new amulet of reflection to become a snack for a rust monster or rock mole. Nothing will ever pick up the bag of holding, however.

Stash location

The first level of Sokoban, once completed, is often used as a stash level, for several reasons:

  • It is one of the locations which the Eye of the Aethiopica can teleport you to instantly.
  • It is conveniently located one level from the Oracle, 2-8 levels from the Gnomish Mines, and located in the top half of the Dungeons of Doom, where shops and altars are likely.
  • It is relatively free of monsters, and a spawning ground for baby monsters rather than their larger versions.
  • There are spare boulders which can be used to further block off a safe area.
  • There is a long corridor which can be used for polypiling.
  • If there is an altar nearby, Sokoban can be used to control your Luck and avoid crowning during altar farming.

Out-of-game practice

nhss (originally by IanK of iank.org) is a C/terminal tool that sets up a Nethack-like environment (basic movement and boulder pushing only) that can be used to figure a level out before actually playing it, thus reducing the chances of rendering a level unsolvable. It can also record sessions and play them back step by step.

Unaffiliated but related to nhss, Nethack's Sokoban levels for various Sokoban implementations (XSok, Sokoban++, YSokoban, Universal Sokoban format and Games 4 Brains Sokoban format) which you can use to practice the levels in other Sokoban games.

Even more unaffiliated with any of the above, Nethack's Sokoban levels for Enigma.

The Nethack Android port by gurr with using Wizard mode can be done for practising on mobile. Use the level teleport option, go to the entry to Sokoban, and use the recreate map option if the player needs to try again.

Online web app links:

History

Sokoban first appears in NetHack 3.3.0. From this version to NetHack 3.4.3, including some variants based on these versions, Luck penalties would apply for most of the aforementioned actions minus jumping, even if the level was solved. In addition, the prize for the last Sokoban level did not have a cursed scroll of scare monster present, and depended on which final level map was generated: Sokoban Level 4a would always have a bag of holding, and Sokoban Level 4b would always have an amulet of reflection.

As of NetHack 3.6.0, the cursed scroll of scare monster appears on the prize square, and both final levels have a 50% chance of the prize being either the bag of holding or the amulet of reflection.

Origin

Sokoban is a video game that was created in 1981 by Hiroyuki Imabayashi, with the first commercial release published in December 1982 by Thinking Rabbit, a software house based in Takarazuka, Japan. Sokoban was a hit in Japan, where it sold more than 400,000 copies before being released in the United States in 1988, where it was published by Spectrum HoloByte for the Commodore 64, IBM PC compatibles, Amiga, and Apple II as Soko-Ban.

The presence of three doors in the treasure zoo with a prize behind one of them, is possibly a reference to the Monty Hall Problem.

Variants

Most variants of NetHack attempt to improve upon the Sokoban experience in some form, on top of often adding new Sokoban levels:

SLASH'EM

Main article: Sokoban (SLASH'EM)

In SLASH'EM, the rules are the same as in NetHack 3.4.3, with 15 new possible levels - the final level has the usual 12 chance of either a bag of holding or an amulet of reflection at the end, dependent on the level generated. Given that ordinary sacks and oilskin sacks can be upgraded to a bag of holding in SLASH'EM, the amulet is typically the more desirable prize.

Some of the new Sokoban levels have iron bars - a doppelganger character can liquid leap through them, though they will still incur a Luck penalty, and the bars cannot be crossed by any other means (e.g., by polyself into a small or slithy monster such as a snake).

Several public server versions of SLASH'EM include a patch that adds the acid hound, which corrodes the floor to create pits when killed; these can be very troublesome if they appear in Sokoban, as they may make solving the level impossible without using a scroll of earth.

NetHack brass

NetHack brass does not change or add any layouts for Sokoban levels, but instead has a choice between the amulet of reflection, a cloak of magic resistance, and a bag of holding as the prize item. All monsters will avoid stepping on or touching the items, preventing abuse via using pets to retrieve unchosen prizes.

Non-artifact items that provide magic resistance or reflection can wear out and disintegrate from resisting or reflecting enough times, making it a good idea to carry a spare source. The bag remains a good choice if you already have "permanent" and/or redundant options for both properties.

GruntHack

Main article: Sokoban (GruntHack)

GruntHack adds some new Sokoban levels, and offers a choice between the amulet of reflection, a cloak of magic resistance, and a bag of holding as the prize item, similar to NetHack brass. If one of the prize closet doors is opened or kicked down, the others will seal; a means of identifying the closet containing your item of choice, such as a potion of object detection, is recommended.

GruntHack also implements player displacement of peaceful monsters, making herding them out of the path of boulders considerably easier.

SporkHack

In SporkHack, Sokoban is mostly unchanged from NetHack 3.4.3, though each final level has an equal probability of the prize being an amulet of reflection or a bag of holding. Sporkhack also has displacement for peaceful monsters.

UnNetHack

Main article: Sokoban (UnNetHack)

UnNetHack introduces new Sokoban levels as well, and additionally shortens the branch to three levels—the vanilla maps for levels one and two may all be used to create level one.

From UnNetHack 4.1.1 onwards, cheating in Sokoban does not incur a Luck penalty. Instead, solving Sokoban without cheating is tracked as a new conduct. However, to compensate, the scrolls of earth typically found on the first level are not guaranteed. Since UnNetHack 6, solving Sokoban without cheating increases your Luck by 1 point.

The final level always has a bag of holding, a cloak of magic resistance or [[Cloak of displacement|displacement, and an amulet of reflection, life saving or flying. When one of these objects is picked up, the other two are destroyed. If any of these items are in direct line of sight, they are temporarily and partially identified, allowing for a more informed decision.

DynaHack

Main article: Sokoban (DynaHack)

Sokoban in DynaHack has three floors and uses maps from both UnNetHack and SLASH'EM, among other variants. The random rings and wands that are normally scattered in Sokoban are instead placed within a sack on Sokoban's final level, with the standard prizes moved to Mines' End, making the Sokoban branch more optional.

The prize selection is derived from earlier versions of UnNetHack: the choices are a bag of holding, a cloak of magic resistance or displacement, and an amulet of reflection, life saving or flying.

NetHack Fourk

Fourk gives a name to each Sokoban level, and contains quite a few quality-of-life changes which are non-exhaustively listed below:

  • If a peaceful monster would spawn in Sokoban, it is generated hostile instead. Thus, it is safer to kill unknown monsters that are blocking boulder movements.
  • Sokoban luck penalties can only lower luck to a minimum of -3, and .
  • Luck penalties do not apply when you have a non-cursed luckstone.
  • Luck penalties do not apply when you are hallucinating, but a boulder will hit you for 1d12 damage.
  • There are a number of additional Sokoban levels. Player feedback suggests that these are on average easier than the vanilla levels.
  • Two of the new final Sokoban levels have a sack which contains rings of teleport control and polymorph control and a third random ring. If you already have either of those rings, you might receive other jewellery.
  • In the other final levels endings, if you already have reflection, the Soko prize will not be an amulet of reflection; if you already have a bag of holding, the prize is likely to be an amulet of reflection. In either case, or if you already have both items, the prize might be a simple oilskin sack.
  • To help pacifists, completing Sokoban without cheating grants one experience level.
  • To make Sokoban more skippable, Perseus's statue always contains the shield of reflection and the sack.

FIQHack

In FIQHack, all pits on the first level of Sokoban are converted to holes, which will drop you back into the main dungeon. Additionally, if a peaceful monster would spawn in Sokoban, it is generated hostile instead; unicorns are also excluded from spawning in Sokoban to avoid creating scenarios where you must risk a major Luck penalty, so you can safely kill unknown monsters blocking your boulder movements.

xNetHack

xNetHack uses the same maps and layout for Sokoban as vanilla NetHack, with the removal of flipped Sokoban levels that were introduced in the upcoming NetHack 3.7.0.

SpliceHack

SpliceHack adds a few new levels from other variants; for those that have an equal number of pits/holes and boulders, a hole or pit is removed in order to create a spare boulder and make them less difficult. SpliceHack also has different versions of levels 2a and 2b that replace the boulders with explosive monsters such as gas spores and flaming spheres.

EvilHack

Main article: Sokoban (EvilHack)

In EvilHack, several levels from SLASH'EM, GruntHack, UnNetHack, and other variants are added.

On the final level, all three closets in the Sokoban zoo have a prize behind each door, but you will not be able to tell exactly what that prize is until you pick it up - you can learn the object type of the prize behind each door via some form of item detection, e.g. quaffing a potion of object detection or reading a non-cursed scroll of magic detection. Like GruntHack, the doors are made impenetrable to prevent taking more than one prize: once one door is opened, the other two doors disappear and are replaced with a sealed wall; despite this, the doors can still be broken, e.g. by a giant. When you pick up one of the prizes, the other two will magically disappear regardless of whether or not the doors were opened.

There are two different items of each type that can spawn behind each door, with a 50% chance for each item. Those items are:

Since magic markers do not generate randomly, Sokoban is potentially one of a few locations in the game where a marker can be found.

GnollHack

In GnollHack, Sokoban is largely the same as in NetHack 3.6.2 except for the top floor: there is an additional room accessible from the zoo where a mage resides. He sells items, teaches spells and provides other services (such as performing incantations) for a fee.

Hack'EM

Main article: Sokoban (Hack'EM)

Hack'EM imports several levels from SLASH'EM, SlashTHEM, Fourk and other variants, and all levels have been given Fourk-style names to make them easier to reference.

Encyclopedia entry

Sokoban (Japanese for "warehouse keeper") is a transport puzzle
in which the player pushes boxes around a maze, viewed from
above, and tries to put them in designated locations. Only one
box may be pushed at a time, not two, and boxes cannot be pulled.
As the puzzle would be extremely difficult to create physically,
it is usually implemented as a video game.

Sokoban was created in 1982 by Hiroyuki Imabayashi, and was
published by Thinking Rabbit, a software house based in
Takarazuka, Japan. Thinking Rabbit also released three sequels:
Boxxle, Sokoban Perfect and Sokoban Revenge.

[ Wikipedia, the free encyclopedia ]

External links

References

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

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

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