Arcane Wonders Forum

Mage Wars => Strategy and Tactics => Topic started by: fas723 on January 20, 2014, 03:11:14 PM

Title: Dice vs Armor table
Post by: fas723 on January 20, 2014, 03:11:14 PM
After some requests I made a Die vs. Armor table where you can see how much expected damage you will deal depending on your amount of dice vs. the amount of armor.

Tables in here always look strange. I hope you can read it. I have put it in here for you who don't want to download it. If you like to print the table I made an ok looking tab in Excel suitable for this which you can bring to your games. In there where you also find the calculation. You find it here:

https://drive.google.com/folderview?id=0Bz0fnLKKUKlxaUtBU1dhcDNCTkE&usp=sharing

It is quite hard to write large tables right into the forum, so please let me know if you find any errors. The printable version should be fine though, so it is safe.

The table show the expected value in a normal distribution based on the amount of dice vs. your opposing armor. The two columns next to each "my" are one standard deviation, "sigma", up and down from the expected value. When you read the table "my" will represent the most likely result and within +/- 1 "sigma" you have a 68.2% hit rate.

Note that resiliant can be interpreted as infinit armor. In this table you can use armor levle 9 to simulate this as long as the amount of dice do not exceeds 7 4. EDIT: It should be 4 dice not 7. Table updated with Resilient and Incorporeal.

Enjoy!


                                                                                       
                1                    2                    3          
   Armor      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ   
   0      0,18      1,00      1,82      0,85      2,00      3,15      1,59      3,00      4,41   
   1      -0,08      0,67      1,41      0,38      1,44      2,51      0,97      2,30      3,62   
   2      -0,26      0,50      1,26      0,06      1,11      2,16      0,54      1,81      3,09   
   3      -0,26      0,50      1,26      -0,04      1,03      2,09      0,32      1,61      2,90   
   4      -0,26      0,50      1,26      -0,08      1,00      2,08      0,21      1,52      2,83   
   5      -0,26      0,50      1,26      -0,08      1,00      2,08      0,19      1,50      2,82   
   6      -0,26      0,50      1,26      -0,08      1,00      2,08      0,18      1,50      2,82   
   7      -0,26      0,50      1,26      -0,08      1,00      2,08      0,18      1,50      2,82   
   Resil      -0,26      0,50      1,26      -0,08      1,00      2,08      0,18      1,50      2,82   
   Incorp      -0,14      0,33      0,80      0,00      0,67      1,33      0,18      1,00      1,82   
                                                                                    
                4                    5                    6          
   Armor      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ   
   0      2,37      4,00      5,63      3,17      5,00      6,83      4,00      6,00      8,00   
   1      1,64      3,20      4,76      2,37      4,13      5,90      3,13      5,09      7,04   
   2      1,10      2,59      4,08      1,74      3,43      5,12      2,43      4,31      6,19   
   3      0,79      2,26      3,73      1,32      2,97      4,62      1,92      3,74      5,56   
   4      0,60      2,09      3,58      1,05      2,70      4,35      1,57      3,37      5,16   
   5      0,51      2,03      3,54      0,90      2,57      4,25      1,35      3,16      4,97   
   6      0,48      2,00      3,53      0,83      2,52      4,21      1,22      3,06      4,90   
   7      0,47      2,00      3,53      0,80      2,51      4,21      1,16      3,02      4,88   
   Resil      0,47      2,00      3,53      0,79      2,50      4,21      1,13      3,00      4,87   
   Incorp      0,39      1,33      2,28      0,61      1,67      2,72      0,85      2,00      3,15   
                                                                                    
                7                    8                    9          
   Armor      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ   
   0      4,84      7,00      9,16      5,69      8,00      10,31      6,55      9,00      11,45   
   1      3,93      6,06      8,18      4,76      7,04      9,32      5,60      8,03      10,46   
   2      3,16      5,22      7,28      3,93      6,16      8,38      4,73      7,11      9,49   
   3      2,57      4,56      6,55      3,27      5,42      7,57      4,00      6,31      8,62   
   4      2,14      4,09      6,03      2,76      4,85      6,95      3,42      5,66      7,91   
   5      1,85      3,79      5,74      2,40      4,47      6,54      2,99      5,19      7,39   
   6      1,66      3,63      5,59      2,15      4,23      6,32      2,68      4,87      7,07   
   7      1,56      3,55      5,54      1,99      4,10      6,21      2,47      4,69      6,91   
   Resil      1,48      3,50      5,52      1,84      4,00      6,16      2,21      4,50      6,79   
   Incorp      1,09      2,33      3,58      1,33      2,67      4,00      1,59      3,00      4,41   
                                                                                    
                                                                                       
Title: Re: Dice vs Armor table
Post by: webcatcher on January 20, 2014, 04:07:46 PM
Very helpful, thanks.
Title: Re: Dice vs Armor table
Post by: Aylin on January 20, 2014, 04:14:02 PM
Awesome!  8)
Title: Re: Dice vs Armor table
Post by: jacksmack on January 20, 2014, 05:45:04 PM
Its clear you got math skills i do not posses.

But I have a hard time accepting that rolling 7 dice vs 9 armor = 3.5 average damage.
Average roll per dice = 0.5 normal and 0.5 crit.
So rolling 7 dice = average 3.5 normal and 3.5 crit.
Just taking the 3.5 crit and it matches your number from the table.
However... sometimes the normal damage will spike up and actually exceed the 9 armor. Shouldnt that add something to the 3.5 average?
Is it because its so rare that it has been rounded down to 3.5? - my guestimate would be that 7 dice do closer to 4 damage on average than 3.5

Especially the 3 dice table interests me because of the hydra.
The 1.61 average vs 3 armor .  i thought it would be higher - the normal damage only provides 0.11 on average.

