Civ1 explained: population

darkpanda

Dark Prince
Joined
Oct 28, 2007
Messages
844
A very quick post about the total population computed by CIV: I have looked around a little bit, and couldn't find any mention of the algorithm to compute the total population, so I though I would share what I found...

It is quite simple really, and could be deducted by looking carefully at the number, but I stumbled on it while looking at the CIV code - the "easy" way ;)

  • For a city of size N, its population is computed as 10,000 * SUM(i){i from 1 to N}; this also translate into the more practical formula: POP = 10,000 * N * (N+1) / 2; some examples:
    • Size 1: POP = 10,000 * 1 * 2 / 2 = 10,000
    • Size 2: POP = 10,000 * 2 * 3 / 2 = 30,000
    • Size 3: POP = 10,000 * 3 * 4 / 2 = 60,000
    • Size 4: POP = 10,000 * 4 * 5 / 2 = 100,000
    • ...
    • Size 10: POP = 10,000 * 10 * 11 / 2 = 550,000
    • Size 20: POP = 10,000 * 20 * 21 / 2 = 2,100,000
  • The total population of a Civ, obviously, is the sum of all the Civ's Cities' populations

As you can see, this computation is not linear: in order to have the same population as 1 city of size 20, you would need to have 210 cities of size 1! Or 70 cities of size 2...

That's all for now.
 
Back
Top Bottom