Understanding Lanchester's Square Law to improve the Militia Line

I’d like to start by first giving credit to SOTL for his amazing Lanchester’s square law video, and to Robby Lava who during a stream posited what I’m about to say, tho at a very conceptual level, without the lanchester’s square law justification.

Lanchester’s square law says that given certain assumptions, if you double the number of units in your army, your army’s relative offensive capability will be squared.

If you and I have 10 xbows each, equal upgrades, no micro, flat terrain, we’d expect to lose all our units. Maybe one xbow has a few hp left, but basically it should roughly be a draw everytime.

However, if I double my number of xbows, I won’t win with half my xbows left, I will demolish you, and maybe my xbows lose 20% of their HP.

Archers, especially in large numbers, basically satisfy all the requirements, so they get the full square increase.

Cavalry don’t satisfy the ranged requirement, so they don’t get the full squared relationship. They ending up having an exponent of about 1.8. But their speed not only helps to mitigate the lack of range in a battle to help them find a new target faster, but also at a macro level, helps them dictate engagements and better control the map.

So if we think about this from an ROI standpoint, by investing x number of resources the strength of my army will increase by y amount, by putting additional resources into increasing the size of my xbow army, i’m getting the best return on my value. But I’m less capable of controlling the map and dictating engagements. Alternatively I can choose to go with a worse ROI with knights for example, but I can better dictate engagements and control the map.

Given this context, what if we instead went with the militia-line.

Well their lack of speed makes them even worse than cavalry at finding targets, so their strength exponent is about 1.7, AND they don’t have the speed to dictate engagements or better control the map. Militia line is just worse knight line.

Yes, someone’s gonna say “but building bonus damage”, or “but pikemen”, or something and yeah that’s all true but it really misses the point.

Investing into militia-line provides a worse ROI than scouts or knights, with mobility of archers and the same 0 range of cavalry.

So this is where we come to the solution. Lanchester’s square law has three primary levers you can pull (aside from just making a unit stronger). You can make the unit have a ranged attack, to have it better find an enemy, which is what archers do. You can make the unit faster so that it can better find enemy targets, which is what cavlary does. Or you can just have more units. this I believe is what is mathematically necessitated to make militia line viable in a way that doesn’t just duplicate the strengths of cavalry or archers.

So directionally I think the militia needs to be made cheaper and take less than 1 pop space. this will allow you to build up the requisite numbers cheaply enough such that then the militia line can sufficiently leverage lanchester’s square law so that your militia line army can for a comparable investment possess an offensive utility similar to a comparable costing army of cavalry or archers.

Specifically, looking at the math, 40f and 20g at 2/3rds of a pop space I think seems to make the most sense, tho this is really starting to get into re-balancing, which is far more speculative than the above analysis with lanchester’s square law.

2/3rds of a pop space allows you to have 50% more units than you would have had previously. So three militia line take up two pop space. the pop space reduction is important for late game so militia line numbers. It’s less important in early and mid-game, tho it is presently another subtle disadvantage of most specifically LS compared to knights. If my opponent makes 5 knights, I can’t just make 5 LS, I’m going to have to make like 10. but that’ll require 2 houses of pop space, which costs 25 more wood compared to the knight player.

40f and 20g is pretty close to where we end up after supplies, so you can either get rid of it entirely, or maybe move it to imp, and have it shave off 5g or move it to food. having the heavier gold mix in feudal is advantageous, but not so in imp. Also remember because we’re training an extra unit for the same pop space, you’re training say 3 champions for 60g total, as opposed to 2 at 40g. You’re initial champion army will have a larger gold investment

Are champions too strong now? maybe. or maybe they’re just too cost efficient with lanchester’s square law helping them. Or maybe they aren’t cost efficient enough anymore against trash because of the higher weighting of gold.

I suspect, tho again highly speculative, 40f 20g 2/3rd pop space champions are a too strong, so what you can do is make them a bit weaker, but then give them an atk bonus vs trash, so they still perform well vs trash. It also might help maa, as most of the units they’ll face in feudal are trash units.