I going to make a postulate and there is a big chance im wrong here:
Your table somehow takes into account the chance of armor being applied - 3 dice has almost 30% (29.7% IIRC) chance of not triggering armor due to only crits and nulls being rolled - but somehow doesnt take spikes of normal damage exceeding the armor into account.

Like i said - my foundation of math to base all this on is both weak and flawed so dont take it amiss.
Title: Re: Dice vs Armor table
Post by: svvcDark on January 20, 2014, 06:30:07 PM
Hooray for statistics!

Thanks for this. It's great.
Title: Re: Dice vs Armor table
Post by: IndyPendant on January 20, 2014, 09:14:59 PM
Actually jacksmack, his math is good here.  I think the problem here is twofold: 1) fas is tabling probabilities, while you're describing statistically improbable anecdotes; and 2) fas has decided to round to 2 decimal places for his table, which (as you speculated) tends to indicate no difference where, statistically speaking, there are indeed very small differences.  However, those differences are negligible:

The chance of spiking normal damage does add something to the average; a very small something.  In your example (7 dice vs 9 armour), the average damage actually works out to 3.505 (rounded).  If crits were treated like normal damage for the purposes of armour, the average would be a flat 3.500; the chance of spike-normal damage adds that 0.005 variance.  Which, for the purposes of players in the game, can safely and accurately be rounded to 3.50.
Title: Re: Dice vs Armor table
Post by: fas723 on January 25, 2014, 01:55:46 AM
Good that you liked it!

Anyone who printed it out? Did it work  out ok?

I will correct my statement regarding Resilient, and update the OP. I wasn't thinking clear when I mentioned 7 dice to be the limit. It is rather 4 dice. So, the table is ok for Resilient with 9 armor and up to 4 dice.

Question:
How often have you seen 8 or 9 armor? Is it better I change this to Resilient and Incorporeal?  I don't want to expand the table because it won't fit one paper then (A4 size). If 7 armor could be removed the curve at the bottom could be enlarged as well. Comments?
Title: Re: Dice vs Armor table
Post by: fas723 on January 25, 2014, 02:07:32 AM
Its clear you got math skills i do not posses.

But I have a hard time accepting that rolling 7 dice vs 9 armor = 3.5 average damage.
Average roll per dice = 0.5 normal and 0.5 crit.
So rolling 7 dice = average 3.5 normal and 3.5 crit.
Just taking the 3.5 crit and it matches your number from the table.
However... sometimes the normal damage will spike up and actually exceed the 9 armor. Shouldnt that add something to the 3.5 average?
Is it because its so rare that it has been rounded down to 3.5? - my guestimate would be that 7 dice do closer to 4 damage on average than 3.5

Especially the 3 dice table interests me because of the hydra.
The 1.61 average vs 3 armor .  i thought it would be higher - the normal damage only provides 0.11 on average.

I going to make a postulate and there is a big chance im wrong here:
Your table somehow takes into account the chance of armor being applied - 3 dice has almost 30% (29.7% IIRC) chance of not triggering armor due to only crits and nulls being rolled - but somehow doesnt take spikes of normal damage exceeding the armor into account.

Like i said - my foundation of math to base all this on is both weak and flawed so dont take it amiss.

Jacksmack,
I think Indy explained it well. I have rounded the figures with 2 decimals. If you like to see the "real" value, go into the calc tab in the Excel and scroll down to the copied table. Either you change the shown decimals or you just click the cell you like to see and it will show the result with all (almost) decimals. 7 dice vs 9 armor have true expected value of 3,5049189814925.

As Indy said the spikes are there. In the 7 dice vs 9 armor case you have to roll at least 8 point of normal damage with your 7 dice (not including all your perfect rolls). This will occur in just a fraction (0,04%) of the times you roll something else. That is why it give such small impact.

Regarding the 3 vs 3 Hydra case it is the same thinking. With 3 armor you have to roll at least 4 normal damage to make an impact. This will occur 3% of the times you make that roll (if i'm not mistaken...).

Use the standard deviations to get a better feel for your probabilities.  ;)
Title: Re: Dice vs Armor table
Post by: Shad0w on January 27, 2014, 03:05:54 PM
I will be moving this
Title: Re: Dice vs Armor table
Post by: ringkichard on February 02, 2014, 10:25:27 PM
So after some procrastination, I got around to looking at this, and I like it a lot.
I'd been working on something similar, but I'd been hoping to avoid using a complete brute force solution and instead try to automate a permutations / combinations solution. The fact that you beat me to it shows how well that went for me :)

If you CC license your code, I wouldn't mind stealing your VBA (now that I know that LibreOffice for Mac supports Basic macros) and extracting a bit more data. Not that I'm anything but a dabbling amateur, but standard deviation never really feels like a good substitute for graphing the whole distribution, and it gives me a good excuse to make pretty pictures. :)

-- EDIT

I can't get the macro to run on my system, even after changing its name. This is likely my fault, as I don't really know what I'm doing, but it could also be version incompatibility. It was nice to see how you did it, though! If anyone wants to teach me a complete permutations / combinations solution to mage wars dice math, I'd be interested to learn!
Title: Re: Dice vs Armor table
Post by: fas723 on February 09, 2014, 01:43:11 PM
So after some procrastination, I got around to looking at this, and I like it a lot.
I'd been working on something similar, but I'd been hoping to avoid using a complete brute force solution and instead try to automate a permutations / combinations solution. The fact that you beat me to it shows how well that went for me :)

If you CC license your code, I wouldn't mind stealing your VBA (now that I know that LibreOffice for Mac supports Basic macros) and extracting a bit more data. Not that I'm anything but a dabbling amateur, but standard deviation never really feels like a good substitute for graphing the whole distribution, and it gives me a good excuse to make pretty pictures. :)

-- EDIT

I can't get the macro to run on my system, even after changing its name. This is likely my fault, as I don't really know what I'm doing, but it could also be version incompatibility. It was nice to see how you did it, though! If anyone wants to teach me a complete permutations / combinations solution to mage wars dice math, I'd be interested to learn!

