Jump to content

MathHammer 40K 8th Edition


cadian_shock

Recommended Posts

I made a tool for MathHammer-ing in 8th edition

 


 

Features:

 

• Supports d6, 2d6, 2d3, d3, etc for Shots and Damage

• Supports re-roll to hit for all misses or ones

• Supports re-roll to hit for all failed wounds or ones

• Supports ignoring wounds on a 6+, 5+, 4+, 3+ and 2+

• Output number of hits, wounds, unsaved wounds and models killed

• No ads

• Works on mobile

• Works best on Desktop

 

Any ideas? Let me know!

Link to comment
Share on other sites

I'm not sure if your D6 or more function on damage is working. Also needs 2D6 Pick Highest function 

 

Good tool overall though, best I've seen for this edition

I made some fixes about an hour ago - that might have solved the issue you found?

 

And thanks for the kind words!

Link to comment
Share on other sites

  • 2 weeks later...

Been using this a lot - thanks! Very cool!

 

Last time I tried it I think I was having some issues stacking multiple buff auras, i.e. re-roll ones to hit plus re-rolls to wound, etc. not sure how that all works.

 

Can you retry and if its wrong let me know your inputs that broke it?

 

I also just made an update to allow auto hits (flamers) and fixed a bug for weapons that were D > 1.

Link to comment
Share on other sites

  • 2 weeks later...

Now Mathhammer 8th Edition has multiple unit profiles for attacking! 

 

 

Just heard your cameo on Combat Phase!
Glad that this is a thing will definitely be checking it out! :biggrin.::thumbsup:

 Combat Phase?

 

 

You know what else would be cool, is points per model of shooting unit and points per model of victim. Also, the ability to enter two sets of stats at once and compare them on the same view.

 

Thanks again for this rad tool!

 You can do up to 5 attacking profiles

Edited by cadian_shock
Link to comment
Share on other sites

I question the way you calculate your probabilities for the To Hit roll.

 

Let's consider a space marine (hit on 3+) near a chapter master (reroll all failed rolls to hit). Your app gives an 88.889% hit rate which I guess you obtain by doing (4/6)+(2/6)*(4/6).

 

If you draw a tree of all possible outcomes, you obtain "only" 75% :

  1. Roll a 1, reroll and obtain 1 - fail
  2. Roll a 1, reroll and obtain 2 - fail
  3. Roll a 1, reroll and obtain 3 - hit
  4. Roll a 1, reroll and obtain 4 - hit
  5. Roll a 1, reroll and obtain 5 - hit
  6. Roll a 1, reroll and obtain 6 - hit
  7. Roll a 2, reroll and obtain 1 - fail
  8. Roll a 2, reroll and obtain 2 - fail
  9. Roll a 2, reroll and obtain 3 - hit
  10. Roll a 2, reroll and obtain 4 - hit
  11. Roll a 2, reroll and obtain 5 - hit
  12. Roll a 2, reroll and obtain 6 - hit
  13. Roll a 3 - hit
  14. Roll a 4 - hit
  15. Roll a 5 - hit
  16. Roll a 6 - hit

16 possible outcomes, 12 successes > 75%

 

Am I doing it wrong ?

Link to comment
Share on other sites

Hey, cadian -- I don't know if this is interesting or not, but: I had been working on a sort of simulator thing too. It basically runs a unit against another unit in some specific scenario (shooting or assault or shoot-once-then-assault, which was supposed to sort of represent deep striking, but maybe that is not accurate anymore, etc), simulating all of the die rolls, etc.

It's a command line program, but I put a very-half-assed web UI into it here:

http://www.aurumvorax.com/40ksim/do-battle.php?battle_type=shoot-once-then-assault&num_matches=1&unit1=10-gh-2plasma-wgpl-melee.txt&unit2=3-oblits.txt

You can run it one at a time and see the full results, or you can run a large number of battles and get an aggregate of the results.

e.g. when the tooled-up grey hunters go first, they win 88% of the time against the obliterators, in an average of 2 turns, with 6 guys left alive after. If the oblits go first, they win 57% of the time.

 

