bayes for days
sds plan ev.md
4.3 kB


id: ev title: Damage as a distribution, not a mean status: open dependsOn: [protocol] exitCriterion: > Fire allocation is chosen on P(threshold), and the calculator is tested against hand-computed cases. #

ev #

At a to-hit of 11 a PPC has an expected 0.83 damage and an actual outcome of "nothing, 92% of the time". Overkill decisions need the distribution; the mean says a Locust needs two PPCs when it needs many more. (The figure was written here against a to-hit of 10, which 2d6 reaches one time in six, not one in twelve.)

The calculator lives in crates/sds-core/src/ev.rs. Nothing calls it yet.

WeaponType.getDamage() is a sentinel more often than it is a number #

Four weapon classes now, and each was found the same way - a figure that read zero or negative, traced to an accessor answering a sentinel rather than a damage:

class what getDamage() gives where the real figure lives
cluster (LRM, SRM) DAMAGE_BY_CLUSTER_TABLE = -2 the cluster table, by rack size
variable DAMAGE_VARIABLE per weapon
artillery DAMAGE_ARTILLERY getRackSize()
conventional infantry -3 per weapon ConvInfantry.getDamagePerTrooper() x troopers

Measured for the last of those: a Clan Heavy Foot Point delivers 3.00 and a 25-trooper motorised platoon 8.50, where summing getDamage() over their weapon lists gives -15.0 for both. Nothing in the weapon list carries it, because a platoon's damage is a function of how many troopers it has.

The pattern is the finding. ClusterGrouping.resolvedDamage is our reimplementation of MegaMek's combination rules and it accrues one special case per weapon class we get wrong. Every instance so far has been an accessor whose name promises a damage and whose return is a code, and every one was caught by a figure reading zero rather than by anything failing.