I think making militia line more numerous also helps them against onagers. Onagers have an area of effect attack, but the area in which they attack is finite, as too is their reload time. If the area covered by the approaching militia line is greater than the area that the onagers can collectively attack, it won’t matter if individually the militia line units are a bit weaker now. some militia line will get through. It’s also advantageous, as much of the attack from onagers is overkill. by having lots more units that are slightly weaker, you’re not only exacerbating overkill, making the onagers proportionally less effective, but the onagers are hitting a smaller percentage of the militia-line units, again making them less effective.

Additionally, I think this would help infantry civs differentiate their infantry UU with the champion. you have your mundane, easy to mass but not individually super impressive champions, or your more expensive, but more impressive infantry UU usually with some alternative interesting ability.

Sure karambits might need some attention if champions take 2/3rds of a pop space, and goth discount likely have to be reduced.

But generally I think this is the approach that should be taken with militia line. We can quibble around the edges all day long in regards to exactly what all the new stats should be. But the math I believe is incontrovertible that short insane buffs to the militia line, that they being generally viable when compared to alternative comps utilizing archers or cavalry is mathematically impossible until such time as the militia line can leverage lanchester’s square law to their benefit. And leveraging superior numbers is really the only way to do that without either granting them a ranged attack or speed such that their differences with archers and cavalry are not meaningful.

1 Like

Changing the pop doesn’t do much early-mid game, it’s only lategame that gets effected, so I don’t think that solves most of the issues with the unit. Until you hit 200 pop, you can always just make more houses, it’s generally not too big an investment to do so. Also, it would seem strange for Militia to be <1 pop, but vills and spears to still be regular pop, despite being way weaker and also something you would have a lot of.

4 Likes

Yeah the issue of the militia line is mostly the comparably high cost to bring it to a usable state.

We see this with the Sling strat that came from the WDC2 tourney.

Malay Condottieri in Imp are totally slaughtering even with a 50 % sling tax.
Ofc they are faster than the miltia line which is important for these TG settings, but otherwise when you calc down the cost, the condos are actually weaker than Champs.

Yet still it shows that infantry is actually competitive already when it wasn’t for the way higher tech-in cost.

3 Likes

Agreed. It’ll help a smidge in the early game, needing fewer houses. But the heavy lifting in the early game is the cost reduction.

Agreed. I still think it’d be a change for the better, but yeah that’d be a bit odd.

The guy who posited Persians should be reworked to hurt themselves when dealing damage?! Or posited that at time intervals a civ should get reinforcements or that it’s an advantage to noob trap people into thinking they should train scouts at their TC?! A tech that has a tech that gives LESS discount to a unit the later in the game it is and gives 0% in Imp age. They guy?

Totally trust his game design theory!

I am hesitant coming into this and apologize if I come off as insulting to your post but this gives hesitation when I hear such a name and it’s unfair to you and your efforts.

3 Likes

I understand it’s quote a long post, and if you don’t want to put in the time to read it when the very first line is a red flag for you I truly unsarcastically get it.

I credited Robby Lava because without what he’d said in that stream I’d never have considered to analyze the militia line using Lanchester’s square law.

“all unit types have a a theme to them a play style to them. Cavalry are fast archers have range Siege eat your base um all of them have a way of controlling space Siege control space by making you need to go and defend your base Cavalry do by being faster than you archers do by being more shooter-y than you um so what’s infantry’s way of controlling space what is their theme I would propose that the theme that makes most sense is if infantry could outnumber you and because of that I would personally propose making infantry dramatically cheaper dramatically uh quicker to train”.

Robby Lava was thinking about this more as in controlling area on the map, but what he said in regards to archers having range and cavalry being fast reminded me of SOTL’s Lanchester square law video.

