Ramalhão
Warlord
I understood what you mean, it's better to program AI to interpret rules. I put it to the simpliest way: we know in despotism irrigation doesn't give any bonus to grassland squares, so let's tell AI to never do this. I'm trying to explain that some fix could be simple enough as this example.Commander Bello said:1) Your proposal exactly describes the way in which the AI is programmed up to now. It is pre-determined - and this is the problem.
What, if somebody modded the game, so that irrigation would have an effect even at despotism? With your proposal, this modding would have become pointless, thus reducing the modding potential of the game.
The AI should interpret the rules settings and then decide whether a certain tile improvement makes sense or not.
But I agree interpretation is better than simplier routines, as AI could see several possibilities when it will work a square. Maybe interpretation will make the game very slow, who knows? Let's hope it don't make so much difference.
I think a quantity of workers per nation is not a good idea. When an AI is reduced to some cities, it will try to do more workers than it really needs. In your way, let's say you program to put 20 workers per nation in a standard map. An AI with 4 cities will try to create workers until it reach this number, which is huge enough for 4 cities. And another AI with 30 cities will keep the 20 workers already done, when it needs more.Commander Bello said:3) Again, the worker/city ratio shouldn't be done per city, but per nation. Workers should primarily be built in cities which already reached the maximum size or are close to it.
Making the optimiziation algorithm exact enough, you could even avoid to have to build certain city improvements in such a town, then.
I still prefer defining a quantity of units accordingly to number of cities. At least in the beginning of the game, we need at least one worker working in each city, because cities will increase and will use more squares, so workers need to improve at least 6 squares per city (in case city won't grow without an aquaduct). As I wrote above, cities with several jungle/marsh squares need more workers to clean these squares, because this action takes a lot of turns. These cities will need a better algorithm to define the best number of workers. These workers can be brought/done from other cities, because these cities will tend to grow slower (due bad tiles).
And when almost all possible squares are improved, I usually join several workers to cities, so they won't cost support. I think current AI uses this kind of algorithm.
I think more experieced players may decide which is better. They know better how to develop cities faster and micromanagement, so they'll know which is better: workers per city or workers per nation. Well, soon someone will come here and say "I never build workers, I always get slaves"

Oh, yes. That's what I do, but I think you meant the inverse.Commander Bello said:4) I would almost all time build the road first, as this will improve your wealth and will speed up all your units.
About 5, I forgot to mention it: when I build some embassies, I usually see AI's capitals size 1 and doing settlers

You used the wrong word: it is not crap, it is incompleteCommander Bello said:Forgive me, but this is crap.
The AI should check for luxuries (access internally or by trade), if there are enough military police units and then play around with the internal advisor.

Building an improvement which makes people happier also help, but it should be build before people becomes unhappy. If city will soon grow and the next one will be unhappy, AI should try to build a temple soon to avoid this problem.
Yes, a spearman can be used as military police, but there's no need to keep spearmen when a city has 4 Mech Infantries, 3 TOWs, 2 Infantries and dozen more units. These units could be moved to cities which really needs military police, but if all cities are already at max MP, why keeping obsolete units? When I find a civilization alone in a small island, its capital always have tons of units, most of them obsolete.Commander Bello said:Because a spear makes as much citizens happy as a modern armor.
So, there is no reason to upgrade an ancient unit, given that the town it is in is not located near a potential enemy or the shores.
Upgrading can be done if enough wealth is available (let's say the treasury is already above 5000 gold [figures just for display])
First, about upgrading units. I agree disbanding units isn't really "lucrative", but keeping very obsolete units, spending 1 per turn each one, is not wise. And updating these units may cost too much, depending which unit it will upgrade to. And some cities can build new units in a few turns (eg: rifleman each 4 turns), leaving the money for better purposes (science, for example). AI could do something as "new unit built, disband most obsolet unit in a city with weak production", it's an idea, what do you think?Commander Bello said:Again, stated in the absolute way as in your posting, I cannot agree to this.
The answer is: optimization.
Upgrading almost always is a better way to get new units compared to disband old ones for the sake of the production of new ones.
There are obvious exceptions from this rule of thumb as "Hannibal ante portas", but except for this the disbanding most times is just pointless.
Second, about money. I think AI must keep money as one of first priorities, because money goes to: support of units, support of buildings, science, luxury and even can hurry production when highly necessary. So, buildings which gives money are important.
But finding priorities for AI is hard. In Civ3, cities far away from capital must build courthouses first, so corruption won't "eat" most of shield production. Any other building would waste much shield, while this city will stay using 1 shield per turn, even if it produces 20 (corruption get most shields). Also, cities in islands should build harbor so they can receive/send resources - this one when there's no harbors in that island. New cities with a huge culture neighborhood need to build cultural buildings fast or the city will flip.
Your word is correct: optimization. But there must be a huge algorithm to see which to build next instead of using pre-determined building orders (as most games do).
That's why I put the idea of avoiding producing settlers in cities with a few population. Let's imagine this theory:eg577 said:If we were looking to improve the AI then we should not bother to try to have it 'interpret the rules' so it can play other mods. It is too hard to take everything you know about civ that can be hardcoded into an AI and then generalize it. For example, you might hardcode into the AI how many settlers to build in its first city before stopping based on your own trial and error with the game. Now how would you generalize that number so it is a function of settler shield cost and settler population cost? It just wouldn't work.
P - number of population removed to produce a settler (2 if not changed)
Tr - number of turns expected to produce a settler in this city (maybe including eventual growth and new shields in use, but not really necessary)
Tg - number of turns expected for this city to grow to P+1 size
If Tr>Tg, then this city can do a settler, if Tg>Tr, then this city cannot produce a settler, because it won't grow fast enough, it will produce the unit and then will wait to grow, wasting several turns when it could produce something else.
Simplifying this idea: produce settlers in cities which size is at least P and which growth is faster than producing a settler. If city size<P, don't produce settlers here.