# The natural growth as evalueation approach for Military Units

Hey guys.

In the past I calculated the Booming Potential of Civs in AOE2:

Now, I try to get to a differnt topic which is far more complex, The Assesment, how much (Military) Units actually cost “for real”.

In this approach, I take a uncommon approach which actually allows me to include all the soft factors in the calculation, for example Cost and Building time of Military Buildings, Housing Capacity, Creation Time and Upgrade Costs. Also it allows me to estimate the real “working” spent for the different ressource Types, mostly the cost of farms.

The basic approach is, to assume there is a natural growth (or in the opposite direction decline of value) of economic prowess. What this basically means, I assume having eg 20 archers now has the same “value” of having more archers later in the game. There are many ways to do this, and all of them are basically mathematically equal, you just need to set a value for the natural “decline” of value.

To make it the most easy to understand what is happening, I chose the Half Worth Period (HWP). The HWP is a time difference given, to state: This prowess now is equal double that prowess a single HWP later. If for Example we have a HWP of 10 minutes, having 10 archers now would give you the same in-game value of having 20 archers in 10 minutes. That’s how I asses values in the following.
The real maths aren’t complicated for somebody who studied it, but maybe hard to undersnand who someone who didn’t. That’s why I try to make it as Simple as possible. Via Time, I will try to get further into details. But for know, most important for me is to get feedback how I can present my results in a comprehendable manner for all interested people.

The most important factor for this kind of evalueation is of course the correct estimation of the HWP. But I figured out, that in terms of military, this is very hard to estimate. Whilst for land economy I could easily calculate that value by the interaction of Villagers, Farms and Town Centers (Housing is included in Villager cost), there is no ultimate way to assess it for military. The problem is, that the snowball isn’t polynomial. Low differences of army make the greatest amount of difference. I figured this out by using this website:
https://aoe-combatsim.com/

If I set up 50 arbs vs 50 arbs in average 3.3 of both sides survive. If I set Up 51 vs 50, the winning side wins with 10.9 vs 0,1 arbs left in average. Meaning, the additional 1 arb is actually worth more than 10 (!) times his value. But the intersting part comes, if you further raise that difference. If you make it 100 arbs vs 50, from the 100 79.4 survive. But 79.4/50 is not even 1.6. Means in average every added arb only gives you about 1.6 of the value you spent. This is way less than the more than 10 you get from adding a single one.

This leads to the odd behaviour of multiple wins in smaller close battles are fare more valueable than a single win in a big single battle. Which makes calculation of a HWP in terms of military impossible to calculate. It’s only possible to somewhat “assume” it.
It doesn’t mean, it is a wrong approach. It actually is the only viable approach that comes to my mind. As all other approaches actually don’t allow to factor in the “soft” factors mentioned above. It just means, that value is gameplay-related.

In the mid game, there is actually a possible way to somewhat ste upper and lower limits for the HWP. As there is a limit in economic growth, the lower limit is basically how fast you can double your economic prowess by booming. The best I calculated for this was 238 seconds for the indians. The other extreme would be to completely stop economy and only go for military at some point. But because it is an rts, the concept is always that playing the long run (economy) is (if perfectly executed) always superior to an all-in attack. Hence the HWP for an all-in offence MUST be higher than the HWP of an all-out boom. As we still can’t calculate it, we must also assume the worst case for the upper limit. This would be infinite. Now there comes the comprehensive part, which may be hard to understand, but is the logical following.
As stated before having a slight military edge has the highes snowball potential, there is an actual optimum of investment ratio between military and eco. We still can’t calculate it exactly, but as statet before: It is an rts and in rts the “eco” approach is always benefitial. So if we want to find a weightened middle, we have to assume that in the mid game at least 50 % of all investment wents into eco. This is still “worst case” scenario. But taking this, we can calculate a harmonic mean between the common eco HWP (256 secs) and the worst case military HWP (infinite). This would not be calculable, but by using limiting calc we can see this “wents towards” the double value of the eco HWP. This means the upper limit of the HWP would be 512 secs in the mid game. It must be somewhere between 237 (indians) and 512 (common) secs.

