Page 5 of 7

Re: Monster slaying cost

PostPosted: October 12th, 2014, 4:40 am
by Anderas
Yes ok, sooner or later it will be there anyway.
I need a location where other people than the NSA can download it. :D

Re: Monster slaying cost

PostPosted: October 12th, 2014, 12:51 pm
by sajungzak
I use google drive, I'm not aware of any time limit.

Yeah, they prolly got the whole net backed up in triplicate. Might be hard to get in tho.

Re: Monster slaying cost

PostPosted: October 13th, 2014, 11:53 am
by Anderas
A total of 17 809 277 600 Body Points of damage have been dealt to Heros during the simulation.
A total of 4 452 319 400 Potions of Healing had been necessary to survive the test.
As they had been available for a discount price of 50 Gold, this test had a total cost of 222 615 970 000 Gold for the Empire; plus 100 Gold for every Hero.
A total of 1 894 604 000 Monsters have been slain in the process; emtying whole continents.

Fleeing in terror, the small number of Monster survivors is hiding in dark dungeons now.
Uncounted Necromants had been necessary to generate and regenerate all the dead and undead bodies; and to puzzle their bones togehter for generating all the fantasy monsters with body stats that had been unknown up to that date.
At the end of that glorious week, every participating hero suffered from serious muscle soreness.

The emperor, not satisfied because there were survivors and not satisfied by the cost, ordered the positions of the dungeons be noted in Loretome and asked Mentor to send Heros to clean out these last bastions of survivors. Frightened by the cost, he ordered that the Heros shall be paid mostly on a "what you find is what you get" basis.

Download the results here.
If you don't like line 1, just hide it.

I am open for discussions: Something missing, something on the wishlist?

My personal wishlist would definitely include a formula to be found for the standard deviation of this little problem. After, no mass murders of monsters and no 10MB Excel Files are necessary anymore. :D Count Mohawk, wouldn't it be possible to calculate the standard deviation after you have the results for 1, 2, 3, 4, 5... Bodypoints seperately from each other?

Re: Monster slaying cost

PostPosted: October 13th, 2014, 2:27 pm
by Count Mohawk
The crux of my problem with generating a small spreadsheet that will calculate the variance and standard deviation of the MSC is this: MSC is actually a product of two independent variables, "Amount of damage per attack" and "Number of attacks per monster". I can make a table that provides the variance of the damage per attack quite easily, but I need to figure out how to get the variance of the number of attacks the monsters make to finish the formula. My results so far do not match yours, which is what I am using as a check. For example: on your table, a 2A/2D Hero facing a 4A/5D/1B Gargoyle (ie a heavily injured one) has an MSC of 2.1 and a standard deviation of 3.0. However, my formula currently returns a standard deviation of 3.8, which does not match. Also, I have not yet worked out a good means for generating St.Dev for multiple-BP monsters. I will update when I have more concrete solutions.

Re: Monster slaying cost

PostPosted: October 13th, 2014, 3:54 pm
by Goblin-King
Does anyone actually USE these numbers for anything or are you just in it for the awesomeness that is math?

Re: Monster slaying cost

PostPosted: October 13th, 2014, 4:49 pm
by Count Mohawk
Not this set specifically yet, since I haven't finished with it. However, I do use numeric monster values (albeit somewhat simpler) to balance the difficulty of my Quests against each other and ensure a 'proper' gradiation of difficulty. Of course, the above dialogue thus far has only touched upon 1v1 combat; the next thing we'll need to consider is the intricacies of NvN combat. Suffice to say (at least for the moment), 12 monsters scattered about in 12 different rooms are quite a bit less threatening than 12 monsters all lying in wait in the center room.

As an aside, I consider most Chaos Magic and other Quest-Noted effects to generally be inherently incalculable as far as MSC or anything like it goes.

Re: Monster slaying cost

PostPosted: October 14th, 2014, 1:06 am
by Anderas
Hey Goblin-King;
I didn't use them yet, because they are new.

