Home | A mathematical analysis of Civilization II |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Civ II |
At first glance Civ2 might seem too complicated to be amenable to simple algebra. However, it turns out there are some aspects of the game about which it is possible to say something useful.
## Sections- The general ideas used
- When to build libraries etc
- When to build marketplaces etc
- When to build temples etc
- Rush-Building
- When to build miscellaneous other buildings
- Combat strength
## The Big IdeaWell, not such a big idea really. The general argument is to consider tax and luxury rates and forget that they can only move in increments of 10%. We consider the little increments in, for example, the tax rates required to pay for maintenance or the luxury rates required to keep a city out of civil disorder caused by each decision we take, on the grounds that it is the aggregate of all these little increments that force us to make the 10% jumps. Our 'income' each turn is the total number of trade arrows - Generate enough money to pay for maintenance on all our city improvements.
- Generate just enough luxuries to keep all our cities out of civil disorder.
- Spend the rest of the trade on either science or money (to build up a cash reserve) as required.
## Libraries, Universities, Research LabsSuppose we want to maximise our total science output. We should then preferably spent the 'free' share of the trade (item 3) entirely on science. If we don't want to do that (since we want to build up a cash reserve) then we should spend 'as much possible' of item 3 on science, leaving a fraction spent on producing cash which we're not prepared to reduce any further. Let the total trade output of our empire be
Let the current science rate be r<1)_{s}Thus total science output is S_{old} = r_{s} TSuppose we build this improvement, and change the science rate to r_{s}'Our science output is now S_{new} = r_{s}' ((T-T*) + (1+t)T*) = r_{s}' (T + tT*)Now, to pay for the added maintenance we must increase the tax rate by
Thus S_{new} = (r_{s} - C/T)(T + tT*)
= r_{s} T + t r_{s} T* - C - tC T*/T
= S_{old} + t r_{s} T* - C - C T*/TThus we say We can get a bound on the If our lower bound is positive we can guarantee that building the improvement will increase our science output. If the upper bound is negative we can guarantee that building the improvement will reduce our science output. Here's the nice part: S*.t S* - (1+t)C < dS < t S* - CCan't help (upper bound negative):
Note that for each improvement 1 + t = (Sci multiplier with)/(Sci multiplier without)
## Marketplaces, Banks, Stock ExchangesSuppose we just want to make lots of money (and don't care about the luxury increasing effects) Let the tax rate be T* and
the potential improvement multiply money by 1 + t and cost C.Clearly the change in our termly income after building the improvement will be So we should build it if the money generated by the city C/t. Well, that was nice and easy
Note that for each improvement 1 + t = (Money multiplier with)/(Money multiplier without)
## Temples, Colosseums, CathedralsWhat we want to consider is which of luxuries and happiness improvements waste less trade.
Each two luxury units make one unhappy citizen content so, if we have trade N = ½m T dr, where
_{l}m is the luxury multiplication factor associated with marketplaces etc.m={1,1.5,2,2.5} for {none, Marketplace, Bank, Stock Exchange} respectively.
If we have an improvement which will make dr. We thus have a 'measure of goodness'
_{t} < dr_{l} <=> C < 2N/m2N/m - C
We thus have the rather surprising result that Colosseums and Cathedrals don't do you any good after you've got a Bank or Stock Exchange. I've no idea if is this a deliberate joke about Mammon overtaking God, or just the result of Microprose not thinking things through. ## Rush Build costThis is just a brief experimentally derived[1] explanation for how the rush-build
costs work. I could have typed in a big table of all the results I used to derive these
but that would have been tedious - just trust me, ok :-) - 2N for a building
- 4N for a wonder or spaceship part
- N*( (N/20) + 2) [rounded down] for a unit
If the production box is empty (no resources have yet been spent) the cost is doubled. ## Other Buildings## FactoryAs all republic players will realise, through rush buying money ## Combat StrengthSuppose we have two units fighting it out, Just to restate the rules: - The units fight a number of rounds until one unit is destroyed
- Each round either the attacker hits (with probability
*S/(s+S)*) and reduces the defender's hit points by*F*, or else the defender hits (with probability*1 - S/(s+S) = s/(s+S)*) and reduces the attackers's hit points by*f* - The first unit to run out of hit points is destroyed
Well, the obvious thing to do is say: We then have the reltionship Subject to the conditions P_{r}(m,0)=1 (m>0)P_{r}(0,n)=0 (n>0)This is all well and good, with the minor drawback that it doesn't have a suitably nice solution[2]. It's a little irritating that the one issue which is blantantly a straightforward mathematical problem is the one which you have to simplify. Anyway, having failed to solve it properly we now resort to handwaving.Set Suppose that a large number of rounds are played, so that after N turns the attacker has inflicted
a damage of approximately The attacker wins if Oooh, lookee. Pretty result. This leads us to define the Attack Power, Suppose the attacker wins. Then the combat will have lasted Thus 1. I could probably have saved time by buying the rip-off Microprose "strategy guide", which apparently lists some of the formulae the game uses. Am I the only person who finds shipping a manual full of vague non-explanations and then charging extra for information about how the game actually works rather rude?
2. Well, at least |