Home - Articles

Optimal City Count for Science

At the end of my Rome tall science game, where my scientist bulbing fell short of completing the tech tree, I wondered again where the right wideness for science victory lies, seemingly somewhere between 7 and 15 cities. What I didn't tell you then was that there exists a right answer and the methodology to find it hit me like a ton of bricks.

There are enough known values that we can solve ahead of time for how much beaker production is needed. And from there work out the city count. Here are the principles involved:

Beaker production maxes as soon as research labs are done. Once they are bought, I hire all Secularism specialists, work all trading posts for the Free Thought beaker, and shut down growth (don't work food) in the cities. That maxes beaker productivity and it doesn't go any higher. You can bulb everything once you're 8 turns after labs so that the sliding history window is filled with max value. (For anyone who doesn't know, a Great Scientist used for a technology awards beakers equal to the total of your last 8 turns of research.)

The cost of the entire tech tree between Plastics and the end of the game is a known constant. (Based on map size and city count.) It's always the same set of techs with the same costs. Ignore the two in the last column as freebies from the Rationalism finisher and Oxford University. The rest total 156,000 beakers on a huge map on Emperor for one city.

The number of great scientists available is nearly constant. 8 from normal production, 4 from wonders, 3 from faith, 1 from Spaceflight Pioneers. The expectation is 16 scientists, but sometimes games don't get them all and might miss out on one each from normal or faith or Pioneers. I'll use a conservative 14 here.

Beaker production per city is nearly constant. A typical city produces 150/turn after research labs and all the specialists and Rationalism modifers, or 180 with an observatory. A larger capital with the National College typically makes around 300. These numbers vary quite little between cities and games and civs (other than Korea.)

The number of turns between Plastics and the end of the game should be constant. The required time spans are 8 turns after labs for bulbs to reach full yield, plus about 6 turns to build the Apollo Program, plus about 10 turns to build all the spaceship parts including the last one. Those are the sequential dependencies. There should be no other delays. You should bulb immediately to Rocketry 8 turns after buying the labs, and bulb immediately to the end of the tech tree after the Apollo Program. You should be able to finish the game 25 turns after Plastics. Hubble should ideally be engineer-rushed and finish sooner than Apollo so it's not a limiting factor.

Here is our fundamental equation. (It's easiest to work in terms of N being the number of additional cities beyond the capital.)

B = Beaker production per city after labs
Bc = Beaker production in the capital
C = Total base cost of the tech tree after Plastics
N = Number of cities beyond the capital
P = Tech cost penalty per city
S = Number of scientist bulbs

C × (1 + N × P) - (25 × (Bc + B × N)) = 8 × S × (Bc + B × N)

Take the total cost of the tech tree after Plastics and subtract out those 25 turns of normal production. That cost equals the total yield we need from bulbs. The total yield of all bulbs is of course 8 × the number of scientists × the civ's beaker production.

Combining the blue and green terms algebraically simplifies to this:

C × (1 + N × P) = (8 × S + 25) × (Bc + B × N)

Plugging in the constants yields the following:

156000 × (1 + N × 0.02) = (8 × 14 + 25) × (300 + 150 × N)

Solving for N yields 6.6. That means 6.6 cities beyond the capital. Since we can't have a fractional city, this means we'll round up and it turns out we need 8 cities total to make the bulb yield of all scientists reach from Plastics to endgame.

That's what the tall Rome game fell short of. That difference between 7 and 8 cities really does matter. That's 150 beakers/turn, which multiplied by 8 turns and 14 bulbing scientists equals 16800 beakers, which is just about the cost of those two late techs (Telecommunications and Mobile Tactics) by which the scientists fell short.

This equation also gives us the power to adjust it for other circumstances. You can use any other tech cost total and per-city modifier for a different map size or difficulty level. Babylon can plug in its larger number of Great Scientists. Korea can plug in its greater city beaker productivity (and this actually reveals that Korea wants fewer cities not more!)


Now here is one more principle to observe. It is desirable to spend bulbs before Plastics to reach labs sooner. I've wondered whether that's true and made attempts at it by intuition and trial and error, and it seems like that always turns out worthwhile... and now I've finally quantified why.

Bulbs are equally valuable before research labs as after. Research labs just about double a city's science productivity. The +4 and +50% is not quite directly double, but at that time we also add the fourth scientist specialist, all possible Secularism specialists, and any available trading posts, which all bring the post-lab productivity to twice the pre-lab. Because the civ's productivity is half before Plastics, therefore so is a great scientist's bulb yield. A scientist before Plastics yields half his endgame value, or loses 4 turns worth of endgame potential. But he brings the civ to labs and that doubled yield 8 turns sooner. Doubling the natural production 8 turns sooner makes back up exactly those 4 turns of endgame value that he lost! It becomes immaterial to the great scientist in terms of beaker value whether he bulbs before or after labs. So he should do it before, to enable the labs' GPP sooner. (This assumes you actually do get the labs 8 turns sooner, meaning you already have enough money to buy them.)

To bring that into concrete numbers for an example: Suppose our civ makes 1000 beakers/turn before labs and 2000 after. We could save a scientist to bulb for 16000 beakers in the endgame. Or we could bulb him for 8000 beakers before Plastics. Then having the labs 8 turns sooner produces an extra 8000 beakers and exactly makes up for the scientist's early yield deficit.

How about public schools, do we bulb to those too? They don't double a city's science yield, but do they still make up the endgame deficit of an early bulb? Turns out yes. In fact, it doesn't matter how much any science building adds or multiplies beakers! Regardless of that value, reaching a milestone 8 turns sooner will create the difference between the early bulb deficit and the endgame value. Suppose public schools add 10 beakers per city and labs add 20. Bulbing before schools misses out on 240 beakers per city compared to endgame value... but makes exactly that back up in enabling +10 from the schools and +20 from the labs each 8 turns sooner.

This also applies to science modifiers besides buildings. If we bulb to an ideology that gets Workers' Faculties 8 turns sooner, that leads to the same effect of replacing its endgame yield deficit with the 8 additional turns of it and subsequent modifiers. (This requires actually building the factories 8 turns sooner as well, so don't do this if the cities are still building schools.)

