View Full Version : Terrain Optimization (Phase I)


DaviddesJ
Dec 15, 2005, 12:49 AM
The subject of this posting is to work out a theoretical analysis of the possible output of a city of a given size, given the following assumptions:

1. The city has access to an unlimited number of tiles of every "basic" terrain type (i.e., plains or grassland, hill or flat). The tiles may or may not have rivers; this doesn't really affect the analysis, as the city just gets +1 commerce for each river, regardless of other choices.

2. We assume all special resource tiles will automatically be worked, so we are only analyzing the incremental production from additional tiles.

3. The civilization has researched the relevant early-game technologies of Agriculture, Mining, Pottery, and Machinery (for farms, mines, cottages, windmills, and watermills). We don't have access to advanced technologies such as Chemistry or Replaceable Parts, or any relevant civics or leader attributes.

4. We assume that each cottage/hamlet/village/town is a village, worth 3 commerce; there may be some towns at this point, but there will also be some cottages and hamlets that haven't grown to villages yet. This value could be varied, with some extra complexity in the analysis.

5. We will also simplify the analysis by pretending that a city can allocate fractional citizens, e.g., 1/2 citizen on a grassland/flat/farm and 1/2 on a grassland/hill/mine. Again, this could be made more precise, with some extra complexity. Note that you can usually achieve an equivalent result to a fractional citizen by moving one citizen back and forth between different tiles on successive turns.

Immediate conclusions:

1. We can define the value of each worked tile relative to the basic unimproved grassland, which produces just enough food to feed the citizen who works it. E.g., we think of a grassland farm as +1f, because it's worth 1f more than the unimproved grassland. A plains farm is +1p. A grassland mine (on a hill, of course) is worth -1f +3p.

2. The value of a tile can be split into an improvement value and a base terrain value. The base terrain is worth 0 (grassland) or -1f +1p (plains). The hills/flat and improvement values then modify this base value. The complete table:

grassland 0
plains -1f +1p

hill/mine -1f +3p
hill/windmill +1p +1c
flat/farm +1f
flat/watermill +1p
flat/town +3c

3. Workshops are never useful, under these theoretical conditions, because hill/mine (-1f +3p) is strictly better than flat/workshop (-1f +1p).

4. Watermills are never useful, either, because hill/windmill (+1p +1c) is strictly better than flat/watermill (+1p).

5. Windmills are never needed, either, because a hill/windmill (+1p +1c) is equivalent to 1/3 of flat/farm (+1f) plus 1/3 of hill/mine (-1f +3p) plus 1/3 of flat/town (+3c).

6. Plains/flat/farm is never useful, because 1/2 of grassland/flat/farm (+1f) plus 1/2 of grassland/hill/mine (-1f +3p) is strictly better than plains/flat/farm (+1p).

7. Plains/flat/town is only useful if we have no farms, because one grassland/flat/town (+3c) plus 1/2 of grassland/hill/mine (-1f +3p) plus 1/2 of grassland/flat/farm (+1f) is strictly better than one plains/flat/town (-1f +1p +3c) plus one grassland/flat/farm (+1f).

8. Plains/hill/mine is only useful if we have no farms, because one grassland/hill/mine (-1f +3p) is strictly better than 2/3 of plains/hill/mine (-2f +4p) plus 1/3 of grassland/flat/farm (+1f).

This leads to the following optimal allocations (depending on what we are trying to maximize):

1. All grasslands, in some mix of hill/mine (-1f +3p), flat/farm (+1f), and flat/town (+3c). If we allocate a fraction X of our population to mines, Y to towns, and 1-X-Y to farms, this gives (1-2X-Y) food, (3X) production, and (3Y) commerce.

2. Plains and/or grasslands, in some mix of hill/mine (-1f +3p) and flat/town (+3c). If we allocate a fraction A of our population to mines, 1-A to towns, and a fraction B to plains, 1-B to grasslands, this gives (-A-B) food, (3A+B) production, and (3-3A) commerce.

To phrase this differently, suppose our goal is to produce P production and C commerce, per citizen. If P+C is between 0 and 3, we can do this with scheme 1 (all grasslands): we will have P/3 mines, C/3 towns, and (3-P-C)/3 farms, for a net food production of (3-2P-C)/3, per citizen. If P+C is between 3 and 4 (and C is at most 3), then we will need to use scheme 2 (mix of grasslands and plains): we will have 1-C/3 mines, C/3 towns, C+P-3 plains, 4-C-P grasslands, for a net food production of (6-3P-2C)/3, per citizen.

An example:

Suppose I found a city on default terrain (so the core produces 2f 1p 1c), and the city has one grassland/corn space which I farm and irrigate for 6f. So the net production with 1 citizen (minus his food consumption) is 6f 1p 1c (plus any river commerce). Suppose the city grows to size 10 (with no health penalty). I want it to be stable at this size, meaning I need to produce a net of -6 food with the remaining 9 citizens, or -2/3 food per citizen.

