 |
|  |
 |
|
alexman
|
 |
Hunt Valley, MD
Jan 1970 time: 00:23
|
|
In the thread titled "Why, oh why does the poor AI...", we identified some shortcomings of the AI in managing its cities. Until these issues are possibly addressed in a future patch, and in preparation for the PTW version of the AU mod, let us use this thread to agree on the best way to improve the AI using the current PTW editor.
So here are my proposals:
- The AI builds settlers before the city is large enough to produce them: This happens VERY often on Emperor and above. Only the most food-rich cities get to grow past size 3 before the settler is complete in the AI's expansion phase. This more than negates the early-game production bonus on that level. Option 1: Do nothing. The AI is good enough in the early game without improving it. Option 2: Increase Settler cost to 40 shields. This will not affect the AI on Emperor, (since it already wastes at least 10 shields per settler), but it will delay the human expansion.
- The AI emphasizes growth even when it has happiness problems. This causes the AI to assign entertainers, losing productivity, and irrigating more tiles to support those entertainers, losing even more productivity. Option 1: Double the happiness generated by entertainers. If we can't make the AI not use entertainers, we should at least make it use less of them. I personally believe that the human player's strategy will not be seriously affected by this change, but the AI will benefit greatly. For a more detailed debate on this subject, see this thread. Option 2: Never flag "Growth" as a build-often preference for the AI. The AI already builds Granaries when it has hess than two excess food without this preference. Building Granaries earlier would make its population growth even more out of control. Option 3: Make the city governor emphasize production for all civs. This couldn't hurt, but I have not seen any effect from making this change.
- The AI doesn't build harbors early enough. It often can't benefit from luxury trade without harbors. Option 1: Mark "Trade" as a build-often preference for all AI civs.
- The AI doesn't build factories early enough. Even with "Production" as a build-often preference, the AI builds Factories after cultural buildings like Cathedrals and Research labs. Option 1: Mark "Production" as a build-often preference for all civs. Don't mark "Culture" as a build-often preference, since the AI already emphasizes culture over production. Option 2: Increase the maintenance cost for Factories and Plants. The AI does not consider maintenance in its build decisions. By increasing the maintenance of Factories, the AI will at least save some money from building them later.
- The AI builds too many units and not enough improvements. The real problem is that the AI NEEDS all these units because it's so bad in combat tactics. Option 1: Similar solution as with the Factories: increase the maintenance cost advanced buildings like banks, research labs, and cathedrals. The AI generally builds these later than the human, so we can save the AI some cash for doing so.
- The AI is predictable in its research path. Actually, there is a random factor involved, but it is often outweighed by other non-random factors. The human can bet on being the first to get techs like Mathematics, Literature, Polytheism, Printing Press, et cetera, and sell them to the AI for a fortune. Similarly, the human can rely on the AI to research techs like Nationalism and Bronze Working for him. Option 1: Adjust the tech costs to make them appear more balanced to the AI. This is tricky, and requires some playtesting, but in general it involves making empty techs cheaper and Wonder/Unit techs more expensive. Note that the AI does not look forward when choosing the next tech to research. So it there is a great tech (like Electronics) after a lame one (Atomic Theory), the AI will not know to research the lame one so that it can get to the great one faster.
- The AI builds Guerillas when Infantry is available. Credit to Catt for spotting this one. We think it's because Infantry and Guerillas have the same attack and cost, and both have the AI offense flag checked, so the AI sometimes builds guerillas as offensive units. Option 1: Increase the attack factor of Infantry to always be better than that of guerillas.
- The AI attacks with weird units. The AI attacks with units that have the AI offense flag. Riflemen, Infantry, Mech. Infantry.... Option 1: Increase the attack strength of those units. This would at least make them more effective against the human. Option 2: Remove the AI offense flag from those units. Then the AI would not attack with them unless its odds are realy good. For the AU Mod, we used option 1 for riflemen and infantry and option 2 for Mech. Infantry.
- The Babylonians are too agressive for a builder civ. The Iroquois don't take advantage of the best UU in the game. This one is simple. Lower the aggression of Hammurabi to 3 from 4. Increase the aggression of Hiawatha from 2 to 3 and flag his offensive units as a build-often preference.
- The AI doesn't know how to produce units in its core cities and disband them in the corrupt cities. It often uses Wealth when its good cities have nothing else to build. Option 1: Double the value of Wealth. It is still not worth building for us humans, most of the time.
- The AI doesn't know how to effectively place its Forbidden Palace. The AI suffers from high corruption. Option 1: Reduce the corruption level for the AI, by making it play at Warlord level instead of at Regent. This AI Level affects content citizens, their combat bonus against barbarians, and percentage of OCN for corruption. It doesn't directly affect research or production. Option 2: Reduce the AI level to Chieftain! Option 3: Make Chieftain unavailable to humans and make the AI play there. Change this level so that it has 200% optimal number of cities (to simulate the FP bonus), and the rest like Regent.
- The AI uses Communism instead of Monarchy as a Wartime Government. Communism is far worse than Monarchy in most cases. The problem is the high communal corruption. Option 1: Increase the free unit support under Communism. Option 2: Add free building maintenance for Communism. Option 3: Increase worker speed for Communism. The trick here is to help the AI when it switches to Communism, without giving such a boost to this government type that it will become a viable option for the human player.
Any other ideas? Different solutions? Comments?
Sorry if you've seen all this before, I just wanted to get all these AI issues together somewhere.
Last edited by alexman on 15-11-2002 at 05:54
|
|
|  |
 |
