124 is the increase for your entire empire and it was a guess. Obviously it will depend on # of cities and will vary from game to game.
To use your number, an increase of 5-8, it would only take 15-20 cities to reach the 124 mark. In a 50 tile area, 11 cities will fit comfortably. So yeah I guessed a little high. Still, 11 * 5-8 = an increase of 55-88 per city added. How long will it be before that new city is generating more than 55-88, even if you whip a courthouse? A while.
There seems to be some huge misunderstanding as you are talking about placing 11 cities in a 50 tile area. Since there are only 50 tiles to work and 11 are already taken with city centers, 39 are left for improvements shared by 11 cities. That's about 3-4 tiles per city. I can't imagine that that is what you want as you dislike city overlap. So you must have a very different idea about what I meant with a 50 tile area.
In my original post (1179 in this thread), I was talking about placing 2 or 3 cities inside a 50 tile area. The 2 cities would take 2 tiles from the 50 tiles and leave 48, an average of 24 per city for tile improvements. Because 2 cities can only use 20 tiles (outside the city centre), the 2 cities cannot use all the tiles in the area (at least 8 tiles aren't used).
If you place 3 cities in the area, then 47 tiles are left for tile improvements, an average of almost 16 per city. This means that the cities are necessarily having some overlap as they can have 20 tiles in their fat cross.
The difference between these 2 situations is one single city with an upkeep of 8-16 (depending on inflation level, using Krikkitones numbers and he's assuming distant cities with high distance upkeep and he's assuming maximum number of cities upkeep). The three cities will easily make more than 8-16 extra gold than the 2 cities. It just takes 1-2 good trade routes and you have 4 extra trade routes in these cities in the late game. And you're using at least 8 extra tiles and maybe several corporations.
Of course, you should watch overexpansion in the early game. I was just trying to show that 3 cities can get more out of a 50 tile area than 2 cities.
Since I guess that you must have been talking about a radically different situation, I don't know how useful it is to respond to the rest of your post.
Still some other things were discussed in your post and I'll react to those points.
We're talking increase in maintenance. This occurs in every city, not just the new city.
This is not true by the way. There is a cap, an upper limit to the number-of-cities maintenance. Once that cap is reached, founding another city won't raise the upkeep in other cities in your empire.
My abject apologies... I wasn't angry at all but I certainly see how you might think that. I was just trying to place emphasis and I went overboard.
No problem. I would just dislike it when anger would become part of the discussion. That would lead us away from any important issues. I apparently misread you. It's sometimes hard to see whether someone is angry by looking at written text.
If Bhruic thought he couldn't fix some of the problems then he wouldn't be trying. He asked for our suggestions.
It already does this (except for the "perfect" part). All we're trying to do is to make it a little bit better.
A recursive algorithm is probably easiest, but I can think of several ways to do it without recursion.
As Bhruic has stated himself, he's presently letting the AI place cities one by one. You said that it could be possible to program the AI to plan an entire continent full of cities in advance. I read your idea about that (post 1211), but I must say that I didn't get it.
It theoretically could be done recursively, but I believe that the number of calculations would become far too high. Planning the positions of multiple cities in advance requires an exponential number of calculations. It might be possible to plan 2 or 3 cities in advance without getting too many calculations, but I don't even know if that would lead to significantly better city placement by the AI. Mainly because the situation changes during placement of these cities (AI and barbarian city placement and further scouting). It could lead to some improvement in city placement on tiny islands.
Those two statements are the same thing.
I was pointing at the difference which Bhruic explained a bit more clearly a few posts after yours. Since you were talking about tackling the problem of planning a continent of cities recursively, I guess this was another example of miscommunication.
It just seems like the crux of your argument is "this is hard" and giving up thereby.
That remark was unneeded as I'm trying to suggest ways to improve the code in several other posts. But yes, I do think it is hard. Along with waging war, this is probably the most complicated part of the AI in civ4. And I don't think it will be feasible to plan an entire continent of cities in a meaningful way. I would love to be proved wrong about that and see the AI plan cities in a way a human does. But since I don't see improvement in that way, I'll just suggest stuff related to valuation of the city locations for the next city.
Regarding how the A.I. values future improvements, you could modify the expected output of a tiles based on the length of time an improvement would be available. The lumbermill is about halfway up the tech tree, so it would be valued half it's output. Railroads are about 60% up the tech tree so the added production it gives to lumbermills and mines would be one sixth of a production point. Would that work? By the way, could the A.I. adjust those values as it moves up the tech tree? Like valuing a lumbermill closer to it's full value as it gets closer?
Interesting idea. If this is considered, then I guess that the age (ancient, classical, medieval, renaissance, industrial, modern) could be used to see how long it takes before the improvement becomes available. Each technology has an age and the age has a number (1-6), so in that way the difference between the present technology level and the level at which the improvement becomes available could be quantified. Maybe not exact, but good enough I guess.