Understanding Lanchester's Square Law to improve the Militia Line

I really advise you to give it a test buddy.

More pop efficient melee units should result in a better exponent dacter for lanchester.

The lanchester exponent is a result of the stats of the unit, so changing the stats will also change lachester. And one of the reasons why the militia line has one of the worst lachester exponents in the game is it’s comparably bad pop efficiency.

2 Likes

I get that. Ranged units will always benefit more than melee units. Again that is not my point.

If we double the number of units:
Archer = 2 or close
Generic champion = 1.7
Civ specific Champion = ???

Making a video is hard. Dissing someone like this is easy.

Almost certainly 1.7

I’ll admit, Roman Legionaries with Comitatenses and Slav Champions with Druzhina are kind of exceptions.

The general principles still apply, but the square law doesn’t really model a opening charge attack or an area of effect attack.

So it’s less that they wouldn’t have a 1.7 exponent, but should have other modifiers that are out of the scope of what lanchester’s square law was intended to model.

But every other champion, even every other unit with approximately 1 tps movement speed and zero range, should have an exponent about 1.7.

Viking Berserks are probably another case that, at least situationally, would be hard to model with the self healing. The longer the fight, the more the correction would need to be. Urumi swordsmen with their charge aoe attack, would be harder to model.

Still doesn’t mean the principles of lanchester’s square doesn’t apply, but there are other effects that are beyond the scope of lanchester’s square law.

If yall wanna have a Jerry Springer spat you can. Just go find him or at leas take this to another thread!?

IRL, the basic logic of formations is to get as many of your troops doing damage as possible. Strategies to enable this varied between troop types.

For infantry
You design a number of men in a box, call it a unit and have it press against an enemy unit. The units spread themselves out a certain length to have as many men attack side by side at once - the lines behind obviously cannot attack through the dudes ahead. So why make a formation with rows at all? Thats because the main battle in a big melee is stamina management - when the line Infront gets exhausted, the next row behind steps forward to replace them with fresh fighters.

This contest of stamina continues until one side has a psychological breakdown and routs. A wider formation has more men fighting, but less rows of fresh fighters. A deeper formation has divides the stress better, but is always more at risk of a flank. While the formation holds, its like a wall - things cant freely move past it.

Infantry vs cavalry relationships usually favored cavalry. A disciplined wall of infantry could outlast the enemy horses (provided the could hold the charges). On the other hand the horsemen can keep repositioning to tire the infantry in a game of cat and mouse and then just dismount to fight as fresh infantry vs tired infantry.

For cavalry
The addition of horses was another step for stamina management. The advantage of cavalry is that the considerable strain of marching and moving over the battle is diverted to the horse - a beast with very good natural stamina. As a result, cavalry could spread themselves deep or thin to manage their surface area on the fly - something very taxing for armored foot solider to do repeatedly or over large distances.

Add that the speed of the mount means they can dis and re engage parallel units before the enemy can chase them down means that you have a troop that can add another battle front to a unit at any time, if unchecked. This would deplete the stamina of the unit under pressure much faster, since they would now have men would be essentially pulling double shift. Cavalry would be the game maker/breaker - when infantry locks horns you have steady grind between boulders. A charge of horsemen would be like hitting one of the boulders with a pickaxe - a concentrated and instantaneous pressure to tip the scale.

The stamina of mounts was always a factor, but most prominent in cavalry vs cavalry. Light and heavy horsemen engagements would be about heavy cavalry connecting with a good charge to cripple the unarmored enemy horses while the light cavalry would more easily change fronts and swap troop lines to gass out the armored horses.

For archers - Two main ways they were used - arced clouds of arrows descending into enemy units before the melee or firing straight at targets at will. They had their own formation - the advantage over melee units was that many rows of men could attack at once, but that depended on being able to see their enemy. So they would have to properly set up in columns and rows to maximize their surface area. Elevation would help with that, more dudes could see over each other head = more dudes shooting.

The limits to them is that wouldn’t be as close packed as infantry when firing - a surprise cavalry charge could sweep all they way through their formation. Another limit is ammunition - when (not if) they ran out of arrows, its time to grab your side arm and be infantry.