However... all this holds true only for an early bulb that reaches all later milestones those 8 turns sooner. What if a bulb saves 8 turns to schools, but because of increased research later from another modifier (say Secularism) only saves 6 turns to labs? Then the wash doesn't occur. Without the full extra 8 turns of labs, the early bulb never makes up the deficit compared to its potential endgame value.

This bulb equivalency principle also doesn't hold true regarding modifiers that are unlocked through some other means than research. This means Secularism and Free Thought. Because those are enabled by culture not research, it's impossible to bulb to them sooner. A bulb before they exist (and fill the 8-turn window) never makes up that deficit in endgame value. (It's not truly impossible. In theory you could bulb to a culture modifier like Sistine Chapel or the industrial-age cultured city-state value, which could in turn reach the science policy 8 turns sooner. But I'm fairly sure this doesn't happen in practice.)

Finally, the equivalency principle doesn't apply while still within the sliding window of 8 turns after a new modifier. If you bulb 3 turns after a modifier like schools or Free Thought, you miss out on 5/8ths of the bulb yield of that modifier, and that is never made back up by endgame. Whatever next milestone it reaches sooner needs all of that milestone itself to repay the deficit. A milestone can't overpay for itself to recoup the incompletely filled window. This even applies to regular city growth, any bulb spent less than 8 turns after any city grows never quite theoretically recoups that value by endgame. Although that loss is small and frequent enough that you'll have to cut that corner sometime.


So what this all means in reality is don't bulb until Secularism and Free Thought are in place (plus 8 turns), bulb carefully to Workers' Faculties when you're ready to build the factories right away, but then once all those are in place we can bulb freely regardless of the position on the tech tree relative to schools or labs as long as no 8-turn window for a modifier is still filling.

In practice, we can get the various Rationalism modifiers in place about halfway through the industrial age. There is room for about 3 bulbs between that and Plastics. That means there's 11 bulbs rather than 14 to spend post Plastics. Rerunning the above equation with 11 scientists results in N = 8.8, so adding the capital and rounding up gives 10 cities. Not surprisingly, that's exactly what my two best games skirted alongside, with 11 cities for the Shoshone and 9 for Babylon. And Babylon could get by on one fewer city thanks to two extra Great Scientists from the civ ability. But that's why the wide and tall Rome games misfired so badly, the wide game wasted early investment on expanding to cities that wouldn't be needed for endgame, and the tall game failed to expand to cities that would.

Reality also does include GPP production from public schools and the ideology, so even if a bulb before those might not pay all the way back by endgame, it might do so by enabling one extra Great Scientist. Similarly you might cut corners on a modifier or window to reach a few non-science bits like railroads or hydro plants sooner.

An alternate way of looking at all this is that more cities grant you more leeway to spend bulbs early because fewer scientists are needed to finish the endgame. Cities #8 through #10 can't accelerate the game post Plastics because you already have enough scientists to cover the whole tech tree, but what they accelerate is the industrial age before Plastics. Cities beyond #10 can't accelerate the game at all, because you already have enough scientists to cover the industrial age too, and bulb yields before that will lack the Rationalism policy modifiers and can't make up that deficit compared to endgame value. So it's in these principles that my marginal gains are still yet to be found. Although the Babylon game got pretty close to these optimalities just by intuition.

I of course will continue to play with these principles in mind now.