ML variation and to-hit rates

This is where you spade, shovel and sickle. Or is it reap?
Post Reply
User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

ML variation and to-hit rates

Post by QuantumNightmare » Thu Oct 18, 2007 11:05 am

Crawly posted something interesting on the HCO forums, regarding the fact that you can now hit monsters as if they have 90% of their ML in defense, but they still take damage as if they have 100% of their ML in defense. Basically, a 400 muscle character can hit a 440ML basement (ML-invariant?) monster more than half the time.

So something has changed. I propose we start a new spading project to verify ML-variation in this new game, and test to-hit rates as well. Most of the needed tools have been created by the old/inactive guard over at HCO, most specifically dirkdiggler's powermunger, a perl tool for parsing mafia logs. I don't know if it works with new versions or if we need to edit it.

The ML-variation tests that need to be run are:
-What is the ML variation of the average monster. % of ML, or preset amount?
-Does ML vary based on base ML, or based on +ML as well?
-Do basement monsters vary?
-Are bunnies really constant/negative ML? If so, what other monsters are?

The to-hit tests are simpler:
-Find the lowest possible muscle to hit a given defense
-Find the maximum possible muscle to miss (besides fumbles)
-Find the to-hit rate within this range.

This will be a very large project, but I believe we have the right people here to do it. You guys down with this? I'll try to start designing some experiments soon, but these are the questions we need to answer. Let the spading begin.

Barehanded damage = floor(player muscle/4) - (monster defence) + 1 + bonus damage + C
C=0, or 1 if a critical hit is rolled.

dalgar
Pie of the Sky
Posts: 26
Joined: Sun Sep 02, 2007 9:32 am

Post by dalgar » Mon Oct 22, 2007 6:31 pm

When Kittiwake tests anything to do with damage (criticals, regular damage, ML variance, etc.), he equips a pasta spoon (or equivalent) rather than fighting barehanded. I believe the reason is that the results become less variant and thus easier to interpret/more meaningful. His actual words are in the HCO forum, probably in an ML variance thread, but I'm in a rush atm and thus can't search for it.

Hope this helps.

Dalgar

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Mon Oct 22, 2007 7:22 pm

Thanks for trying to help, but you're wrong. Well not wrong, since kittiwake did spade ML in the way you described, but the method I pointed out is better. With a weapon of power 10, you can deal between 1-3 damage with your weapon (2-6 on criticals). This means that three different amounts of damage need to be dealt before you know the monster defence (and on average, many more than 3 rounds of combat). When fighting barehanded, you will always deal 1 damage with your weapon (2 on criticals), with no variation. The disadvantage is your muscle needs to be more than 4 times the monster defence to get a reading... but it eliminates variation.

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Tue Nov 06, 2007 7:50 pm

Fern's basement.

34ML: 31 defence
40ML: 36 defence (beer golem, implied ML)
60ML: 54 defence
126ML: 114 defence
154ML: 139 defence

In every case, defence is 90% of monster ML. In NS-11, this used to be 100% (with rare exceptions).

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Fri Dec 14, 2007 1:24 pm

