Page 4 of 7

Re: Monster slaying cost

PostPosted: October 6th, 2014, 11:57 am
by Anderas
Hey,
i am trying to do my own calculations now in Excel.

The Brute Force Method is working well - so well, i decided to test the deviation of results after 10 000 000 Cycles and much, much less cycles.

In fact, i found that with 37500 cycles, the results are exact to 2%. Meaning, if you show 2 digits (0.24 for example) then it is likely you will not see the deviation in the second digit; and if you see it, very often it is just .1 difference

After i found that out, it sped up the crunching big time.


___



I found that it is a huge, huge, huge difference if the monster has the initiative or not. So much that a standard Goblin with 1 Body Point is costing you .8 Body points if he has the initiative; and he costs you .2 body points if the Hero has the initiative and strikes first. Other than many other small things, i think this really has to be included in your calculation of the Mission difficulty.
A wandering Monster (or a monster appearing because of a trap, because of a spell or other things) has the initiative, so it deals the high amount of damage. A Monster that is waiting for you in a room normally has the low value.



___


Did you think about the variance? My first little try of calculating the variance/standard deviation was... erm... slow. This point is particularly important if you want to size your dungeon; because if you want to put the Barbarian together with a 5.8 MSC into a room, savely thinking - the Barbarian has 8 Body Points, the Monster will remove 5.8 (or anything you calculated for your specific Monster in this specific situation), then you're quite wrong and you risk losing the Barbarian.

The typical standard deviation I found so far was more or less around 2 for the higher results. I will write more on this topic when i have more secured data. But already now, i can say:
A Monster with 5.8 MSC might just deal between 3.8 and 7.8 damage as "entirely normal result" (68% propability); and he might deal between 1.8 and 9.8 damage as a result that is "not normal, but *lemony goodness* happens" (27% propability). Higher and lower results happen with ~4.5%; meaning they are possible but do not appear very often.

Meaning, if you use a calculated monster against a single hero, please take care that you keep some "security distance" between the Hero's life points and the Monster's MSC. If you have a Hero with 6 Life points, rather use a MSC 3 Monster and send a second MSC 3 Monster if the first accidentally under-performs. Don give him one single all-or-nothing MSC 5 Monster, it's too risky - with two exceptions, of course: If the Hero has enough Potions of Healing, here we go; and if it is the Final Boss of your dungeon, he shall really be dangerous.


____


I did find a working and accurate formula to calculate single-bodypoint-Monsters without need of data crunching. Sadly, the same formula underperforms between 5% and 15% if i apply it to multi-bodypoint-Monsters, so i have still to work on it. The charme of having a really working formula is, of course, that you don't need to wait minutes until it is calculated, but instead it is instantly. So if you want to size your final boss monster to the actual stats of your group of heros, you could do it life in an App on your mobile phone instead of trusting old calculations on a paper table.


____

Multi-Hero against one Monster Problem: It can be easily solved by mastering the dungeon accordingly. Have a goblin or some piece of furniture for every hero just to block the way - only the target hero gets the specifically tailored boss Monster. Easy solution to a mathematically complicated problem.

Re: Monster slaying cost

PostPosted: October 9th, 2014, 3:04 pm
by Anderas
After several days of data crunching, now, i am pretty sure that count Mohawk's formula is wrong.
I myself was generating a formula, which provides 100% accurate results for 1BP Monsters. Sadly, it underestimates multiple BP Monsters by far. So - in short - no success from my side. If there is somebody interested, i can post it here. Together, maybe we find a solution to the multiple BP Monster problem.

The Brute Force / Monte Carlo Method, anyway, proves to be really successful. I am now calculating any monster between 1AT, 1DE, 1BP and 10AT, 10DE, 10BP against any hero between 1AT, 1DE and 5AT, 5DE.

The table already has 20 000 lines and is growing every hour. :) But data crunching is SLOW. I would like to have a formula, to be honest.

I don't know what the original creator of the thread was calculating in his code. I really would like to know the details, especially who was attacking first.

I have a wandering Goblin attacking the standard Hero, with .8 Body Points loss, and a Hero, attacking the Goblin waiting in a room, with .2 Body Points loss.

Re: Monster slaying cost

PostPosted: October 10th, 2014, 1:12 am
by Count Mohawk
Anderas wrote:After several days of data crunching, now, i am pretty sure that count Mohawk's formula is wrong.

Did somebody summon me??? :gargoyle:

