Difference between revisions of "Invoke"

From NetHackWiki
Jump to navigation Jump to search
m (cut words)
m (pothole)
 
(21 intermediate revisions by 11 users not shown)
Line 1: Line 1:
The '''#invoke''' [[extended command]] allows you to activate certain objects. The only objects that can be activated this way are [[crystal ball]]s and most [[quest artifact]]s.<ref>{{sourcecode|artifact.c|1188}}</ref>
+
The '''#invoke''' [[extended command]] allows you to activate certain objects. The only objects that can be activated this way are [[crystal ball]]s and most [[quest artifact]]s.{{refsrc|src/artifact.c|1417|nethack=3.6.1}}
  
Artifacts tire after you invoke them, and you cannot do so again for <code>[[rnz]](100)</code> turns (averages 100; can be up to 2000, but 95% of the time it is less than 400). If you invoke again too soon, "You feel that the <artifact> is ignoring you" and 3d10 turns are tacked on to the wait time.<ref>{{sourcecode|artifact.c|1198}}</ref>
+
Artifacts tire after you invoke them, and you cannot do so again for <code>[[rnz]](100)</code> turns (averages 100; can be up to 2000, but 95% of the time it is less than 400). If you invoke again too soon, "You feel that the <artifact> is ignoring you" and 3d10 turns are added to the wait time.{{refsrc|src/artifact.c|1433|nethack=3.6.1}} For artifacts that give temporary [[extrinsic]]s, the wait time is counted from the moment they're switched off (via an #invoke or otherwise).{{refsrc|src/artifact.c|1620|nethack=3.6.6}}
  
 +
==Optimal invocation schedule==
 +
{{anchor|Optimum invocation schedule}}Invoking strategy is basically a trade-off between the risk of getting nothing and waiting too long. The turns to wait after a successful #invoke versus probability of success are graphed below (assuming your experience is <=17): <div class="thumb tcenter">[[Image:GraphWaitingTimeVersusInvokeSuccessProbability.svg|thumb|waiting time after successful #invoke versus probability of success of invocation]]</div>
  
==Optimum invocation schedule==
+
If you need the artifact reliably, such as emergency healing from the [[Staff of Aesculapius|Staff of Aesculapius]], you should treat it like prayer - #invoke only in dire need. If you want a simple strategy for the most successful #invocations per turn, e. g. charging lots of wands with the [[PYEC]], you should wait 78 turns between invocations. This yields an expected wait
Invoking strategy is basically a trade-off between the risk of getting nothing and waiting too long. The turns to wait after a successful #invoke versus probability of success are graphed below (assuming your experience is <=17): <div class="thumb tcenter">[[Image:GraphWaitingTimeVersusInvokeSuccessProbability.svg|thumb|waiting time after successful #invoke versus probability of success of invocation]]</div>
+
of 180.83 turns. If you miss the time a bit, the rate of success does not go down much. Your experience level does not matter.
  
If you want to maximize the expected rate of successful invocations per time, you should wait 91 turns after a successful invoke, 121 turns after one consecutive failure, 211 turns after two consecutive failures and so on. In the table, after waiting for "wait" turns, "chance" means the probability of a successful invoke, and "rate" is 100 times the expected rate of successful invokes per turn.
+
The optimum strategy is waiting
 