Archers and light cavalry relationships were a ‘first hit wins’ sort of deal - unarmored horses are very nice targets for war bows; but an archer formation is a very nice target for a flank.

Archers and infantry was a win or lose; either the arrows can reliably pierce the enemy defenses- you win; or the enemy shrugs off the arrows - you’re useless. Range would matter here, since the closer footmen got the more likely arrows could be dangerous, but also fewer lines of archers firing on them since it would be too close for volley fire.


All the is preamble for; the game mechanics have an inherent bias for various troop types. Every troop in an approximation to life, brought closer to reality via hidden damage. The gaps in the approximations benefit each troop type disproportionately;

Infantry - game mechanics reflected very well here. One line attacking at a time, body blocking, slow grinding engagements between melee troops. Lets say its 1:1 in terms of ability between life-to-in game.

Cavalry - game mechanics are reflected reasonably well here. Ideally, 2 champions should be able to beat a paladin and they shouldn’t have to stop to attack - the whole routing business. Ultimately, they beat infantry if committed and they really are supposed to. Close enough, though a bit stronger than life - 1:1.2.

Archers - Infinite ammo, all troops always attacking, kiting in large formations, impermeable death ball. The archer in this game reflects the missile troops of the 18th century - the time where melee infantry was useless. Since they have a key advantage of IRL melee infantry (impermeable wall of men) and horse archers (no setup + move and shoot) they are a credible threat to heavy cav in larger numbers and solid doomstack vs infantry. The fact that the best counters are siege weapons or a whacky counterbalance unit (skirmisher) says alot about how much stronger they are than they out to be. Say about 1:3.

Now, this is all ultimately the consequence of the counter triangle simplification. A design so foundational to the game that I personally don’t see any small fix here - we either remake the game or it is what it is.

Potential changes (independent):

Cavalry gain micro chare attack → +2 on first attack after minimum 1.5 tiles traveled without attacking. To punish the foot archer kiting a bit more.

Foot archers become passable units - they cant body block anything. Light cavalry and hussar gain +2 attack, have a 1.8 attack rate and lose 10 hp.

Cavalry gain a 0.25 tile splash of 5 damage and infantry gain 20% damage reduction to melee combat. (Tweak the numbers - end result is no change in inf vs cav, but archers balls are weaker to cav.)

Foot archers have a minimum range like skirmishers.

1 Like

In mid game, it is kinda costly for xbow player to tech into pikes while it is same for knight player to tech into elite skirmishers. Just make a unit that requires least techs synergize well with Longswords. This can drastically improve it.

Mule cart have attack priority lowered than usual units. So similarly siege units can have higher atk priority than militia-line. Xbow need to micro more against longswords+ rams/scorpion/mangonel.

Do foot archers need a further nerf like this?

There’s actually a very subtle way we can start out when it comes to buffing the militia line: removing frame delay. It won’t be that harmful since they really aren’t that fast (even Celt militia line isn’t that fast). If that doesn’t help at all, then we can keep moving forward.

Why is that? SOTL said Knight vs Knight is approximately 1.85. So I thought extra HP and more importantly speed will help.

Obviously units that you have mentioned can’t be calculated by simple math.

A small test I did with Generic Champion vs Generic Arbalester.

In 10v10, Champions win with 54% HP. In 20v20, Champions win with 50% HP. This was obviously expected as ranged units will benefit more with their numbers.

Speed will help, extra HP won’t.

I think this will just be clearer if we run through an example where we determine the strength co-efficients and see how they’re applied.

Thankfully SOTL in his video did a Paladin vs Cavalier example we can go through.

Firstly to show off the equation. SOTL explains alpha and beta will be the strengths coefficients, A sub 0 and B sub 0 are the starting numbers of units, and A sub f and B sub f are the ending “final” numbers of units.

The two nearly identical equations just show you can come at this from either players side.

I would like to make special note at this time, that the strength co-efficients, alpha and beta, are in a fraction preceding enemy starting units, and don’t affect the exponent being applied to A sub 0 or B sub 0.


A couple notes on how SOTL determined the strength co-efficients, It’s based on finding their DPS over two minutes. Also as you can see in this example, it’s not really a head to head. the unit being attacked isn’t attacking back. we’re just trying to find out how many time it takes for, in this example, a champion to bring down a THS, and conversely, a THS to bring down a champion.