One thing that's useful is e.g. I can do a comparison of different power weapons. I suffer from generating way too much data and not really having the statistical chops to make sense of it, but I'll post here a .csv (like a spreadsheet) of the efficiency of different power weapons (mounted on a power-armored wolf guard chassis) against different targets, if maybe somebody can make sense of it. I took that basically: pair of wolf claws is efficient in most scenarios.

unit1,unit1pts,unit2,unit2pts,wins_1,wins_2,draws,avg_turns,avg_kills_1,avg_pts_killed_1,avg_remaining_1,avg_pts_remaining_1,avg_kills_2,avg_pts_killed_2,avg_remaining_2,avg_pts_remaining_2,pts_killed_per_turn,pts_killed_per_turn_per_pts
5-pawg-claws,150,boyz-target-dummy,468,1000,0,0,4.526,78,468,5,150,0,0,0,0,103.4026,0.6894
5-pawg-cs,80,boyz-target-dummy,252,1000,0,0,4.8,42,252,5,80,0,0,0,0,52.5000,0.6562
5-pawg-maul,100,boyz-target-dummy,306,1000,0,0,5.458,50.999,305.994,5,100,0,0,0.001,0.006,56.0634,0.5606
5-pawg-claw,130,boyz-target-dummy,396,1000,0,0,5.465,66,396,5,130,0,0,0,0,72.4611,0.5574
5-pawg-axe,105,boyz-target-dummy,324,1000,0,0,5.739,53.989,323.934,5,105,0,0,0.011,0.066,56.4443,0.5376
5-pawg-pp,115,boyz-target-dummy,360,1000,0,0,6.156,59.95,359.7,5,115,0,0,0.05,0.3,58.4308,0.5081
5-pawg-frost-sword,115,boyz-target-dummy,360,1000,0,0,6.282,59.941,359.646,5,115,0,0,0.059,0.354,57.2502,0.4978
5-pawg-sword,100,boyz-target-dummy,306,1000,0,0,6.618,50.444,302.664,5,100,0,0,0.556,3.336,45.7335,0.4573
5-pawg-frost-axe,130,boyz-target-dummy,396,1000,0,0,6.709,65.266,391.596,5,130,0,0,0.734,4.404,58.3688,0.4490
5-pawg-fist,180,boyz-target-dummy,558,1000,0,0,7,68.03,408.18,5,180,0,0,24.97,149.82,58.3114,0.3240
5-pawg-hammer,180,boyz-target-dummy,558,1000,0,0,7,68.033,408.198,5,180,0,0,24.967,149.802,58.3140,0.3240
5-pawg-hammer,180,dreadnought-target-dummy,798,1000,0,0,3.695,6,798,5,180,0,0,0,0,215.9675,1.1998
5-pawg-fist,180,dreadnought-target-dummy,798,1000,0,0,4.762,5.999,797.867,5,180,0,0,0.001,0.133,167.5487,0.9308
5-pawg-claws,150,dreadnought-target-dummy,798,1000,0,0,6.503,5.844,777.252,5,150,0,0,0.156,20.748,119.5221,0.7968
5-pawg-claw,130,dreadnought-target-dummy,399,1000,0,0,4.972,2.996,398.468,5,130,0,0,0.004,0.532,80.1424,0.6165
5-pawg-sword,100,dreadnought-target-dummy,399,1000,0,0,6.175,2.838,377.454,5,100,0,0,0.162,21.546,61.1262,0.6113
5-pawg-frost-sword,115,dreadnought-target-dummy,399,1000,0,0,6.151,2.847,378.651,5,115,0,0,0.153,20.349,61.5593,0.5353
5-pawg-pp,115,dreadnought-target-dummy,399,1000,0,0,6.572,2.636,350.588,5,115,0,0,0.364,48.412,53.3457,0.4639
5-pawg-axe,105,dreadnought-target-dummy,399,1000,0,0,6.765,2.4,319.2,5,105,0,0,0.6,79.8,47.1840,0.4494
5-pawg-cs,80,dreadnought-target-dummy,399,996,0,4,6.978,1.834,243.922,5,80,0,0,1.166,155.078,34.9559,0.4369
5-pawg-frost-axe,130,dreadnought-target-dummy,399,1000,0,0,6.752,2.435,323.855,5,130,0,0,0.565,75.145,47.9643,0.3690
5-pawg-maul,100,dreadnought-target-dummy,399,997,0,3,6.973,1.845,245.385,5,100,0,0,1.155,153.615,35.1907,0.3519
5-pawg-cs,80,GEQ-target-dummy,255,1000,0,0,5.402,50.999,254.995,5,80,0,0,0.001,0.005,47.2038,0.5900
5-pawg-claws,150,GEQ-target-dummy,465,1000,0,0,5.257,93,465,5,150,0,0,0,0,88.4535,0.5897
5-pawg-maul,100,GEQ-target-dummy,315,1000,0,0,6.35,62.957,314.785,5,100,0,0,0.043,0.215,49.5724,0.4957
5-pawg-sword,100,GEQ-target-dummy,315,1000,0,0,6.495,62.76,313.8,5,100,0,0,0.24,1.2,48.3141,0.4831
5-pawg-claw,130,GEQ-target-dummy,405,1000,0,0,6.514,80.895,404.475,5,130,0,0,0.105,0.525,62.0932,0.4776
5-pawg-pp,115,GEQ-target-dummy,360,1000,0,0,6.563,71.773,358.865,5,115,0,0,0.227,1.135,54.6800,0.4755
5-pawg-axe,105,GEQ-target-dummy,330,1000,0,0,6.702,65.495,327.475,5,105,0,0,0.505,2.525,48.8623,0.4654
5-pawg-frost-axe,130,GEQ-target-dummy,405,1000,0,0,6.799,80.511,402.555,5,130,0,0,0.489,2.445,59.2080,0.4554
5-pawg-frost-sword,115,GEQ-target-dummy,360,1000,0,0,6.943,69.769,348.845,5,115,0,0,2.231,11.155,50.2441,0.4369
5-pawg-hammer,180,GEQ-target-dummy,555,1000,0,0,7,68.766,343.83,5,180,0,0,42.234,211.17,49.1186,0.2729
5-pawg-fist,180,GEQ-target-dummy,555,1000,0,0,7,68.714,343.57,5,180,0,0,42.286,211.43,49.0814,0.2727
5-pawg-claws,150,gh-target-dummy,462,1000,0,0,3.146,33,462,5,150,0,0,0,0,146.8531,0.9790
5-pawg-frost-sword,115,gh-target-dummy,378,1000,0,0,3.847,27,378,5,115,0,0,0,0,98.2584,0.8544
5-pawg-claw,130,gh-target-dummy,420,1000,0,0,4.001,30,420,5,130,0,0,0,0,104.9738,0.8075
5-pawg-axe,105,gh-target-dummy,336,1000,0,0,4.188,24,336,5,105,0,0,0,0,80.2292,0.7641
5-pawg-sword,100,gh-target-dummy,336,1000,0,0,4.425,24,336,5,100,0,0,0,0,75.9322,0.7593
5-pawg-maul,100,gh-target-dummy,336,1000,0,0,5.241,23.985,335.79,5,100,0,0,0.015,0.21,64.0698,0.6407
5-pawg-frost-axe,130,gh-target-dummy,420,1000,0,0,5.123,29.999,419.986,5,130,0,0,0.001,0.014,81.9805,0.6306
5-pawg-cs,80,gh-target-dummy,252,1000,0,0,5.079,17.965,251.51,5,80,0,0,0.035,0.49,49.5196,0.6190
5-pawg-pp,115,gh-target-dummy,378,1000,0,0,5.66,26.906,376.684,5,115,0,0,0.094,1.316,66.5519,0.5787
5-pawg-fist,180,gh-target-dummy,546,1000,0,0,5.66,38.994,545.916,5,180,0,0,0.006,0.084,96.4516,0.5358
5-pawg-hammer,180,gh-target-dummy,546,1000,0,0,5.668,38.992,545.888,5,180,0,0,0.008,0.112,96.3105,0.5351
5-pawg-hammer,180,heldrake-target-dummy,594,1000,0,0,3.399,3,594,5,180,0,0,0,0,174.7573,0.9709
5-pawg-claws,150,heldrake-target-dummy,594,1000,0,0,5.605,2.978,589.644,5,150,0,0,0.022,4.356,105.1996,0.7013
5-pawg-fist,180,heldrake-target-dummy,594,1000,0,0,4.854,2.991,592.218,5,180,0,0,0.009,1.782,122.0062,0.6778
5-pawg-claw,130,heldrake-target-dummy,594,1000,0,0,6.931,2.162,428.076,5,130,0,0,0.838,165.924,61.7625,0.4751
5-pawg-sword,100,heldrake-target-dummy,594,919,0,81,7,1.003,198.594,5,100,0,0,1.997,395.406,28.3706,0.2837
5-pawg-axe,105,heldrake-target-dummy,594,902,0,98,7,1.001,198.198,5,105,0,0,1.999,395.802,28.3140,0.2697
5-pawg-frost-sword,115,heldrake-target-dummy,594,913,0,87,7,1.015,200.97,5,115,0,0,1.985,393.03,28.7100,0.2497
5-pawg-pp,115,heldrake-target-dummy,594,910,0,90,7,1.001,198.198,5,115,0,0,1.999,395.802,28.3140,0.2462
5-pawg-frost-axe,130,heldrake-target-dummy,594,910,0,90,7,1.019,201.762,5,130,0,0,1.981,392.238,28.8231,0.2217
5-pawg-cs,80,heldrake-target-dummy,594,554,0,446,7,0.558,110.484,5,80,0,0,2.442,483.516,15.7834,0.1973
5-pawg-maul,100,heldrake-target-dummy,594,536,0,464,7,0.539,106.722,5,100,0,0,2.461,487.278,15.2460,0.1525
5-pawg-hammer,180,knight-target-dummy,1362,1000,0,0,6.119,2.892,1312.97,5,180,0,0,0.108,49.032,214.5726,1.1921
5-pawg-claws,150,knight-target-dummy,1362,1000,0,0,7,1.791,813.114,5,150,0,0,1.209,548.886,116.1591,0.7744
5-pawg-fist,180,knight-target-dummy,1362,1000,0,0,6.983,1.993,904.822,5,180,0,0,1.007,457.178,129.5750,0.7199
5-pawg-claw,130,knight-target-dummy,1362,994,0,6,7,1.007,457.178,5,130,0,0,1.993,904.822,65.3111,0.5024
5-pawg-frost-sword,115,knight-target-dummy,1362,790,0,210,7,0.79,358.66,5,115,0,0,2.21,1003.34,51.2371,0.4455
5-pawg-axe,105,knight-target-dummy,1362,343,0,657,7,0.343,155.722,5,105,0,0,2.657,1206.28,22.2460,0.2119
5-pawg-frost-axe,130,knight-target-dummy,1362,351,0,649,7,0.351,159.354,5,130,0,0,2.649,1202.65,22.7649,0.1751
5-pawg-maul,100,knight-target-dummy,1362,47,0,953,7,0.047,21.338,5,100,0,0,2.953,1340.66,3.0483,0.0305
5-pawg-sword,100,knight-target-dummy,1362,8,0,992,7,0.008,3.632,5,100,0,0,2.992,1358.37,0.5189,0.0052
5-pawg-pp,115,knight-target-dummy,1362,4,0,996,7,0.004,1.816,5,115,0,0,2.996,1360.18,0.2594,0.0023
5-pawg-cs,80,knight-target-dummy,1362,0,0,1000,7,0,0,5,80,0,0,3,1362,0.0000,0.0000
5-pawg-hammer,180,land-raider-crusader-target-dummy,948,1000,0,0,5.65,2.92,922.72,5,180,0,0,0.08,25.28,163.3133,0.9073
5-pawg-fist,180,land-raider-crusader-target-dummy,948,1000,0,0,6.751,2.471,780.836,5,180,0,0,0.529,167.164,115.6623,0.6426
5-pawg-claws,150,land-raider-crusader-target-dummy,948,1000,0,0,6.992,1.968,621.888,5,150,0,0,1.032,326.112,88.9428,0.5930
5-pawg-claw,130,land-raider-crusader-target-dummy,948,996,0,4,7,1.136,358.976,5,130,0,0,1.864,589.024,51.2823,0.3945
5-pawg-frost-sword,115,land-raider-crusader-target-dummy,948,924,0,76,7,0.932,294.512,5,115,0,0,2.068,653.488,42.0731,0.3659
5-pawg-axe,105,land-raider-crusader-target-dummy,948,544,0,456,7,0.544,171.904,5,105,0,0,2.456,776.096,24.5577,0.2339
5-pawg-frost-axe,130,land-raider-crusader-target-dummy,948,571,0,429,7,0.571,180.436,5,130,0,0,2.429,767.564,25.7766,0.1983
5-pawg-sword,100,land-raider-crusader-target-dummy,948,86,0,914,7,0.086,27.176,5,100,0,0,2.914,920.824,3.8823,0.0388
5-pawg-maul,100,land-raider-crusader-target-dummy,948,74,0,926,7,0.074,23.384,5,100,0,0,2.926,924.616,3.3406,0.0334
5-pawg-pp,115,land-raider-crusader-target-dummy,948,11,0,989,7,0.011,3.476,5,115,0,0,2.989,944.524,0.4966,0.0043
5-pawg-cs,80,land-raider-crusader-target-dummy,948,0,0,1000,7,0,0,5,80,0,0,3,948,0.0000,0.0000
5-pawg-cs,80,poxwalker-target-dummy,255,1000,0,0,5.413,50.999,254.995,5,80,0,0,0.001,0.005,47.1079,0.5888
5-pawg-pp,115,poxwalker-target-dummy,360,1000,0,0,6.852,70.419,352.095,5,115,0,0,1.581,7.905,51.3857,0.4468
5-pawg-maul,100,poxwalker-target-dummy,315,1000,0,0,6.941,60.07,300.35,5,100,0,0,2.93,14.65,43.2719,0.4327
5-pawg-claws,150,poxwalker-target-dummy,465,1000,0,0,6.963,90.164,450.82,5,150,0,0,2.836,14.18,64.7451,0.4316
5-pawg-sword,100,poxwalker-target-dummy,315,1000,0,0,6.999,51.628,258.14,5,100,0,0,11.372,56.86,36.8824,0.3688
5-pawg-claw,130,poxwalker-target-dummy,405,1000,0,0,7,65.957,329.785,5,130,0,0,15.043,75.215,47.1121,0.3624
5-pawg-axe,105,poxwalker-target-dummy,330,1000,0,0,7,51.769,258.845,5,105,0,0,14.231,71.155,36.9779,0.3522
5-pawg-frost-axe,130,poxwalker-target-dummy,405,1000,0,0,7,62.459,312.295,5,130,0,0,18.541,92.705,44.6136,0.3432
5-pawg-frost-sword,115,poxwalker-target-dummy,360,1000,0,0,7,52.146,260.73,5,115,0,0,19.854,99.27,37.2471,0.3239
5-pawg-hammer,180,poxwalker-target-dummy,555,1000,0,0,7,66.735,333.675,5,180,0,0,44.265,221.325,47.6679,0.2648
5-pawg-fist,180,poxwalker-target-dummy,555,1000,0,0,7,62.204,311.02,5,180,0,0,48.796,243.98,44.4314,0.2468
5-pawg-hammer,180,rhino-target-dummy,642,1000,0,0,4.556,6,642,5,180,0,0,0,0,140.9131,0.7829
5-pawg-fist,180,rhino-target-dummy,642,1000,0,0,5.807,5.974,639.218,5,180,0,0,0.026,2.782,110.0771,0.6115
5-pawg-claws,150,rhino-target-dummy,642,1000,0,0,6.983,4.978,532.646,5,150,0,0,1.022,109.354,76.2775,0.5085
5-pawg-claw,130,rhino-target-dummy,642,1000,0,0,7,3.306,353.742,5,130,0,0,2.694,288.258,50.5346,0.3887
5-pawg-sword,100,rhino-target-dummy,321,1000,0,0,6.847,2.37,253.59,5,100,0,0,0.63,67.41,37.0367,0.3704
5-pawg-frost-sword,115,rhino-target-dummy,642,1000,0,0,7,2.424,259.368,5,115,0,0,3.576,382.632,37.0526,0.3222
5-pawg-pp,115,rhino-target-dummy,642,1000,0,0,7,2.066,221.062,5,115,0,0,3.934,420.938,31.5803,0.2746
5-pawg-axe,105,rhino-target-dummy,321,999,0,1,6.987,1.861,199.127,5,105,0,0,1.139,121.873,28.4996,0.2714
5-pawg-cs,80,rhino-target-dummy,321,989,0,11,7,1.382,147.874,5,80,0,0,1.618,173.126,21.1249,0.2641
5-pawg-frost-axe,130,rhino-target-dummy,642,1000,0,0,7,1.874,200.518,5,130,0,0,4.126,441.482,28.6454,0.2203
5-pawg-maul,100,rhino-target-dummy,321,994,0,6,7,1.351,144.557,5,100,0,0,1.649,176.443,20.6510,0.2065
5-pawg-claws,150,tda-ss-target-dummy,504,1000,0,0,3.403,9,504,5,150,0,0,0,0,148.1046,0.9874
5-pawg-claw,130,tda-ss-target-dummy,504,1000,0,0,4.726,8.996,503.776,5,130,0,0,0.004,0.224,106.5967,0.8200
5-pawg-maul,100,tda-ss-target-dummy,336,1000,0,0,4.177,5.997,335.832,5,100,0,0,0.003,0.168,80.4003,0.8040
5-pawg-fist,180,tda-ss-target-dummy,672,1000,0,0,4.714,11.969,670.264,5,180,0,0,0.031,1.736,142.1858,0.7899
5-pawg-hammer,180,tda-ss-target-dummy,672,1000,0,0,4.754,11.962,669.872,5,180,0,0,0.038,2.128,140.9070,0.7828
5-pawg-axe,105,tda-ss-target-dummy,336,1000,0,0,4.17,5.992,335.552,5,105,0,0,0.008,0.448,80.4681,0.7664
5-pawg-frost-sword,115,tda-ss-target-dummy,504,1000,0,0,5.894,8.819,493.864,5,115,0,0,0.181,10.136,83.7910,0.7286
5-pawg-sword,100,tda-ss-target-dummy,336,1000,0,0,5.127,5.937,332.472,5,100,0,0,0.063,3.528,64.8473,0.6485
5-pawg-frost-axe,130,tda-ss-target-dummy,504,1000,0,0,5.887,8.82,493.92,5,130,0,0,0.18,10.08,83.9001,0.6454
5-pawg-cs,80,tda-ss-target-dummy,336,1000,0,0,6.15,5.566,311.696,5,80,0,0,0.434,24.304,50.6823,0.6335
5-pawg-pp,115,tda-ss-target-dummy,504,1000,0,0,6.723,7.762,434.672,5,115,0,0,1.238,69.328,64.6545,0.5622
5-pawg-fist,180,tda-target-dummy,660,1000,0,0,3.134,15,660,5,180,0,0,0,0,210.5935,1.1700
5-pawg-hammer,180,tda-target-dummy,660,1000,0,0,3.168,15,660,5,180,0,0,0,0,208.3333,1.1574
5-pawg-claws,150,tda-target-dummy,528,1000,0,0,3.119,12,528,5,150,0,0,0,0,169.2850,1.1286
5-pawg-frost-sword,115,tda-target-dummy,396,1000,0,0,3.418,9,396,5,115,0,0,0,0,115.8572,1.0075
5-pawg-sword,100,tda-target-dummy,396,1000,0,0,4.296,8.999,395.956,5,100,0,0,0.001,0.044,92.1685,0.9217
5-pawg-claw,130,tda-target-dummy,396,1000,0,0,3.366,9,396,5,130,0,0,0,0,117.6471,0.9050
5-pawg-axe,105,tda-target-dummy,396,1000,0,0,4.267,9,396,5,105,0,0,0,0,92.8052,0.8839
5-pawg-frost-axe,130,tda-target-dummy,396,1000,0,0,4.274,9,396,5,130,0,0,0,0,92.6533,0.7127
5-pawg-maul,100,tda-target-dummy,396,1000,0,0,5.883,8.845,389.18,5,100,0,0,0.155,6.82,66.1533,0.6615
5-pawg-pp,115,tda-target-dummy,396,1000,0,0,6.028,8.778,386.232,5,115,0,0,0.222,9.768,64.0730,0.5572
5-pawg-cs,80,tda-target-dummy,264,1000,0,0,6.189,5.497,241.868,5,80,0,0,0.503,22.132,39.0803,0.4885

 