Glad you liked it. Sure go ahead and use the code, it is no rocket sience. As you might have seen already I just made a loop that rolled every signel possilbe out put, stored each result and went to "my" and "sigma" from there.

Humm...so you didn't get it to work even when you changed the function name as described?
Go in to the VBA editor. At the top for each function you find this code: "Function expected_value1(dice, armor)" & "Function sigma1(my, dice, armor)". Change both of them to "Function expected_value(dice, armor)" & "Function sigma(my, dice, armor)", without the "1". After this you have to go to one cell and hit "enter". I did this so to prevent the loop to start each time someone would open the file. It took my computer quite some time run through it all. At the end there is 6^9 (10077696 pcs) possible combination for each roll with 9 dice, and in here this is done 27 times (and then we have all other # dice 27 times as well).  :o
Title: Re: Dice vs Armor table
Post by: fas723 on February 18, 2014, 08:53:15 AM
Table updated with Resilient and Incorporeal instead of Armor 8 and 9.
Title: Re: Dice vs Armor table
Post by: DeckBuilder on February 18, 2014, 09:25:36 AM
@Fas723

Can I challenge you to use your great maths skill to work out something please?

I roll X attack dice against Y armour (after piercing)
I always re-roll all X dice (once only) if I roll less than average net damage - but I must take the re-roll

How much extra damage is this ability to re-roll worth? (As X vs. Y tables above)
Could you then compare this to just rolling X+1 and X+2 dice once at the start?

If this is really complicated (or too challenging for you :) - play on the ego!), then no problem.
I've had a bet our Forum Statistician could solve this but it's not an issue if it's too hard for you.

[Savvy players will know the game development reason why I'm asking this huge favour...]
Title: Re: Dice vs Armor table
Post by: fas723 on February 20, 2014, 02:04:46 AM
@Fas723

Can I challenge you to use your great maths skill to work out something please?

I roll X attack dice against Y armour (after piercing)
I always re-roll all X dice (once only) if I roll less than average net damage - but I must take the re-roll

How much extra damage is this ability to re-roll worth? (As X vs. Y tables above)
Could you then compare this to just rolling X+1 and X+2 dice once at the start?

If this is really complicated (or too challenging for you :) - play on the ego!), then no problem.
I've had a bet our Forum Statistician could solve this but it's not an issue if it's too hard for you.

[Savvy players will know the game development reason why I'm asking this huge favour...]

Sure I can help you the best I can (when I have time...).  :)
I don't really understand your example though. You are saying that you can re-roll your dice? How?
Ok, let's say you can, then you want to re-roll every time you are below average [my]. Is that correct? And your question is how much you would gain from doing that?

Well, if I get your question correct, I would say that in average you will get the difference between your first result and your next expected value [my]. Once you re-roll you will reset your chances of getting something.
If you compare this diff with the difference you get between X dice and X+1 dice you can then determine your best option.

