Combat Selection Spading With Conditional Monsters

This is where you spade, shovel and sickle. Or is it reap?
Post Reply
User avatar
Pewt
AFH
Posts: 200
Joined: Sat Aug 25, 2012 2:56 pm

Combat Selection Spading With Conditional Monsters

Post by Pewt » Tue Mar 05, 2013 12:56 pm

edit: A back-end hotfix made this no longer accurate.

After compiling all of this I noticed it's somewhat more coherent than I expected, so I'll post what I have for feedback/suggestions and link darth here to add whatever I missed or messed up whenever he gets on.

Note that when I say "conditional" this was only tested with monsters that have multiple types depending on ascension, gender, etc, and I'm not talking about delay()/base rejection rate (astronomer), etc.

First off, the experiments and hard data (mostly done today and yesterday by darth in AoJ aftercore and myself in NP aftercore):

-Back in december I noticed that if you banish a whole zone but have sniffed a conditional monster (meat blob, clingy pirate are the ones I tested on) you get white screened.

-Darth noticed while spading the cream staff that olfaction and cream stack (so olfact = 4 copies, cream = 3 copies, olfact+cream = 6 copies, all total) and that banishing isn't entirely overridden by olfaction; it still removes the initial copy, so olfaction goes from 4 copies to 3, cream goes from 3 to 2, etc. This is doubled if there are two copies of the monster, so astronomer goes from 8 to 6 or somesuch.