Using this methodology SOTL finds that a Paladin requires 21.159 seconds to defeat a Cavalier. The Cavalier being weaker than the Paladin, requires 30.682 seconds.

he uses the inverses, so that the stronger the unit, shorter the time that unit needs to defeat another, results in a bigger number.

so 1 divided by 21.159 = .047262, and 1 divided by 30.682 = .032593. When you work out the fraction it equates to just a touch over 1.45 (1.450066). All this is saying is that Cavaliers require 45% more time to defeat a Paladin, than a Paladin requires to defeat a Cavalier. And just to double check, 21.159 x 1.45066 = 30.68194.

In this example, SOTL is revisiting his Paladin vs Cavalier topic, so he’s trying to figure out how many paladins, X, is equivalent to 36 Cavaliers.

The strength co-efficients are placed into a fraction preceding X. So you re-arrange and the equation is 36 squared = (1.45)X sqaured.

which comes out to about 30.

Now, you might be looking at the equation and noting that we are using an exponent of 2, and not an exponent of 1.8 (SOTL actually found 1.77 was best fit, I’ve been rounding to 1.8 in this topic for brevity), and you may be thinking to yourself “see, we used stronger units, so the exponent increased.”

Let’s hold onto that for just a second.

As you can see in this portion of the video, when SOTL is experimentally determining the best exponent fit for champions, and finds 1.68 (which I’ve previously rounded to 1.7 in this topic) to be the best fit, he starts the battles with the red champions and the green champions separated. This is important. Champions have no range and are relatively slow, so they can’t perfectly translate their numbers advantage into an actual increase in fighting capacity. They have to walk over, and bump into each other, before they can find a target to attack, and in that situation 1.68 is the best fit.

Going back to the Paladin Cavalier example tho, we see something very different. The Paladins and Cavaliers are all mixed together first, intentionally placed to be that way in the scenario editor, THEN the battle is started. This is how SOTL did his testing in his original two paladin vs cavalier videos, so he replicated the setup during this part of his video when he’s revisiting the topic.

However because all the units are mixed together, unit movement to find an enemy is extremely efficient, more efficient that you’d ever see in a real situation. So the fact that Paladins and Cavaliers, don’t have a ranged attack is largely mitigated. THAT is the reason SOTL uses an exponent of 2, instead of 1.77. He uses an exponent of 2, not because the paladin and cavalier are stronger, but because in this example where units are artificially arranged to all have convenient close targets to each other, the lack of a ranged attack is almost entirely mitigated, thus the paladins and cavalier almost entirely satisfy the assumptions of the square law, where attacks must be continuous. In a situation where units are mixed in like this, there is extremely little wasted time finding an enemy, so the exponent ends up very close to maximum of 2.

Additionally, it’d make very little sense if the strength of the unit mattered in regards to what exponent is used, that we still used an exponent of 2 in the paladin v cavalier example for BOTH paladins and cavaliers, and not some lower exponent for the cavalier.

To make it even clearer this is the exponent SOTL found matched for 5 skirms vs 10 skirms, exponent of 1.94. I’m not a 2900 ELO player, but I’m pretty sure skrims are weaker than champions, but skirms best fit when they have the higher exponent.

So a units hp, attack, attack speed, armor, NONE of that will change the exponent. All of those will change how effective one unit is vs another 1v1, which is represented in the strength co-efficients we determined by finding the inverse of seconds required for one unit to defeat another. But the strength of the units doesn’t factor into the exponent.

Speed tho can. Speed doesn’t help you defeat an opponent faster, but it does help if your units are faster so that they waste less time finding enemy units to attack, which allows them to more closely satisfy the assumptions of the square law where attacks must be continuous. less wasted time walking around equals higher exponent.

It occurs to me when you’d previously asked about civ specific champion exponents, that I should have mentioned the Celts, as they benefit from a slight movement speed bonus. I don’t think the effect would be very large. generic champions, which move at .99 tps a second, have an exponent of 1.68 whereas knights moving at, assuming they have husbandry, 1.485 tps have an exponent of about 1.77. So Celt champions with a TPS of 1.035, while not a large improvement, there is some improvement and I was remiss for not mentioning them previously.