This is still a big span, but better than nothing. I think, if we just take a value somewhere in the middle ground like 360 seconds, we will get quite acceptable results. But it is still to state, that it’s not possible to get an exact value, it’s just an approach to somehow get anything close enough, as perfect accuracy is just impossible to achieve.

This is actually the one thing, which might be the most debatable set value i will use in the process, as the following actually can be, thankfully to the approach, calculated very accurate.

When I calculate the “real” cost in the following, I will always give a villager work time equivalent. Not a ressource value, also not a blunt amount of ressources spent. The reasoning behind this is, that ressources are gatherered with different speeds which are also dependentent on in-game decisions if and when to get certain upgrades. Especially food needs farms to be placed first. So each food you collected from them has a indirect wood cost inherit. But because off the approach of a natural decline of current value, this can equally be assesed by the pay off of a debt. So every used food from a farm will also be loaded with that debt payoff. This way there is no need to calculate exact timestamps when farms are build and when they expire, via the correct calculation of the “debt” of needing to build a farm to gather food, the indirect costs can be inherit implemented in every unit that needs food to be produced. This one was actually one of the hardest to come by, as the farms expire, depending on how much is on them, gather rates, building time etc… But because of this expiring I needed to make sure that over the lifespan of the farm the whole debt is paid off. For tis I needed to integrate the relative pay-off and set a correction value to make sure, the integral over that livespan is exactly the original debt.

The other ressource were quite easy to calculatem as the work time equivalent is pretty much the inverted effective gather rate.

Now how i separate the different partial costs and calculate them:

1. Basic Cost: Basically the work time equivalent of the unit
2. Building Cost: Every unit needs a building to be produced in. This is Calculated the same way as the farms, but with the difference that the buildings don’t expire, therefore there is no correction value needed.
3. Housing: Yeah, quite self-explanatory. Every unit neets housing space
4. Upgrade: Here I needed to use a small trick. As we all know that upgrades pay off over time. But how much every unit needs to pay off that debt we first would need to know how much are in production at any time… Impossible to assess. Instead I chose that you just give a amount of villagers you want in that unit production. Then I calculated how long these vills would need to work for the upgrades and basically delay all unit production by that time. Means you pay for the upgrades by getting the units out later. This is funnily also basically how it works out in-game. But this way we get around trying to estimate how much production at what time will be spent into that unit, as everytime you spent more in that unit the indirect upgrade costs will be automatically corrected. It makes sure, the payoff is ensured at all stages of the game.
5. Time: All units need some time to be trained. But the ressources need to be spent in the beginning. Therefore units which take longer to produce lose some of their value in that process.

Please note that it needs a lot of inputs to get a result, as there are so many factors which are considered. I plan to make a macro which gives results faster, but for this I need the feedback which are the most interesting variables to check, what influence they have. I will no give 2 examples, knights and crossbows, how they perform in that calculation:

I assumed that for both of them all castle age wood + food upgrades, the feudal gold upgrade and wheelbarrow is researched. I also assume that all castle age techs benefiting the units have been researched and you pump them out using 30 of your vills to create the units.

The Result is (Work Time equivalent):
Knight: 1075 s
Crossbowman: 554 s

So a knight costs almost twice as much as a crossbowman, actually quite close to the pure comparison of raw ressource cost -

But the interesting part is the split off the different sources of that cost:
Whilst for the knight the raw ressource cost make 39 % of the total cost, for the crossbows it is just 28 %. Way less than for the knights. The cost of the construction Building makes 5 % of the knight’s cost, but 9 % of the cost of the crossbows. Housing is 2 % resp. 3 %. A big difference is in the Upgrade costs. Crossbows cost way more to fully upgrade. Whilst the upgrade for knighst is 44 % of the total cost, it is 51 % (!) for the crossbows. If we would have skipped eg ballistics, their upgrade share would make about the same as knights (45 %) and their effective work time equivalent would be 485 s.
Lastly the share of the training time delay is roughly the same with 11 % for knights and 10 % for crossbows.