|
Random Passerby
|
|
The other thread hints at a way to get at the AI's build preferences a bit more aggressively: as noted there, Spain has "build never" for Wealth, and so will not build banks or stock exchanges... but WILL build marketplaces, since they have other uses too. Try checking "Build never" culture and "Build often" production--the AI still remains in love with libraries/universities, but goes for factory, power plant, manufacturing plant right afterwords, only building coloseums and then temple/cathedral later. Still not exactly ideal, but it's an interesting concept: so long as an improvement has ONE function for which the AI does not have "Build never" flagged, the AI will still build it... eventually.
|
|
|  |
 |
|
ducki
|
|
quote: Originally posted by alexman
[*]The AI emphasizes growth even when it has happiness problems. This causes the AI to assign entertainers, losing productivity, and irrigating more tiles to support those entertainers, losing even more productivity.
[*]The AI doesn't build factories early enough. Even with "Production" as a build-often preference, the AI builds Factories after cultural buildings like Cathedrals and Research labs.
|
I'd be willing to bet my Forbidden Palace that these are related.
He's having happiness problems and losing productivity, so naturally, happiness builds will be more important than production builds until happiness isn't a problem.
At least, I'd be willing to bet that.
I think if you get the AI's happiness problems semi-solved, the production building problem might solve itself.
|
|
|  |
 |
|
DaveMcW
|
|
quote: Originally posted by jshelr
Just a thought: the early game structure already favors stopping settler expansion early to build military units. If you increase settler shield costs, that would tip the balance further toward the pure warmonger style. Fine with me, but maybe not with everyone.
|
I agree. By fixing only the builder aspects of the AI we are making it harder to beat them as a builder. Thus warmongering becomes relatively more attractive. Unfortunately we have no control at all over the AI's military tactics.
Re: giving the AI warlord/chieftain level corruption.
The AI already gets a corruption bonus as you move up in difficulty, by way of the penalty to humans. Decreasing corruption is just as drastic as decreasing the AI production costs. If you want to make a "beyond diety" mod so be it, but I thought the goal of the AU mod was to make the AI play better without cheating.
|
|
|  |
 |
|
Random Passerby
|
|
It appears that I have misinterpreted the data. I looked at the example of Spain building marketplaces with "Never build wealth" on and assumed that Spain was looking at the list of possible roles for marketplaces, ignoring its use for wealth, and opting to build them for their happiness benefit. I'm now beginning to think that improvements may have one and only one role that the AI considers them for, and marketplaces are not considered wealth at all; similarly, never build culture does seem to have no effect whatsoever. It appears my results came from my testing setup, wherein the AI had some very impressive production.
It turns out that the AI weighs the production capacity of a city when deciding how soon to build a factory. Here's the test I devised to confirm this:
-The AI is given five ungrowable cities, with production of 5, 10, 20, 30, and 40 (the high production comes from resources). Diety level, accelerated production--so the AI can build things VERY quickly. Never build any units; often build production.
-The 5 shield city went through all the research and happiness culture improvements right off the bat, as usual.
-The 10 and 20 shield cities went through library and university, then went to factory, power plant, manufacturing plant.
-The 30 shield city built a library first, then factory, power plant, manufacturing plant.
-The 40 shield city built a factory right away, not bothering with any other improvements until it had its power plant and manufacturing plant done.
Eager to see if these results could be applied towards getting the AI to build more commercial type improvements, I went in and changed the AI from build often production to build often wealth/trade. In my haste, though, I had grabbed an earlier test and neglected to turn off unit builds. The result? The AI (with about a dozen cities) built one airport, one harbor, and then started pumping out guerrillas to attack me with, with a few odd libraries built here and there. Not a marketplace in sight.
This might explain the impoverished AI problem: if the AI doesn't have many luxuries, it wouldn't want to bother with a marketplace. If it has no marketplace, it can't build banks. I've never been in love with the marketplace's luxury effect--it makes it obscenely easy to keep your cities happy--and would be happy to get rid of it to try and jostle the AI into viewing marketplaces as a money-making proposition, but I'm a bit wary of crippling the AIs that DO have lots of luxuries by adding to their happiness problems. Well, actually, petrified of it, given that Soren has said that the AI only uses the empire-wide happiness boost of the luxury slider in order to fight the empire-wide war weariness unhappiness.
|
|
|  |
 |
|
alexman
|
 |