In scheme 1, this happens when (3-2P-C)/3 = -2/3, or 2P+C = 5. So, in scheme 1, I can produce as much as P=2.5, with C=0, which would give the city net production of 9*2.5+1 = 23.5, and just 1 commerce (plus rivers). This is achieved with 7.5 grassland/hill/mines and 1.5 grassland/flat/farms. Or, I could produce P=2 and C=1 (remembering that P+C can't go over 3 in scheme 1), for net production of 19, and 10 commerce. This is achieved with 6 grassland/hill/mines and 3 grassland/flat/towns. Or, I can choose something in between these two.

Or, in scheme 2, the food balance occurs when (6-3P-2C)/3 = -2/3, or 3P+2C = 8. Then I could, again, have P=2 and C=1, for net 19 production and 10 commerce (as above). Or, I could maximize commerce with P=2/3 and C=3, for net 7 production and 28 commerce. This would mean 9 towns, of which 3 are grassland and 6 are plains. Or, again, I could choose something in between these two.

In other words, for this example, for P values between 2 and 2.5, each unit of production that I give up, buys me 2 additional commerce, while maintaining the same level of food production. For P values between 0.67 and 2, each unit of production that I give up, buys me only 1.5 additional commerce, while maintaining food production. And P values between 0.67 are never optimal (i.e., I could always put out the same amount of food and commerce, and more production).

Conclusion:

I'm not sure yet if or how this sort of analysis will be useful. Of course, you don't get to choose the terrain you're on. But I'm thinking that this might eventually lead to one of two conclusions: either it might be helpful in deciding how to develop a particular city with a particular terrain mix, or it might be useful in deciding how productive a city can be in a particular site (and thus to compare one location to another).

The analysis does generally support something that I already felt to be true (and this is not going to be a big surprise to Civ IV players): that grasslands are generally better than plains. But, there are some cases where it is better to have some plains, i.e., when you already have bonus food (so you don't need any farms), and you want to put out as much production as possible.

Zombie69
Dec 15, 2005, 11:28 AM
The tiles may or may not have rivers; this doesn't really affect the analysis, as the city just gets +1 commerce for each river, regardless of other choices.

You're wrong on this one. Rivers give +1 commerce to certain terrain types, but nothing to other types. For example, it gives nothing to forests.

Krikkitone
Dec 15, 2005, 11:49 AM
Well the basic rule is that flatlands are best for commerce and food, and hills best for production.

Windmills, Watermills, and Workshops are ways to use a terrain type sub optimally (although Watermills and Workshops become net usefull under state property)

Plains reduce a flatland's strength and shore up its weaknesses
Forests do the same thing (becoming as good as a mine when lumbermills are available)


BTW towns are +4c

DaviddesJ
Dec 15, 2005, 12:00 PM
You're wrong on this one. Rivers give +1 commerce to certain terrain types, but nothing to other types. For example, it gives nothing to forests.

Under the stated conditions, you would never choose to work a forest tile, so this isn't relevant to the analysis.

BTW towns are +4c

Yes, as I said above, I'm counting them all as 3c because they don't spring up fully formed, and you won't generally, at this stage of the game, have the opportunity to work all towns and no cottages, hamlets, or villages.

Zombie69
Dec 15, 2005, 12:01 PM
You also made the unstated assumption that the leader is not financial. I suspect that half of all games played are with a financial leader, since this is understood by almost everyone to be the best trait in the game.

This changes your analysis a lot, adding 1 extra commerce to hamlets/villages/towns, while adding nothing to the other types of improvements.

DaviddesJ
Dec 15, 2005, 12:18 PM
You also made the unstated assumption that the leader is not financial. I suspect that half of all games played are with a financial leader, since this is understood by almost everyone to be the best trait in the game.

This changes your analysis a lot, adding 1 extra commerce to hamlets/villages/towns, while adding nothing to the other types of improvements.

I did say "no relevant civics or leader attributes". So it's not unstated.

I think (or maybe hope) that most people mostly play with random leaders. What would be the point of just always choosing the best ones? Isn't that sort of like just always playing on the easiest difficulty level?

Anyway, if you change the value of towns from 3c to 4c (for example), it basically just increases all of the commerce figures above by 33%, leaving everything else unchanged. So it doesn't really affect the analysis much (it makes windmills even less attractive).

Beamup
Dec 15, 2005, 12:42 PM
1. The city has access to an unlimited number of tiles of every "basic" terrain type (i.e., plains or grassland, hill or flat). The tiles may or may not have rivers; this doesn't really affect the analysis, as the city just gets +1 commerce for each river, regardless of other choices.
I'd like to hear your plan for removing this assumption.

After all, the analysis cannot be readily applied to any in-game situation until this is relaxed. Work including this assumption is principally meaningful insofar as it lays the groundwork to eventually move past it.

DaveMcW
Dec 15, 2005, 01:58 PM
You really need to define a production/commerce conversion rate. This seems to be pretty much constant for each game, though it will obviously vary between games with different goals.

Assume your city has no national wonders that would skew the local value of food/production/commerce. (Optimizing specialized cities is easy.)

TBox
Dec 15, 2005, 02:45 PM
I would just like to go on the record as saying I support what DaviddesJ is trying to do.

<troll>
I think Krikkitone and Zombie69 are being unhelpful, because they are supporting what is "accepted" to be true, when DaviddesJ is trying to get a rational basis for why such things might be accepted. If you are not willing to accept the possibility that your findings will overturn conventional wisdom, you are not approaching this project with the right frame of mind. (Similarly, if you are not willing to accept that your findings may support conventional wisdom, you're suffering the same problem.)
</troll>

Firaxis has pulled a real number on us by all the techs/options that improve improvements. Time-delayed towns, State Property, Universal Sufferage, Free Speech, Emancipation, Biology, Replaceable Parts, Electricity, Guilds, Chemistry... every one of these changes the numbers drastically. I get my back up whenever anyone says something is "useless," but in the context of assumption 3, I can't deny it. Even if I want to.

At first I was uncomfortable with assumption 5, since I thought it was an invitation to MM, but then I realized I could translate conclusion 5 into meaning "I'd rather have a farm, a village, and a mine than 3 windmills." So I guess I can accept it now. (Yes, I'm being careful with the difference between the assumptions and the conclusions.)

I'll reiterate my opinion that workshop and windmill are "Terraforming" features: They turn a flat into a hill and a hill into a flat, respectively. With guilds+chemistry, you can even mine your "terraformed hill", and with electricity/replaceable parts, you get some cottage bonuses out of your "terraformed flat." If you buy this theory, then the "infinite tiles" assumption becomes more reasonable. A side effect of this is that no city should have both workshops and windmills, which is unfortunate, because I'm tempted to classify the watermill as a "workshop+", but have also been pushing the watermill/windmill combo as improved over farm+mine in the late game. I still think, post replaceable parts, mill/mill is better than farm/mine, but I don't know where that leaves watermill conceptually.

One interesting discovery is that, within certain limitations, your commerce/production balance is arbitrary. IE, you choose what you want more of first, then develop the land to suit, not look at the land and decide which it's suited for. This makes DaveMcW's call very poignant to me. A combination of a rational basis for production/commerce ratios, the use of DaviddesJ's optimized allocation schemes with the belief that the workshop/windmill are terraforming devices, and the natural march of technology to make that belief supportable for us less-than-deity players, could lead to a good-enough "set it and forget it" worker strategy.

Deity players appear to be stuck with a focus on workers and continually updating their tiles as new technology is discovered.

BruceLeeee
Dec 15, 2005, 02:49 PM
I feel the correct approach to this topic needs to be more specific. First you need to have a list of resources available. Then, you can come up with a happiness and health bonus to shoot for. This will give you an idea of the maximum city size for all cities regardless of terrain. You need 2x city size + extra unhealthiness for food, but the ultimate goal is maximizing commerce and production. If you are not getting much commerce or production (too much farms), drop the city size and replace farm with cottage or mine.
A city with half hills and half grassland probably is best with whole grassland farmed, all hills mined. You can replace farms with cottage if you have too much flatland (in planning of course), and windmill on hills if you have too many hills. Try to pick out a group of flatlands as "support tiles" with farms, then drop cottage and mines on the rest.
Work as much of your river/floodland as possible. Otherwise, ignore the extra commerce in your planning.
In my opinion, watermills and workshops are never useful. Specialize you grassland city for commerce. Use universal suffrage (I think) for hammer if necessary. Your hill towns can do all the producing.
It's probably necessary to separate the planning into pre and post biology cities. Biology usually gives 2-3 extra size to my cities.
Great merchant gives +1 food. Farm everything and use specialists for production and research is a viable strategy if you can come up with lots of happiness and health.

TBox
Dec 15, 2005, 03:10 PM
First you need to have a list of resources available. Then, you can come up with a happiness and health bonus to shoot for.

DaviddesJ's allocation formulas are population independent. You plug in your population. So, yes, this is an important step for using the formulas, but not developing them.

You need 2x city size + extra unhealthiness for food, but the ultimate goal is maximizing commerce and production. If you are not getting much commerce or production (too much farms), drop the city size and replace farm with cottage or mine.

The lack of consideration for unhealth is a concern, but maximizing commerce and production (in a predetermined ratio) is exactly what the allocation formulas are for.

In my opinion, watermills and workshops are never useful. Specialize you grassland city for commerce. Use universal suffrage (I think) for hammer if necessary. Your hill towns can do all the producing.


A more balanced city will produce more utility than a totally specialized grasslands commerceberg in the long term, simply because it can produce the market, grocer, bank, library, university, observatory, and laboratory in something resembling a reasonable time frame, since Universal Suffrage is so very late game. Unless you have pyramids, but I've tried a pyramids strategy, and I'm finding the wait for towns to develop leaves you vulnerable. PS: If you have a farm and a mine, you will seriously want to consider a watermill and a windmill post replaceable parts, as that gives you the same production and *more* commerce. Electricty makes this even more embarassing for the farm/mine. Workshops are more debateable.

Zombie69
Dec 15, 2005, 05:01 PM
I think (or maybe hope) that most people mostly play with random leaders.

Let's say that half the people play random leaders, and the other half pick financial leaders 90% of the time. Of the 26 different leaders, 7 are financial (that's 27%). So on average, that would be (27+90)/2 = 58.5% of games being played with financial. Even if everybody played random civs (which is clearly not the case from the messages posted in the forums, where it seems like 90% of people choose their leaders), that would still be 27% of games played with financial. It's very much worth taking into account.

TBox
Dec 15, 2005, 05:24 PM
It's very much worth taking into account.

So are US, State Property, and all the techs I listed in my first post. But we have to start somewhere, and if the basic analysis is predicated on financial, it leads to everyone leaning on financial as a crutch to their gameplay. What about 8+ player MP games? Someone's not going to be financial.

I definitely think it's better to have a basic strategy that you can adjust for being financial, rather than a strategy that you have to adjust for not being financial.

Smirk
Dec 15, 2005, 06:21 PM
I'd suggest an expansion to include a sample breakdown of terrain features and include an average population size. Also rivers are not just a +1c feature as the are required to even build a watermill.

For instance the case of point #4, a watermill would equal the hill/windmill with +1p +1c. (But of course the same windmill with river would be +2c total). I also can't ignore the watermill (and thus all tech learned bonuses) anyway, as its bonus +1p can come quickly after they are able to be built.


Anyway an example for a nice commerce specialist city will have maybe 80/20grass/plains, and an average one maybe 60/30/10 grass/plains/hills. So your optimum city (80% grass = 16 grass tiles) is in fact all grass when considering its population will not exceed 16 for the bulk of the game, and even the average has 12 grass.

DaviddesJ
Dec 15, 2005, 06:31 PM
I also can't ignore the watermill (and thus all tech learned bonuses) anyway, as its bonus +1p can come quickly after they are able to be built.

I'm certainly not claiming that you should never use the windmill or watermill.

But, I can't really agree with your parenthetical remark. It's quite a long way from Machinery to Replaceable Parts.

The reason I labeled this thread with (Phase I) is that I plan to do a Phase II analysis that will include the effects of Guilds, Chemistry, and Replaceable Parts. (But not Biology, Electricity, Railroad, State Property, or Universal Suffrage, which come later still.)

DaviddesJ
Dec 15, 2005, 06:33 PM
Let's say that half the people play random leaders, and the other half pick financial leaders 90% of the time.

Let's say that I think that anyone who picks one particular leader trait 90% of the time is missing the whole point of the game, and I don't really care whether my analysis is helpful to them, or not.

DaveMcW
Dec 15, 2005, 06:42 PM
Also, Financial civs get out of Phase I faster, so they have less time to benefit from mature cottages! ;)

Krikkitone
Dec 15, 2005, 07:04 PM
I'm certainly not claiming that you should never use the windmill or watermill.

But, I can't really agree with your parenthetical remark. It's quite a long way from Machinery to Replaceable Parts.

The reason I labeled this thread with (Phase I) is that I plan to do a Phase II analysis that will include the effects of Guilds, Chemistry, and Replaceable Parts. (But not Biology, Electricity, Railroad, State Property, or Universal Suffrage, which come later still.)

Did a quick check on that, basically Windmill>Mine (unless you want P>3) and Mine=Workshop=Lumber on Hill
so its (keeping towns at 3)
Farms, Windmills+Towns (all Grassland) [P+C<3, P<2]
Wind=P/2
Towns=(2C-P)/6
Food=(3-P-C)/3
OR
Windmills+Towns (Plains+Grassland) [P+C>3, P<3 or P>2]
Wind=3/2-C/2
Town=C/2-1/2
plain=P+C-3
Food=2-P-C
OR
"Mines"+Windmills (all Plains) [where a lumbermill on a hill is basically the same as a mine] [P>3]
Mine=P-3
Windmill=4-P
Food=2-P
Commerce=4-P

Interesting thing is at This point the Production/Commerce trade off is 1 for 1 at all levels. Perhaps less so if Towns are assumed to be 4 Commerce (more Mature/Printing Press)

phase 3 gets much more complicated (with watermills producing all three resources) I think it may much more strongly depends on the production/commerce ratio desired
Watermills+Mine>Workshop/Lumbermill
Watermill/Plain>Workshop/Lumbermill
Watermill/Grass > Mines+Farms

So it amounts to Towns+Watermills as the base best, with Mines taking over before plains Hills/Lumbermills+ taking over at the 'all plains' max production options.

So if

4P+C<10, P<2 (all grassland, some farms)
Towns= (C-P)/5
Water=(6P-C)/10
Food=(20-2P-3C)/10
a production costs 2/3 commerce

4P+C>10, P<3 (no more farms, some plains)
Town = (C-2)/4
Water = (6-C)/4
Plains = (4P+C-10)/4
Food = (8-C-2P)/2
a production costs 2 commerce

4P+C>14,(all plains, Watermills, Mines, Towns)
Town= (P+C-5)/3
Water = (10-C-2P)/2
Mine= (4P+C-14)/6
Food = (19-2C-5P)/3
a production costs 2.5 commerce

Pure Mines+Towns+Plains
Towns=C/6 or (5-P)/3
Mines=1-C/6 or (P-2)/3
P=(10-C)/2
C=10-2P
F=(-1-P)/3


The value of watermills showing the remaining strength of rivers in the late game.

zienth
Dec 15, 2005, 07:36 PM
The first assumption, that we have access to any sort of tile that we might want, is such that I find it very hard to see how this could be applicable. Conclusions 3, 4 & 5 saying that "X are never useful" are only true if you have an infinite choice of tiles, which is certainly *not* the case, so the conclusions are misleading at best, and probably more like worthless. A hill/windmill is only better than a flat/watermill if you have plenty hills available to put windmills on. A plains/flat/farm is certainly more useful than a grassland/flat/farm and grassland/hill/mine if you don't have any handy grassland/flat and grassland/hill tiles.

This reminds me of a compiler conference I went to several years ago. I was working for a hardware/software company (Pyramid Technology), in the compiler group, where we spent our days working on improving our compilers so our real-world customers could get the best performance. At this conferance, there were a bunch of people from various universities presenting their research into compiler optimization. Almost every one made various simplifications to make the research easier, but that made their result totally inapplicable. Things like working with a subset of C that doesn't include pointers, "because pointers make the problem too complicated". Great, we just have to tell our customers not to use pointers and we can speed up their code by 20%. They'll love that. The best was a fellow who's presentation was "A novel way to allow using a debiugger to step through optimized code." He basicly had both the unoptimized code (which can be stepped through with a debugger) and the optimized code (which can't) in the same object file, and ran the optimized code when the debugger wasn't being used. When asked what happens if there is a bug in the optimizer that results in the optimized code acting differently, he replied (with a straight face) "We're careful not to have any bugs in our optimizer". That got a huge laugh from the people who worked in the real world, and not in Ivory Towers.

This sort of discussion is useful, but you have to limit the assumptions to something approaching reality, or you start reaching conclusions that aren't applicable to the real-world (or rather, the real-game-world).

Keith

Krikkitone
Dec 15, 2005, 09:55 PM
Well the assumptions do approach reality in the case of low population cities (where there may be 20 tiles from which 5 citizens can work... and is therefore particularly useful in the early part of the game)

It can also be useful when placing a city, knowing what key things to look for.

DaveMcW
Dec 15, 2005, 10:10 PM
The first assumption, that we have access to any sort of tile that we might want, is such that I find it very hard to see how this could be applicable. Conclusions 3, 4 & 5 saying that "X are never useful" are only true if you have an infinite choice of tiles, which is certainly *not* the case, so the conclusions are misleading at best, and probably more like worthless.

That's like saying nobody can play a flawless game of Civ4 without reloading. It may be true, but knowing all the tricks and theories behind a perfect game is very useful.

In this case, we want to know how close our city site comes to "max production", and DaviddesJ proposed a tool to measure that.

BruceLeeee
Dec 16, 2005, 08:09 AM
I agree with zienth. This is exactly like programmer oversimplifying to solve a problem, but it becomes so limited it doesn't really solve any.
I propose building a mod that tells you what improvement is best on a specific tile you are given. Can't be too hard since Civ4 already has an algorithm built-in. Just trick the game into thinking that you have 6 tiles with each improvement and see which one the game circles. Hopefully, we can modify the game algorithm with a better optimization formula.

Zombie69
Dec 16, 2005, 09:08 AM
Let's say that I think that anyone who picks one particular leader trait 90% of the time is missing the whole point of the game, and I don't really care whether my analysis is helpful to them, or not.

Let's say that Fireaxis should release a patch to balance all the traits, so that we don't have to restrict ourselves to one in particular.

Smirk
Dec 16, 2005, 02:03 PM
Let's say that Fireaxis should release a patch to balance all the traits, so that we don't have to restrict ourselves to one in particular.

I'm sure they are all just waiting for your every post to know what to do next.

Anyway no one if forcing you to only play finacial civs and whether its fixed or balanced in the future doesn't really matter. The debate of the effectiveness of this trait belongs in another thread. But you seem to have made up your mind while the rest of us are actually playing other civs, for other reasons and other game goals. For example, what good is financial for an early conquest?


Also its Fir Axis, the axis of an evergreen not fire. Ignore the symbolism of their company logo.

DaviddesJ
Dec 16, 2005, 10:20 PM
Let's say that Fireaxis should release a patch to balance all the traits, so that we don't have to restrict ourselves to one in particular.

As I already said, you don't have to restrict yourself.

I'm actually quite happy if some traits are better than others, as it gives another way to modify the difficulty of the game than just adjusting the handicap for the computer opponents.

This still seems pretty irrelevant to this thread. As I said, if you have a financial leader, just multiply all of the commerce values by 4/3 (or whatever factor you think is appropriate).

nalbano
Jan 17, 2006, 08:57 AM
wow.. what an unintelligable load of crap. was the intention of the op to be of help to anyone here?

Gato Loco
Jan 17, 2006, 06:47 PM
Nice effort here. I'm sure this will be useful in deciding how to develop cities. In my own consideration of hte subject, I've come to similar conclusions. Rather than saying X is or isn't useful, I think it would be more productive to rank different combinaitons in order of utility so they can be applied to real-world situations.

1. The city has access to an unlimited number of tiles of every "basic" terrain type (i.e., plains or grassland, hill or flat). The tiles may or may not have rivers; this doesn't really affect the analysis, as the city just gets +1 commerce for each river, regardless of other choices.

Obviously a very off-putting assumption. In its defense, if this assumption is used to rank different combination in order of usefulness, the ranking can then be used to decide among various possible combinations for a city site.

Assumptions 2 and 3 seem pretty reasonable, though certain special resources shouldn't necessarily be worked in every situation (e.g. ice/furs or desert/iron).

4. We assume that each cottage/hamlet/village/town is a village, worth 3 commerce; there may be some towns at this point, but there will also be some cottages and hamlets that haven't grown to villages yet. This value could be varied, with some extra complexity in the analysis.[\quote]

This is a very tricky point. I suspect it's an ok approximation for the early game, but cottages are tricky because of their small immediate value and immense long-term value. The value of a cottage in the middle ages isn't the 2-3 commerce its making now but the 7 commerce it'll be making later on with full growth and printing press/free speech, so you can't really treat cottages like other improvements. They're an investment for hte future.

[QUOTE=DaviddesJ]5. We will also simplify the analysis by pretending that a city can allocate fractional citizens, e.g., 1/2 citizen on a grassland/flat/farm and 1/2 on a grassland/hill/mine. Again, this could be made more precise, with some extra complexity. Note that you can usually achieve an equivalent result to a fractional citizen by moving one citizen back and forth between different tiles on successive turns.

This is the secret to useful terrain analysis. Because food yields in one spot affect your population assignment elsewhere you have to consider not individual tiles but tile combinations (or yield-per-food).


3. Workshops are never useful, under these theoretical conditions, because hill/mine (-1f +3p) is strictly better than flat/workshop (-1f +1p).[\QUOTE]

Pretty much aggree. Even in a real game, you're in a pretty bad way if you have so few hills that you're reduced to using pre-guilds workshops to get enough hammers.

[QUOTE=DaviddesJ]4. Watermills are never useful, either, because hill/windmill (+1p +1c) is strictly better than flat/watermill (+1p).

Here's where you'll need to slightly modify your analysis to apply it to real conditions. For a reasonably large city the choice will never be between working either a hill/windmill or a flat/watermill. Rather it'll be about what to do with the hill tile and the flat tile that you already have. For example) 1/2 grass/hill/windmill + 1/2 grass/watermill for [+0.5p +0.5c], 1/2 grass/hill/mine + 1/2 grass/farm for [+1p], 1/2 grass/hill/windmill + 1/2 grass/flat/village for [+0.5p +1.5c], or 1/2 grass/hill/mine + 1/2 grass/flat/watermill for [-0.5f +1.5p]. You can see here that the real choice is between optimizing for hammers or for comerce, as well as whether to run a food debt to get a bit more hammers out of the tiles. It does show, however, that the watermill isn't all that good unless you're absolutely going for broke with the hammers, which would take you outside the scope of this thought experiment.

5. Windmills are never needed, either, because a hill/windmill (+1p +1c) is equivalent to 1/3 of flat/farm (+1f) plus 1/3 of hill/mine (-1f +3p) plus 1/3 of flat/town (+3c).

Aggreed, with the reservations mentioned above. Windmills are a second-best improvement and wouldn't ever be useful under ideal city conditions where you can build mines, farms, and cottages to your heart's content. The other conclusions are similar.

Your math does seem to be reasonable, particularly the part about balancing food. It takes a lot of thinking and calculating in-game to apply this but it's still useful in helping to form intuitions about city spaces. Also, I think that your assumptions are particularly well suited for phase I. At this point I usually cherry-pick the best spots with the terrain I want, so not having enough hills or fgrasslands isn't a problem. For phase II, I'd suggest making two sets of calculations, one for mature cities founded during phase I and one for newer backfill cities founded more recently in poor spots (e.g. fishing villages, all hills, limited grassland, no food bonuses, etc.) Such extreme cases become increasingly relevant later in the game and are the reason Firaxis gave us workshops, windmills, and watermills. I look forward to your future work.

DaviddesJ
Jan 17, 2006, 07:17 PM
Yes, if I do more with this, I'm going to focus more on how to improve the tiles you actually have, not what the ideal mix of tiles would be. As you say, that becomes more relevant later in the game, because when cities are only working 5-10 tiles, usually you can choose the best ones. But, even earlier, you might, for example, have the choice between plains/river tiles and grassland/non-river, and it would be nice to have some theoretical analysis of that tradeoff.

fed1943
Jan 18, 2006, 09:34 AM
IMO,the tricky point to analise is that:a city needs food and hammers,never needs commerce.So,it may be would better to study about the tiles ímprovements(farms,mines,windmills,watermills,lumb ermills,but not cottages)decide the necessary or desirable,the others would be cottages,or make a steadyfast decision about the commerce basic output of that city and the remaining...Well,I never got a satisfactory conclusion.
Best regards,

Smirk
Jan 18, 2006, 12:29 PM
In my games the overall question has really boiled down to do I cottage that luxury or improve it. And this is increasingly being applied to more and more resources, all except early food based ones. Since resources are so far flung in most maps trading is hardly valuable so even when I do connect them, its generally only one.
The reasoning should be obvious, getting +3-4 gold instead of a couple hammers is better because that gold can support another city which in turn can easily create more hammers than any improved tile. And with a financial civ this is even better, that 2f7g cottage is in essence 2f7g + 2f1h1g+ 2f(minimum) and it continues to grow thru out the game.

I do still mine hills, but thats about it.

DaviddesJ
Jan 18, 2006, 01:07 PM
Since resources are so far flung in most maps trading is hardly valuable so even when I do connect them, its generally only one.

I don't understand what this means. If you have a resource, either it's not a duplicate for you (in which case, building the improvement is necessary to give you access to it), or it is a duplicate (in which case, you can trade it to another civ for usually a lot more than 3-4 gpt).

Gato Loco
Jan 18, 2006, 06:12 PM
In my games the overall question has really boiled down to do I cottage that luxury or improve it. And this is increasingly being applied to more and more resources, all except early food based ones. Since resources are so far flung in most maps trading is hardly valuable so even when I do connect them, its generally only one.
The reasoning should be obvious, getting +3-4 gold instead of a couple hammers is better because that gold can support another city which in turn can easily create more hammers than any improved tile. And with a financial civ this is even better, that 2f7g cottage is in essence 2f7g + 2f1h1g+ 2f(minimum) and it continues to grow thru out the game.

I do still mine hills, but thats about it.

Don't forget rice. Rice = sugar = floodplain. You cottage you're floodplains, don't you? And those pesky calander resources that give you a paltry +1 at the start. I'd be wary about other food resources because your cities do need to grow, but I could even see myself cottaging wheat in the right circumstances.

Jamppa
Jan 19, 2006, 03:12 AM
How about we set like 10 different city sites with different landscapes; then optimize how terrain should be improved... This way we could calculate some kind of average value, right?

It would also be nice to have an article of how to improve "specialized" cities to get the most out of your terrain. Anyone up for it here? :)

