Is the page on Overpopulation correct?

It won't allow me to post links, so this is the page with ".com" changed to " dot com": wiki.utopia-game dot com/index.php?title=Overpopulation

For example: Metric = MIN [ 1 , 0.20* [(Current population-Peasants*0.07)/Max population - 1] ]

Let's say Current population = 10753 Peasants + 5000 military = 15753. Max population = 10000. (Here, when I say "military", I'm gonna include wizards and thieves.) Assume no military is in training. Also, for simplicity, assume all military is at home.

So Metric = MIN [ 1 , 0.20* [(15753-10753 *0.07)/10000 - 1] ] = MIN [ 1 , 0.20* [(15000)/10000 - 1] = MIN [ 1 , 0.20* 0.5 ] = 0.1

Let's say 5000 military = 0 wizards, 0 thieves, 0 off specs, 0 def specs, 4500 elites, 500 soldiers.

According to the formulas, elite, thief, offspec, defspec desertions are all 0, and soldier desertions = Max[(Solds home-{Leet Desertions + Thief Desertions + Defspecs Desertions + OffSpecs Desertions}) * Metric,0] = Max[(500 * 0.1,0] = 50.

So 50 soldiers desert the next tick. This contradicts "Troops desert at a rate of 20% the amount you are overpopulated, calculated after peasants leave." In this example, we're overpopulated by 5000 after peasants leave. 20% of that is 1000 =/= 50 soldiers deserting.


Take another similar-ish example.

Current population = 1075 Peasants + 5000 military = 6075. Max population = 4000.

So Metric = MIN [ 1 , 0.20* [(6075-1075 *0.07)/4000 - 1] ] = MIN [ 1 , 0.20* [(6000)/4000 - 1] = MIN [ 1 , 0.20* 0.5 ] = 0.1

5000 military = 0 wizards, 0 thieves, 0 off specs, 0 def specs, 4500 elites, 500 soldiers.

According to the formulas, elite, thief, offspec, defspec desertions are all 0, and soldier desertions = Max[(Solds home-{Leet Desertions + Thief Desertions + Defspecs Desertions + OffSpecs Desertions}) * Metric,0] = Max[(500 * 0.1,0] = 50.

So 50 soldiers desert next tick. In this example, we're overpopulated by 2000 after peasants leave. 20% of that is 400 =/= 50 soldiers deserting.


The formulas also seem to imply that as long as any one of elites/thieves/dspecs/ospecs * metric > soldiers at home, soldier desertions = Max[ a negative number, 0 ] = 0. In other words, either you desert one or more types of non-soldier troops and desert no soldiers OR you desert only soldiers. Does that feel correct?


Back to the first example. But let's change the military to:

5000 military = 0 wizards, 0 thieves, 0 off specs, 0 def specs, 4600 elites, 400 soldiers.

According to the formulas, elite desertions now = 4600 * 0.1 = 460 because elites * metric = 460 > 400 = number of soldiers at home. Thief, offspec, defspec desertions are all 0, and soldier desertions = Max[(Solds home-{Leet Desertions + Thief Desertions + Defspecs Desertions + OffSpecs Desertions}) * Metric,0] = Max[(400 - 460) * 0.1, 0] = Max[ a negative number, 0 ] = 0.

So with a slight change in the number of elites and soldiers sitting at home, instead of 50 soldiers and no other military deserting in the first example, we now have 460 elites and 0 soldiers deserting. Does that feel correct?

Basically, from the formulas, it looks like the number of soldiers at home isn’t “If you have sufficient soldiers then they can desert in place of a particular troop type” but rather the number of soldiers at home serves as a check. As long as number of soldiers at home >= elites * metric, no elites desert, and then the same for thieves, dspecs, ospecs. If the number of soldiers at home passes this check for each troop type, then only [(number of soldiers at home) * metric] soldiers desert. If soldiers deserted in place of other troop desertions, it would be more like: number of soldiers deserting = MIN [ (elites + thieves + dspecs + ospecs) * metric, number of soldiers at home ].

Let me know if there are any parts that are confusing. It’s pretty confusing for me, too, lol.

Thanks!