Just to clarify, since it's been a while since I last stepped into this thread: a monster's MSC is defined as the expected Body damage it can deal to one Hero if they take turns attacking each other, correct? I never deleted my original Excel file, so I can quite easily pick up where I left off last. I think I know where I went wrong, though, and it has to do with recursion. (Monsters with 1 Body Point are the easiest to calculate because you only have to ask "did the Hero kill it?" instead of "how badly does the Hero wound it?" between each swing.)
Also, Goblins get a score of 0.2 if the Hero goes first? Oh dear. That makes some sense, though.

Re: Monster slaying cost

PostPosted: October 10th, 2014, 11:39 am
by Anderas
Yes, you throw them into a pit. The pit is a room, two fields big, with no doors. :D
On one field, there is the Hero, on the other, there's a Monster. Its a pretty boring dungeon. :lol: :goblin:

What you do calculate is the amount of BP the Hero loses. In the beginning i was also calculating the amount of game turns necessary, but it is not really interesting that result.
If the Hero strikes first, the Goblin deals in average .2something damage; if the Goblin strikes first, he deals in average .8 damage to the hero.... according to my results.

Problem about this calculation is it's inherent unreliability. Sometimes, if you calculate an average, the average is pretty close to the truth. It is the case for Warhammer 40k, for example. You calculate a certain amount of deaths in the other's unit, for example 9, and the real result will deviate by 2 deaths.

In Hero Quest, we roll less dices and we have a (luckily much) shorter dice roll process, both. The average often has a standard deviation of 100% and more, meaning to deal double the damage or nothing, both is completely normal in this system; and to roll triple the normal damage (or zero) is still happening in about 25% of the cases.

Code: Select all
Hero          AT  DE   Initiative    Monster            AT  DE  BP  MSC   Standard Deviation
Generic Hero   2   2   Monster    Goblin EU/US/YeOlde   2   1   1   0,8   1,0
Generic Hero   2   2   Hero       Goblin EU/US/YeOlde   2   1   1   0,3   0,7

Re: Monster slaying cost

PostPosted: October 10th, 2014, 6:34 pm
by Count Mohawk
Maybe, in addition to the "average damage" a Monster deals, it might be interesting to get the odds that said Monster will deal a specific amount of damage - 0, 1, 2, 3 or 4+, for example. (although I would go to 8 or 10 for Ogres and similarly-strong monsters)

Here's what I will do for calculations. I will start with the 1 BP Monster because that is by far the easiest case. Let's use the Goblin as the case study monster here, and assume a Hero with 2 Attack and 2 Defend. I also assume that the Hero attacks first. I will use two shorthand notations here: P(blah) = "the probability of event 'blah'", while E(blah) is "the expected value of event 'blah'".