Brighteye
Jan 19, 2006, 06:34 AM
What would be good is if someone listed a few basic rules for beginners like me which others can then debate or alter depending on their opinion, so here are some. I start from terrain production values assuming complete health and happiness: this seems like a better basic assumption to me. I will ignore resources, although actually they are very important in choosing city sites. It's really very hard to separate choosing city sites from terrain optimisation, so there's a bit of both in here.

Grassland is better than plains; if you like hammers you should be looking for 2:1 ratio of grassland to grassland hills, not for plains. You can farm plains for reasonable effect, but grassland is still better.
Unlike in previous Civ games farmed grassland gives you nothing but food, so it is only good for growing population.
This extra population is useful for mining hills but particularly for being specialists. I say this because if you use it to mine hills you're just doing what has been considered before and trying to optimise the average tile production, which can be done after founding a city, but if you want great people the specialist cannot support himself and so you absolutely must have farmed grassland to support him, and so a great person farm must be on grassland and floodplains.
I've seen a fair few comments about whether we should bother with farms. Two grassland farms still give a free population point, so you have a net bonus. Therefore farms are still worthwhile (before considering health and happiness). On plains they are worthwhile because the tile then supports itself and gives an extra one of those ever-elusive hammers.
So a very simple system to start your civilisation would be to farm river tiles, cottage other tiles and mine hills. Your priorities for cities should be river tiles, then grassland, always looking for a good number of hills within the city radius.
Once we have these basic rules we can then add extras. An important consideration is the financial trait, which adds an extra commerce to cottages on rivers. Thus you have a dilemma: you can reduce city growth by using cottaged tiles on a river but get extra commerce, or you can grab some commerce while growing the city by farming the river tile. Thus it's all dependent on how close you are to civil service for farming non-river tiles and whether you want short-term or long-term bonuses. I'd say that for greatest long-term bonuses you'd want to farm river tiles and cottage others, thus getting the commerce from the river while your city grows enough to use the cottages.
If your city is going to be a producer: your military unit city or other building city, you don't need to worry about cottages. Just mine those hills and farm other spaces to support the miners.
As previously mentioned, the base effects of workshops etc. are to optimise production of food/commerce/hammers in sub-optimal conditions. Thus you should be aiming to found cities in better places, at least to start with. Maybe once you have a bit more tech., and maybe state property, you can change the improvements around your core cities, but my scheme is a starting scheme.
I realise that on harder levels health and happiness are major concerns, but they change depending not only on difficulty level but on resources, which I haven't considered here. You can adjust the scheme to take account of your health/happiness by planning ahead. I have stated that extra population is never bad, but if you know the city size that you're going to start having problems you can reduce the number of farms accordingly. Farms help speed up growth, so even if you know you want two cottages in the end, it may be helpful to have farms to begin with so that you can be working those two cottages sooner. Thus you might have farms to support miners and growth, but when you give up on growth you can cottage over most of your farms and exchange your food production for cash. Either this, or support great people instead of production.
This leads me on to the point that I think that there's a choice between specialists and cottages. Your production cities will focus on hammers and not worry about this choice. A scientist gives you 3 science whereas a cottage gives you a variable amount of commerce, which in this thread has been said to average 3. However, specialists can add far more, such as 2 culture and 3 extra science, as well as great person points. On the other hand, 3 cottages support themselves whilst giving an average of 9 commerce, but specialists need 2 farms to support them, so the output is still only 6 science. How much do you value those great people?
I reckon that farms are very helpful to start with, and in producing cities (large hammer output), but I haven't seen great people help too much, and I'd say that three cottages (which will give far more output with a little time) are far more valuable.
Thus with the new health and happiness system you can't set a city and leave it, unless you cottage immediately and forget it, but there are some basic rules about improvements.