So yes while I did come to vaguely similar results, infantry being cheaper but more numerous, it was my idea to look at infantry, archers, and cavalry with the framework of Lanchester’s Square law, to understand at a fundamental level why infantry was disadvantaged, and from there what the math said infantry would need to be competitive.

1 Like

Nothing to do with the topic at hand. There’s a reason we go out of our way to enumerate logical fallacies like “ad hominem.” Understandably some of the “Lavant-garde” proposals are controversial, but that has 0 do to do with this discussion. I think you would benefit more from focusing on finding fulfilment in your own creative projects, as per your recently stated intention, than going out of your way to provide so much rent-free headspace for things you dislike.

As is custom!

On topic, I’ve always liked the AoE1 infantry design a bit more - cheaper out of the box, with the logistics option to compete with other Iron Age units. Not that that’s a perfect solution for AoE2, but I think the early investment is a lot of the problem, and I’ve never been a huge fan of the “pay for discount” of the Supplies tech.

3 Likes

I don’t think that “cheap” is actually needed at the current state of the game.
It’s all about timings. So you get away with investing more in the units if they can hit a better timing.
So the idea to have infantry as an easy early accessable unit at the different timings is what I aim for.

That’s actually the direction I would currently go with the line - especially as this can’t “break” anything. If the powerspike is a bit too high it’s still ok as the other “power units” would just scale better.

Whilst the other way around there is the very high risk to make lategame just a total “goth spam” feast.

That definitely is part of the problem. In feudal you can either drop an archery range for 175w to train archers that cost 70 resources, split amongst wood and gold, or you can upgrade your militia to maa for 140 resources, importantly 100f, to have a unit that is slower (until you invest more into researching another tech) and more expensive than the archer (until you invest more into researching another tech), costs food which is slower to gather than wood, and scales worse than the archer.

But to me, all of these problems are secondary. Sure they’d help, but it’s like worrying about your tire pressure, or your air filter when your car doesn’t have an engine.

I feel, to continue the metaphor, we have to understand the underlying problem is the car doesn’t have an engine. No amount of tweaking the tire pressure, or changing air filters, or changing oil, replacing the suspension, is going to make the car run better until it has an engine. Only after first addressing the lack of an engine, we can tinker around with the secondary systems that admittedly are definitely problems to get it performing exactly how we want.

To argue the point anecdotally we’ve been one small buff away from the infantry line being viable for 25 years. I’m skeptical the next small buff is going to do the trick.

It would be like quoting or relying on the research of a heart surgeon who decides to vomit into his patient’s chest cavity.

I may be hyper exaggerating but it’s for a good cause. Mayhaps I don’t like bad civ craft making good craft look bad by proxy and perhaps I take this too seriously after over 2 decades of honing the art. But Ill never stop fighting for proper civ craft!

I apologize for going off topic on a supposedly harmless rant

I actually took me some time to reflect about the approach.
I think this is decremental.

And Goth are the best example why.