+
82;81;68;81;88;67;54;96;78;62;88;81;65;63;81;65
{| class="wikitable"
+
turns after consecutive failed #invokes and restarting the list after successes. This yields an expected wait of 180.2354 turns.  
!Consecutive failures beforehand !! colspan="3" | your level <=17 !! colspan="3" | your level 18-20 !! colspan="3" | your level 21-23 !! colspan="3" | your level 24-26 !! colspan="3" | your level 27-29 !! colspan="3" | your level 30
 
|-
 
|&nbsp; || wait || chance || rate || wait || chance || rate || wait || chance || rate || wait || chance || rate || wait || chance || rate || wait || chance || rate ||
 
|-
 
|0||91||46.7||0.47||91||46.7||0.47||91||46.7||0.47||91||46.7||0.47||91||46.7||0.47||91||46.7||0.47
 
|-
 
|1||121||73.6||0.59||121||73.6||0.59||121||73.6||0.59||121||73.6||0.59||121||73.6||0.59||121||73.6||0.59

 
|-
 
|2||211||79.7||0.37||211||79.7||0.37||211||79.7||0.37||211||79.7||0.37||211||79.7||0.37||211||79.7||0.37

 
|-
 
|3||39||21.9||0.43||39||21.9||0.43||39||21.9||0.43||39||21.9||0.43||39||21.9||0.43||39||21.9||0.43

 
|-
 
|4||195||76.0||0.38||195||75.6||0.38||195||75.6||0.38||195||75.6||0.38||195||75.6||0.38||195||75.6||0.38

 
|-
 
|5||46||23.4||0.41||46||22.8||0.40||45||22.3||0.39||45||22.3||0.39||45||22.3||0.39||45||22.3||0.39

 
|-
 
|6||185||75.9||0.4||185||73.5||0.39||186||73.1||0.38||186||73.0||0.38||186||73.0||0.38||186||73.0||0.38

 
|-
 
|7||49||29.4||0.49||48||25.1||0.42||48||24.5||0.41||48||24.4||0.41||48||24.4||0.41||48||24.4||0.41

 
|-
 
|8||180||91.5||0.50||183||74.6||0.40||183||72.0||0.38||183||71.5||0.38||183||71.4||0.38||183||71.3||0.38

 
|-
 
|9||41||86.0||2.02||51||31.4||0.51||50||26.8||0.44||50||26.1||0.43||50||26.0||0.43||50||26.0||0.43

 
|-
 
|10||33||87.2||2.53||178||90.4||0.50||182||73.9||0.40||182||71.1||0.38||182||70.6||0.38||182||70.5||0.38
 
|-
 
|11||31||89.2||2.77||43||85.0||1.89||53||32.5||0.52||52||27.7||0.44||52||27.0||0.43||52||26.9||0.43
 
|-
 
|12||30||90.6||2.92||34||85.9||2.41||176||89.8||0.51||180||73.1||0.4||179||69.9||0.38||179||69.3||0.38
 
|-
 
|13||29||90.6||3.02||32||88.6||2.66||44||83.4||1.81||54||33.2||0.52||54||29.1||0.45||54||28.4||0.44
 
|-
 
|14||29||92.1||3.09||30||88.4||2.83||35||84.9||2.31||174||88.7||0.5||178||72.1||0.4||178||69.2||0.38
 
|-
 
|15||28||90.9||3.14||30||90.8||2.93||33||88.2||2.57||46||82.9||1.72||56||34.9||0.53||56||30.2||0.45
 
|-
 
|16||28||91.6||3.17||29||90.4||3.01||31||88.6||2.75||36||84.1||2.22||173||88.1||0.5||176||71.4||0.4
 
|-
 
|17||28||92.3||3.2||29||91.7||3.07||30||89.2||2.86||33||86.1||2.49||47||81.8||1.66||58||36.0||0.53
 
|-
 
|18||28||92.8||3.23||28||90.4||3.11||30||91.1||2.94||32||88.6||2.66||37||83.6||2.15||171||87.3||0.5
 
|-
 
|19||28||93.2||3.25||28||91.0||3.15||29||90.4||3.01||31||89.6||2.79||34||86.1||2.42||49||82.0||1.6
 
|-
 
|20||27||91.2||3.27||28||91.7||3.17||29||91.5||3.06||30||89.7||2.88||32||87.0||2.6||38||83.5||2.09
 
|}
 
 
 
