Difference between revisions of "User:Agulp/Tool Assisted Speedrun"

From NetHackWiki
Jump to navigation Jump to search
(Summarize turn 17)
(Through turn 36)
Line 133: Line 133:
 
|Luck Manipulation
 
|Luck Manipulation
 
|This is the first really major luck manipulation of the game.  The largest source of useful items in the game is upon level generation, especially on levels high in the dungeon which often contain shops. Most pressing for us is to generate a particular set of rings, to enable the polymorph-self strategy used in all the fastest gametime speedruns (whether tool-assisted or not), so we manipulate a huge ring shop that contains all the rings we need (together with a large number that we don't, as it happens) as we go downstairs.  Luck manipulation is typically done by walking into a wall, incidentally, which we can do up to 750 times a second, and advances the RNG with, generally, no other effects (the random number is generated for the purpose of eroding engravings on the current square, but typically there aren't any); we explicitly try to stay next to walls throughout the TAS for this reason.
 
|This is the first really major luck manipulation of the game.  The largest source of useful items in the game is upon level generation, especially on levels high in the dungeon which often contain shops. Most pressing for us is to generate a particular set of rings, to enable the polymorph-self strategy used in all the fastest gametime speedruns (whether tool-assisted or not), so we manipulate a huge ring shop that contains all the rings we need (together with a large number that we don't, as it happens) as we go downstairs.  Luck manipulation is typically done by walking into a wall, incidentally, which we can do up to 750 times a second, and advances the RNG with, generally, no other effects (the random number is generated for the purpose of eroding engravings on the current square, but typically there aren't any); we explicitly try to stay next to walls throughout the TAS for this reason.
 +
|-
 +
|18
 +
|
 +
|We end up in our first real combat of the game as we go down the stairs; we're next to a newt (the yellow colon), and apparently the only exit to the room is to the east, beyond the newt, and apparently without enough space to run around it without taking a hit.  Although we could beat the newt easily, we have no need to, and so we demonstrate here how a TAS can avoid combat much more perfectly than an unassisted game can.  We start off by exploiting the fact that monsters cannot move on the turn they are generated (a consequence of the game's speed system) to move next to a wall (and in the direction we want to go anyway).
 +
|-
 +
|19
 +
|
 +
|The newt is now able to move, but we're now next to a wall and so able to manipulate.  The door in the east wall actually goes in the wrong direction, but it turns out that there's a secret door in this room (something trivial to verify in a TAS; we routinely looked for secret doors by savestating, going into debug mode, then loadstating again).  The guaranteed starting spell for a Wizard, "force bolt", destroys doors, so we use it to destroy the secret door to avoid having to first locate it and then open it, wasting time.  The newt attacks us, but just misses; an incredibly lucky result (if you try this in realtime, you'll find that a newt nearly always hits a starting wizard, although for a negligible amount of damage).
 +
|-
 +
|20-34
 +
|
 +
|Leaving the newt behind (as we can outrun it), we simply continue along the corridor via the shortest path.  Nothing particularly interesting here.
 +
|-
 +
|35
 +
|
 +
|A grid bug blocks our path, so we show off the Wizard's melee combat ability by oneshotting it with our quarterstaff (which takes a small amount of luck manipulation, but not a lot; grid bugs are really weak, and a quarterstaff isn't ridiculously bad as weapons go).  This is actually the only time in the entire game where we simply hit an enemy with a stick to kill it, and only possible because we're still facing very early-game monsters.
 +
|-
 
|}
 
|}
  

Revision as of 23:19, 21 May 2022

Purpose

The purpose of this page is to document the NetHack 3.4.3 Tool-Assisted Speedrun. This is a living document, and anyone that is actively contributing to or interested in joining the project is free to edit it.

To-Do List

Documentation

This section was initially copied from ais523's Current Turn-by-Turn Explanation and formatted into the form of a wiki page.

Preamble

Before the first turn there is some setup we need to do to get an optimal start. One of the most important variables for the run is the date and time that the computer's clock is set to upon loading NetHack; this is what controls the initial RNG seed, and several elements essential to getting the fastest possible time are decided right at the start of the game before we have any chance to manipulate the RNG. NetHack is also pretty unusual in that the date and time are what determine the difficulty level, with some days being luckier or unluckier than others.

