Theory

Dead units do not shoot

Why the bigger army wins by more than it should.

Learner Competitor Advanced

The short version

  • A unit that is dead stops shooting. That one sentence is the whole model.
  • So the advantage of the bigger army compounds inside a single fight. Twenty against twelve does not end with eight survivors. It ends with about sixteen.
  • Which means the reward for concentrating is not linear, and the punishment for arriving in pieces is severe.
  • It also means winning the first fight makes you likelier to win the second by more than the first fight cost you.
  • The model breaks in a choke and it breaks for melee units. That break is the subject of T3.

The situation

You have twenty marines. They have twelve. You attack, you win, and you look down expecting to have eight marines left, because twenty minus twelve is eight. You have sixteen.

Or the other version, the one that actually happens. You have twenty marines somewhere on the map, and you send ten in now because the fight looks urgent, and ten a few seconds later as they finish. Against the same twelve you finish with seven, and you spend the rest of the game wondering how a fight you were ahead in went that badly.

Both outcomes come out of the same two lines of algebra.

See it

Twenty of yours against however many of theirs. The gold curve is what actually happens. The dashed line is what most players expect. Drag the second slider to split their army into waves and watch their losses get worse the more carefully they feed them in.

Their army, in units Your survivors 05101520 05101520 the square law one for one

Twenty of yours against 12 of theirs: the square law leaves 16.0 alive, one for one accounting says 8.

Both armies are the same units and both fire the whole time. The only difference between the two curves is whether the units you have already killed keep shooting back.

Read the gap between the curves as a bonus you are paid for being bigger. At twelve against twenty the bonus is eight units, which is two thirds of the smaller army, handed to you for free by arithmetic.

Why the curve bends

Start from the only assumption that matters: a unit that is dead does not deal any more damage.

Suppose both sides have identical units and both are firing continuously. Your losses per second are proportional to the number of enemies still alive, and theirs are proportional to the number of yours still alive. When you outnumber them, you kill them faster than they kill you, which leaves you with even more of a numerical edge a second later, which makes you kill them faster still. The advantage feeds itself for the whole length of the fight.

That is why the bigger army does not win by its margin. It wins by something closer to the difference of the squares.

Concentration compounds across fights too

The lecture made the strongest version of this argument with a professional replay rather than with algebra, and it is worth repeating. Two armies jockey for position in the middle of a map. Their spells cancel out. The only difference is that one player's trailing units took a longer path and arrived late, so for about ten seconds one side fought with everything and the other fought with most of it.

The side that arrived together took fewer losses. Which meant it was bigger for the next fight. Which meant it took fewer losses again.

This is the part players miss when they judge a fight by whether they won it. You are not trying to win the fight. You are trying to end the fight with an army that is a larger fraction of the one you started with, because that fraction is the opening position of the next fight.

Reinforcing piecemeal is the same mistake, backwards

Here is the consequence nobody likes hearing. If your army is scattered and you feed it in as it arrives, you are doing the enemy's work for him.

Twenty against twelve, everyone at once, leaves you about sixteen. Split your twenty into two groups of ten arriving a few seconds apart, and the first ten lose to the twelve, who finish that exchange with about seven left, and then your second ten beat the seven and finish with about seven of their own. You turned sixteen survivors into seven by pressing attack twice instead of once.

The rule that falls out is blunt: units that are walking toward a fight are not in the fight, and units that arrive after it has started are usually worth less than units that arrive before it has started. If you cannot get everything there, the question is not whether to attack with half. It is whether to attack at all.

The working

Show the maths

The discrete version first, because it is where the lecture starts and it needs no calculus. Two sides of identical ranged units fire in volleys. Side one concentrates its fire so that damage turns into corpses; side two spreads its fire evenly so that everything is wounded and nothing dies. Each volley, side one kills

k=N1DHPk = \frac{N_1 D}{HP}
(1)
Damage delivered, divided by the health of one body.

Side one fires first, so on volley jj side two is down to N2jkN_2 - jk shooters. Over MM volleys the total damage side two manages to deliver is

j=1M(N2jk)=N2MkM(M+1)2\sum_{j=1}^{M}\left(N_2 - jk\right) = N_2 M - k\,\frac{M(M+1)}{2}
(2)
The board's own expression, with k written out.

The first term is what side two would have dealt if nobody had died. The second is what it lost to its own casualties, and it is second order in M. The longer the fight runs, the more of side two's paid-for damage never happens. That quadratic is the point of the exercise: neither perfect nor worst-possible micro is achievable, so the numbers are worthless, but the order of growth is not.

Now the continuous version. Let AA and BB be the two army sizes, with each side's losses proportional to how many of the other side are alive and shooting:

dAdt=αB,dBdt=βA\frac{dA}{dt} = -\alpha B, \qquad \frac{dB}{dt} = -\beta A
(3)
Alpha is how fast one of theirs kills yours; beta is how fast one of yours kills theirs.

