Hi all,
Population Growth
(A Factoid Copious Spare Time Production.)
Disclaimer
This was mostly written back in September, but I find it really hard to write it well enough that it is comprehensible. I know what I know (and what I don't know) but explaining it is another matter. Some supporting details are omitted for clarity, others 'cos I haven't checked and verified everything.
The fixed width tables below will suck if you have a light background colour set. They aren't very nice in any case.
Introduction
I understand most but certainly not all of how population growth works in Moo1. I have done this by poking around in save files, altering values and seeing what happens to population in the following years. What we really need is some gurus who have Phrozen Keep level understanding of the executable code. Gurus certainly would have been around when Moo1 came out, but I can't find any useful information anywhere even on save file format. All I know I have found out by looking at what the save file editors tell you, and then by hex-editing and Perl scripting beyond that.
I don't understand enough to be able to build a *general* model of population growth for any arbitrary planet size, so I can't build a generalised population-growth spreadsheet.
Definitions
Excess Eco spending is spending on the planetary ecology slider above that needed for waste cleanup and terraforming.
Growth rate - start an *average* game as the Sakkras, so the starting population is 50 (million). At the end of the first year Sssla's population has climbed by 10% to 55. This is what I call a 10% growth rate (= 5/50), and also 2x normal growth rate since Sakkras are said to grow twice as fast as normal races. The Silicoids grow at 0.5x normal rate on all planets (2.5%), and other races grow at 1.0x normal rate (5%).
It might be more sensible to call Sssla's growth from 50 to 55 (on a size 100 planet) a 5% (= 5/100) absolute growth rate but I haven't done this below, you are warned.
I call the visible current population (in millions) of a planet "p". Below I also use "x", a hidden tenths-of-millions variable for each planet. There is also a natural population increase (in tenths of millions) I arbitrarily call "c". "c" on the average Sssla above would be 50 (in tenths of millions, = 5.0 million).
A normal planet is a planet that is not hostile, fertile or Gaia, population grows normally.
A normal race is every race except the Sakkras and Silicoids, population grows normally.
Basics
Charis's posting (
Charis - population growth and optimal transport) presents the idealised growth model, which I call "Charis's model" or the "ideal model" below (aren't these two terms always equivalent?)

I strongly recommend you look at the pretty picture there - a parabola showing maximum population growth for half-full planets, decreasing to zero for full and empty planets.
Start a game with the Humans and save the game in 2300 so you can reload if needed. Settle a normal (non-fertile, non-hostile (duh)) planet but don't transport any more people from Sol to this new planet. Leave the planetary sliders set to 100% Fac and watch closely how the population grows. A Human, normal, size 100 planet (woohoo!) *always* grows following the pattern
2 (first year of settlement, say 2303 - planet naming screen says 2302)
2
2
3
4
4
4
6
6
7
9
10
...
This pattern is irregular, and also growing too fast for the ideal model. The irregularity is too much for integer truncation or roundoff to explain. This rate of growth is also too fast for the ideal model.
I call the visible current population "p". There is a hidden variable "x" for each planet which acts as a tenths-of-millions counter, very similar to the corresponding tenths-of-factories counter. When you add this detail in the pattern becomes
p.x
2.0 (first year)
2.2
2.6
3.4
4.0
4.3
4.9
6.1
6.7
7.9
9.4
10.6
...
This is still irregular. After some head-scratching I came up with the following algorithm. Double the hidden variable every year and add an amount that depends on current planet population, race, planet fertility and planet size - I think of this as "2x + c" where x is the hidden variable, c the added factor. Take any tens-overflow from x and add to visible millions of population.
Partial table of "c" for normal races (non-Sakkra, non-Silicoid) on normal planet (not fertile, Gaia or hostile) for planet size 100 -
p____c
1____1
2____2
3____2
4____3
5____4
6____5
7____6
8____7
9____8
10___9
11___9
The pattern with workings becomes
p.x____work_____new p___new x
2.0____2x+2=2___(2)_____2
2.2____2x+2=6___(2)_____6
2.6____2x+2=14__p=p+1___4
3.4____2x+2=10__p=p+1___0
4.0____2x+3=3___(4)_____3
4.3____2x+3=9___(4)_____9
4.9____2x+3=21__p=p+2___1
6.1____2x+5=7___(6)_____7
6.7____2x+5=19__p=p+1___9
7.9____2x+6=24__p=p+2___4
9.4____2x+8=16__p=p+1___6
10.6___2x+9
...
If population grew by adding "c" alone (without the "2x" effect) it would be very close to the ideal model, population would grow VERY slowly at almost-empty and almost-full, and Moo1 would be a more predictable, duller game.
The "2x" effect matters much less when a planet is half full, or if you are force-growing population. It can produce counter-intuitive results. You can sometimes make a planet grow to full *slower* by transporting one more population to it. You can sometimes make an almost-full planet grow to full slower by turning on a single tick of excess ECO expenditure. Adding more than a bit of population or excess Eco spending doesn't have this problem (phew!) but may do less than you expect. It may also do more than you expect.
The "2x" effect is *very* roughly equivalent to growing population by an extra 0.3 million per year.
(Diversion) - Growing population by ECO expenditure
Excess ecology expenditure (after waste cleanup and terraforming) also contributes to "x". If eco spending contributes enough to make the new x go from (say) 9 to 10 this counts as "+1 POP" on the slider. A tiny trickle of excess eco spending has a much smaller effect than the "2x" side of things.
There is no such thing as a plain "ecology counter", which accumulates excess Eco spending until there is enough for a +1 pop (that is, the Eco slider goes from Waste to +1 pop with nothing between). In the example above, let the population grow to 4.3 (next year 4.9) and 2 BC put to eco spending will add 1 to x, making next year's population 5.0 instead of 4.9, and this will produce "+1 POP" on the Eco slider.
Excess ECO is also subject to truncation effects. Humans start off needing to spend 20 BC to grow population by one million, or 2 BC to add 1 to "x". 1 BC of excess Eco produces no result, but still reads as "Clean", the same as if it was having some effect. 3,5,7... BC produce the same results as 2,4,6... BC respectively. This really, really matters for Silicoids, who need 4 BC to get any effect at all. Putting a single click to ECO with the Silicoids to help a new planet (that you don't care to send transports to) grow population grow doesn't work at all well. I used to do this all the time.
My current Silicoid thinking is have a largish planet or two (poor planets are ideal) dedicated to growing population and transporting to other planets, who don't bother with any excess ECO expenditure. This is probably what most people do anyway, I just hadn't realised how poorly *trickling* excess ECO to lots of planets worked.
Late game, with cloning and highly productive planets, I frequently have all my planets force-growing population as my tidal wave of gropos overrun the remaining enemy planets. This proves that I wait too long before going on the offensive.
Ugly details, and stuff I don't understand
The Moo1 save file is thankfully pretty simple, mostly fixed format. Numbers are mostly stored as two-byte signed integers. The save file starts off with structures for each planet (room is allocated for 108 planets, even if the galaxy isn't huge). Each planet record is 0xb8 (=184) bytes. The current population "p" is at offset 0x3a. The hidden variable is at offset 0x70. Many more details of what I know or conjecture available on request.
What I am missing is a general way of working out the "c" numbers. I have produced tables for size 100 planets, but only by grinding through peeking/changing the "x" variable for various combinations of race, planet fertility/hostility, and current population, then seeing what the population and "x" are the following year. I have semi-automated this using Perl, but even so..
This is the point where a code guru would explain What They Were Thinking when they wrote their algorithm to produce the "c" values, 'cos I sure don't know.
The values of "c" do not produce an absolutely symmetric parabola. The actual implementation of population growth is.. interesting. I can only guess that it was written by someone who didn't understand the meaning of the word "interpolation." On a size 300 world population "c" at multiples of 3 (3,6,9...150,153,156...294,297,300) follows exactly Charis' model, but population growth at 298 is higher than at 297, and 299 higher again. The result roughly matches Charis' parabola until mid-point, then has increasing "sawtooths" above the parabola after that.
The value of "c" is truncated, so Silicoids lose out. Sakkras on (say) a hostile size 60 planet do
NOT grow at exactly the same rate as Humans on a size 60 non-hostile planet.
I believe Silicoids invading a size 100 planet and ending up with exactly 99 population will NEVER grow to size 100 ("c" is zero). "c" is also zero for a population of 1, but there is a special case "kick-start" for low population and c=0, 1.0 -> 1.1 and then the normal c=0 behaviour follows (-> 1.2 -> 1.4 -> 1.8 -> 2.6). I may be mistaken on some of the "c=0*" values below, my earlier and later notes are contradictory.
If you want some simple examples to check, Table 3 below has "c" values for size 10 and 15 planets. If you have cared enough to follow the gobbledygook above you should be able to grind through 2.0 -> 2.1 -> 2.3 -> 2.7 -> 3.5 etc for yourself.
I believe x=0 when you successfully invade a planet, but haven't checked this. I believe population drops (like being bombed or death spored) don't affect the "x" variable.
Summary
Carry on as you were, intuition is fine. Population grows slowly on an almost-empty or almost-full planet, fastest at half-full.
Transporting a fair amount of population to a new planet is a Good Thing. Topping up an almost-full planet to full is OK (but not better than OK in my opinion). I mainly care about topping up my home world and rich/artifact planets, maybe front-line hostile planets too.
Don't bother trying a single click of ECO expenditure with Silicoids in the early game.
An algorithm to accurately predict "c" can probably only come from code reading.
Appendix: Tables
Table 1 - growth rates
Ecology_________Sakkra__________Other___________Silicoid
Hostile_________1.0x (5%)_______0.5x (2.5%)_____0.5x (2.5%)
Normal__________2.0x (10%)______1.0x (5%)_______0.5x (2.5%)
Fertile_________3.0x (15%)______1.5x (7.5%)_____0.5x (2.5%)
Gaia____________4.0x (20%)______2.0x (10%)______0.5x (2.5%)
Table 2 - cloning costs
Cloning cost/+1 pop_____Sakkra__Other___Silicoid
Start (TL 1)____________10 BC___20 BC*__40 BC*
Cloning (TL 21)__________5 BC___10 BC___20 BC*
Adv.Cloning (TL 42)______2.5 BC__5 BC___10 BC
Table 3 - small planet "c" values
Planet size 10
race____other___other[***table]
eco_____normal__hostile
pop_____grow 1__grow 0.5
1_______1_______0*
2_______1_______1
3_______2_______1
4_______2_______1
5_______2_______1
6_______2_______1
7_______2_______1
8_______1_______1
9_______1_______1
10______0_______0
Planet size 15
race____other___other
eco_____normal__hostile
pop_____grow 1__grow 0.5
1_______1_______0*
2_______1_______1
3_______2_______1
4_______3_______1
5_______3_______1
6_______3_______1
7_______3_______1
8_______3_______1
9_______3_______1
10______3_______1
11______3_______1
12______2_______1
13______1_______1
14______1_______1
15______0_______0
* Successfully invaded planet with 1 gropo surviving? Grow to 1.1 in first year then treat as c=0.
Sakkras grow at roughly the same rate on hostile planets that other races grow on normal planets of the same size, but this isn't exact for larger planet sizes.