In order to allow us to "play on the hardest difficulty", Ilari searched for maximally unlucky days; it turns out that there have been none at all since the release of NetHack 3.4.3, so we picked the first one that will occur, Friday 13 November 2015. In addition to being a Friday 13, there will also be a new moon on that day, making the game even harder (although Friday 13 has a much stronger effect than the phase of the moon). (Amusingly, this dependence on the moon phase can cause desyncs on occasion; this is likely the only TAS that will have been desynced by running a script on a full moon by mistake.) The time chosen (by dwangoAC, who wrote the luck manipulation bots, and who did most of the early luck manipulation while ais523 got up to speed with how to use them) was 00:13:02; playing just after midnight leaves undead at their most dangerous, and the minutes and seconds are chosen for luck manipulation purposes. This means that there's a hard limit of 46 minutes 58 seconds for the run, because at 1am, the game would become slightly less difficult as undead damage reverted to normal, so we would no longer be playing at highest difficulty. The seed value was 1447373582 which maps to Fri, 13 Nov 2015 00:13:02 GMT.

We were looking for several things in our luck manipulation. The most obvious is the depth of the dungeon; the length of the game is slightly randomized, and leaving it as short as possible is obviously helpful. The seed we chose leaves it at the minimum possible depth of 45 levels. We also controlled the location of some of the special levels to increase the gain from sequence breaks; in particular, the portal to the Wizard of Yendor's Tower (with that seed, on level 43) was manipulated to be as far as possible from the tower itself (which occupies levels 36 to 38 inclusive with that seed). In addition to the dungeon layout, we also manipulated the materials of which some rings were made. Eating rings is the only way to get certain properties intrinsically, saving on ring slots, but not all rings are edible in any given game, and it's random which are which. We needed to ensure that, at least, polymorph and polymorph control were edible.

Character selection was also important (in fact, we originally messed up and had to hex in a different character; this required redoing the first level of the run, but luckily it synched after that, which says something about NetHack's incredible sync-stability). We chose to play as a Wizard due to the possibility of eventually learning to cast a four-square jumping spell, something which no other class has the magical ability to manage. Playing neutral is required to be able to use certain artifacts, most importantly the Eyes of the Overworld, which enable even blind monsters to see. This is vital because the fastest polymorph form in the game is blind, and yet vision is required at several points which means the Eyes are needed to avoid having to change into a suboptimal form on occasion. Race and gender are less important; we play as a gnome for entertainment purposes (they can see warm-blooded monsters in the dark, thus giving a better clue as to what's going on towards the start of the run), and although we specified an explicit gender (male) for luck manipulation purposes, being female would have worked just as well, as gender is almost cosmetic in NetHack. (Not to mention that we end up changing gender frequently during the run itself for various reasons.)

Our starting inventory wasn't massively important as we can always get more items later, but we end up using much of it anyway. For reference, it contains a quarterstaff and cloak of magic resistance (as always for a wizard), scrolls of gold detection, teleportation, and light, spellbooks of force bolt and scare monster, potions of enlightenment, object detection, and extra healing, rings of free action and teleportation, and a wand of striking. The most important for our purposes are the scroll of teleportation and potion of object detection; the scroll is used for a sequence break (one which was placed there deliberately by the game's developers, but nonetheless not the normal course of things), and although we never actually drink the potion, it was invaluable in luck manipulation early on (when manipulating for particular items, we could see if we succeeded by drinking the potion, then loadstating to revert the turn it spent; this was considerably easier than memory watching would have been).