I also just calculated another example which is the beloved war wagon - but without any upgrades. As we often see, upgrading war wagons in castle isn’t really a thing until very late into the age. For good reasons, as they also can perform quite well without upgrades in early castle.
For them the work time quivalent is 584 s from which 55 % come from the actual unit cost, 35 % from the castle, 2 % from housing and 8 % from the training time.
Which actually means that not upgraded war wagons have only a slightly higher cost than fully upgraded xbows or skirms (also 554 s / 485 s without balistics) in castle age. Pretty interesting. And it also explains, why skirms often struggle against war wagons. Cause the high upgrade costs hold them back and they are useless against war wagons if not upgraded.
But upgrading skirms can also force the korean player to upgrade his war wagons, too. Then they will cost a whapping 1118 s work time equivalent and start to fall off in comparison to other units which benefit more from the (same) upgrades.

So please let me know what would be interesting to see. Shall I calculate the effect of having more villagers working to produce the units? Shall I look for the impact of eco upgrades? Shall I test individual upgrades how much they rise the cost of the individual unit? Or do you want to know like for example how many stables mass producing knighs needed to make eg husbandry cost an individual unit effectively 10 % or less extra work time per unit (2.3 stables). Any specific unit you want to be calculated? Or the same units (xbows/knighs/eles/maa/champs) for different civs?

Just be free with your questions, feedback or recommodations. The whole thing is still in the basic aloha phase and the earlier I get the right impressions the better I can prepare it for later handleability and usage.

Also if you have more general questions you always asked yourself about this thematic, just ask. I don’t want to screw the thing in two months because I maybe missed an important aspect of the whole thing.

4 Likes

All of this flew over my head 11, good luck with it tho. I will be interested to see your findings

Yeah, maybe I should have begun with the results and put the explanation hidden for all who are interested in how I made it.

After I made it work now I just wanted to share and give some answers to the questions we always wondered about -
Anything you have special interest in. Maybe why cavalry UUs are so underused like keshik? Or if special upgrades are worth it (depending on the amount of work put in them)?
I mean there are countless applications, like the example with the war wagons that finally showed why they are so strong in early castle age, bu fall off later on.
How good are specific team bonusses like britons/huns?
Or in general which upgrade for a upgrade heavy unit like cav archers increases the effective cost by what amount?

1 Like

I guess for me I’d like to know mostly what affects the Meta units the most for a start, like crossbow and knights, when to get armour upgrades over more knights like say your in early castle age in a very high level game and there’s knights in you base or not in base how do you spend your limited resources to get the most value of making knights and upgrades for them. I guess spirit of the law probably has vids on these optimal spending frequencies now that I think about it. Most of the ones you listed just now are nice to know but the earlier ones to do with knights and crossbow carry more weight and importance might be easier to calculate the earlier ones for yourself too

So like you pump out knights from 2 stables and you don’t know: Should I add another stable or get the upgrades first?
Yeah that’s a good question, and I can only answer how much each upgrade indirectly raises the cost of your knights. As it is highly dependent on what situation you are in, I can’t give the answer to the original question. It hghly depends on what impact the upgrades have on the fighting capacities of your knights.
So Here’s the table for 2 working stables and how much the debt pay-off makes the knights indiretly more expensive by getting the upgrades:

Bloodlines: 10 %
Forging: 7 %
Iron Casting: 14 %
Scale Barding: 7 %
Chain Barding: 17 %
Husbandry: 7 %

Now it would be interesting to see how they perform in different situation, so we can compare that extra cost with it.

