11 June 2009

Battle Math for Battletech

This post may be totally incomprehensible, but I'm trying to express some mathematical ideas that have been occupying my mind recently. Eventually I need to be able to express these ideas to others without being too "mathy", and this is my first attempt at explaining something that is pretty darn complicated. Hold on tight ...

A while back I wrote about a statistical probability distribution that can be applied to Battletech. Given a random "stress" (damage) and a critical breaking strength (armor and internal structure), you can calculate the probability that a part (location) will break (be destroyed) in a given amount of time (number of damage groups). The hard part is that a Battlemech has many different parts, and calculating the joint distribution for the survival of all these parts is very difficult ... but it's not impossible ... and I am making some progress. I'll explain some of it, enough to give the general idea but not the complete details because I'm really sleepy.

1) Starting assumptions: The amount of damage needed to destroy each armor and internal structure location, and the amount and variability of the damage groupings (mean and standard deviation), and the probability of hitting each location. This last bit means assigning probabilities to Front/Rear/Side hit-location columns, and also Full-body/Punch/Kick tables.

2) Start counting grouping of damage (which I may call "shocks"), which are assumed to strike the mech. This represents the time "t" or the number of hits applied to the mech so far.

3) Starting with the left arm (LA), calculate the proportion of hits striking the LA (front and rear separately) at each time (this can be a fraction).

4) Total this number of hits and use it to calulate A) the probability the LA armor is destroyed at time t, and B) the probability the LA armor and internal structure is destroyed at time t. There is a key idea here: instead of calculating the damage transferred to the LA internal structure after the armor is destroyed, I am calculating based on the total damage to the LA destroying both armor and internal structure. I will need to add armor and internal-structure locations one at a time for increasingly larger (and overlapping) parts of the entire mech.

5) Use the difference between the two probabilities to determine the number of hits striking after the LA armor is destroyed but before the LA internal structure is destroyed. To be more complete: determine the the probability that X number of hits striking at time t after the LA armor is destroyed but before the LA internal structure is destroyed. This number of hits is then used to calculate probabilities of critical hits (which I will not detail here).

6) Calculate the amount of damage that strikes the LA from the rear before the entire LA (armor and IS) is destroyed. This damage-from-rear reduces armor that also take damage from the front, and so it contributes to the total damage transferred from LA to Left Torso (LT) on the front (something that took me a long time to figure out). Likewise, the amount that strikes the front before the arm is destroyed contributes to damage transfer in the rear.

7) Repeat steps 3-6 for the Left Leg (LL).

8) Calculate total damage at time t for the different ways the Left Torso front armor might be destroyed: i) damage that directly strikes the LT, ii) damage on LT and LA (including the amount transferred from the rear in 6), iii) damage on the LT and LL (also transfer damage), iv) damage to the LT+LA+LL+rear transfer.

9) Using the damage amounts determined in 8, calculate the probability of destruction at time t for for following total damage quantities: i) LT front armor (LTfa), ii) LTfa+ total LA (armor and IS), iv) LTfa+ total LA and LL (armor and IS).

10) repeat 9 for the LT rear amor.

OK, I'm getting really sleepy and I haven't gotten to the LT internal structure: it follows the same pattern except the are 8 separate probability calculations needed. The center torso armor locations and internal structure will need 18 sets of calculations each (ouch), and then I glue the head on top of all that. I'm going to need some sort of computer program to cross-check the results, otherwise I won't be able to tell the difference between a math error (mine) and a spreadsheet typo.

So ... that must have been an awful read (but Sam will read it!). Long story short, it is d*mned hard to calculate, but I know how to do it now. It's just a matter of banging on the keyboard until I get it right.

UPDATE: For what it's worth, the exercise of writing that out got me thinking about organized ways to list all the calculations needed, and I realized I had left out a bunch. There should be about 150 combinations of locations to work out, and I'm going to need to do some programming to make that convenient.
GBR Giant Battling Robots Favicon

4 comments:

skiltao said...

I made a rough guess at the final numbers back in February, so I'm looking forward to seeing what your more rigorous approach turns up.

Dan Eastwood said...

If I follow you correctly, your "25% damage = battlemech = 30% destroyed" means that the progress toward destroying a Mech proceeds a little faster than the damage accumulates. If we carry this out then ...
25% damage = battlemech is 30% destroyed
50% damage = battlemech is 60% destroyed
75% damage = battlemech is 90% destroyed
~88% damage = battlemech is 100% destroyed

My own educated guess (as of March) was that 75% damage == Mech destroyed, but I may have included Mechs with XL engines in that. In my current spreadsheet typical estimates are running closer to your 88%, but this will come down some a when I fix the latest bug** get critical hits added in. Your guess is probably very close for a Mech with a standard engine and no explosive critical slots.

** I've hit a bit of a snag. Nothing that I don't know how to do, but a lot more calculations than I had expected - and I expected a lot in the first place. This takes the problems to the limits of what can be done in a spreadsheet; it can work, but I would never be sure it worked right. I had already come to the conclusion that I need a computer program to verify the results, and writing another program for the calculations will actually make my life easier. Once I get that working, I can set up a near approximation in a spreadsheet for everyone to play with.

skiltao said...

Whoops! My apologies, I seem to have screwed up the 'Mech numbers... my 25% should probably read 36%, but without my original notes I can't be sure. Here's what the chart was supposed to say:

How much damage it takes to kill a 'Mech varies - sometimes you shoot the head clean off, sometimes you have to start with an arm and carve your way inwards. The righthand number expresses this average "killing damage" as a percent of the victim's total Hit Points. But not all damage contributes to the kill - sometimes you blow the wrong arm off, or scratch a leg without getting any deeper. So the lefthand number expresses the "killing damage" as a percentage of the total damage inflicted on the victim.

So to find how many HP a 'Mech will lose (on average) before being destroyed, divide the rightside by the leftside - so I figure a 'Mech will die after losing 83% of its total HP.

Of course, that ignores damage groupings (which will probably bring the figure down some) and overkill.

Dan Eastwood said...

Somewhere in there, and 83% is probably very close, is a number that represents the "best" design for a battlemech in terms of its useful life. That is, the design that allows the longest useful life where the mech can stand and fight. This means that the legs need to last (on average) a little bit longer than the center torso and other locations mounting the primary weapons.
Having some the the total hits NOT be "killing damage" turns out to be a good idea.