Friday, November 16, 2012

MathHammer Part 4. Rolling to Hit

 
     This post is to answer a question about the MathHammer calculator. Kai asked me to explain the formula I used to determine the probability to hit with blast weapons. So here it goes. And if you have any thoughts on how this could be improved, or any other questions feel free to leave a comment! More below...

     So first lets review the process of shooting a blast weapon. So we place the blast marker over our intended target. Next we roll the scatter dice and two D6. The scatter dice has 2 out of 6 faces which are hits and the other 4 are scatters. So we have a 1/3 chance of hitting straight off the bat and 2/3 chance of scattering 2D6. when we scatter 2D6 we subtract the ballistic skill of the shooter. Now that I've repeated what everyone already knows, lets look at the math.
      In this example, we are shooting at a group of Imperial Guard with our frag missile. The mathhammer calculator shows that we have a 61% chance of hitting. this isn't quite as straightforward as hitting with something like a boltgun, so i will explain the math i used to estimate this.
      So to determine the probability we start with the 1/3 chance of rolling a hit. Next we add the probability of hitting when we roll a scatter instead of a hit. To calculate this we start with the 2/3 chance of rolling a scatter multiplied by the probability of the total of the 2D6 being small enough to still hit. To do this in excel I had to do things a little differently by graphing out the probabilities of 2D6 results.
     This graph is the cumulative probability of 2D6 results. For example if we need a 6 or less we can see from the graph that there is about a 40% chance. I used a third order polynomial as the trend line which gives a function that we can use to finish off our equation.
     Now the probability of rolling a small enough number is determined by the polynomial function where x is the minimum distance needed which is determined by the BS plus the radius of the blast marker and the radius of the base of the target. The blast size is divided by 2 to get from the diameter to the radius and the base is divided by 50.8 to convert from the diameter in millimeters to the radius in inches (1in=25.4mm).
     This picture shows a quick example of how this works. say we are aiming for the middle model but roll a scatter and a total of 7 on 2D6. For the equation to see if we still hit the original target we take the 7 that we rolled. We then subtract the BS of 4, half of the 3" blast (1.5in), and half of the base width (about 0.5in) for a total of 4+1.5+0.5=6". So as the math shows exactly what we see in the example, we missed the original target by 1inch. 
     And back to the original mathhammer calculation. We plug in the stats for our firer and the target along with the size of the blast (usually 3 or 5 inches) and the size of the target's base (25, 40, 60mm etc. The model base could also be the size of a tank). All this info goes into the equation we described earlier and bam, we have a pretty decent estimation of our chances to hit.
     So that's about it! As you may have noticed, there are a few limitations of this equation. first of all, since it uses a best fit trend line as the 2D6 probability, it isn't exact. It is however a pretty decent estimation (and we really don't need any more than an estimation for what we're doing). The second limitation is having more than one enemy fall under the blast marker since it is really only set up to calculate the chances of killing one model. In the example above, the equation would have said we missed completely, but we really hit another guy. Unfortunately this calculation can't really determine the chances of hitting other models since there are so many possible places that other enemy units could be placed.
     Okay, sorry about the long winded explanation, but hopefully it was somewhat interesting/informative. Thanks for reading!

6 comments:

  1. Thanks for your detailed explanation!

    Recently I thought about the blast issue myself and I found the same problems you describe at the end. As you said already, there is no way to figure it out analytically.
    My approach was to assume a certain formation and modell nummber at first, i.e. 7 modells in a loose two row formation. After that I layed down a coordinate system and gave every base's center and the blast's center specific coordinates. Depending on the base and blast positions and sizes, I measured the distance of the centers and was able to see wether a base is under the blast template or not. Summing that up for 8 directions with the corresponding scatter probabilities I could approximate the number of hits.

    If your are interested, I can send you my excel file.

    Best regards

    ReplyDelete
    Replies
    1. Yeah It would be cool to see another take on how to do it. One of my professors always says "all models are wrong, but some of them are useful"(model as in mathematical models, not minis). Seeing the limitations of something as simple and predictable as a 40k game really proves that point. You can send the excel file to me at pykeman07(at)gmail.com

      Delete
    2. It seems like you could do this pretty well by actually writing a program that allowed you to place the enemy models and specify where to place the blast marker and all the other paramaters and just have it run a simulation. Unfortunately I don't know how to do any of that. But really, when you go that far into it you're probably better off just going off intuiton. All these models are for are to see what weapons work best in specific scenarios and they do that just fine. Beyond that is a bit excessive I think. (but would still be fun to do anyway).

      Delete
  2. Sorry to post on an old thread but I lost track of this series and am I only now catching back up. This stuff is just too much fun! As soon as I find the time I will run some simulations on this stuff. Honestly in alot of situations like this its both easier and faster to make a simulation. Actually doing the math is the hard part!

    ReplyDelete
    Replies
    1. That would be pretty cool to see. Let me know when you finish it. I'd love to take a look!

      Delete

Related Posts Plugin for WordPress, Blogger...