Kujjie is collecting more data, and I'm analyzing it here. As sample sizes increase, I'll post the data here. For each monster, I display (Defence) : (# of times encountered)

Funhouse
Lemon-in-a-box (17 base ML)
16 : 112

Disease-in-a-box (18 base ML)
17 : 117

Bugbear-in-a-box (18 base ML)
17 : 107

Shaky Clown (19 base ML)
18 : 112

Scary Clown (19 base ML)
18 : 114

Creepy Clown (20 base ML)
18 : 81
19 : 22

The only monster that shows any variation is the creepy clown. For all monsters, base defence is CEILING(0.9*ML).

User avatar
KujjieKujjieKoo
Spade Ninja
Posts: 2240
Joined: Mon Apr 30, 2007 8:50 pm
Location: !Chicago
Contact:

Post by KujjieKujjieKoo » Fri Dec 14, 2007 1:29 pm

I'd be interested to see if it's base ML that determines if it can have variable defense, or adjusted ML. I'll run some Fun House with +10 ML, and see if we get any changes.
Image

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Sat Dec 15, 2007 12:22 pm

Goatlet (All monsters have 68 base ML, 62 base defence)
Sabre tooth goat
59 : 13
60 : 36
61 : 44
62 : 62
63 : 66
64 : 17
Average: 61.77 defence

Drunk Goat
59 : 19
60 : 34
61 : 42
62 : 54
63 : 94
64 : 11
Average: 61.88 defence

Dairy Goat
59 : 9
60 : 36
61 : 47
62 : 55
63 : 78
64 : 15
Average: 61.84 defence

Totals
59 : 041 (5.60%)
60 : 106 (14.48%)
61 : 133 (18.17%)
62 : 171 (23.36%)
63 : 238 (32.51%)
64 : 043 (5.87%)
Average: 61.80 defence
Last edited by QuantumNightmare on Mon Jan 21, 2008 9:21 pm, edited 1 time in total.

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Mon Dec 17, 2007 12:27 am

Dungeon of Doom
Large Kobold (32 defence, 39ML)
31 : 36
32 : 67
33 : 29
Average: 31.9

Acid Blob (35 defence, 38 ML)
34 : 35
35 : 73
36 : 32
Average: 35.0

Mind Flayer (36 defence, 38ML)
35 : 16
36 : 84
37 : 27
38 : 15
Average: 36.2

Swarm of Bees (36 defence, 41ML)
35 : 28
36 : 103
Average: 35.8

Quantum Mechanic (34 defence, 37 ML)
33 : 44
34 : 66
35 : 30
Average: 33.9
Last edited by QuantumNightmare on Mon Jan 21, 2008 9:21 pm, edited 2 times in total.

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Thu Jan 10, 2008 11:57 am

Lab

Very mad (45 ML)
39 : 3
40 : 16
41 : 36
42 : 21
43 : 10
Average: 41.22

Mad (40 ML)
35 : 18
36 : 97
37 : 38
38 : 21
Average: 36.36

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Thu Jan 10, 2008 3:25 pm

Conservatory
Encounter: skeletal hamster (8 ML)
8: 33

Encounter: man-eating plant (9 ML)
9: 32

Encounter: skeletal cat (9 ML)
9: 32

Encounter: anglerbush (9 ML)
9: 35

Encounter: skeletal monkey (9 ML)
9: 36

Encounter: confused goth music student (9 ML)
9: 30

As expected, no variation occurred at low ML

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Thu Jan 10, 2008 5:05 pm

Fun house with +15ML

Encounter: shaky clown
31: 47

Encounter: disease-in-the-box
30: 52

Encounter: lemon-in-the-box
29: 57

Encounter: creepy clown
31: 8
32: 19
33: 16

Encounter: scary clown
31: 49

Encounter: bugbear-in-the-box
30: 50

Variation is only seen if base ML is 20 or higher. Creepy clown is the only clown to show variation, both with and without +ML. However, the range of variation is higher.

Conclusion: Base ML is used to see if variation occurs, boosted ML is used to calculate the amount of variation.

However, monster defence is NOT increased by 15 when using +15ML! Take the scary clown. It has 19ML, so defence is ceiling(0.9*19)=18. A scary clown with +15ML has ceiling(0.9*[19+15])=31 defence, instead of ceiling(0.9*19)+15=34 defence.

salien
Pie in the Sky
Posts: 115
Joined: Fri Jan 11, 2008 1:50 pm

Post by salien » Fri Jan 11, 2008 2:19 pm

QuantumNightmare wrote:Conclusion: Base ML is used to see if variation occurs, boosted ML is used to calculate the amount of variation.


Actually, I think your data disputes this. Consider your original Creepy Clown. With a base ML of 20, assume the actual attack values are either 19, 20, or 21:

19*0.9 = 17.1, ceiling'd to 18
20*0.9 = 18
21*0.9 = 18.9, ceiling'd to 19

(This would agree with your much higher encounter rate of 18's.)

Then, with +15 ML, if we apply the original variance of +/- 1:

34*0.9 = 30.6, ceiling'd to 31
35*0.9 = 31.5, ceiling'd to 32
36*0.9 = 32.4, ceiling'd to 33

This matches the data on both sides, but the degree of variance is unchanged. Given that the minimum ML for variance is 20, and the other monsters observed have defense values in line with 5% of base ML, I hypothesize the following full attack and defense formulas:

Attack = base ML +/- RAND(0, FLOOR(0.05*base ML)) + ML mods
Defense = CEILING(0.9*attack), or CEILING(0.9*(base ML +/- RAND(0, FLOOR(0.05*base ML)) + ML mods))

Easiest way to test would be to hit the creepy clown with +20 ML. If you see defense values of 35, 36, 37, 38, QN is right. If you only see 36, 37, then my hypothesis is correct. Also, should try hitting the creepy clown with just a nasty rat mask, and see if any variance is detected; -ML might work different from +ML, but assuming it doesn't, by QN's conclusion there would be no variance, by mine there would still be (in fact, you'd see 3 different values, 13, 14, and 15).

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Tue Jan 15, 2008 9:57 pm

Funhouse (aria at level 16, equivalent to +32ML)
Encounter: disease-in-the-box
45: 37

Encounter: shaky clown
46: 33

Encounter: creepy clown
46: 13
47: 11
48: 5

Encounter: bugbear-in-the-box
45: 37

Encounter: lemon-in-the-box
45: 31

Encounter: scary clown
46: 32

Conclusions: 20 ML creepy clown is increased to a 52ML clown. Defence is then ceiling(52*.9)=47. ML variation adjusts this by 1 in each direction, so ML variation occurs due to base ML.

I read the last round of data wrong, thanks to salien for pointing out how the +15ML data didn't conclusively show either way. This also better explains why the other monsters don't show any variation with +ML.

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Mon Jan 21, 2008 6:55 pm

Treasury
Encounter: Knob Goblin Elite Guardsman (26 defence)
24: 10
25: 56
26: 57
27: 33

Encounter: Knob Goblin Bean Counter (22 defence)
20: 17
21: 46
22: 59
23: 28

Encounter: Knob Goblin Embezzler
21: 1

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Mon Jan 21, 2008 9:19 pm

South of the Border
Encounter: irate mariachi
Monster Defence Testing:
18: 32
19: 14

Statgain testing:
5 : 46
ML = 20.00
------------------------------

Encounter: mariachi calavera
Monster Defence Testing:
19: 7
20: 28
21: 14

Statgain testing:
5 : 29
6 : 20
ML = 21.63
------------------------------

Encounter: handsome mariachi
Monster Defence Testing:
16: 46

Statgain testing:
4 : 33
5 : 13
ML = 17.13
------------------------------

Encounter: angry piñata
Monster Defence Testing:
19: 14
20: 20
21: 9

Statgain testing:
5 : 20
6 : 23
ML = 22.14
------------------------------

Encounter: raging bull
Monster Defence Testing:
22: 8
23: 30
24: 11

Statgain testing:
6 : 38
7 : 11
ML = 24.90
------------------------------
Some curiosities: 20ML creepy clown varies, 20 ML handsome mariachi does NOT.
Last edited by QuantumNightmare on Wed Jan 23, 2008 6:47 pm, edited 1 time in total.

salien
Pie in the Sky
Posts: 115
Joined: Fri Jan 11, 2008 1:50 pm

Post by salien » Tue Jan 22, 2008 3:29 pm

Where are your ML values coming from? I thought you'd said the wiki, but the handsome mariachi is listed there as ML 17, and ML 17 makes a lot more sense with the 16 defense and lack of variance. Are you determining ML yourself based on stat gains?

Basically, my feeling is that with NS13 and the new defense formula, there are no longer any monsters with attack/ML unlinked from defense. I'm curious if anyone has been able to prove any monsters unlinked recently. The obvious place to start would be with NS11 monsters that had known significant differences, though I can't offhand remember any... Of course, if you're determining ML yourself and are certain the handsome is ML 20, then I've already been disproven. :)

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Tue Jan 22, 2008 9:50 pm

So far I've been taking ML and defence values off of kittiwake's guide, scaling down to 90% for NS13, and seeing how the defence varied off the expected amount. But I'm starting to work on tracking statgains from the debug logs (not as easy as it sounds...), and found that you might be right once more.

Out of 45 handsome mariachis, 32 gave 4 stats and 13 gave 5 stats. That's 71% 4 stats and 29% 5 stats, as expected with 17 ML. This might be the best way to collect both base ML and defence data.

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Tue Mar 04, 2008 10:38 pm

salien wrote:Basically, my feeling is that with NS13 and the new defense formula, there are no longer any monsters with attack/ML unlinked from defense. I'm curious if anyone has been able to prove any monsters unlinked recently. The obvious place to start would be with NS11 monsters that had known significant differences, though I can't offhand remember any...
The fun house has several monsters with different attack and defence, according to Kittiwake's spading. Here's some data from the fun house, ML determined by stat gain, defence determined by barehanded attacking. Any round numbers are exact.

Code: Select all

------------------------------

Encounter: lemon-in-the-box
ML = 17.08
Defence = 16.00

------------------------------

Encounter: scary clown
ML = 18.58
Defence = 18.00
------------------------------

Encounter: shaky clown
ML = 18.62
Defence = 18.00

------------------------------

Encounter: disease-in-the-box
ML = 17.95
Defence = 17.00

------------------------------

Encounter: bugbear-in-the-box
ML = 16.00
Defence = 17.00

------------------------------

Encounter: creepy clown
ML = 20.00
Defence = 18.27


ML and defence don't seem to be linked for the bugbear-in-the-box. There's no reason for defence to be higher than ML, unless it's set that way on purpose.

salien
Pie in the Sky
Posts: 115
Joined: Fri Jan 11, 2008 1:50 pm

Post by salien » Wed Mar 05, 2008 1:14 am

Well, that's just annoying. :) Just because I didn't want it to be true, I sniffed bugbears and spent a few turns confirming their stats. I also got conclusively 17 defence, always received exactly 4 substats, and just to be entirely certain they hadn't unlinked attack and statgain, took my moxie down to 15 and DA and DR to zero and let them hit me for a while. I always took either 4 or 5 damage, which is consistent with 16 attack, and conclusive that it's no higher (since an attack of 17 would have done a minimum of 5 damage).

So, no easy tricks to determine ML from defence, though it does seem to be largely consistent. I guess stat gains still has final say there though.

salien
Pie in the Sky
Posts: 115
Joined: Fri Jan 11, 2008 1:50 pm

Post by salien » Tue Apr 22, 2008 1:24 am

Double-post! And cross-posted from the HCO forums, since this thread is where most of the defence formula work is:

fighting bugbears in boxes (base attack 16, defence 17) with varying +ML:

Code: Select all

1351 muscle   
   
+ ML   Damage   Defence
0 ML   321   17
1 ML   320   18
2 ML   320   18
3 ML   319   19
4 ML   318   20
5 ML   317   21
6 ML   316   22
7 ML   315   23
8 ML   314   24
9 ML   313   25
10 ML   312   26
11 ML   311   27
12 ML   311   27
13 ML   310   28
21 ML   302   36
22 ML   302   36
23 ML   301   37

This implies monsters with weird defence simply have a bonus number factored into the formula, as such: defence = ceiling(0.9*(attack+def_bonus)). For the bugbear-in-the-box, def_bonus is 2. (In case it's not obvious, here's how I came to the conclusion: by the normal ceiled 0.9*attack formula, increases in defence as you incrementally increase ML only fail to happen when attack mod 10 is 0; for the bugbear, they fail to happen whenever attack mod 10 is 8, implying a hidden bonus of 2 ML (or 12, or -8, or 22, etc.) for defence only; 2 fits the actual observed defence values, including QN's example above at +32 ML giving bugbears with (48+2)*0.9=45 defence. If it was just a flat bonus of 2 to defence, the failed increases would appear when attack went from 19->20 and 29->30, not from 17->18 and 27->28)

This should be helpful in the monster spading effort, helping us nail down questionable monsters, as well as being useful in things like mafia that calulate the effects of ML for you. Still needs to be confirmed on other weird-defence monsters.

EDIT: elite guard data:

Code: Select all

ML   def min   def max
30   25      27
31   26      27
32   27      28
33   27      29
      
40   34      36
41   35      36
42   36      37
43   36      38


That's consistent with a base ML of 30, def_bonus of -2, and the following formulas:
mon_var = floor(base_attack/20)
attack = base_attack + ML_mod + rand(-mon_var, mon_var)
defence = ceiling(0.9 * (attack + def_bonus))

Still todo: determine if that rand roll can differ for attack and defence in a single encounter. Should be doable with more elite guards.

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Tue Apr 22, 2008 9:29 am

Haunted kitchen has odd attack/defence values as well. There's are 3ML/4defence, 4ML/4defence, 4ML/5defence, 5ML/4defence, 5ML/5defence monsters there. With +5ML, all monsters have 9 defence.

3ML/4defence: (3+5+1)*.9=8.1, rounded up to 9
4ML/4defence: (4+5)*.9=8.1, rounded up to 9
5ML/5defence: (5+5)*.9=9
5ML/4defence: (5+5-1)*.9=8.1, rounded up to 9
4ML/5defence: (4+5+1)*.9=9

EDIT: I misread your previous statement, this looks plausible. I'd still like to see some high ML library readings, to verify this.

Take a look at the demoninja data: 48ML, 26-28 defence variation. The small variation makes it look like a % modifier is different here, as opposed to an absolute value. If variation was straight calculated on base ML, this variation should be +/- 2, not +/-1.

salien
Pie in the Sky
Posts: 115
Joined: Fri Jan 11, 2008 1:50 pm

Post by salien » Tue Apr 22, 2008 1:56 pm

Are you certain your parsing scripts are handling crits properly? Because I'm noticing the same difference as when I fought the elite guards; I just whacked a bunch of demoninjas, and only ever saw 27-28 defence. (Muscle of 380, I did either 68 or 69, or 69-70 on a crit). If your script was miscalculating a crit like normal damage, it would appear to have the 26 defences you saw.

Because if the demoninja does only have either 27 or 28 defence normally, that corrects an couple assumptions I made: the def_bonus is actually an attack_bonus, and while the bonus does count for XP, it doesn't count for determining variation. The previous examples couldn't determine this because the attack/defense bonus didn't cause the monster to cross a variation boundary one way or the other, and in that case the two sets of formulas are the same; but the demoninja cements this more complicated set as the correct one, having a base_attack of 30 and an attack_bonus of 18:

XP = (base_attack + attack_bonus + ML_mod)/4
mon_var = floor(base_attack/20)
attack = base_attack + attack_bonus + ML_mod + rand(-mon_var, mon_var)
defence = ceiling(0.9 * (base_attack + ML_mod + rand(-mon_var, mon_var)))

Which actually makes it pretty likely that attack and defence can vary independently (as I believe was initially suspected) since the defence formula isn't tied to the actual attack. Still plan to verify that, and the library when I can. (In case it isn't obvious, the attack bonus for the two monsters I previously mentioned is just the inverse of the def_bonus, so bugbears have a -2 attack_bonus and elite guards a +2 attack_bonus; the actual observed values are the same. I suppose we could keep with the first set of formulas I posted, and just add the def_bonus in the mon_var equation, but I think this way looks more sensible.)

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Tue Apr 22, 2008 6:02 pm

I just went through the logs, and it looks like everything is being recorded properly. I've shown that with monsters of <20ML, defence is one exact value and is recorded as such whether they are hit with criticals or not.

As for the demoninja and elite guard, here are the parsed data:

Code: Select all

Encounter: Knob Goblin Elite Guardsman
Monster Defence Testing:
24: 3
25: 117
26: 165
27: 92

Code: Select all

Encounter: Demoninja
Monster Defence Testing:
26: 4
27: 61
28: 24


The low end occurs much less frequently than the regular variation, but it does occur. I just went through the elite guard data by hand, and the three times that 24 defence appeared, no critical hit was present in the debug log. That might be a mafia mistake, but not a parsing mistake.

EDIT: most of this is speculation, until we run testing at +ML and see how things are effected. Both absolute and % defence ideas can work, since there are so many variables that can be changed in these theoretical tests.
Last edited by QuantumNightmare on Tue Apr 22, 2008 6:28 pm, edited 1 time in total.

salien
Pie in the Sky
Posts: 115
Joined: Fri Jan 11, 2008 1:50 pm

Post by salien » Tue Apr 22, 2008 6:27 pm

Welll... crap. Not much I can think of to account for that. Seems that one of the following must be true:

-Our understanding of monster variance is incorrect somehow
-Our formula for barehanded damage is incomplete somehow (but then we should see these regardless of monster level)
-Uh... Something else less obnoxious.

Any chance the spaders gained a muscle point on those hits? No, even with that, it would at best make the defence appear higher, not lower. Bah.

Maybe it is our assumption on variance; do any other varying monsters have weird distributions like this? Maybe the distributions can expose a different formula for how variance is determined than rand(-x,+x). In particular, the distributions from the poop deck and belowdecks might be useful, as the poop deck behaves as expected but the consistent 121's belowdecks are weird.

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Tue Apr 22, 2008 6:44 pm

salien wrote:In particular, the distributions from the poop deck and belowdecks might be useful, as the poop deck behaves as expected but the consistent 121's belowdecks are weird.
Um... 121 is wrong. I have no idea why I wrote that. It's been changed to 122-131 as the range of variance.

In other news, the parsed results are posted for people to look at, to make sure that I didn't make any other mistakes and to help analyze distributions.

We really do need +ML data to figure out what is going on, too many ways to think up elaborate formulas that give us the result we've seen so far.

salien
Pie in the Sky
Posts: 115
Joined: Fri Jan 11, 2008 1:50 pm

Post by salien » Wed Apr 23, 2008 3:18 am

Here are some parsed results from a day (around 80 encounters each) in the library at +122 ML:

Code: Select all

Encounter: bookbat
Monster Defence Testing:
153: 28
154: 30
155: 19
156: 7

Encounter: banshee librarian
Monster Defence Testing:
155: 6
156: 17
157: 20
158: 24
159: 11

Encounter: writing desk
Monster Defence Testing:
160: 18
161: 22
162: 48
163: 3


If my previous theories are correct, this implies:

bookbat: base_attack 49, attack_bonus 2
banshee librarian: base_attack 52, attack_bonus 5
writing desk: base_attack 57, attack_bonus -4

Which matches the base data as well... Except the base data has instances for each monster of a defence one lower than predicted, and this does not. I couldn't find the base haunted library data in the posted parsed results to analyze distribution, but I'm assuming the lowest defence value was again rare; my high-ML test may just not have seen it yet, so I'll continue this tomorrow.

macman104
Just Plain Old Pie
Posts: 13
Joined: Tue Apr 15, 2008 9:07 pm
Contact:

Post by macman104 » Wed Apr 23, 2008 1:32 pm

The next question is what is the reason for these extra values? I mean, Jick and Co. just assign these values willy nilly to these monsters? It makes the equation nice and simple, I'm just not sure about the reason behind it (which may never know).

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Wed Apr 23, 2008 2:55 pm

More testing in the haunted kitchen, +106ML:

Code: Select all

Encounter: paper towelgeist (4 ML / 4 defence base)
110ML / 99 defence

Encounter: zombie chef (5 ML / 5 defence base)
111ML / 100 defence

Encounter: possessed silverware drawer (5 ML / 4 defence base)
111ML / 99 defence

Encounter: demonic icebox (4 ML / 5 defence base)
110ML / 100 defence

Encounter: skullery maid (3 ML / 4 defence base)
109 ML / 99 defence


That's consistent with salien's equations.

EDIT: sniffing demoninja's at +91ML
48ML / 27 defence base
139ML / 109 defence buffed (108-110 defence variation)

Looks like an attack bonus of 18, on an ML of 30. ceiling(30*.9)=27, ceiling([30+91]*.9)=109. Salien... your idea is looking better and better.

If this is correct, it changes the whole format of this guide. Every monster will have a base ML and an attack bonus, instead of a base attack and base defence. Although this might be a base ML value and a defence penalty (with defence variation occuring on the reduced ML), all depends on how attack varies. How can attack variation be tested?

salien
Pie in the Sky
Posts: 115
Joined: Fri Jan 11, 2008 1:50 pm

Post by salien » Wed Apr 23, 2008 9:04 pm

My plan for testing elite guard attack variance was to get DA and DR to 0, and Moxie as low as I can (20, since the multi I'm using is an AT), and then just let them hit me for 29 rounds before finishing them off (the finisher will show whether defence and attack vary independently). According to the monster damage formula, I should take (30-20)+(6-to-7.5)+variance, or 16+variance to 17.5+variance. Though it would be good to know ahead of time how that .5 will be rounded, so it may be better to be hit by a non-varying monster first, also to confirm the damage formula. Or do we know how monster damage rounds? The wiki says the distribution is triangular, which will make it harder to get the extremes we want to nail down a given monster's range, but doesn't say anything about how the rounding works.

Anyway, this'll work pretty well on low-level monsters with a narrow damage range like that, but will be trickier once a lot of +ML is added or on high-level monsters with wider ranges, but it's the best method I know of.

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Wed Apr 23, 2008 9:33 pm

This post uses the stick-on eyebrow method discussed in a seperate post... it's a nice method of testing attack variation (at least on the low end).

Demoninja has 48 ML, 27 defence. Question is: does attack vary by +/-1 or by +/-2? This helps us see how variance is calculated, whether attack varies and defence is calculated off this value, or whether both can vary seperately.

Setup: 42 moxie, +5ML (needed furry suit). At this moxie, stick-on eyebrow piercing will block all attacks at 51 ML or less. Now, demoninja at +5ML has 53ML... in order for the stick-on to block it's attacks, it must have an ML of no more than 51 after variation. In other words: if a single attack is blocked, this is proof that demoninja attack varies by at least 2.

In 18 demoninja encounters, 1 demoninja had it's attack blocked. That one ninja has an attack of 51, we can test it's defence. This shows that attack varies by +/- 2, while defence varies by +/- 1. So it's no a base ML and an attack bonus, it's a base ML and a defence penalty.

salien
Pie in the Sky
Posts: 115
Joined: Fri Jan 11, 2008 1:50 pm

Post by salien » Thu Apr 24, 2008 2:49 pm

Okay, I wanted to just double-check the eyebrow method using the get-hit method; really just to be doubly sure there weren't any quirks to it we didn't know about. The short answer is it's correct, but I learned some more about the monster damage formula, and confirmed that attack and defence vary completely independently. (I fought ninjas with +1 def and -2 attack, and +1 def and +1 attack, normal def and +2 attack, etc. All combinations except +1 def and +2 attack, not surprising in the small sample size.)

Test details next, tentative conclusions at the end.

Setup: no equipment but monster bait. Effects: cantata, inspired (-20% mox), beaten up (-50% mox), embarrassed (-30% mox), and radium radicality (+30 mox, so I can get in and didn't take too much damage), so I had muscle of 677 and mox of 30. Get an encounter with a demoninja, let it hit me until round 28 recording the damage each time, then finish it with a barehanded attack to learn it's defence. Since this is obnoxious and time-consuming, I just olfacted them once, and then tattered away the few other monsters I found, so I managed to fight 38 demoninjas total (one of which I failed to finish because I didn't pay enough attention to my own HP). I expected to take 27.6 to 30 damage from 'normal' demoninjas, not knowing how the rounding would work, and not knowing what to expect from the varied demoninjas.

Results: As stated, attack and defence varied completely independently; defence was either 27 or 28, the 27's being more common as expected, so I'll just address attack. I saw 5 different ninjas as far as attacks, all with ranges with exactly 4 values: 25-28, 26-29, 27-30, 28-31, and 29-32. Small sample, but for each of the 5 ninjas all 4 damage values were pretty common; none were as rare as you'd expect say a 28 to be from round_random(28.8).

Conclusions: monster attack variance could not be factored in for both of the monster attack values in the monster damage formula; if it were, the +2 ninja would have done a minimum of 30 damage (48+2-30)+(0.2*(48+2)), and all 5 ninja types dealt less than 30 at some point. From there, it was easy to conclude that variance must be involved in the first term, as removing it from there would result in a max damage on the +2 ninja of 30.5, which no amount of rounding will push up to the observed max of 32. Also, the low end of the damage range is not ceiled, as again that would force a minimum of 30 on the +2 ninja ((48+2-30)+(0.2*48)=29.6). With no variance on the monster 'weapon', I can't make any conclusions about how the max end is rounded as it was always a whole number. I also can't rule out a round_random() on the low end vs. floor(), because of the small sample size, but the fact that I didn't observe noticeably rare low-end damage leads me to believe it is floored, as otherwise for each ninja the low-end damage would have occurred 2/5 as often as any other damage value. From all that, and the previous work in this thread:

Tentative equations:
Each monster has a base_attack and a base_defence value; these are often equal, but not always.
XP= max((base_attack+ML_mod)/4, 1)
attack_var = rand(-floor(base_attack/20), floor(base_attack/20))
def_var = rand(-floor(base_defence/20), floor(base_defence/20))
final_attack = base_attack+ML_mod+attack_var
final_defence = ceiling(0.9*(base_defence+ML_mod+def_var))
monster_weapon = rand(floor(0.2*(base_attack+ML_mod)), floor(0.25*(base_attack+ML_mod)))
monster_awesome = max(final_attack-player_def, 1)
monster_damage = (monster_awesome+monster_weapon-DR)*DA*ER
attack_var and def_var are constant for the duration of the encounter, monster_weapon is rerolled each time the monster attacks.

Things to verify:
-Rounding in monster_weapon
-Distribution in monster_weapon (is it triangular?)
-Confirm ML_mod in monster_weapon
-Does def_var have -1 added to it randomly and rarely, or is there some oher explanation for the observed rare one-too-low defence values
-Is there a minimum value for (monster_awesome+monster_weapon-DR)

Side note: monster base_defence can not be conclusively figured from the current monster spading tactic if the observed defence is 9; that could be a base_defence of either 9 or 10, due to that ceiling in there. However, if we go back with +1ML, we'll observe either 9 or 10 defence, which will decide the base defence for certain. I think for the higher values that would have this issue, the variance actually makes it possible to determine conclusively with the current tactic; for instance, a base_defence of 28 will show 25-27, 29 will show 26-27, 30 will show 27-28, and 31 will show 27-29, all distinctly identifiable ranges. Just need to exclude those rare -1's from this figuring, heh.

User avatar
QuantumNightmare
AFH
Posts: 1827
Joined: Mon Jan 29, 2007 10:28 pm
Location: Montreal

Post by QuantumNightmare » Thu May 01, 2008 10:38 pm

I took quite a while to get back to this thread, but have been using it's results in the monster stat project quite a bit. The variance equations look to be correct, and I finally have an explanation for the rare one-too-low defence readings: it was a parser bug after all. Player muscle wasn't being updated if you gained a muscle point while in *compact display*, which only effected data sent by macman. I checked all the logs, and ran his debug logs through the updated parser: all the one-too-low values disappeared.

So it looks like salien's defence formulas were exactly right after all.

macman104
Just Plain Old Pie
Posts: 13
Joined: Tue Apr 15, 2008 9:07 pm
Contact:

Post by macman104 » Fri May 02, 2008 12:56 am

:(, sorry for all the problems :(

Post Reply