To calculate this you must predict or choose a value for your first roll (which you later on re-roll). Or I can look for the breakeven point when you should have chosen to go for +1 depending on your first roll (I'm not sure why you want to know this since in a game you can never know which way you should go before you have made the first roll, and then it is to late.)

Did I understand your question correct?
Title: Re: Dice vs Armor table
Post by: DeckBuilder on February 20, 2014, 02:48:19 AM
Hi fas723

Thanks for getting back on this, it's much appreciated. I might as well be blunt.

There is a promo card called Akiro's Favour and its persistent enchantment benefit is this:
Once per round when attacking. this creature may either reroll ALL its attack dice using the new roll or reroll a d12
In my "Promo Cards Feedback" thread, I slated it (and Ballista) as overpowered as printed.

Now evaluating the re-roll of d12 (for effects or for Daze), even a dumbo like me can do that
For example: if I am Dazed, before I had 50% miss, now I have a 25% miss if I use it that way
Re-rolling a Daze miss takes priority of its use but 50% of the time, I would not need to use it that way
(Daze is situational, the effect die is worse, Arc Lightning's Stun 9+ becomes Stun 5/9 with reroll option)

What is beyond my rusty maths (maybe not SAS/SPSS/Excel) is to evaluate the value of the optional reroll all keep 2nd roll effect

My maths intuition tells me that it's worth between +1 (Hawkeye) and +2 (Bear Strength) dice
I also know that it will reduce the variability making the attack more certain to deal a threshold damage
Note the versatility of this spell - it's just awesome (especially for mages with all those control effects)

Because it's a promo card (and I have already slated its cost), I'm not divulging any design secrets here
I came to you because I worry AW may be making a big mistake here (they appreciate it's undercosted)
And I care deeply about the game and don't want a ubiquitous card so would like it costed appropriately

So can you please use your maths skills to evaluate the benefit of this card?
You would be doing the game an invaluable service if you could put your mind to this very soon?

(I'm a firm believer in tapping into a fan base and crowd sourcing, it's a free asset, everyone feels good, win-win)

I may get in trouble for being so frank...
Title: Re: Dice vs Armor table
Post by: Wildhorn on February 20, 2014, 06:58:59 AM
Without being a math guru, but on average, if you reroll 50% of time your dice and then you 50% chance to get average or more damage, it means an increase of about 25% damage. So take the chart up here and increase numbers by 25%.
Title: Re: Dice vs Armor table
Post by: jacksmack on February 20, 2014, 07:12:27 AM
Without being a math guru, but on average, if you reroll 50% of time your dice and then you 50% chance to get average or more damage, it means an increase of about 25% damage. So take the chart up here and increase numbers by 25%.

Its not 50% chance to roll average or more.

With 1 and 2 dice it is 33,3% to roll average, 33,3% to roll above and 33,3% to roll below.
Which means its 66,6 to roll average or above.

I believe the chance of rolling excately average drops from 3 dice and up. Thus the chance of rolling "Average or above" drops as well.
Title: Re: Dice vs Armor table
Post by: webcatcher on February 20, 2014, 07:44:27 AM
I'll let someone else do the numbers on this one but an attack rolling a low number of dice definitely benefits more on average from this ability than one rolling a high number because the standard deviation goes down as you add more dice.
Title: Re: Dice vs Armor table
Post by: Wildhorn on February 20, 2014, 08:22:03 AM
Without being a math guru, but on average, if you reroll 50% of time your dice and then you 50% chance to get average or more damage, it means an increase of about 25% damage. So take the chart up here and increase numbers by 25%.

Its not 50% chance to roll average or more.

With 1 and 2 dice it is 33,3% to roll average, 33,3% to roll above and 33,3% to roll below.
Which means its 66,6 to roll average or above.

I believe the chance of rolling excately average drops from 3 dice and up. Thus the chance of rolling "Average or above" drops as well.

You are right.
Title: Re: Dice vs Armor table
Post by: ringkichard on February 20, 2014, 07:22:32 PM
In the abstract, damage re-rolls aren't that good. For example, with 1 die and no armor, a reroll has 1/3 chance of contributing 1 damage, on average.   Expected value of 1/3 damage per roll.

With two dice and no armor, a reroll has a total of 2/9+2/9 = 4/9 expected damage improvement per attack.

With 3 dice and no armor, a reroll has 3/27 + 6/27 + 6/27 = 5/9 expected damage improvement per attack.

With 4 dice and no armor, a reroll has 4/81 + 12/81 + 20/81 + 12/81 = 48/81 expected damage improvement per attack.

And so on. The extra damage is, overall, quite low when considered strategically. It's tactically very useful, however, potentially halving the chance of failure on an important roll.

--
Edit, I should clarify that's fractional damage added to the mean damage per attack. Compare that to Bear Strength's 2 damage.
Title: Re: Dice vs Armor table
Post by: Kharhaz on February 21, 2014, 06:17:36 AM

I may get in trouble for being so frank...

You can talk about promo cards
Title: Re: Dice vs Armor table
Post by: fas723 on February 21, 2014, 08:49:30 AM
@DeckBuilder
Hummm Akiro's Favour, why didn't I think of that one? I have it here somewhere myself.
Ok, I see what you are saying. It can be done. Give me some time and I'll see what results I can bring.

Basically what I think I will do is to run each roll twice. For the first roll I just eliminate the lower half of the results, and merge it together with the second roll. In theory it will give twice as many "good" results as "bad".

Quote
Without being a math guru, but on average, if you reroll 50% of time your dice and then you 50% chance to get average or more damage, it means an increase of about 25% damage. So take the chart up here and increase numbers by 25%.
Quote
Its not 50% chance to roll average or more.
I think you are partly right both of you. In a perfect normal distribution half (almost) of the samples falls below average and half (almost) falls above. In the three dice example it is not a continues distribution, rather a step vise one, and in these cases the exact average [my] can contain a substantial portion of the solution space.  The more dice there is, the closer to a smooth distribution it will be.
The 25% increase is however a quite rough approx. This depends on number of dice and armor (It will maybe occur but in one or two cases perhaps).
Title: Re: Dice vs Armor table
Post by: Aylin on February 21, 2014, 02:12:32 PM
New averages with reroll: (all values are approximate, with ~ +/- 0.05 error)

                1 armour   2 armour   3 armour   4 armour   5 armour   6 armour
1 die         1.33           0.99           0.82           0.82           0.82           0.82
2 dice        2.46           1.91          1.54            1.46          1.46            1.42
3 dice        3.55           2.82          2.32            2.15          2.06            2.02
4 dice        4.60           3.85          3.20            2.90          2.66            2.64
5 dice       5.76            4.90          4.12            3.62          3.41            3.27
6 dice        6.8             5.89          5.05            4.48          4.10            3.89


Based on this in the 1-6 dice range Akiro's Favor adds between 1/3 and 1 die worth of damage, with it being worth "more dice" against higher armoured targets or if you're already rolling a lot of dice.

Adding in the rest of the armour and dice values will be fairly simple if more is requested.

In each scenario, the dice were rolled, converted to the no damage/normal damage/critical damage we have here in Mage Wars, then checked against the average (rerolling the dice iff we got below average damage). After 5000 trials of each, the damages were averaged.

Do note that the method I used didn't allow for standard deviations due to memory concerns, so those will not be appearing.

Code (https://www.dropbox.com/s/x82w50by4ub2osn/Mage%20Wars%20Reroll%20Value%20Code.cpp)

There is a practical issue as well to determining Akiro's Favor's "worth"; with so many combinations of dice and effective armour, people are not likely to reroll only if they get below average (they may reroll higher than average results or keep below average results, for example). That is outside the scope of what I'm able to analyze with this program, but it is something to consider.

EDIT: Also important to note is that the reroll would probably go to the effect die first if needed, since that has a more tangible result in most cases.

I suppose on a personal note I should be a little offended, since evidently I wasn't considered capable of solving the problem.
Title: Re: Dice vs Armor table
Post by: fas723 on February 22, 2014, 06:07:12 AM

@All - Edit
New updated tables 2014-02-24

@Aylin
Ahh didn't see you had done this over nigh. I made a chart as well and processed it all night. My figures are almost the same (which is good), but there are some differences due to that you have used 5000 samples for each while I have used all possible combinations.

@All
Akiro's Favour - table                                                                                       
                1                    2                    3          
   Armor      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ   
   0      0,31      1,33      2,35      1,13      2,67      4,21      1,88      4,89      7,90   
   1      0,00      1,00      2,00      0,59      2,21      3,83      1,27      3,60      5,94   
   2      -0,24      0,83      1,91      0,20      1,82      3,44      0,80      2,57      4,34   
   3      -0,24      0,83      1,91      0,08      1,71      3,35      0,56      2,39      4,23   
   4      -0,24      0,83      1,91      0,03      1,67      3,31      0,43      2,31      4,18   
   5      -0,24      0,83      1,91      0,03      1,67      3,31      0,40      2,28      4,17   
   6      -0,24      0,83      1,91      0,03      1,67      3,31      0,39      2,28      4,17   
   7      -0,24      0,83      1,91      0,03      1,67      3,31      0,39      2,28      4,17   
   resil      -0,24      0,83      1,91      0,03      1,67      3,31      0,39      2,28      4,17   
   incop      -0,12      0,56      1,23      0,09      0,96      1,84      0,29      1,74      3,20   
                                                                                    
                4                    5                    6          
   Armor      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ   
   0      2,90      5,53      8,16      3,55      8,02      12,50      4,40      9,58      14,76   
   1      2,01      5,05      8,09      2,78      6,55      10,31      3,58      8,06      12,54   
   2      1,47      3,88      6,29      2,18      5,23      8,28      2,91      6,67      10,42   
   3      1,09      3,60      6,12      1,76      4,19      6,63      2,44      5,47      8,50   
   4      0,86      3,44      6,02      1,44      4,01      6,58      2,01      5,21      8,41   
   5      0,76      3,37      5,98      1,27      3,92      6,57      1,74      5,04      8,35   
   6      0,72      3,34      5,96      1,19      3,88      6,57      1,60      4,95      8,30   
   7      0,72      3,33      5,95      1,16      3,86      6,57      1,53      4,90      8,27   
   resil      0,76      2,79      4,82      1,15      3,86      6,57      1,50      4,88      8,25   
   incop      0,57      2,12      3,68      0,86      2,43      4,01      1,13      2,70      4,27   
                                                                                    
                7                    8                    9          
   Armor      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ      μ-σ      μ      μ+σ   
   0      5,25      11,13      17,00      6,11      12,67      19,24      6,97      14,22      21,46   
   1      4,41      9,59      14,77      5,24      11,12      17,00      6,09      12,66      19,23   
   2      3,68      8,13      12,59      4,47      9,63      14,79      5,28      11,14      17,00   
   3      3,14      6,84      10,54      3,86      8,25      12,64      4,61      9,71      14,81   
   4      2,58      6,53      10,48      3,40      7,02      10,65      4,09      8,39      12,69   
   5      2,38      5,54      8,71      2,95      6,81      10,68      3,53      8,14      12,76   
   6      2,17      5,44      8,71      2,64      6,66      10,68      3,33      7,08      10,84   
   7      2,05      5,39      8,72      2,46      6,56      10,66      3,08      6,99      10,89   
   resil      1,96      5,34      8,72      2,30      6,46      10,62      2,80      6,87      10,94   
   incop      1,38      3,66      5,95      1,70      3,92      6,13      2,01      4,13      6,26   
                                                                                    
                                                                                       
                                                                                       
Akiro's Favour gain - table (Akiro's Favour table vs Standard table)                                                                                       
         1      2      3   
   Armor      μ      μ      μ   
   0      0,33      0,67      1,89   
   1      0,33      0,76      1,31   
   2      0,33      0,71      0,76   
   3      0,33      0,69      0,78   
   4      0,33      0,67      0,78   
   5      0,33      0,67      0,78   
   6      0,33      0,67      0,78   
   7      0,33      0,67      0,78   
   resil      0,33      0,67      0,78   
   incop      0,22      0,30      0,74   
                                                                                    
         4      5      6   
   Armor      μ      μ      μ   
   0      1,53      3,02      3,58   
   1      1,85      2,41      2,97   
   2      1,29      1,80      2,36   
   3      1,34      1,22      1,73   
   4      1,35      1,31      1,84   
   5      1,34      1,35      1,88   
   6      1,34      1,36      1,89   
   7      1,33      1,36      1,88   
   resil      0,79      1,36      1,88   
   incop      0,79      0,77      0,70   
                                                                                    
         7      8      9   
   Armor      μ      μ      μ   
   0      4,13      4,67      5,22   
   1      3,53      4,08      4,63   
   2      2,91      3,47      4,03   
   3      2,28      2,83      3,40   
   4      2,45      2,17      2,73   
   5      1,75      2,34      2,95   
   6      1,81      2,43      2,21   
   7      1,84      2,46      2,30   
   resil      1,84      2,46      2,37   
   incop      1,33      1,25      1,13   
                                                                                    
                                                                                    


As you said Aylin, Akiro's favour doesn't give much statistically. I would say that it is most suitable when rolling effect dice. Then you only have one die which gives the highes effect of Akiro (apply even for attack dice, see table).

If you want to see the code just go to the link in the first post and download the Excel. I have updated the file in there.

@Deckbuilder
Happy?  :)
Title: Re: Dice vs Armor table
Post by: ringkichard on February 22, 2014, 06:53:02 AM
Based on this in the 1-6 dice range Akiro's Favor adds between 1/3 and 1 die worth of damage, with it being worth "more dice" against higher armoured targets or if you're already rolling a lot of dice.

Thanks for doing this. It's good to have my intuition confirmed that AF is good against Resiliant.

Quote
There is a practical issue as well to determining Akiro's Favor's "worth"; with so many combinations of dice and effective armour, people are not likely to reroll only if they get below average (they may reroll higher than average results or keep below average results, for example). That is outside the scope of what I'm able to analyze with this program, but it is something to consider.

That's a good point. Against resiliant it's mercifully easy to calculate expected damage, but e.g. a 6 die attack vs 3 arm isn't so simple. My intuition says the breakpoint is 4 (resisting the urge to cheat now and look it up), but I'm not sure I'd reroll a 3 unless it would mean the death of the target.

Which its the real interesting use of AF, I think. If I have to kill a target with an attack, it gives a strong % boost to my chance of success.

(unreached musings ahead) AF could find good use on something like Royal Archer against a swarm of foxes, significantly increasing the chances of a one hit kill (~.4 -> ~.6 ; approximately 50% improvement), which I think is on par with Hawkeye.
Title: Re: Dice vs Armor table
Post by: DeckBuilder on February 22, 2014, 07:13:10 AM
Yes, very much, thank you both for your hard work.
 
There seem to be a few anomalies in both results
With Aylin (e.g. 1 die vs. 2+ should be constant, 2 die vs. 4+ should be constant, I attributed it to her Monte Carlo sampling technique.
But it seems you have used an "every permutation" mathematical model? (Wow!)

I am a very simple person so I will just look at 1 die vs. 1 armour
Half the time (0, 0, 1), I will score 0 net damage so I will re-roll.
This re-roll gives me a 1/3 chance to score 1 damage (2, 1*) and 1/6 chance to score 2 damage (2*)
Which equates to +0.67 damage in 50% situations which equates to +0.33 damage.
Yet when I look at the delta chart of 1 die vs. 1 armour, I see 0 (yet +0.33 in 1 vs. 0).
I'm sure there must be something I've not considered here but I don't know what it is...

Other anomalies was me expecting the deltas to erode away with extra armour but it doesn't always erode?
E.g. in 7-9 dice attacks, the deltas above 2 armour feels random (for a method that doesn't use sampling).

I suspect some of these issues may due to difficulty transposing tables into posts, errors creep in easy.
None of this takes away from the hard work that you (and the strangely quiet Aylin) have done.
And I am very grateful for this feedback (and so amazingly quickly too). Many thanks.

At first glance, it seemed like my maths intuition was wrong about its benefit.
But if I identify how much +1 die gains in original table, deltas are comparable and in some cases superior.

I think what can't be captured is probability of hitting a target damage level (anything excess is irrelevant).
Why do you say the deltas on standard deviation is "not possible" to demonstrate lower variability / higher consistency?

In some ways, this may demonstrate luck plays less of a role in the attack dice than any I ever anticipated.
Which is heartening (and explains my initial phobia of d12 effects).

Yes, Akiro's Favour is most definitely geared to the effect die.
But it's also a good insurance against outlier poor attack rolls.
And grants more certainty achieving a target kill damage level.

Hmmm, I was surprised by these results but these gains have to be compared against +1 die and +2 dice.

Very thought-provoking. Thank you, both of you!
Title: Re: Dice vs Armor table
Post by: Aylin on February 22, 2014, 11:17:18 AM
There seem to be a few anomalies in both results
With Aylin (e.g. 1 die vs. 2+ should be constant, 2 die vs. 4+ should be constant, I attributed it to her Monte Carlo sampling technique.

Yes; different runs of the program also give slightly different results due to this.

Quote
I am a very simple person so I will just look at 1 die vs. 1 armour
Half the time (0, 0, 1), I will score 0 net damage so I will re-roll.
This re-roll gives me a 1/3 chance to score 1 damage (2, 1*) and 1/6 chance to score 2 damage (2*)
Which equates to +0.67 damage in 50% situations which equates to +0.33 damage.
Yet when I look at the delta chart of 1 die vs. 1 armour, I see 0 (yet +0.33 in 1 vs. 0).
I'm sure there must be something I've not considered here but I don't know what it is...

No, you are correct here. Explanation below.

Quote
I suspect some of these issues may due to difficulty transposing tables into posts, errors creep in easy.
None of this takes away from the hard work that you (and the strangely quiet Aylin) have done.
And I am very grateful for this feedback (and so amazingly quickly too). Many thanks.

In all honesty, I haven't played Mage Wars since early-January. The group I play with has been focused on playtesting some games made my a local designer.

Quote
Very thought-provoking. Thank you, both of you!

You're welcome.

@Fas723

I believe there is a mistake in your table. For 1 die against 2+ armour/resilient, it should be:
1/6 + 2/6 + 2/3(1/6+2/6) = 1/2 + 2/3*1/2 = 3/6 + 2/6 = 5/6 = ~0.833333
whereas you have 0.50. Perhaps you should double-check your other numbers as well, to ensure they are free from error.

Also, could you post your method? Your 5 and 6 die examples are much greater than mine, and I'm unsure if it's due to an error in my program or not. In either case, I'm interested in seeing how you did it.
Title: Re: Dice vs Armor table
Post by: fas723 on February 22, 2014, 11:21:09 AM
There is something fishy with my table. My results are equal to Aylins results but at a different row...and they don't seems to be completely correct. I'm not sure where these error originates from, if it is from the input or calculation. Don't use my table until I have reviewed it. I'll be back with an update. Sorry...
Title: Re: Dice vs Armor table
Post by: fas723 on February 22, 2014, 11:28:27 AM
@Aylin
Again you posted just before me.  :)
The code is within the Excel, maybe you want it in another format?
I saw that the file I have shared also were not updated, so there must have been something strange going on before I left home today. This is what happens when you rush things.  :P
Title: Re: Dice vs Armor table
Post by: Aylin on February 22, 2014, 11:31:11 PM
@Aylin
Again you posted just before me.  :)
The code is within the Excel, maybe you want it in another format?
I saw that the file I have shared also were not updated, so there must have been something strange going on before I left home today. This is what happens when you rush things.  :P

I don't see it in the excel file. It might be because I'm using Libre Office (my OS is Mint, not Windows). When I open it all I see are a bunch of '#'s.

If you could put it into another format that would be great.
Title: Re: Dice vs Armor table
Post by: ringkichard on February 23, 2014, 01:42:02 AM
In libre, you've got to go Tools > Macros > Organize Macros > LibreOffice Basic  and then navigate the viewer to the creature evaluation .xlsm and work from there.
Title: Re: Dice vs Armor table
Post by: Aylin on February 23, 2014, 04:12:38 AM
@ringkichard

Thanks!

@fas723

I've never worked with Visual Basic before, but I think I was able to get the gist of your program. Pretty interesting, though I'd be especially interested in seeing how you delt with the rerolls. Please let me know when you get your code working properly and posted.
Title: Re: Dice vs Armor table
Post by: fas723 on February 24, 2014, 07:47:16 AM
Okay, now I have gone through my code again. There are a few things that bugs me with this task.

First, my initial code had several errors. I had flipped constrains, looped within the wrong area and divided with the wrong probabilities. Hopefully I have it right this time.

Secondly however, I don't get my figures to match yours Aylin. I have tried to scratch my head why this is, but not come up with a good answer... Matter of fact is that we do we the same values but you have them for one Armor level higher then I have.

My approach has been to simulate all possible die rolls there is for each case (this worked out quite well for the standard table).  Generate the probability for each roll and add the results together. In the Akiro case I have done the same, but this time I made each possible roll twice. The first roll in each case is just as before, but I tracked each time the result was below the expected value. In the second roll I have simply added the probability for the first roll to fail.

First roll:
my = sum (p(x) * x(i)) over all possible rolls

where p(x) is the probability for roll i to occur and x(i) is the result of roll i.

Second roll:
my = sum (p(jj) * p(x) * x(i)) over all possible rerolls.

where p(jj) is the probability for the reroll to occur.


Maybe I have a brain freeze over here, but I can't get our numbers to match and I can't really think where mine went wrong this time... I need you to look at my figures / approach and see if / where it went wrong. Looking at your 1 die 1 Armor example Aylin my figures correspond while yours do not...

I have updated my table from before. Check there.
Title: Re: Dice vs Armor table
Post by: fas723 on February 24, 2014, 11:13:30 AM
Short reflection (if my latest values are correct):

- Akiros favour becomes better and better the more dice you have.
- More armor reduces the efficiency of AF. Strangely in some cases when armor goes up the efficiency of AK goes up. I guess this is because the standard "my" falls over/under a integer between the two values and becomes more efficient. E.g 4 dice 0 Armor vs. 4 dice 1 Armor.
- It must also be the same reason why 3 dice 0 Armor is more efficient than 4 dice 0 Armor.

@Aylin
Were you able to reach the code now?
Title: Re: Dice vs Armor table
Post by: Aylin on February 24, 2014, 06:03:01 PM
@Aylin
Were you able to reach the code now?

Yes, though I won't be able to check it until Thursday evening due to some IRL stuff.
Title: Calculating the probability of damage amounts
Post by: joechip90 on May 15, 2014, 06:00:00 AM
Dear All,

There has been a lot of talk on the forums lately about the relative merits of increasing the number of attack dice vs armour piercing against heavily armoured opponents.  A lot of people have been using a basic calculation of around 1 point of damage per attack dice but, of course, this becomes more complicated in the presence of armour.  More dice mean more chance of critical hits but armour piercing strikes will allow you to make the most of each dice.

Because I am a total geek, I realised that there was a way to calculate the probability of dealing a certain amount of damage for any given number of attack dice and the armour of the defender.  I have written a small script for the R statistical platform (http://www.r-project.org/) that will perform this calculation that I have posted here (https://dl.dropboxusercontent.com/u/4451494/MageWars/DamageProbabilityCalculator.R).  It defines a single function 'damageProbabilities' that takes three arguments:  the first is the number of attack dice, the second is the effective armour of the defender (basic armour minus piercing), and the final argument is some text denoting the type of damage (this defaults of "normal" for normal damage type but can also be "incorporeal" or "resilient" to calculate damage for defenders with these traits).

As an illustration of this script I have attached to this post the results of an analysis of two different attacks against an opponent with 3 armour: a 4-dice attack with +3 piercing and a 6-dice attack.  I ran this using the following calls of the 'damageProbabilities' function: damageProbabilities(4, 0, "normal") and damageProbabilities(6, 3, "normal").  The function will then provide the probability of dealing a certain amount of damage to the defender and the 'expected' amount of damage (which is sort of analogous to the mean amount of damage you'd expect from the attack, see information about expected values (http://en.wikipedia.org/wiki/Expected_value)).  I have attached a figure with the probability mass distribution for the 4-dice +3 piercing attack given in red and the probability mass distribution for the 6-dice attack given in blue.  The expected damage for the two attacks is shown by the dotted lines in the corresponding colours.  You can see from this analysis that the expected damage for the 4-dice piercing attack is 4 whereas the expected damage for the 6-dice attack is only 3.74.  This means that if you're up against a knight of westlock with a timber wolf then you're much more likely to do more damage by casting 'piercing strike' (2 mana) than revealing a bear strength enchantment (3 mana + original casting cost).

Feel free to use the script how you like for lots of different types of attacks.  I can also post a description of the mathematics behind the calculation if people are interested.
Title: Re: Calculating the probability of damage amounts
Post by: fas723 on May 15, 2014, 09:10:36 AM
Any different from this?
http://forum.arcanewonders.com/index.php?topic=13562.0
Title: Re: Calculating the probability of damage amounts
Post by: joechip90 on May 15, 2014, 09:16:03 AM
Ooh no maybe not...  Didn't see that post.  Thank you for the heads up.  I'll check my results against the table but from the first few lines it looks like we have exactly the same answers.
Title: Re: Calculating the probability of damage amounts
Post by: lettucemode on May 15, 2014, 09:20:06 AM
You can see from this analysis that the expected damage for the 4-dice piercing attack is 4 whereas the expected damage for the 6-dice attack is only 3.74.

This is a cool find, thanks for sharing it. Now that I look at fas723's table again I see that it has the same information in there but I didn't notice it back then.

In your example, we can see that piercing is better than +2 dice, cool. But if you go down to a 2 dice attack with +3 piercing vs. 4 dice, both against 3 armor, the 4 dice comes out ahead.

A graph that shows when piercing is better than +2 dice for many combinations of dice and armor would be very helpful to this discussion. Tables of numbers are great but it can be hard to see patterns in them.
Title: Re: Calculating the probability of damage amounts
Post by: joechip90 on May 15, 2014, 10:17:52 AM
I'm just trying to get a little app set up on my webpage that will allow people to put in any combination of piercing, armour, attack dice and defensive traits (such as 'incorporeal' and 'resilient') and then check out the probabilities of the different damage values themselves.  That should reduce the need to print out a series of tables that still won't cover some eventualities.

Hopefully I'll be able to report back soon with the functioning app.

EDIT:  In the meantime I've set up a webpage here (http://www.r-fiddle.org/#/fiddle?id=0xBEMr9H) where you can try out your own combinations without having to install any software.  Click the 'run code' button on the website and then simply type the following into the *bottom* console 'plotDamage(#attack dice, #net armour, #trait)' replacing '#attack dice' with the number of attack dice, '#net armour' with the amount of armour after piercing (i.e. base armour - piercing) and '#trait' with either the value "normal" (include quotation marks) for standard damage calculation, "incorporeal" for damage to incorporeal creatures, and "resilient" for resilient creatures.  It will produce a graph of the probabilities of the damage in the top-right corner and then display the expected damage and the probabilities in the console.  I'll try a more elegant solution soon but this should be a fix in the meantime.

EDIT:  I've coded up a much better solution that can be found >>here<< (http://joechip90.batcave.net/MageWars/damCalc.html).  It is a simple webform where you can simply put in the relevant attacker and defender information and click 'calculate'.
Title: Re: Calculating the probability of damage amounts
Post by: Shad0w on May 15, 2014, 01:04:37 PM
Any different from this?
http://forum.arcanewonders.com/index.php?topic=13562.0 (http://forum.arcanewonders.com/index.php?topic=13562.0)

I am merging the threads  8)
Title: Re: Calculating the probability of damage amounts
Post by: sIKE on May 15, 2014, 01:40:26 PM
Any different from this?
http://forum.arcanewonders.com/index.php?topic=13562.0 (http://forum.arcanewonders.com/index.php?topic=13562.0)

I am merging the threads  8)
You are going to make Gozer mad
Title: Re: Dice vs Armor table
Post by: Wise fool on May 15, 2014, 03:00:59 PM
Cross the streams?
Title: Re: Calculating the probability of damage amounts
Post by: Shad0w on May 16, 2014, 04:31:09 PM
Any different from this?
http://forum.arcanewonders.com/index.php?topic=13562.0 (http://forum.arcanewonders.com/index.php?topic=13562.0)

I am merging the threads  8)
You are going to make Gozer mad


Does not matter same / similar topics get merged to lower forum clutter
Title: Re: Dice vs Armor table
Post by: joechip90 on June 08, 2014, 08:34:44 PM
Apologies in resurrecting this thread but I have finally got a little web programming side-project finished that allows anyone to calculate the probabilities of dealing different amounts of damage in various different circumstances.  This is much cleaner than my previous interim attempt and instead implements everything within a standard webform.  You simply put in your basic melee attack dice number along with any modifiers (such as attack bonuses and multiple attacks) and the armour/traits of the defending creature, press 'calculate', and you are given a table of damage probabilities.  The output damage table show the probability of scoring a particular amount of damage but also the probability of scoring at least a certain amount of damage: allowing you to work out if it is probable that you next attack with kill a creature or whether it is worth doing an Akiro's favour attack die re-roll.

I've sorted the algorithm so that it now applies +melee modifiers correctly when making multiple attacks (i.e. only applying them for the first attack).  I've also added some code for incorporating the effect of veteran's belt, resilient and incorporeal defensive traits.  If anyone is interested in the mathematics behind it then I'd be happy to post that somewhere (it involves generating functions and polynomial rings).

The webform can be found >>here<< (http://joechip90.batcave.net/MageWars/damCalc.html).  It probably could do with being made to look a little prettier but hopefully the functionality is all there.  Feel free to try it out and let me know if you spot any errors.
Title: Re: Dice vs Armor table
Post by: Shad0w on June 09, 2014, 01:05:09 AM
NP It has only been a month  8)
Title: Piercing strike versus power strike
Post by: joechip90 on June 09, 2014, 05:41:31 AM
A graph that shows when piercing is better than +2 dice for many combinations of dice and armor would be very helpful to this discussion. Tables of numbers are great but it can be hard to see patterns in them.

Not sure if this totally satisfies what you were looking for but from the damage calculator (http://joechip90.batcave.net/MageWars/damCalc.html) I have made a table of the situations when it will be preferable to cast Piercing Strike (+3 piercing) over Power Strike (+2 melee) on one of your creatures.  Below is a table of the differences in the expected damage dealt by a creature with the power strike incantation versus a creature with the piercing strike incantation (positive values mean that power strike is expected to deliver more damage than piercing strike):

Base AttackNo Armour1 Armour2 Armour3 Armour4 Armour5 Armour
121.2960.8150.6110.8561.005
221.1980.5930.2590.6420.914
321.1320.428-0.0290.4040.76
421.0880.307-0.2590.1680.569
521.0590.219-0.44-0.0460.364
621.0390.156-0.581-0.2340.162
721.0260.111-0.688-0.394-0.028
821.0170.078-0.769-0.525-0.199
921.0120.055-0.83-0.632-0.349
1021.0080.039-0.876-0.717-0.476

As you can see from the table, in general, power strike is much more useful than piercing strike.  However, if your creature has a base attack of at least 3 dice and you are coming up against a heavily armoured opponent then piercing strike has some situational uses.

A couple of caveats when interpreting the table: firstly I've assumed that the attacker does not already have some form of piercing ability, if the attacker does have this piercing ability then deduct one from the armour for each point of piercing when looking up the defender column on the table to decide if piercing strike will be a better play than power strike.  Also, although it is relatively easy to do so on the damage calculator, I haven't yet created a table for the addition of Veteran's belt.  I suspect that the addition of Veteran's Belt will swing things much more in favour of piercing strike.