There are times, when you’re reading a Black Library book, when you think “I bet the math behind that is kinda interesting…”

I mean, probably not, but if you’re reading this blog, who are you to judge?

I’ve been catching up on the Horus Heresy on Audible, and had this thought triggered by the rather dramatic void battle at the conclusion of Ruinstorm by David Annandale. While most of the book is the sort of grand-scale horror that he’s known for, there’s actually some neat math that underpins how the final battle goes.

First, I’m talking about the end of a book. There are obviously spoilers here. But you’re warned.

Lanchester’s Laws and the Math of Shooting People

Back in 1916, a man named F.W. Lanchester (who in his spare time was a major force in the automotive industry in Britain and basically founded the field of operation’s research…) started working on a mathematical representation of the aerial component of the Great War, looking for a way to analytically predict the outcome of a battle. Which would have obvious advantages to the side that could do it.

What he came up with were two fairly elegant equations to describe…well…combat.

Lanchester’s Linear Equation covers two oddly different situations – ancient combat, and indirect fire like artillery. Basically, situations where you can’t really aim, and while firepower kills people, ordinance might arrive in places where there isn’t anyone, etc. The winner is the one with the most people, and the expected casualties are the difference between the larger army size and the smaller one. Neat, but not what we’re going to talk about.

Lanchester’s Square Equation, on the other hand, presents an interesting situation – that of aimed fire. Which presents the interesting problem that not only can someone shoot at multiple things, but they can be shot by multiple things. A guy in a shield wall only really needs to worry about the guy across from him. A tank needs to worry about anyone who has them targeted. As it turns out, two sides (A and B) shooting at one another is expressed by a really elegant set of two differential equations:

$$\frac{dA}{dt}=-\beta*B$$

and

$$\frac{dB}{dt}=-\alpha*A$$

That is, the rate of change in the number of people in Army A is determined how many people in Army B there are and how lethal their guns are ($\beta$), and the rate of of change in the number of people in Army B is determined by how many people there are in Army A and how lethal their guns are ($\alpha$). From this relatively simple set of equations, we can see some cool things.

For example, lets consider 100 Guardsmen vs. 100 Marines, both in Rapid Fire range to get two shots. Because we know how this fight ends, but we can show it now with math!

Here, we set the lethality of the Marines to 0.741 – roughly the number of Guardsmen a single Marine should kill in one turn (2 shots from the Bolter * 0.6667 to hit * 0.6667 to wound * 0.8333 to get through the Guard’s armor), and the Guard to a dire 0.111

Easy to see what’s happening here, right? The Guard get massacred, and as huge numbers of them die, their effectiveness goes down. But this isn’t exactly surprising, is it? Now let’s think about equal points of Guard. A standard Tactical Marine is 13 points, so 100 of them is 1300 points. That’s…325 heroic Cadians. Let’s see what the picture looks like now…

Quite the opposite result. The Guard, while suffering significant casualties, triumph, and the marines, despite having an almost 7-fold advantage in terms of firepower lose badly due to being outnumbered by 3.25 : 1. Which is the primary insight from Lanchester’s Square Equation – it’s far better to outnumber your foe than outgun them, and the disadvantage of being outnumbered isn’t linear.

This, at its core, is why spam works – not only are units being spammed often better, but taking three of something to do a job is more than three times as effective as taking one thing to do it. This is also the fundamental problem with elite armies – you have to get the Marine’s lethality up to 1.19, a close to 11-fold advantage, before the battle ends up being “close, but the Marines win”.

To put it in context, that’s giving every Marine a 3-shot Bolter, and every fourth Marine a 4-shot Bolter, for no additional points increase. Now of course, this isn’t how the game works – this assumes a blank, featureless board, no terrain, etc. And no randomness – but the core principle is there.

Which brings us to Ruinstorm…

The Second Battle of Davin

One of the primary villains of Ruinstorm is “The Pilgrim”, a menacing, otherworldly entity that heralds the doom of worlds – and transforms them in very chaos-y, 40K ways, like fortresses that span entire star systems. As it turns out,  The Pilgrim is actually the Veritas Ferrum, lost to the Imperium and having been transformed into a monsterous demon ship.

Kinda like this…

In the closing of the book, the Veritas Ferrum attacks the combined Blood Angels, Ultramarines and Dark Angel’s fleets with its own retainers of ex-Imperial ghost ships lost to the Warp. But that fleet is badly outnumbered by the Imperial fleet, and the commanders of the fleet, while intimidated by the size of the Veritas Ferrum, seem reasonably confident that they can handle it, albeit with losses.

And we, having now played with Lanchester’s Square Equation, agree. Being outnumbered is bad, and there’s no suggestion that, beyond being really, really huge, that the revenant ships are any better. And they’ve have to be a lot better, as we’ve seen.

(Technical note: There’s another set of equations, the aptly named ‘Salvo Equations’, that deal with naval combat, but that tends to be things like volleys of cruise missiles and counter-measure systems – Lanchester’s Square Equation feels more appropriate for how naval warfare is portrayed in Warhammer, especially when it breaks into the desperate point-blank range and boarding actions phase. The prow of the Veritas Ferrum is literally a giant mouth that can bite ships – how do you countermeasure that?)

Where David Annandale’s story collides with fun math is that when a revenant ship kills an Imperial ship, that now dead vessel joins the enemy fleet. Beyond the horror of seeing the brothers you failed to protect turn their guns on you, it poses and interesting question…what does the battle look like when one side can turn the other?

Mathematically, this looks something like

$$\frac{dImperium}{dt}=-\beta*Chaos$$

and

$$\frac{dChaos}{dt}=-\alpha*Imperium + \beta*Chaos$$

How does this change the battle? Quite dramatically. Let’s assume the ships are equally effective, for the sake of convenience, and give the Imperial fleets an even 1,000 ships (you could think of this as “Ship Points” where a frigate is one, and a strike cruiser might be 10, etc.). For a badly, but not comically outnumbered fleet, lets make the Pilgrim Fleet 650 ships. This, then, is the battle the fleet masters of the combined Legion fleets would have been expecting:

A handy victory. Yes, the loss of close to 200 ships would be sorely felt later when they try to relieve the heroic forces of the Imperial Fists currently holding Terra, but an engagement never really in doubt. Even a much worse 1000 vs. 800 ship matchup leaves a victorious Imperial fleet still largely intact.

But what about with this new set of equations, and the Imperial fleet losses capable of being corrupted?

Well that’s not good.

The initial losses, toward the beginning of the battle smooth out the Pilgrim Fleet’s descent, and eventually, they actually outnumber the Imperial fleet despite being on much worse footing to start out with, and the engagement leads to disaster, and a Pilgrim Fleet that’s actually slightly larger than the one it started with. Now, the Pilgrim Fleet can’t be much smaller than this – 619 ships is the first scenario where they actually survive the battle, but even with smaller numbers, it turns the battle into something far more costly for the Imperium.

Of course, these equations don’t take into account that there are three Primarchs and some witchy-poo warp nonsense on the field as well…

 

So there you have it. Ruinstorm, but in differential equations.