This are situations that are quite easy to answer, if you are under immediate threat, just pump out as many units as you can, getting upgrades in such a situation is almost always pay to lose. For this you don’t need to calculate.
This calculation I made shall help to set up a game plan, getting a deeper understanding what are the true costs of certain units and when to upgrade them if you are in a situation to decide whether or not.

Maybe also interesting to know would be tech switches and support units, how much it effectively costs to perform then, when it’s worth to do them or just stay with your current army comp.

1 Like

Also if you are late stage in say arena game and you need to make a tech switch to counter opponent heavily but you have limited gold how viable is the tech switch might be too hard to work out I guess

Yeah, the main thing that must be considered is the value you give your gold. If we just say: OK Gold is now 3 times more valueable than food, then it’s easy to calc.

1 Like

Just add a TL;DR paragraph at the end for us lazy people.

2 Likes

I second that.

Yeah, I tried to make a spoiler bar, but I don’t know how it’s done…
Thing is, the whole thing has a lot of inputs - so I try to figure out which of them I should set by a default setting which can be chosen by a general “in that situation” setting, and which I should make variable, to give the best results.
And talking of results I try to figure out what would be the best one to give so everybody can somewhat work with them.

What the whole think basically does is to assume that having something now is basically equal to have more (or better value) later. That’s the basic concept.
This allows me to estimate how much is the real cost of a unit, split off by all investments done before even producing it. And I can split it up by all possible parts of that cost: Production Building, Upgrades, Housing, Training time… Basically whatever you want.

Is this short and comprehensible enough?

Great post by the way
Do you have a website with all these topics?
It is worth knowing (and understanding) how each upgrade makes your military units more “expensive”
It also helps you decide which upgrade you want to do first
I would like to know in what situations; Crossbows fighting Scouts, Knights, other crossbows or Skirmishers are not the same in terms of military cost

I don’t get it. I can only calc you how each individual upgrade indirectly increases the cost of the crossbows, not how they perform in battle situaitons. As it also is highly dependent on micro.

I can split the crossbows upgrades like I did with knigthst if you want this.

not atm, but i might in the future. Prob is, that i’m very, very bad in presenting my results. If I have an individual who tells me what he wants i can adapt, but it’s hard for me to make it generally comprehensible.

1 Like

then make it incomprehensible. as long as its accurate im sure we can find relevant info. aoe is not a simple game, as much as it goes against my better judgement to say, there arent that many total idiot around here. aside from me of course. i just like chaotic difficult to understand jumbles of stuff, finding helpful stuff is like a treasure hunt.

With EW gameplay in RBW5 I figured out, that my approach assuming a nearly constant value is actually wrong.
The thing is when player go up an age the game slows down but accelarates very fast after they got up. i thought already a lot of time about this, but I still haven’t found a solution how to approach this.

Whilst I adjusted my calculation in a way that it gives reliable results for each timestamp there are factors involved I can’t determine yet:
A) Farms placed an age ago - should already have paid of to a seizable margin during the slow-down phase.
B) Already made units benefitting from the upgrades - effectively reducing the indirect cost for later upgrades - there must be a “sweet spot” for each upgrade when it gives optimal army value - but I haven’t figured out a way to calc this yet.
C) Transition into boom behind - when the pace of the game slows down, players should invest more into booming and reduce their military expenses - with idle military buildings my approach of considering them “always working” seems wrong. Maybe I should calc them the same way as the upgrades, as a time delay for production. This way the expenses would still be underestimated at a constant (low) pace of the game, but intentionally overestimate the impact when inserting the high pace when reaching a new age.

Just you know, I’m still on this but the subject has become much more complicated than I expected.

Probably I need a new approach for the method of representing the game pace - but this would actually mean that I need to set up simulations instead of static calculations which are way easier to handle.

If anybody has an Idea for a new approach please tell me, cause I’m looking for new influences how to approach that problem. Especially how to estimate a proper “game pace” for the time after reaching a new age.