Roman Legionaries within the aura of a Centurion, top out at a speed of 1.14 TPS, so they too would benefit from a slightly larger exponent, and should have mentioned them previously, but only because of the additional movement speed. Their attack speed buff would factor into the strength co-efficient, but not the exponent.

If we do some rough math and take the speed and exponent difference of a knight and a champion, we find that for about every .55 TPS movement speed increase there’s an increase to the exponent of about .01. I wouldn’t take this math tooooo seriously, it implies a sufficiently fast unit could exceed an exponent of 2. Also I can’t know for certain if the champions/knights in SOTLs examples had squires/husbandry researched. However if assume those techs were researched and we’re comfortable using this methodology for TPS values between .99 and 1.485, we can estimate that the exponent for Celt Champions should improve from 1.68 to about 1.69, and Roman Legionaries when buffed by Centurion, should improve from 1.68 to about 1.71. So not large increases to the exponents, but increases nonetheless.

So in summary, units being offensively stronger (hp, attack, attack speed, armor) effects the strength coefficients but not exponent. Range and unit movement speed, which determines how well an army can translate it’s number advantage into more units actually attacking continuously, does effect the exponent.

1 Like

Yeah, I realized now.

So most of the Aoe2 melee units are almost at the exponent of 1.65 to 1.8. I have a feeling SL and Kamauyk will be closer to 2.

Another thing that will raise the exponent is “Army Position”. If Champion army can surround Arbalesters like a sandwitch, the exponent will go higher than linear. So maybe reducing infantries collision size that has been posted here before, is not that bad idea. Infantries can just go through other units and will surround enemy army better.

Absolutely. I don’t think SOTL mentions lanchester’s square law in his kamayuk video, but kamayuks go from losing 1 on 1 v the militia line, to winning handily in 10v10, and it’s just a beautiful example of lanchester’s square law. Also it occurs to me another excellent example of the difference between strength co-efficients and the applicable exponents.

I actually don’t think that’d be the case. If you have arbalesters in a tight group, there are only so many places a melee unit can attack from. And it can be the case that the melee army contains more units than the number of possible places from which they can attack.

In that case I think the melee army would be operating under the linear law, but the archers would be operating under the square law.

Yes if the infantry collision radius was smaller, then there would be fewer instances of this kind of asymmetry, but it wouldn’t remove that phenomenon completely.

Now if the archers fanned out to loose formation, then they’d both be operating with the square law, tho the melee army wouldn’t get the full squaring, but more like the 1.7-1.8 we’ve mentioned.

Which actually I’d like to tie back to the steppe lancer. I’m sure everyone has seen at least one video of steppe lancers on release just deleting enemy units. And then the devs nerfed just about every stat.

this is something else that I think is a fascinating topic when viewed in the context of lanchester’s laws.

SL are a melee unit, but because of the 1 range, and very tight formation, especially when they stayed still and let enemy melee units come to them, you had a very similar effect to the arbalest situation you described above. compact formation of SL, basically every single one could attack, but the enemy melee units only had a finite number of places from which to attack. I think the collision radius is actually the single largest reason SL felt OP on release. SL could pretty easily almost fully benefit from the square law, but the enemy units were confined to the linear law.

At least in certain situations, SL were basically cavay archers with nearly the DPS of a cavalier. It’s insane, and mostly due to the small collision box. without the small collision box, SL can’t as effectively all get in on the action, and more enemy units can surround the SL.

Now SL would probably have still been too strong if ONLY the collision box was nerfed. They had nearly the DPS of cavalier, for 30g, and had the movement speed of Hussar. But all that was a different order of magnitude of imbalance.

I’m not saying they will be removed. But I have a feeling exponent will go high up with lower size box. Again need to test and I have no idea on how to mod.

In all of my 10 v 10 battle, infantries pretty much operated in linear law. And in 20v20, it was a mixed.

1

2 Likes

No they really dont. They’re well enough contained by the existing counter system.

The extreme examples I gave were just to drive home how severe a change it would take to make infantry functional.

Just think of it as me impying we have to build a new game without actually saying it.