Code: Select all
E(Number of attacks Goblin makes against Hero) = P(Goblin survives Hero's attack) * (1 hit + E(Number of attacks Goblin makes against Hero)).

In the case of a 1 BP monster, the odds of any monster surviving a blow are equal to it taking 0 damage from that blow. The accounting demons in my employ calculate these odds for 2A/2D Hero v 1D/1B Goblin to be exactly 33.333...%. Thus the formula becomes:
Code: Select all
E(# of attacks Goblin makes vs Hero) = 0.3333 * (1 + E(# of attacks Goblin makes vs Hero))

which simplifies to:
Code: Select all
E() = 0.3333 + (0.3333 * E())

Code: Select all
0.6667 * E() = 0.3333

Code: Select all
E() = 0.5000

Therefore the common Goblin gets to make an average of 0.5 hits against a 2A/2D Hero if the Hero goes first.

Now, to calculate the MSC of a monster, all we need is (E(Number of attacks) * E(Damage per attack)). The accounting demons report that the average damage from one Goblin attack against a 2D Hero is 0.5556; thus, the MSC for a Goblin in this scenario is 0.5000 * 0.5556 = 0.2778.
(If the Goblin goes first, of course he gets one more hit in, which would give an MSC of 1.5000 * 0.5556 = 0.8333.)

Re: Monster slaying cost

PostPosted: October 11th, 2014, 1:59 am
by Anderas
Et voilá, here we are, we have the same result now :)

I think my math has rusted. I used a different angle of attack, but yours is convincing.
Why the 1+ in the Goblin Attack?
did you calculate that the goblin may survive two rounds with P(survive)^2 and three rounds with P(survive)^3? I did this for 100 rounds, added all the surviving parts of the goblin together and let them attack.


My Monstercruncher has now arrived at Monsters with 5 Attack, 8 Defense and 8 Body Points. I will let him run until 10, 10, 10 and then i post the result list.

The propability of a specific amount of damage is not calculated and i won't restart it. But with the standard deviation you have a pretty good estimation. This is why i calculate it.

Hero: AT4 DE 6
Hero strikes first
Monster AT4 DE9 BP8

Average Monster Slaying Cost: 5,2
Standard Deviation: 3,4

This means:
13.6% of the results will be between 0 and 1.8 (between MSC - SD and MSC - 2SD)
68% of the results will be between 1,8 and 8,6 (between MSC - SD and MSC + SD)
13.6% of the results will be between 8.6 and 12 (between MSC + SD and MSC + 2SD)

... the rest is 4.5% --> 2.25 % even lower (stays with 0) and 2.25% even higher (between 12 and 15.4)

For me the standard deviation is so important because it shows you the range of normal results. In this example, the Monster has 5.2, which is theoretically not dangerous if the hero has 7 BP. But you have to take into account that normal results range from 1.8 to 8.6; so it might just kill the Hero as "normal result".


-----


Update - My Monstercruncher is calculating the last batch of monsters. Estimated time of calculation end is 23:30. It may be sooner as the strongest monster comes last - and i take a shortcut. If a monster ever manages to generate 100 BP of damage, three times, the calculation gets interrupted and the next Hero/Monster combination is calculated. No-one wants to see a Monster on the table that has the possibility of generating 100 BP of damage. My monsters are getting subsequently stronger and stronger, so the shortcut may be taken more and more often.

Re: Monster slaying cost

PostPosted: October 11th, 2014, 4:37 pm
by Daedalus
(This got posted late without reading subsequent posts. Just catching up now.)
Anderas wrote:Hey,
i am trying to do my own calculations now in Excel....

I hope you can post results. I'd especially like to see MSC for expansion monsters with higher stats such as Ogres, Giant Wolves, and Warbears.


Anderas wrote:I found that it is a huge, huge, huge difference if the monster has the initiative or not. So much that a standard Goblin with 1 Body Point is costing you .8 Body points if he has the initiative; and he costs you .2 body points if the Hero has the initiative and strikes first. Other than many other small things, i think this really has to be included in your calculation of the Mission difficulty.
A wandering Monster (or a monster appearing because of a trap, because of a spell or other things) has the initiative, so it deals the high amount of damage. A Monster that is waiting for you in a room normally has the low value.

I totally agree about this. Thequester seems to have only worked up numbers for monsters with second attack. [Not really sure, as a Goblin MSC is .6 against a Hero with 2 AD and 2 DD in his table. -edit] Again, if you accumulate the data feel free to post it in this thread. Monster traps could be meaninfully measured with the alternate numbers.


Anderas wrote:Did you think about the variance?...

The typical standard deviation I found so far was more or less around 2 for the higher results....
A Monster with 5.8 MSC might just deal between 3.8 and 7.8 damage as "entirely normal result" (68% propability); and he might deal between 1.8 and 9.8 damage as a result that is "not normal, but *lemony goodness* happens" (27% propability). Higher and lower results happen with ~4.5%; meaning they are possible but do not appear very often.

Meaning, if you use a calculated monster against a single hero, please take care that you keep some "security distance" between the Hero's life points and the Monster's MSC. If you have a Hero with 6 Life points, rather use a MSC 3 Monster and send a second MSC 3 Monster if the first accidentally under-performs. Don give him one single all-or-nothing MSC 5 Monster, it's too risky - with two exceptions, of course: If the Hero has enough Potions of Healing, here we go; and if it is the Final Boss of your dungeon, he shall really be dangerous.

My only thoughts about variance were "*lemony goodness* happens--it's part of the game randomness." Your thoughts are a lot more accurate. Keep high MSC monsters for the end of the Quest--check. Too bad the EQP and BQP didn't share your understanding when placing Ogres and Warbears. Like you said, healing potions are a terrific balm to smooth over such eventualities.


Anderas wrote:I did find a working and accurate formula to calculate single-bodypoint-Monsters without need of data crunching. Sadly, the same formula underperforms between 5% and 15% if i apply it to multi-bodypoint-Monsters, so i have still to work on it....

I also worked on a formula that came close but showed cracks with multi-Body Point monsters. Another fault is it doesn't work for 1 AD monsters, so if you want a Giant Rat you gotta resort to best guess. The advantage is it is quick and dirty I'd love to test it's appropriateness against the expansion monsters I mentioned above.

    Monster Combat Value = (AD-1) x (6+DD) x BP
It was built upon observations of averaged MSC numbers, which I created from the various AD and DD options for each of the Main Game System monsters. Every MSC was then multiplied by 2O to yield combat values easily compared to whole numbers. However, not all Heroes can have particular AD and DD combinations, so those entries were re-figured for a second set of adjusted averages which I hoped better represented game conditions. This second set of MSC numbers were then multiplied by 25 for comparison with whole numbers. From there, I applied some educated--but apparently flawed--guesses about how to value combat dice and Body Points so as to arrive close to the converted averages.

.............   Goblin   Skeleton  Zombie       Orc         Fimir     Mummy   Chaos
 Warrior 
Gargoyle
Avg. MSC .35 .41 .48 .78 1.75 2.0 4.4 5.25
Avg. x 20 7.0 8.1 9.6 15.6 35.0 40.0 88.0 105.0
Adj. MSC .29 .32 .37 .61 1.36 1.51 3.45 4.83
Adj. x 25 7.0 8.0 9.25 15.25 34.0 37.75 86.25 100.75
MCV 7 8 9 16 36 40 90 99
 
These MCVs are then tweaked for Mind Points and movement to arrive at Monster Values. They are used along with traps to measure the difficulty of a Quest against the similar Hero Values.

Re: Monster slaying cost

PostPosted: October 11th, 2014, 9:23 pm
by Count Mohawk
Anderas wrote:Et voilá, here we are, we have the same result now :)