Hunt Valley, MD
Jan 1970 time: 00:23
|
|
quote: Originally posted by Theseus
1. I would avoid changing Settler cost... this is more for me than for the AI, it just confuses me too much when going back and forth between mods and stock.
|
Fair enough. I thought this was a big change anyway. But what about attacking with the AU mod Infantry-on-steroids? Isn't this confusing too?
quote:
2. Double the entertainers' effect. WE just have to agree not to exploit this.
|
I'm not sure we have to, because it may not be exploitable. I believe that happiness improvements will still be the way to go, but we definitely need to playtest this.
quote:
3. and 4. I think trade and production should be emphasized... we do it, don't we?
|
Agreed. We didn't used to emphasize trade for all civs.
quote:
5. and 6. Leave alone.
|
Why? We humans don't look at maintenance costs (we build whatever needs to be built), so increasing them will not affect our strategy - only our pockets. The AI builds many units before improvements. So why not help them save some costs in doing so?
quote:
7. 8-attack for Infantry, yes?
|
Yes!
quote:
8. Repeat what we did before.
9. Cool!
10. Leave alone.
|
Why leave alone 10? We made this change in the AU mod. Do you build wealth more often as a result?
quote:
11. This is the most difficult one... I'd love to hear from Soren.
|
I'd love to at least know he's reading some of these threads.
quote:
12. What are the current fixes in the AU Mod?
|
Not settled yet. AU 1.05 had free maintenance. AU 1.06 has increased free unit support. Both had fasted workers.
Last edited by alexman on 15-11-2002 at 06:27
|
|
|  |
 |
|
Theseus

|
 |
The warmonger formerly known as rpodos. Gathering Storm! Apolyton Spirit!!
Apr 2002 time: 00:23
|
|
Well, all of the changes are sorta confusing... I just can't deal with any changes to Settlers! 
5. and 6. I'd like to see more of PTW first... I think the AI civs should build MORE units, if anything (but that's my warmongerin' way!).
10. Sorry, I forgot.
12. Man, I just don;t know what to do with Communism, but we gotta do something. Unless people really disagree, I suggest we *try* making Communism the uber-government for how and why the AI civs (SI, whatever) seem to function. Now that the AI civs are getting 'polished' we seem to be focusing more on later-game performance... well, that probably means at least some warfare, and thus Commies. This'll be 1.07/PTW? Fine let's consciously experiment, and give Communism everything... in fact, is there a way to increase the likelihood of Factories?
|
|
|  |
 |
|
alexman
|
 |
Hunt Valley, MD
Jan 1970 time: 00:23
|
|
quote: Originally posted by Random Passerby
I'm now beginning to think that improvements may have one and only one role that the AI considers them for, and marketplaces are not considered wealth at all
|
Soren has already told us that buildings belong to several groups. He also said to be very careful when setting something as build-never. But from our tests it appears that build-never means that you never build something just for that category, but you build it if it falls in another category that you are allowed to build. Marketplaces belong in the Happiness, Wealth, and Trade categories, BTW.
quote:
It turns out that the AI weighs the production capacity of a city when deciding how soon to build a factory.
|
Your tests are very enlightening. Keep up the good work.
quote:
This might explain the impoverished AI problem: if the AI doesn't have many luxuries, it wouldn't want to bother with a marketplace.
|
Buildings belong to different categories, but have a certain amount of strength in each category. I think marketplaces are weak in trade and happiness, but strong in Wealth. In any case, did you repeat your experiment with units turned off? It would tell us much.
Again, thanks for sharing your experiments!

|
|
|  |
 |
|
Random Passerby
|
|
Oops. I am an idiot. First, fiddling with the multiple-category aspects of improvements in the AI's preferences, I discover that the AI does weigh production capacity when deciding its build order; then when I start looking at marketplaces I go back and ignore both of these. Doy.
Anyways, I went through two more runs on variations of the production scale scenario: the first time, I just unchecked production for build often and put in wealth and trade instead. The results were negligible: the highest production city still started off on a factory, and second-highest went through library-university instead of library alone. All cities ignored marketplaces until they had finished just about everything else.
Then I smacked myself on the forehead and upped the production resources I gave them to have 25 commerce too. The AI built library first everywhere, and marketplace was 1-2 builds later. This is obviously much better.
One thing that is either promising or disturbing: in both scenarios, the AI built airports very, very quickly (I left those out of the above build orders on purpose, since they appeared to have a roughly universal weighting). All the cities I was looking at had strategic resources in their radii (but unconnected), so this wasn't such a bad idea in terms of regular game conditions... except that all the cities were on the same landmass. I'd do some more fiddling with the effects of resources and trade routes on build preferences, but I don't have any more time to spend fiddling.
|
|
|  |
 |
|
ducki
|
|
Maybe it's because I'm inexperienced, and therefore, making "bad" decisions on tech research, but I always end up buying Philosophy from the AI.
Actually, I can't recall which factor is significant, but either since I started playing Regent/Monarch or possibly with PtW, the AI always beats me to Philosophy, Map Making, Code of Laws, and Republic.
Unless I realize within the first 40 turns that I'm alone on a landmass and beeline for Map Making, naturally.
Actually, I'm usually last to Mathematics as well.
Am I doing something terribly wrong, or is there enough randomness in research that some people will see the AI ignore certain techs and others won't?
|
|
|  |
 |
|  |
 |
|  |
All times are GMT. The time now is 05:23. Apolyton Time is 00:23. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|