Adventure Queue: Difference between revisions

From A KoL Wiki
imported>MindlessGames
imported>Eightstraight
Try to Remember
 
(38 intermediate revisions by 24 users not shown)
Line 1: Line 1:
__TOC__
__TOC__
{{RETURNTO Mechanics}}


The adventure queue is a feature in the game coding that makes high occurrences of the same adventure in a short period of time less likely.  For example, if you head to the goatlet for the first time and fight a [[dairy goat]], [[dairy goat]]s will be slightly less frequent for the next several adventures.
The adventure queue is a feature in the game that makes high occurrences of the same adventure in a short period of time less likely.  It works by keeping track of the last few adventures, and then sometimes rejecting an adventure if it's rolled again.  For example, if you head to the goatlet for the first time and fight a [[dairy goat]], [[dairy goat]]s will be slightly less frequent for the next few adventures.
 
The queues are 5 encounters long.  There are separate queues for combats in each zone, and for noncombats in each zone.


==Choose Your Own Adventure==
==Choose Your Own Adventure==
Specifically, the way an adventure is chosen is
Specifically, the way an adventure is chosen is
* Roll for a [[Combat Frequency#Superlikely|Superlikely]] adventure.  If that roll did not give you the adventure,
* Check the conditions for each of the [[Superlikely]] adventures in the zone.  If you meet the requirements for a superlikely, you receive that adventure.  (If you qualify for more than one, you receive one of the possible ones at random, with equal probability.)  If you do not meet the requirements for any of the superlikelies, then:
* Decide on either combat or non-combat.  
* Decide on either combat or non-combat.  
** Create a selection list to use for the encounters.
** Create a selection list to use for the encounters.
:* (c) If combat: populate the selection list with the possible combat encounters from the zone like so:
:* (c) If combat: populate the selection list with the possible combat encounters from the zone like so:
::# If the monster has a special rejection rate on it, do not add it if a roll says that monster should be rejected.
::* For each combat encounter in the zone, first do the following:
::# If there is a conditional, such as delay() on the monster, do not add it unless the conditional has been met.
::# If the monster is [[On the Trail|olfacted]], add 3 copies of that monster to the list (does not override the special rejection rate below).  Note that since this occurs for each copy of a monster in the base list, in a zone that starts out with 2 copies of a monster, the olfaction processing would result in a total of 6 additional copies of the monster in the selection list, etc.  (The same goes for Attunement, below.)
::# If you have attuned to the monster's essence with a [[Staff of the Cream of the Cream]] jiggle, add 2 copies of that monster to the list.  
::# If the monster is banished, do not add it to the list.
::# If the monster is banished, do not add it to the list.
::# If the monster is [[On the Trail|olfacted]], add 4 of that monster to the list (overrides banishing, but not the special rejection rate).  Note that for zones with multiple copies of monsters, this works just fine, as the monster will be seen twice when traversing the master encounter list for that zone.
::# Otherwise, add the monster to the list.
::# Otherwise, add the monster to the list.
::* If, at this point, the combat selection list is empty, ignore banishing and use the original list of combat encounters.
::* For each monster in the list:
::# If the monster has a special rejection rate on it, remove it if a roll says that monster should be rejected (applies to all copies at once).
::# If there is a conditional, such as [[Combat Frequency#Delay()|delay()]] on the monster, remove it unless the conditional has been met.
::* (c select) Select an encounter from the selection list.
::* (c select) Select an encounter from the selection list.
::* If, at this point, the combat selection list is empty, fight a [[tumbleweed]].
::* If it's olfacted, that's the encounter.
::* If it's olfacted, that's the encounter.
::* If it's not in the combat queue, that's the encounter.
::* If it's not in the combat queue, that's the encounter.
Line 22: Line 33:
:* (nc) If non-combat: populate the selection list with the possible non-combat adventures from the zone like so:
:* (nc) If non-combat: populate the selection list with the possible non-combat adventures from the zone like so:
::# If the adventure has a special rejection rate on it, do not add it if a roll says that it should be rejected.
::# If the adventure has a special rejection rate on it, do not add it if a roll says that it should be rejected.
::# If there is a conditional, such as delay() on the adventures, do not add it unless the conditional has been met.
::# If there is a conditional, such as [[Combat Frequency#Delay()|delay()]] on the adventures, do not add it unless the conditional has been met.
::# Otherwise, add the adventure to the list.
::# Otherwise, add the adventure to the list.
::* (nc select) Select an adventure from the selection list.
::* (nc select) Select an adventure from the selection list.
Line 60: Line 71:
   outq(j,R,U;i) = <var>r<sub>i</sub></var> ---------------
   outq(j,R,U;i) = <var>r<sub>i</sub></var> ---------------
                       4 - 3 * <var>r<sub>inq</sub></var>
                       4 - 3 * <var>r<sub>inq</sub></var>
The adventure queue is 5 encounters long (it was changed from 3 encounters to 5 encounters in Fall of 2006).


==Table of Encounter Frequency==
==Table of Encounter Frequency==
Line 126: Line 136:


==NS13 Queue Manipulation==
==NS13 Queue Manipulation==
While adventure queues in the NS13 world are not yet well understood, there are some ways of increasing or decreasing the odds of encountering given monsters.
There are some ways of increasing or decreasing the odds of encountering given monsters.
*[[Harold's bell]] is a single-use quest item that banishes regular monsters from a particular location's combat queue for 20 adventures.
*[[Copying]] can be used to repeat a combat encounter against any normal monsters upon which the item is used.
*[[Creepy Grin]] scares away a single regular monster from one location for 10 adventures.
*[[On the Trail]] ups the odds of encountering the monster being trailed.
*Using [[Give Your Opponent the Stinkeye]] will scare away a monster for 10 adventures.
**Some less-powerful variants of On The Trail include the [[Nosy Nose]] familiar, Jarlsberg's [[Staff of the Cream of the Cream]], Pete's [[Make Friends]] and [[Gallapagosian Mating Call]].
*A [[divine champagne popper]] will scare away a single monster for 5 adventures.
*[[Banishing]] a monster from an area.
*A [[Spooky Putty sheet]] can be used up to five times per day to repeat a combat encounter against any normal monsters upon which the item is used.
*In much the same way, a [[4-d camera]] can be used once per day to repeat a combat encounter.


Some mechanics are not yet completely spaded, but there is good evidence that they have an effect:
==Queue Manipulation sources==
*[[On the Trail]] ups the odds of encountering the monster being trailed.
The following is a list of all methods of queue manipulation that are not true [[banish]]es. Collectively, they are known as "sniffs".
*[[Curse Magnet]] increases the chances of fighting the [[Scary pirate (cursed)|scary pirate]] when using a [[cursed piece of thirteen]].
{| class="wikitable"
*Using a [[valuable trinket]] at [[the F'c'le]] might remove [[chatty pirate]]s from the zone queue.
|-
*Using a [[cocktail napkin]] on [[clingy pirate (male)|clingy]] [[clingy pirate (female)|pirates]] might remove them from the queue.
! Source !! Source type !! Additional copies !! Suppresses queue rejection? !! Duration !! Notes
|-
| [[On the Trail]] || Skill - [[Transcendent Olfaction]] || +3 || Yes || Until next cast ||
|-
| [[Staff of the Cream of the Cream]] || Chefstaff jiggle - [[Avatar of Jarlsberg]] || +2 || Yes || Until next cast ||
|-
| [[Make Friends]] || Skill - [[Avatar of Sneaky Pete]] || +2 || No || Until next cast ||
|-
| [[Curse of Stench]] || Skill - [[Actually Ed the Undying]] || +3 || No || Until next cast ||
|-
| [[Long Con]] || Skill - [[Avatar of West of Loathing|Snake Oiler]] || +3 || Yes || Until next cast ||
|-
| [[Perceive Soul]] || Skill - [[Dark Gyffte]] || +2 || No || 30 adventures ||
|-
| [[dinosaur pheromone kit]] || Combat item - [[Fall of the Dinosaurs]] || It's complicated || n/a || 20 adventures || Uses a horrifying math function to increase the chances of the targeted dinosaur type
|-
| [[Motif]] || Skill - [[Avatar of Shadows Over Loathing|Jazz Agent]] || +2 || Yes || Until next cast ||
|-
| [[Hunt]] || Skill - [[Wereprofessor]] || +3 || Yes || Until next cast? ||
|-
| [[Get a Good Whiff of This Guy]] || Familiar skill - [[Nosy Nose]] || +1 || No || Until next cast || Only applies while Nosy Nose is your current familiar
|-
| [[Gallapagosian Mating Call]] || Skill - [[Illustrated Mating Rituals of the Gallapagos]] || +1 || No || Rollover ||
|-
| [[Hold Hands]] || Skill - [[ August scepter]] || +1 || No || Until you've encountered 3 copies ||
|-
| [[Offer Latte to Opponent]] || Skill - [[latte lovers member's mug]] || +2 || No || 30 adventures ||
|-
| [[Daily Affirmation: Be Superficially interested]] || Combat item - [[New-You Club Membership Form]] || +3 || No || 80 adventures||
|-
| [[Red-Nosed Snapper]] || Familiar || +2 to target phylum || No || Until changed ||
|-
| [[A Beastly Odor]] || Potion - [[The Beast Within™ candle]] || +2 to [[:Category:Beasts|Beasts]] || No || 40 adventures ||
|-
| [[Ew, The Humanity]] || Potion - [[Scent of a Human™ candle]] || +2 to [[:Category:Dudes|Dudes]] || No || 40 adventures ||
|-
| [[Monkey Point]] || Skill - [[cursed monkey's paw]] || +2 || No || Until next cast || Must have used exactly 4 monkey wishes that day
|-
| [[balanced antler]] || Weapon || -1 to [[:Category:Beasts|Beasts]] || No || While equipped || Beast monster encounters are re-rolled, just once
|-
| [[McHugeLarge Slash]] || Skill - [[McHugeLarge left pole]] || +3 || Yes || Until next cast or rollover ||
|-
| [[Try to Remember]] || Skill - [[Time is a Möbius Strip]] || || || ||
|}


==Notes==
==Notes==
*The adventure queue is thought to reset at rollover (although this has not been tested).
*The adventure queue does not reset at rollover.
*The adventure queue can have duplicates.  If you meet 5 dairy goats in a row, the combat queue contains 5 dairy goats and no other encounters.
*The adventure queue can have duplicates.  If you meet 5 dairy goats in a row, the combat queue contains 5 dairy goats and no other encounters.
*Choice adventures (even ones that result in combats, like in [[The Haunted Bedroom]]) count towards the non-combat queue only.
*The adventure queue cannot be manipulated at all on the [[Secret Tropical Island Volcano Lair]], neither by using [[Transcendent Olfaction]] nor by using banishing or scaring items. (Monsters from this lair can still be [[Copying|copied]], though.)
*Options that skip choice adventures without consuming an adventure prevent the encounter from being added to the adventure queue.
*Straight-forward computer implementations of the algorithm (including KoL's) have very tiny biases in the random selection procedure that can be ignored for all practical purposes.
==History==
*The queue lengths changed from 3 encounters to 5 encounters in Fall of 2006.
*Prior to NS13, all zones shared the same two queues.  If a player entered a zone for the first time, or with 5 of each encounter flavor from some other zone, there would have initially been zero, then one, ... applicable encounters in the queue.
*Prior to NS13, all zones shared the same two queues.  If a player entered a zone for the first time, or with 5 of each encounter flavor from some other zone, there would have initially been zero, then one, ... applicable encounters in the queue.
*After NS13, the adventure queue was changed in a way that -- according to Jick -- makes abusing it impossible. Each zone now has two queues, one for combats and one for noncombats.
*After NS13, the adventure queue was changed in a way that -- according to Jick -- makes abusing it impossible. Each zone now has two queues, one for combats and one for noncombats.
*This area of game mechanics is not well understood.  For past investigation, see the work by godskook, eit_brad and others in this [http://forums.hardcoreoxygenation.com/viewtopic.php?p=30330#30330 HCO forum thread on Adventure Outcome] -- the material on this page is derived from that investigation.
*Choice adventures in zones like the [[The Haunted Bedroom]] count towards the non-combat queue only.


[[Category:Game Mechanics]]
[[Category:Game Mechanics]]

Latest revision as of 17:46, 12 August 2025

[ Return to Game Mechanics ]

The adventure queue is a feature in the game that makes high occurrences of the same adventure in a short period of time less likely. It works by keeping track of the last few adventures, and then sometimes rejecting an adventure if it's rolled again. For example, if you head to the goatlet for the first time and fight a dairy goat, dairy goats will be slightly less frequent for the next few adventures.

The queues are 5 encounters long. There are separate queues for combats in each zone, and for noncombats in each zone.

Choose Your Own Adventure

Specifically, the way an adventure is chosen is

  • Check the conditions for each of the Superlikely adventures in the zone. If you meet the requirements for a superlikely, you receive that adventure. (If you qualify for more than one, you receive one of the possible ones at random, with equal probability.) If you do not meet the requirements for any of the superlikelies, then:
  • Decide on either combat or non-combat.
    • Create a selection list to use for the encounters.
  • (c) If combat: populate the selection list with the possible combat encounters from the zone like so:
  • For each combat encounter in the zone, first do the following:
  1. If the monster is olfacted, add 3 copies of that monster to the list (does not override the special rejection rate below). Note that since this occurs for each copy of a monster in the base list, in a zone that starts out with 2 copies of a monster, the olfaction processing would result in a total of 6 additional copies of the monster in the selection list, etc. (The same goes for Attunement, below.)
  2. If you have attuned to the monster's essence with a Staff of the Cream of the Cream jiggle, add 2 copies of that monster to the list.
  3. If the monster is banished, do not add it to the list.
  4. Otherwise, add the monster to the list.
  • If, at this point, the combat selection list is empty, ignore banishing and use the original list of combat encounters.
  • For each monster in the list:
  1. If the monster has a special rejection rate on it, remove it if a roll says that monster should be rejected (applies to all copies at once).
  2. If there is a conditional, such as delay() on the monster, remove it unless the conditional has been met.
  • (c select) Select an encounter from the selection list.
  • If, at this point, the combat selection list is empty, fight a tumbleweed.
  • If it's olfacted, that's the encounter.
  • If it's not in the combat queue, that's the encounter.
  • If it's in the combat queue,
  • 25% of the time: accept the encounter.
  • 75% of the time: go to (c select) and choose a new combat encounter, subjecting that choice to the combat queue as well.
  • (nc) If non-combat: populate the selection list with the possible non-combat adventures from the zone like so:
  1. If the adventure has a special rejection rate on it, do not add it if a roll says that it should be rejected.
  2. If there is a conditional, such as delay() on the adventures, do not add it unless the conditional has been met.
  3. Otherwise, add the adventure to the list.
  • (nc select) Select an adventure from the selection list.
  • If the non-combat selection list is empty, go to (c)
  • If it's not in the non-combat queue, that's the adventure.
  • If it is in the non-combat queue,
  • 25% of the time: accept the adventure.
  • 75% of the time: go to (nc select) and choose a new non-combat adventure, subjecting that choice to the non-combat queue as well.

Note that once you enter the queue-elimination process, you don't reroll for superlikely or the type of encounter: if a non-combat is first selected you only examine non-combats against the non-combat queue, and similarly for combats.

Equations for Encounter Frequency

For one type (combat or non-combat) of encounter, with

  • e total encounters in a zone,
  • j fractional chance of rejecting an adventure in the queue (assumed to be 3/4 or 75%), and
  • u unique encounters from this zone in the adventure queue
  • U giving the indexes for the u adventures from this zone in the queue
  • R (elements ri) giving the frequencies of encounters of our type in this zone
  • rinq giving the total base frequency of drawing any of the encounters from this zone that are present in the queue.

For all adventures equally likely, ri=1/e and the chance of drawing an encounter that is present in the queue is (assuming j=3/4)

                    1
 inq(j;e,u)  = -----------
                4 e - 3 u

while the chance of drawing an encounter not present in the queue is

                    4 
 outq(j;e,u) = -----------
                4 e - 3 u

Note that these formulas only hold if the zone's encounters are equally likely.

If the adventures are not equally likely, the chance of drawing an encounter that is present in the queue is (again assuming j=3/4)

                           1 
 inq(j,R,U;i)  = ri ---------------
                     4 - 3 * rinq

The chance of drawing an encounter not present in the queue is

                           4 
 outq(j,R,U;i) = ri ---------------
                     4 - 3 * rinq

Table of Encounter Frequency

For j=75%, among e total encounters of that flavor in the zone (all equally likely), and u unique encounters from the zone already in the queue:

Percent chance to draw each encounter that is in the queue
u \ e 3 enc.
in zone
4 enc.
in zone
5 enc.
in zone
6 enc.
in zone
7 enc.
in zone
8 enc.
in zone
9 enc.
in zone
1 zone enc in queue 11.11% 7.69% 5.88% 4.76% 4.00% 3.45% 3.03%
2 zone enc in queue 16.67% 10.00% 7.14% 5.56% 4.55% 3.85% 3.33%
3 zone enc in queue 33.33% 14.29% 9.09% 6.67% 5.26% 4.35% 3.70%
4 zone enc in queue 25.00% 12.50% 8.33% 6.25% 5.00% 4.17%
5 zone enc in queue 20.00% 11.11% 7.69% 5.88% 4.76%


Percent chance to draw each encounter that is not in the queue
u \ e 3 enc.
in zone
4 enc.
in zone
5 enc.
in zone
6 enc.
in zone
7 enc.
in zone
8 enc.
in zone
9 enc.
in zone
0 zone enc. in queue 33.33% 25.00% 20.00% 16.67% 14.29% 12.50% 11.11%
1 zone enc. in queue 44.44% 30.77% 23.53% 19.05% 16.00% 13.79% 12.12%
2 zone enc. in queue 66.67% 40.00% 28.57% 22.22% 18.18% 15.38% 13.33%
3 zone enc. in queue 57.14% 36.36% 26.67% 21.05% 17.39% 14.81%
4 zone enc. in queue 50.00% 33.33% 25.00% 20.00% 16.67%
5 zone enc. in queue 44.44% 30.77% 23.53% 19.05%

NS13 Queue Manipulation

There are some ways of increasing or decreasing the odds of encountering given monsters.

Queue Manipulation sources

The following is a list of all methods of queue manipulation that are not true banishes. Collectively, they are known as "sniffs".

Source Source type Additional copies Suppresses queue rejection? Duration Notes
On the Trail Skill - Transcendent Olfaction +3 Yes Until next cast
Staff of the Cream of the Cream Chefstaff jiggle - Avatar of Jarlsberg +2 Yes Until next cast
Make Friends Skill - Avatar of Sneaky Pete +2 No Until next cast
Curse of Stench Skill - Actually Ed the Undying +3 No Until next cast
Long Con Skill - Snake Oiler +3 Yes Until next cast
Perceive Soul Skill - Dark Gyffte +2 No 30 adventures
dinosaur pheromone kit Combat item - Fall of the Dinosaurs It's complicated n/a 20 adventures Uses a horrifying math function to increase the chances of the targeted dinosaur type
Motif Skill - Jazz Agent +2 Yes Until next cast
Hunt Skill - Wereprofessor +3 Yes Until next cast?
Get a Good Whiff of This Guy Familiar skill - Nosy Nose +1 No Until next cast Only applies while Nosy Nose is your current familiar
Gallapagosian Mating Call Skill - Illustrated Mating Rituals of the Gallapagos +1 No Rollover
Hold Hands Skill - August scepter +1 No Until you've encountered 3 copies
Offer Latte to Opponent Skill - latte lovers member's mug +2 No 30 adventures
Daily Affirmation: Be Superficially interested Combat item - New-You Club Membership Form +3 No 80 adventures
Red-Nosed Snapper Familiar +2 to target phylum No Until changed
A Beastly Odor Potion - The Beast Within™ candle +2 to Beasts No 40 adventures
Ew, The Humanity Potion - Scent of a Human™ candle +2 to Dudes No 40 adventures
Monkey Point Skill - cursed monkey's paw +2 No Until next cast Must have used exactly 4 monkey wishes that day
balanced antler Weapon -1 to Beasts No While equipped Beast monster encounters are re-rolled, just once
McHugeLarge Slash Skill - McHugeLarge left pole +3 Yes Until next cast or rollover
Try to Remember Skill - Time is a Möbius Strip

Notes

  • The adventure queue does not reset at rollover.
  • The adventure queue can have duplicates. If you meet 5 dairy goats in a row, the combat queue contains 5 dairy goats and no other encounters.
  • Choice adventures (even ones that result in combats, like in The Haunted Bedroom) count towards the non-combat queue only.
  • The adventure queue cannot be manipulated at all on the Secret Tropical Island Volcano Lair, neither by using Transcendent Olfaction nor by using banishing or scaring items. (Monsters from this lair can still be copied, though.)
  • Options that skip choice adventures without consuming an adventure prevent the encounter from being added to the adventure queue.
  • Straight-forward computer implementations of the algorithm (including KoL's) have very tiny biases in the random selection procedure that can be ignored for all practical purposes.

History

  • The queue lengths changed from 3 encounters to 5 encounters in Fall of 2006.
  • Prior to NS13, all zones shared the same two queues. If a player entered a zone for the first time, or with 5 of each encounter flavor from some other zone, there would have initially been zero, then one, ... applicable encounters in the queue.
  • After NS13, the adventure queue was changed in a way that -- according to Jick -- makes abusing it impossible. Each zone now has two queues, one for combats and one for noncombats.