Goth have cheaper infantry and even effectively a reduced ppo requirement (practically they just have + 10 max pop, but the efffect is basically equal to like 15-20 % less pop consumption in the lategame.

What it does is that we get to tha tinsane “one type army spam” that’s basically impossible to stop as it just wins every battle.

I don’t want to have a “one type of units beats all” situation. I like to have army comps and interactive fights, skirmishes with different units trying to target the opponent units that are vulnerable to them.

So I feel like this approach will only lead to one type of unit spamming and not thinking about the opponent army - this isn’t desireable to me. If anything this topic should tell us which path we should NOT go.
And the cuurent Goth design is exactly showing what it would result in most likely.

2 Likes

Are RobbyLAVA’s civ proposals that bad??? I haven’t really watched any of his videos because I don’t want to be too influenced by others in my civ designs.

One problem is that trying to max all your tech tree is simply a matter of time and resources. Sure a Malian could go both Farimba cav and missile proof rax units but… thats a lot of resources to combine the two. The techage at both buildings needed can get kinda high

Im kinda keeping it simple but still, then getting your goths maxed out in other units will kill your all in flow

A better example would be expecting a more rounded civ like Byz to go full arb tech, champion Camel and cataphract because they technically could, but…

Request - Can you try Generic Champion vs generic champion and then try Armenians Champion vs Armenians Champion and see which one is closer to satisfy lancher’s square law? In other words which gives the exponent closer to 2?

1 Like

His persian concept his units do 1% of their total HP TO THEMSELVES when attacking

His norse civ group has a tech that when researched at the TC gives a villager discount of 25/15/10/0 percent, yes thats a downwards trending discount that reverts to not existing and punishes you for playing the game.

Im not yelling at the clouds. i know Im right and this is toxic and scummy design and he pretends to be the hero of the civ crafting world! I dont think so!

And when I dare confront him about this he tells me I’m out of line. What a distopia.

I’ll gather more evidence youll see Im not crazy and he is D tier at this job!

Mind you I am using exaggerated language so people heed my words and remember what civ crafting USED to be

2 Likes

I wonder what is the number respectively for cavalry archers, hand cannon, scorpion and mangonel?

1 Like

Wow, that’s actually terrible. I didn’t realize he was the one who came up with the first one. What a hack. My designs are like a hundred times better.

That’s not how the square law works. Allow me to try to better explain.

Let’s say you and I each have 20 archers, equal upgrades, no bonuses, no micro.

The math of the square law says that if I square my 20 archers, so 400, and you square your 20 archers, so also 400, then we subtract your 400 from my 400, so zero, then get the square root, also 0, that’s how many archers I should expect to have left.

Let’s do another example. If I double the number of my archers to 40 but you still have 20 archers, then we square my archers, 1600, we square your archers, 400, take my number and subtract your number, so 1200, get the square root, 35 I expect to lose only 5 archers.

Now I am simplifying a bit. The square law assumes any injured unit to attack at a strength proportionate to it’s remaining health. so an archer at 50% health would only attack at 50% strength. That is not what happens in aoe2, so while I say archers will benefit from the full square, that’s not actually true. Now as army sizes increase, archers get closer, and closer, and closer to the full squaring. However because they already start so close to fully benefitting, and only get closer as the army size increase, I simplify and say archers get the full square.

So in reality I’d probably lose a few more than 5 archers, but I’d still expect to demolish you if I have 2x as many archers as you do.

Let’s do another example. Let’s say I have archers, and you have throwing axemen. Now one throwing axeman is stronger than one archer. The square law allows you to compensate for that when your homologous (and they really should be homologous) units are stronger or weaker than my homologous units, by using strength co-efficients which SOTL used the inverse of time one unit needs to take down the other, but for the sake of simplicity, let’s say one throwing axemen and one archer are equally strong.

Again because both are ranged units, we’d expect both to fully* benefit from the square law.

So like above with two armies of 20 units, my 20 archers, square to 400, your 20 throwing axemen, square to 400, 400 - 400 = 0, square root of 0 is 0, I expect to have zero archers remaining. If we double the number of your throwing axemen, again like the above example of one army of 20 and one army of 40, your 40, square to 1600, my 20, square to 400, 1600 - 400 = 1200, square root of 1200 is 35, you’d expect to lose 5 of your throwing axemen, and I’d expect to lose all my archers.

However, now let’s take those throwing axemen, and now they have zero range. Now they don’t satisy *all the assumptions of the square law, so they will have a smaller exponent, SOTL found to be about 1.7 for infantry in his video.

So let’s run through this again. my 20 archers vs your 20 no range throwing axemen. I get to square my archers, so 20 becomes 400, but you only get to raise your 20 to the power of 1.7, so 163. my 400 minus your 163, is 237, square root is 15. simply by removing the range from your throwing axemen, we went from you and I each losing 20 units, to you losing all your throwing axemen, and I only losing 5 archers.

However, it get’s even worse, the fundamental point I was making in my original post, is that infantry scales worse than archers. So let’s try another example. We each double the number of our units from 20 to 40. If infantry scaled as well as archers, we’d expect that your throwing axement would still lose, but by proportionally the same amount we saw in our last example. However this won’t be the case.

So let’s run through a 40 vs 40 example. my 40 archers, we square 40 to 1600, your 40 no range throwing axemen, we raise 40 to the power of 1.7, which is 529, 1600 - 529 = 1071, square root of 1071 is 33. I expect to lose 7 units.

Even though we both doubled the size of our army, my losses didn’t double. they only increased from 5 to 7.

That’s because my army of archers increases it’s strength more per each additional unit, than your army of throwing axemen.

That rate of increase of strength is the fundamental problem, and that 1.7 exponent will hold true for all infantry of zero range with approximately 1 tps movement speed.

We can consider, armenian champions, Burmese champions, aztec champions, japanese champions, or generic champions. The armies will all increase in strength at the same rate. The individual units may be stronger or weaker, but that rate of growth of strength doesn’t change.

And that is why “infantry is just one small buff away” is mathematically impossible.

Take any militia line unit you care to think of, let’s say the LS. You buff it until 10 LS are viable against 20 xbows. Congratulations you’ve accomplished nothing, cause 20 LS will still suck vs 40 xbows.

infantry buffs don’t address the underlying problem, the rate of increase of strength, they only address the strength co-efficient.

It’s like investing. If my rate of return is higher than yours, eventually I’ll have more money than you even if your initial investment was higher. For 25 years the archer portfolio has had a better rate of return the infantry portfolio, and everytime the solution has been the equivalent of “well the initial investment just needs to be a little higher”. That is not the solution. You somehow, someway, have to figure out how to make the rate of growth somewhat comparable.

Now 2/3rd pop for 50% more units isn’t a 100% perfect compensation. There’s no mathematically perfect way of compensating for infantry’s 1.7 exponent with a singular proportional increase in numbers. But it get’s you close enough untill you’re taking about 200 xbows vs 200 infantry, but you’d never see that in any standard game anyway.

Are there secondary issues with the militia-line. 100% emphatically yes. But those are of secondary import, when compared to the underlying rate of growth of strength.

1 Like

Archer = Range
Cavalry = Mobility
Siege = Attack (?). A combination of range and attack maybe the best answer.
Infantry = What about “Toughness”.

Obuch single handedly forced to buff all infantry UU and later to add +1MA to LS and finally Gambeson. Then we also started to see full Serjeant play. Ever since, I have become a big fan of “Toughness” for “Infantry”.

Granted both of these 2 have their own gimmick. But I can say they are still a solid unit. I mean if Obuch couldn’t tear armor, what would be their cost or attack. At best same cost as militia line after supplies, right? Or almost the same attack as the Militia line. So instead of adding " Number advantage" by “Supplies 2.0” or “Goths” which we can already see failed for the past 5 years, why not try “Omega Gambeson” or “Romans” who probably have the most usable Longswordsman of this game despite not having “Supplies”?

Exactly. You expressed this a lot better than I could.

I do know how Lanchester’s law work. I actually wanted to know about this scenario that you’re describing. Are you sure Armenians champion won’t raise the exponent factor from Generic Champion (you said it is 1.7)? I have a feeling it will go upwards. And I can always be wrong. I will do a test as soon as I get my time.

1 Like

It won’t change the exponent. The exponent could be understood to represent how well the unit satisfies the assumptions the square law requires.

A champion could be given 1000hp and 100 melee attack and it doesn’t better satisfy the assumptions. It’d still only have an exponent of 1.7.

Now the strength coefficient used to equillibrate the two sets of homologous units would change, but the exponent, how well the units satisfy the square law assumptions, which informs the rate of increase of strength of your army for a given increase in the number of units, does not.

That’s why you can buff infantry to be equally strong as any arbitrary number of archers, but if you double the units on both sides, the archers benefit from a greater increase in strength.

No amount of buffing the infantry will change this phenomenon.