I have the start of a game simulator, where there are multiple units on each team and I can put in different AI heuristics to determine how they move and shoot, run 1000 games and see which list wins. I have aspirations of eventually putting some kind of neural net or genetic algorithm in there and see if I can get that to work. Then eventually maybe my laptop can crush my enemies and I just need to paint what it tells me to paint...(the machine spirit!)

 

There are a lot of things missing (some special rules, embarking in transports, power fists do 2 damage instead of d3, etc), obviously. But it's sort of fun. In practice, I guess it just means I spend time doing this instead of painting space wolves...

 

Anyway, I'm obviously happy to talk about this kind of thing in excruciating detail, if you're interested?

Edited by jerrys
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 1 month later...

I question the way you calculate your probabilities for the To Hit roll.

 

Let's consider a space marine (hit on 3+) near a chapter master (reroll all failed rolls to hit). Your app gives an 88.889% hit rate which I guess you obtain by doing (4/6)+(2/6)*(4/6).

 

If you draw a tree of all possible outcomes, you obtain "only" 75% :

  • Roll a 1, reroll and obtain 1 - fail
  • Roll a 1, reroll and obtain 2 - fail
  • Roll a 1, reroll and obtain 3 - hit
  • Roll a 1, reroll and obtain 4 - hit
  • Roll a 1, reroll and obtain 5 - hit
  • Roll a 1, reroll and obtain 6 - hit
  • Roll a 2, reroll and obtain 1 - fail
  • Roll a 2, reroll and obtain 2 - fail
  • Roll a 2, reroll and obtain 3 - hit
  • Roll a 2, reroll and obtain 4 - hit
  • Roll a 2, reroll and obtain 5 - hit
  • Roll a 2, reroll and obtain 6 - hit
  • Roll a 3 - hit
  • Roll a 4 - hit
  • Roll a 5 - hit
  • Roll a 6 - hit
16 possible outcomes, 12 successes > 75%

 

Am I doing it wrong ?

I’m afraid you are, but you’re not the only one. As Grandmasterloser also pointed out, the individual probabilities of outcomes 13-16 are not the same as those for outcomes 1-12. Essentially, your model suggests that, because rolling a 1 or 2 would trigger a re-roll, the chance of rolling 1 or 2 on the first die is increased 6-fold. By your table of outcomes, you have a 6/16 chance of rolling a 1 but a 1/16 chance of rolling a 6 on the first die.

 

The correct method is to say:

 

To hit is EITHER hit on first dice (4/6 ie 2/3) OR miss on first dice (1/3) AND hit on second dice (2/3).

 

In probability mathematics, OR is treated as addition and AND is treated as multiplication.

 

So,

 

Probability to hit = 2/3 + (1/3*2/3) = 8/9 = 0.89.

 

Alternatively, calculate the chance of missing: i.e. miss on 1st dice AND miss on re-roll = 1/3 * 1/3 = 1/9. Therefore, chance to hit (because total probability of all possibilities, i.e. hit and miss, must equal 1) = 1 - 1/9 = 8/9 = 0.89 = 88.89%.

Edited by Plasmablasts
Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.