We also change some options at the start of the game. These are chosen for four main reasons. First, some options are required for the fastest speed through the game, most notably the autopickup options (autopickup and pickup_types), which tell our character what they should and shouldn't pick up as they move (saving turns picking up and/or dropping items manually). Incidentally, we had to adjust these options several times after the run was underway to hex in different things to pick up, such as statues. Next, we turn off the mail option in order to avoid desyncs (it causes the RNG to depend to a small extent on the number of keystrokes typed; not by enough for it to be at all efficient for luck manipulation, but by enough to make it very hard to hex in corrections for past mistakes with the option on). Some options were also changed (or kept at their original values) to streamline the controls to allow us to reduce the amount of input required: confirm prayconfirm cmdassist autodig number_pad. (This is a large difference between a TAS and an unassisted run already; no sane player turns off confirm in an unassisted run, because it's so useful for catching typos.) Finally, some option values were chosen in order to make the game look visually better and to remove time-consuming animations: IBMgraphics color sparkle timed_delay runmode. (Whether IBMgraphics or DECgraphics looks better is a typical flamewar subject among NetHack fans, but luckily DECgraphics doesn't work on the DOS version, making the choice obvious.) Options we didn't care about were just left at their defaults. Most options can be changed without affecting luck, meaning that DECgraphics can be optionally used as part of a ttyrec of the Linux execution of the run.

Turn-by-Turn Play

Turn Purpose Explanation
1 - 13 Movement At the very start of the game, there's not much we can do to speed up our play as we have basically no resources (although some of the equipment in our starting inventory could be used here, we have better use for it later). Thus, we demonstrate the most obvious use for TAS tools in a roguelike game by walking directly to the stairs to the next level via the shortest route. The lichen (green F) touches us, but fails to grab hold of us, while our pet kitten roams the level picking up items. (We leave the kitten, a white f, behind: it would only slow us down, and it would take far too much manipulation to keep it alive with the strategy we're using. The kitten does survive the TAS, though, making it one of the few starting pets in NetHack to escape with its life.) We ignore all the items in view which we don't care about, which as it happens is all of them.
14-16 Obtain cursed scroll of teleportation This is the first break from a typical NetHack strategy, as we decide to pray to our god for help; this takes 3 turns, taking us through to turn 17. Because it's only turn 14 (waiting until turn 300, or 100 if we were actually in trouble, would be required in order for the prayer to have any chance of success), and because it's Friday 13 (which prevents prayer until at least one point of good luck is gained to cancel out its bad luck, arguably the most dangerous effect from difficulty in NetHack), the prayer fails quite drastically, with our god Thoth getting justifiably angry with us. His response is to send a curse at our inventory, although due to the first real luck manipulation of the game, it only affects the scroll of teleport. Cursed scrolls of teleport teleport vertically rather than horizontally, making it possible to skip levels and thus go through the game in an unusual sequence; however, with our current equipment, it would skip only about one or two levels, so it isn't worth using yet.
17 Luck Manipulation This is the first really major luck manipulation of the game. The largest source of useful items in the game is upon level generation, especially on levels high in the dungeon which often contain shops. Most pressing for us is to generate a particular set of rings, to enable the polymorph-self strategy used in all the fastest gametime speedruns (whether tool-assisted or not), so we manipulate a huge ring shop that contains all the rings we need (together with a large number that we don't, as it happens) as we go downstairs. Luck manipulation is typically done by walking into a wall, incidentally, which we can do up to 750 times a second, and advances the RNG with, generally, no other effects (the random number is generated for the purpose of eroding engravings on the current square, but typically there aren't any); we explicitly try to stay next to walls throughout the TAS for this reason.
18 We end up in our first real combat of the game as we go down the stairs; we're next to a newt (the yellow colon), and apparently the only exit to the room is to the east, beyond the newt, and apparently without enough space to run around it without taking a hit. Although we could beat the newt easily, we have no need to, and so we demonstrate here how a TAS can avoid combat much more perfectly than an unassisted game can. We start off by exploiting the fact that monsters cannot move on the turn they are generated (a consequence of the game's speed system) to move next to a wall (and in the direction we want to go anyway).
19 The newt is now able to move, but we're now next to a wall and so able to manipulate. The door in the east wall actually goes in the wrong direction, but it turns out that there's a secret door in this room (something trivial to verify in a TAS; we routinely looked for secret doors by savestating, going into debug mode, then loadstating again). The guaranteed starting spell for a Wizard, "force bolt", destroys doors, so we use it to destroy the secret door to avoid having to first locate it and then open it, wasting time. The newt attacks us, but just misses; an incredibly lucky result (if you try this in realtime, you'll find that a newt nearly always hits a starting wizard, although for a negligible amount of damage).
20-34 Leaving the newt behind (as we can outrun it), we simply continue along the corridor via the shortest path. Nothing particularly interesting here.
35 A grid bug blocks our path, so we show off the Wizard's melee combat ability by oneshotting it with our quarterstaff (which takes a small amount of luck manipulation, but not a lot; grid bugs are really weak, and a quarterstaff isn't ridiculously bad as weapons go). This is actually the only time in the entire game where we simply hit an enemy with a stick to kill it, and only possible because we're still facing very early-game monsters.

Resources

See also