Brighteye
Jan 19, 2006, 06:54 AM
From what I've just said, I think there are a few things to look out for in city placement.
1. Floodplains and rivers
2. Grassland
3. Hills
4. Forest

There are 3 types of city: production, commerce and great people farm.
A production city needs hills, and might also have iron or copper to mine. To support these miners it must have tiles that produce excess food. Thus a production city wants a lot of grassland hills (about 2 for every 3 grassland in a resource-barren area) and grassland to support them. Plains are acceptable, but sub-optimal. Floodplains are also helpful, but could well be better used in a great-person farm. A production city only really needs rivers for fresh water and health. As long as there's a food resource to keep growth going before civil service a river isn't necessary.
A commerce city needs rivers and lots of grassland, with maybe a few plains or hills. Hills will be helpful to mine in order to give the city enough hammers to build the essential buildings, so try to have a couple in the radius.
A great person farm requires huge amounts of food, health and happiness, so look for floodplains, grassland, rivers to provide farms, and either a couple of hills or a lot of forest for building those helpful wonders. A farmed plains tile is a waste of one health; that one production would be better as half a specialist supported by a farmed grassland.
A city with a lot of plains will inevitably be a slow-growing city with a reasonable amount of production, but won't be the best of cities.
Coast is good for quick commerce, but cottages on grassland will soon overtake coast, and don't require a lighthouse, so coastal cities should be later foundings filling in the gaps, major naval ports or there for food resources.