-I burned some turns in the Haunted Pantry and saw 14 meat blobs, 18ish (don't remember exactly?) elbow macaroni, and 23 of each can. Darth burned some turns with 2 monsters banished and saw 14ish blobs and 36ish of the other monster, so blobs have 50% rejection rate or close to it. The exact number doesn't matter for the rest of this post, just the fact that it's 0%<rr<100%.

-I burned some turns in the f'c'le and saw 12 creamy pirates and 14 clingy pirates (everything else was banished), so those look like 0% rejection rate or close (and I don't see why a monster would have 5% RR or something equivalently silly). I also saw 5 clingy pirates in a row with every other monster banished, something which sounds intuitively obvious but isn't (I'll get back to that later).

-Darth noticed that the white screen happens even if you haven't banished a meat blob but you have banished the other monster, but it only happens if the meat blob's rejection rate comes up (so banishing clearly works differently on some conditional monsters). Note that this doesn't occur unless you've sniffed it; otherwise you get tumbleweed.

-Astronomers still show up when sniffed and banished. Unsure on the rate (conflicts with the above, but the rejection rate on conditional monsters seems to be the least important part; as I mentioned earlier, clingy pirate has no rejection rate and yet with olfaction+banish it still white screens an empty zone).

-If you banish the HitS other than astronomers, you get a white screen whenever the astronomer is rejected, same as for meat blobs above. You don't have to have sniffed it.

-I switched genders halfway through a cocktail napkin banish + sniff on clingy pirate, and it was still both sniffed and banished. Clearly there's something weird going on with how the game handles such monsters. Later on pants faxed me a female clingy pirate and sniffing it gave me male clingy pirates, so this wasn't related to switching genders midway through. The game might just recognize what's going on and point you to the other monster, though.

-I noticed that without sniff, but an entirely banished f'c'le, I only saw crusty pirates; I even tried banishing them with two sources at once (just in case) and it had no effect. Haven't tried 6 regular banishes though (no cocktail napkin/valuable trinket) so it's impossible to say whether this is related to some special behaviour of them or to the fact that there's a conditional monster in the zone. The first time through, Crusty Pirates were the last monster banished (with a popper and later a popper + vmask), but the second time through they were the second monster banished, with Harold's Bell.

-If you banish+sniff a conditional and don't banish the rest of the zone (or at least leave one monster unbanished), the conditional monster never shows up.

-The white screening doesn't happen if a noncombat is rolled for (and presumably the same goes for superlikelies).

Okay, so, what does this mean? From here on out everything is guesswork:

-It looks like banishing interacts a bit differently with olfaction than was previously thought.

-It seems like rejection rate happens in two phases.

#1) 100% rejection rate from a banished but otherwise boring monster. This prevents the monster from being added to the selection list, but doesn't prevent copies from olfaction-like effects.

#2) Rejection rate due to special conditions. The combat select should probably look something like this (pseudocode):

Code: Select all

var LastMonsterIndex
var TempMonster
var MonsterList
var RejectedMonsterList

Label: Start
    LastMonsterIndex = Rand(1,size of MonsterList)
Label: Post-index
    If LastMonsterIndex is invalid return Tumbleweed

    TempMonster = Pick LastMonsterIndex from MonsterList
    If TempMonster is in the queue and Rand(1,100) <= 75 go to Start
    If TempMonster is in RejectedMonsterList
        LastMonsterIndex = Rand(1,size of MonsterList) such that it's different from last time
        go to Post-Index
    If TempMonster has a rejection rate, and it's rejected
        add TempMonster to RejectedMonsterList
        LastMonsterIndex = Rand(1,size of MonsterList) such that it's different from last time
        go to Post-Index

return TempMonster
This works fine most of the time, but breaks when there are two or more copies of a monster that gets rejected, and no other choices. I have no idea why this would be coded this way, but I can't think of what else could cause this. Darth's guess was slightly different, with the problematic interaction being that the original monsters, but not olfacted copies, are removed from the list (the same as banishing normally works), but I modified it to this to explain the interaction with Astronomers.

Note that it seems that banishing on conditional monsters specifically modifiers a second special rejection rate they have rather than just giving them a flat 100% before olfaction, so that you'll never see them when banished and so that it will consistently break the zone if there are no alternatives, since it keeps picking and rejecting different versions of that monster rather than picking a tumbleweed. I'd assume that this was related to the fact that most of these monsters toggle by ascension or zone, but then that doesn't explain the white screen from astronomers, who are a consistent monster.

-I really have no clue why I only saw crusty pirates, and am at a loss for how to explain what could cause that.

-What else?

Further spading:

-Find out whether Astronomers show up at a different rate than other monsters while sniffed+banished.

-Find out whether the f'c'le behaves the same way with 6 normal banishes as it does with 4 normal and 2 special.

-Triple check that clingy pirate is actually 0% RR.
Last edited by Pewt on Mon Mar 11, 2013 11:23 am, edited 1 time in total.

User avatar
nworbetan
AFH
Posts: 80
Joined: Tue Nov 15, 2011 6:01 pm

Re: Combat Selection Spading With Conditional Monsters

Post by nworbetan » Tue Mar 05, 2013 2:08 pm

I don't know quite what your overall goal with this spading is, but if "cataloging and documenting all of the variegated and interesting ways that all of the variegated and interesting forms of queue manipulation interact in all of the variegated and interesting zones in KoL" exists on your list of things you want to accomplish, then kudos and I'm sure I'll continue to be impressed with your results as long as you keep working on things! If you're hoping to pin down a "theory of everything"... I think you might end up disappointed.

It's pretty well established that when Jick needs to make something special happen, he'll write the code he needs and stick it in the place where it needs to happen. Later on down the road, when he does something thematically related, you can't exactly take it for granted that he'll even reproduce (or even remember) exactly how the previous similar thing worked, and he has lamented on the podcasts about how not generalized his "make something special happen" code can be. I hope that doesn't sound discouraging though.

Also, there's one minor piece of polish that hopefully is a contribution: a slightly more precise description of olfaction is that it adds 3 copies of the target monster, and presumably the AoJ analog adds 2 copies (and banishing any single one of the copies probably doesn't affect the additional copies in some cases, but may in other cases).

User avatar
Pewt
AFH
Posts: 200
Joined: Sat Aug 25, 2012 2:56 pm

Re: Combat Selection Spading With Conditional Monsters

Post by Pewt » Tue Mar 05, 2013 2:15 pm

nworbetan wrote:Also, there's one minor piece of polish that hopefully is a contribution: a slightly more precise description of olfaction is that it adds 3 copies of the target monster, and presumably the AoJ analog adds 2 copies (and banishing any single one of the copies probably doesn't affect the additional copies in some cases, but may in other cases).
This is the definition I'm running off (may have written it unclearly), except that it's affected by how many monsters there are in the zone (ie there are 2 astronomers so you get +6 from sniff).

And yeah, I don't really know what my goal is either. In general I'd like to find out how exactly monster selection happens if it's at all possible, though, and see where that gets me (if anywhere). This originally got started due to a series of accidents/coincidences and some random game mechanics chat between darth and I and given I'm working on a simulator of adventuring in KoL I figured I might as well run with it. The thing that makes this interesting to me in particular is that it's consistent over several fairly different monsters, so there's clearly something general going on here.

Post Reply