At level 17, the probability of 20 fails is 0.067%. On condition that outcome doesn't occur, the expected rate of successful #invokes is once every 101.35 turns.
 
  
These numbers were computed using the exact probability distribution of rnz(100). The relevant waiting time is the turns you actually wait plus the 3d10 penalty for early invokes. For the first #invoke attempt, we maximize the probability of successful invocation, times the expectation of one over the waiting time. This quantity * 100 is listed in the table as "rate". The waiting time for the next attempt is then computed with the conditional distribution of the remaining artifact timeout, including the penalty from the previous attempt. Iteratively, the rate is again maximized and the conditional distribution updated. It isn't quite clear if each invocation attempt may indeed be optimized separately.
+
[http://tupelo-schneck.org/robert/ Robert Tupelo-Schneck], of [http://groups.google.com/group/rec.games.roguelike.nethack/msg/a987da11a8df6d6b liquid diet tourist] fame, has [http://groups.google.com/group/rec.games.roguelike.nethack/browse_thread/thread/5d5a6af685f3f96d/f4bb7faac4ad5e2d?#f4bb7faac4ad5e2d computed these numbers].
  
Robert Schneck gives a different invocation schedule in his [http://groups.google.com/group/rec.games.roguelike.nethack/msg/a987da11a8df6d6b ascension post of a liquid diet tourist]:
+
Minimizing the expected wait between success is the same as maximizing the expected rate of success per turn due to the [[wikipedia:Renewal_theory#The_elementary_renewal_theorem|Renewal Theorem]].
82;81;68;81;88;67;54;96;78;62;88;81;65;63;81;65
 
Unfortunately, he does not justify these numbers. He only [http://groups.google.com/group/rec.games.roguelike.nethack/browse_thread/thread/6dd7a0a1a6e90d96/61344bead5d498d6#61344bead5d498d6 hints] they could be the expected waiting time before the artifact regenerates on its own.
 
  
 
== List of possible invocations ==
 
== List of possible invocations ==
Line 71: Line 23:
 
* [[The Orb of Detection]]: toggles invisibility on/off.
 
* [[The Orb of Detection]]: toggles invisibility on/off.
 
* [[The Sceptre of Might]]: toggles conflict on/off.
 
* [[The Sceptre of Might]]: toggles conflict on/off.
* [[The Magic Mirror of Merlin]]: gives random rumour, from the true file if blessed, the false file if cursed, or either if uncursed.
 
 
* [[The Mitre of Holiness]]: boost in spell energy.
 
* [[The Mitre of Holiness]]: boost in spell energy.
 
* [[The Heart of Ahriman]]: levitation; you can stop this levitation with '>' at will, or by invoking the Heart again, providing no other levitation sources interfere.
 
* [[The Heart of Ahriman]]: levitation; you can stop this levitation with '>' at will, or by invoking the Heart again, providing no other levitation sources interfere.
Line 81: Line 32:
 
Invoking a non-artifact crystal ball is exactly the same as [[apply|applying]] it.
 
Invoking a non-artifact crystal ball is exactly the same as [[apply|applying]] it.
  
== List of possible invocations for new [[SLASH'EM]] artifacts<ref>http://www.angelfire.com/trek/mazewest/spoilers/arti_007e6.txt</ref> ==
+
==Variants==
 +
Many variants introduce new artifacts, and thus new possible invoke effects.
 +
 
 +
===SLASH'EM===
 +
[[SLASH'EM]] introduces a number of new artifacts that can be invoked:<ref>http://www.angelfire.com/trek/mazewest/spoilers/arti_007e6.txt</ref>
  
 
* [[The Candle of Eternal Flame]]: summons a (tame) fire elemental.
 
* [[The Candle of Eternal Flame]]: summons a (tame) fire elemental.
* The Eye of the Beholder: reduces all non-undead monsters in eye's line of sight to 1/3 HP and reduces luck and alignment by 3 with luck above -9. Instadeath with luck below -9.
+
* [[The Eye of the Beholder]]: reduces all non-undead monsters in eye's line of sight to 1/3 HP and reduces luck and alignment by 3 with luck above -9. Instadeath with luck below -9.
 
* [[Gauntlets of Defense|The Gauntlets of Defense]]: toggles invisibility on/off.
 
* [[Gauntlets of Defense|The Gauntlets of Defense]]: toggles invisibility on/off.
 
* [[The Great Dagger of Glaurgnaa]]: boost in spell energy.
 
* [[The Great Dagger of Glaurgnaa]]: boost in spell energy.
* [[The Hand of Vecna]]: summons 4-7 tame graveyard creatures and reduces alignment and luck by 3 with luck above -9. Does 5-24 damage to player with luck below -9.
+
* [[The Hand of Vecna (SLASH'EM)|The Hand of Vecna]]: summons 4-7 tame graveyard creatures and reduces alignment and luck by 3 with luck above -9. Does 5-24 damage to player with luck below -9.
* Holy Spear of Light: creates a lit field of a 12 square radius. This damages undead and demons in a 9 square radius.
+
* [[Holy Spear of Light]]: creates a lit field of a 12 square radius. This damages undead and demons in a 9 square radius.
* The Storm Whistle: summons a (tame) water elemental.
+
* [[The Storm Whistle]]: summons a (tame) water elemental.
 +
* [[The Arkenstone]] (defunct Dwarf quest artifact): item detection.
 +
* [[The Tentacle Staff]] (defunct Drow quest artifact): level teleport.
 +
* [[The Pick of Flandal Steelskin]] (defunct Gnome quest artifact): toggles conflict on/off.
 +
* [[The One Ring]] (defunct Hobbit quest artifact): toggles conflict on/off.
 +
* [[The Staff of Withering]] (defunct Lycanthrope quest artifact): boost in spell energy.
 +
 
 +
===DynaHack===
 +
In [[DynaHack]], the #invoke command is used to invoke, break or [[rub]] objects depending on the item chosen.
  
== References ==
+
==References==
 
<references />
 
<references />
 +
{{nethack-361|offset=1}}
 +
{{variant-343}}
 
[[Category:Extended commands]]
 
[[Category:Extended commands]]

Latest revision as of 01:58, 6 March 2024

The #invoke extended command allows you to activate certain objects. The only objects that can be activated this way are crystal balls and most quest artifacts.[1]

Artifacts tire after you invoke them, and you cannot do so again for rnz(100) turns (averages 100; can be up to 2000, but 95% of the time it is less than 400). If you invoke again too soon, "You feel that the <artifact> is ignoring you" and 3d10 turns are added to the wait time.[2] For artifacts that give temporary extrinsics, the wait time is counted from the moment they're switched off (via an #invoke or otherwise).[3]

Optimal invocation schedule

Invoking strategy is basically a trade-off between the risk of getting nothing and waiting too long. The turns to wait after a successful #invoke versus probability of success are graphed below (assuming your experience is <=17):

waiting time after successful #invoke versus probability of success of invocation

If you need the artifact reliably, such as emergency healing from the Staff of Aesculapius, you should treat it like prayer - #invoke only in dire need. If you want a simple strategy for the most successful #invocations per turn, e. g. charging lots of wands with the PYEC, you should wait 78 turns between invocations. This yields an expected wait of 180.83 turns. If you miss the time a bit, the rate of success does not go down much. Your experience level does not matter.

The optimum strategy is waiting

82;81;68;81;88;67;54;96;78;62;88;81;65;63;81;65 

turns after consecutive failed #invokes and restarting the list after successes. This yields an expected wait of 180.2354 turns.

Robert Tupelo-Schneck, of liquid diet tourist fame, has computed these numbers.

Minimizing the expected wait between success is the same as maximizing the expected rate of success per turn due to the Renewal Theorem.

List of possible invocations

Invoking a non-artifact crystal ball is exactly the same as applying it.

Variants

Many variants introduce new artifacts, and thus new possible invoke effects.

SLASH'EM

SLASH'EM introduces a number of new artifacts that can be invoked:[4]

DynaHack

In DynaHack, the #invoke command is used to invoke, break or rub objects depending on the item chosen.

References

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

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

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