Actually, I intend to use them, yes. And for me, there is already an interesting information inside: That the Monsters are so unreliable. If i lead a game, I know what I do now. I wouldn't kill a group accidentally.

And of course its fun for me generating them.

Re: Monster slaying cost

PostPosted: October 15th, 2014, 11:07 pm
by Count Mohawk
Anderas, what formula did you use to calculate the standard deviation for your tables? I am nearly certain my own math is correct (and I built a one-at-a-time simulator to confirm it), but our numbers don't match. If you want a specific example, take as a base example a 2A/2D Hero against a 4A/5D/1B monster, and then again with 3 BP. (Hero goes first.)

Re: Monster slaying cost

PostPosted: October 16th, 2014, 1:37 am
by Anderas
Code: Select all
Public Sub SimulateAverageStdDevBadVsGoodDamage()
    'Sets the LP of the good to 100 to measure the real potential of each attacking monster.
    'Then, the LP of each participant get reset to full before the next fight is started.
    'Otherwise, the measurement will always be cut as soon as the good one is dead; thus,
    'producing wrong results.

    HerosDamage = True
    HerosDamageStdDev = True

    AverageCompleteFightDamageStdDev = 0
    ReDim singleCompleteFightDamage(amount) 'redim the array to have enough spaces for all the fight results

    Dim SumForStdDev As Double
    SumForStdDev = 0
    'Standard deviation gets calculated by:
   
    'Square root of (
            'Sum of (
               
                '(average - current value)^2
            ')
        'Divided by amount - 1
    ')
   
    TheGood.LP = 100
    AverageCompleteFightDamage = 0
    threeStrikes = 0 ' If the bad generates 100 LP of damage, 3 times, interrupt simulation and proceed with next pair in order to save time.
   
For i = 0 To amount
        TheGood.CurLP = TheGood.LP
        TheBad.CurLP = TheBad.LP

        FightOneMonster

        singleCompleteFightDamage(i) = TheGood.LP - TheGood.CurLP

        If singleCompleteFightDamage(i) >= 100 Then
            threeStrikes = threeStrikes + 1
            If threeStrikes > 3 Then
                AverageCompleteFightDamage = 100
                Exit For
            End If
        End If

    If (i Mod 1000) = 0 Then
        DoEvents
    End If
    Next i
   
    If AverageCompleteFightDamage < 100 Then
        AverageCompleteFightDamage = SumCompleteFightDamage / CountCompleteFightDamage
    Else
        AverageCompleteFightDamageStdDev = 0
        Exit Sub
    End If
   
    For i = 1 To amount
        SumForStdDev = SumForStdDev + (AverageCompleteFightDamage - singleCompleteFightDamage(i)) ^ 2
    Next i
    SumForStdDev = SumForStdDev / (amount - 1)
    AverageCompleteFightDamageStdDev = Sqr(SumForStdDev)
End Sub


I used the formula of an bessel corrected sample standard deviation.

I set the heros BP to 100 in order not to limit possible results.

Could you post your most recent excel? I would like to see it, too. Maybe i redo the mass murder of monsters if both calculations of you are functioning.

Re: Monster slaying cost

PostPosted: October 16th, 2014, 7:47 am
by Count Mohawk
OK, here's the Excel spreadsheet I'm working with. (It has one macro, so be aware of that). I attached it to this post; you can also download it from Dropbox.
Dropbox link

The formula for Variance of a function is:

Var(x) = E( (X - Average)^2 ) for all X, where E() means "expected value" or, in this case, the average. (Variance can also equal E^2(x) - (E(x))^2 if you're a math guy.)

As I mentioned in a prior post, MSC is actually a product of two independent variables, "Amount of damage per attack" and "Number of attacks per monster". So to get the variance of the MSC, I need to calculate the variances of both pieces and then multiply them together. I use the "Mean of square minus square of mean" trick to get V(damage per hit); you can see that on the "MSC" sheet. I don't have a 100% working formula for the other half, "Number of attacks per monster", yet, so I built a simulator using a VBA macro and put it on the third tab.

Apologies if it's hard to read through the spreadsheet; I don't often optimize them for viewing expediency...