Bazinga! |_P

Anderas wrote:I think my math has rusted. I used a different angle of attack, but yours is convincing.
Why the 1+ in the Goblin Attack?
did you calculate that the goblin may survive two rounds with P(survive)^2 and three rounds with P(survive)^3? I did this for 100 rounds, added all the surviving parts of the goblin together and let them attack.

That is correct logic. The Goblin survives any given round with P probability. If he does, he gets to make one attack before the Hero's next try at killing him, which is indeed where the '1 +' comes from. As described in my prior post, I used a neat mathematical trick to turn what would normally be an infinite series of "P(survive)^N" terms into a simple recursion. Of course, brute force also works and is not incorrect.

Anderas wrote:The probability of a specific amount of damage is not calculated and i won't restart it. But with the standard deviation you have a pretty good estimation. This is why i calculate it.

That's fair. Now if I could figure out how to make a formula for variance (standard deviation squared), we'd be in good shape. Unfortunately, that's not looking too probable unless I suddenly discover a shortcut for the second moment of a recursive function... [/calculus]

Anderas wrote:Hero: AT4 DE 6
Hero strikes first
Monster AT4 DE9 BP8

Average Monster Slaying Cost: 5,2
Standard Deviation: 3,4

My spreadsheet returns an MSC for this matchup of 5.21. That looks like a match to me! As for how I calculated it...
Accounting Demons wrote:MSC = (Average damage per Monster attack) * (Average number of attacks Monster gets to make)

E(Average damage) is trivial to calculate. In this matchup we get a value of 0.5926.

E(# Monster attacks, N Body) = P(Monster takes 0 damage) * (1 + E(# Monster attacks, N body))
+ P(Monster takes 1 damage) * (1+ E(# Monster attacks, N-1 Body))
+ P(Monster takes 2 damage) * (1 + E(# Monster attacks, N-2 Body))
+ ...
+ P(Monster takes X damage) * (1 + E(# Monster attacks, N-X Body))

This can be simplified a little further, but we trust you get the point. By recursing the scenario backwards across monsters of equivalent A/D but lower Body, you can more easily build a chain of MSCs up to whatever Body level you wanted to start with.


Anderas wrote:Update - My Monstercruncher is calculating the last batch of monsters. Estimated time of calculation end is 23:30. It may be sooner as the strongest monster comes last - and i take a shortcut. If a monster ever manages to generate 100 BP of damage, three times, the calculation gets interrupted and the next Hero/Monster combination is calculated. No-one wants to see a Monster on the table that has the possibility of generating 100 BP of damage. My monsters are getting subsequently stronger and stronger, so the shortcut may be taken more and more often.

100 BP of damage? HAHAHAHAHAHAHAnope. :zombie:

Re: Monster slaying cost

PostPosted: October 12th, 2014, 3:09 am
by Anderas
Does somebody know a place in the net, to share an excel file, that will survive more than 2 or 3 years?

Re: Monster slaying cost

PostPosted: October 12th, 2014, 3:37 am
by knightkrawler
The NSA servers. Just tag it with a codeword like "H-bomb" or something.