Differentiate the first and substitute the second and you get A¨=αβA\ddot A = \alpha\beta A, whose solution is

A(t)=A0cosh ⁣(αβt)B0αβsinh ⁣(αβt)A(t) = A_0\cosh\!\left(\sqrt{\alpha\beta}\,t\right) - B_0\sqrt{\tfrac{\alpha}{\beta}}\,\sinh\!\left(\sqrt{\alpha\beta}\,t\right)
(4)
Derived here in full, so you can check every step.

The useful thing is not the solution, it is the quantity it conserves. Multiply the first equation by βA\beta A, the second by αB\alpha B, subtract, and the time derivative vanishes:

βA2αB2=βA02αB02\beta A^2 - \alpha B^2 = \beta A_0^2 - \alpha B_0^2
(5)
Lanchester's square law. Strength goes as the square of the numbers.

Set B=0B = 0 to find the survivors of the winning side:

Af=A02αβB02A_f = \sqrt{A_0^2 - \tfrac{\alpha}{\beta}B_0^2}
(6)

With identical units on both sides, α=β\alpha = \beta, and twenty against twelve leaves 400144=16\sqrt{400-144} = 16. Not eight.

Piecemeal, from the same invariant. Suppose their twelve arrives in ww equal waves, each wave destroyed before the next lands. Each wave costs you (B0/w)2(B_0/w)^2 off your square, so after all ww of them,

Af=A02B02wA_f = \sqrt{A_0^2 - \frac{B_0^2}{w}}
(7)
Splitting the smaller army in two costs it half of the damage it was ever going to do.

Run it the other way, with your twenty split into two tens against their twelve together. The first ten lose, leaving them 1441006.6\sqrt{144-100} \approx 6.6. Your second ten beat that remnant and end on 100447.5\sqrt{100-44} \approx 7.5. Sixteen becomes seven and a half, and nothing about the units changed.

What alpha really is. The lecture's best extension came out of a question. Alpha is not a death rate, it is whatever changes the population, so reinforcements and regeneration and terrain limits all live inside it:

dAdt=αB+R(t)+rA\frac{dA}{dt} = -\alpha B + R(t) + rA
(8)
R is reinforcement arriving; r is regeneration of the units still alive.

And terrain enters as a ceiling on the loss term rather than as a new term, which is exactly the flux cap T3 is about.

Where it stops being true

The square law is not a law of the universe. It is what you get from one assumption, that every unit on each side can shoot every unit on the other. Take that away and the model changes shape.

In a choke, or in any fight where only a few units are in contact at a time, the number of your units firing stops depending on how many you own. Losses per second become constant rather than proportional, and the arithmetic collapses to plain subtraction: twenty against twelve leaves eight, and the extra twelve you brought are standing behind their own front rank being useless. That is the dashed line on the figure, and it is the reason a good player will fight you in a choke while outnumbered.

Melee units drift toward the same regime for a different reason. They cannot all reach. The number of zerglings that can touch a zealot is a property of geometry, not of how many zerglings you own.

So the two laws are not rivals, they are the two ends of one dial, and the dial is called flux. Everything in the next guide is about which end of it you are fighting at.

What the lecture said

The lesson 4 lecture is the densest in the course, and it is worth watching with this page open beside it. It picks up a model first sketched at the end of lesson 3, at 33:00.

The volley model runs to 7:00, and its punchline is put against the other growth rates the course cares about: micro's gap grows like t2t2<span class="katex-html" aria-hidden="true">t2, economy compounds like exex<span class="katex-html" aria-hidden="true">ex, and keeping your army together grows like cosh\cosh. That comparison is the whole micro versus macro argument, made with numbers rather than opinions.

The continuous model runs from 7:00 to 20:00. The lecturer never once used the name Lanchester. He also spent longer on the meaning of the correction term than on the algebra, which is the right instinct: the term exists because part of the enemy was already dead.

That is why it is incredibly important to keep your army together, and we have proved that mathematically.

Two habits from that lecture are worth stealing. Asked whether regeneration belonged in the model, the lecturer did not answer from intuition. He did an order of magnitude estimate at the board, found regeneration was around a fiftieth of the death rate, and dropped it. That is how you decide what to ignore mid game: estimate the size, then drop what is small. The figures were done aloud, so trust the method more than the numbers. Asked about a unit whose kill rate he could not derive, he said plainly that you measure it: run the fight fifteen times, or watch three hundred replays.

He also put rough numbers on what counts as a long fight: one to three seconds is short, ten to twenty is medium, and forty seconds is enormous. That is his judgement rather than a measurement, but it is useful, because the correction term only matters in fights that last.

Where the model stops

Checkpoint

  1. Twenty identical units against twelve, in the open, everyone firing. Roughly how many of yours survive?

  2. Your twenty is split in two. Their twelve is together. What is the best move?

  3. Where does the square law stop describing the fight?

Sources for this page