Thread Tools
Old September 26, 2002, 17:17   #1
Theseus
PtWDG Gathering StormApolyton UniversityApolytoners Hall of FameBtS Tri-LeagueC4DG Gathering StormApolyCon 06 Participants
Emperor
 
Theseus's Avatar
 
Local Time: 04:36
Local Date: November 1, 2010
Join Date: Apr 2002
Location: The warmonger formerly known as rpodos. Gathering Storm!
Posts: 8,907
The key to AI greatness, Part II
To quote from alexman's original thread:

"Ever wonder why AI England is always laughable, while AI Egypt often dominates? Why Zululand rarely gets past the Middle Ages? Well, it’s more than just traits and UU. Ever wonder why the AI sometimes doesn’t have a marketplace in the industrial era, or why it doesn’t have factories well into the modern era? The answer is the build strategy that the AI follows in its cities. "

Well, we're still trying to figure build preferences out, but we totally MISSED another important set of options, the AI Civilization Governor, which can effect food, shield, and trade productivity.

(BTW, note the name "Civilization Governor" and not City Governor. Could that mean something?)

This is important for several reasons.

First, we've all noticed what a crap job the AI civs do of irrigating, mining, and clearing their land.

Second, even so, they generally waaaay over-irrigate, and end up with towns / cities with significant excess food production at 6 and 12 pop, or let population get out ahead of happiness and end up with too many entertainers.

Third, as related to the above, they clearly aren't optimizing shield production, and thus their build capabilities.

Here's what we've got so far, starting with the info from Editor Help:
________________________________

Settings (Civilization Governor)

Selects which aspects of the selected civilization that the AI will proactively manage. Default is to manage citizens and production. The available options and their effects are listed below:

Manage citizens: The AI will monitor the moods of citizens in a city and attempt to keep its people content

Manage production: The AI will manage all production in its cities

Emphasize food: The AI will attempt to maximize food production in all of its cities

Emphasize shields: The AI will attempt to maximize shield production in all of its cities

Emphasize trade: The AI will attempt to maximize trade output in all of its cities

No Wonders: The AI will never build Wonders in any of its cities

No Small Wonders: The AI will never build Small Wonders in any of its cities

Be aware that altering these settings can dramatically affect the way that computer-controlled players behave in the game. Unchecking "manage production", for example, will cause computer-controlled civilizations never to produce anything in any of its cities.
______________________________

Note: In stock Civ3, all AI civs are set to manage citizens and production, and nothing else is checked.
______________________________

Next, Killerdaffy ran a quick test:

In my test scenario (very simple set up, one city for each civ, three settlers, all industrious, all grassland) I got the following results:

Egypt (Emphasize food) 11, 7, 20 (irrigation, mine, road)
China (Emph. shields) 9, 9, 19
America (Emph. trade) 10, 9, 22
France (baseline) 12, 6, 21

That's not too compelling so far. The little differences might simply be due to the movement sequence...

Somebody needs to check this out more thoroughly, I really don't feel like doing this 10 times over right now.
______________________________

Next, I posted a question about this on CFC, and here are some thoughts from Bamspeedy:

"I don't know how the AI reacts if you select 'emphasize food', or shields for them, but I would imagine it works the same as the governor works for you. But I do know if you don't have 'manage production' for the AI marked, they will never build ANYTHING . And you could check off 'No Wonders' for every civ, and the AI will never build wonders, so you can build every single one of them whenever you feel like it.

I dont' think selecting 'emphasize food' or production or commerce would directly affect what they build, but probably indirectly, because this may affect how fast they can build stuff or how fast they grow and that may cause other unknown situations (flags) that tells the AI what to build. Kind of hard to explain what I mean, but for example, if a city is growing faster, they will reach size 6 sooner, so the AI may have to build an aqueduct sooner than it normally would, maybe even before a temple."

And also, in response to this question: "Any thoughts on whether the city governor has any impact on how tiles are 'worked'?"

"Yes, I'm sure it does. Maybe that is why when the workers are on regular automation they keep changing irrigation to mines and mines to irrigation.

And could be why AI cities are always way over-irrigated. (too much food, too little shields). Choosing 'emphasize production' might help this out, I'm not sure. Someone would have to test this out."
______________________________

OK, so, the question is how do we test for the best settings to help the AI civs? Should we just set them all to emphasize production?

Also, how does this vary by civ? Should commercial civs emphasize trade? What about industrious civs? Are there any civs that should specifically be left alone?

Thoughts?
__________________
The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.

Duas uncias in puncta mortalis est.
Theseus is offline  
Old September 26, 2002, 17:23   #2
Theseus
PtWDG Gathering StormApolyton UniversityApolytoners Hall of FameBtS Tri-LeagueC4DG Gathering StormApolyCon 06 Participants
Emperor
 
Theseus's Avatar
 
Local Time: 04:36
Local Date: November 1, 2010
Join Date: Apr 2002
Location: The warmonger formerly known as rpodos. Gathering Storm!
Posts: 8,907
And, on a separate note (which I'm posting here because the AU Mod thread has been TAKEN OVER by unit and building discussions!), here are some of Bamspeedy's comments on AI build preferences:

"Build preferences I've noticed a few things. If you have culture marked as build often, they seem to priotize the highest culture buildings available first. I say this because in the mod I'm playing, both the Aztecs and Iroquios (both religious) are building libraries and colleseums (3 cp) before any other buildings that are cheaper to build, but provide less culture. If you set 'build often' for workers, the AI does a little better, because the AI is so incompetent at worker tasks that just having more workers available helps make up for some of this. Setting 'production improvements' as build often seems to have no effect. So they still take forever to build those factories . If you don't select anything at all as 'build often', I have heard the AI produces massive armies, yet little infrastructure. And 'massive armies' I mean HUGE, as in a warmonger's dream."

Interesting... what does this mean for the settings we currently have in the AU Mod? Any changes re cultural buildings? And should we try a couple of AI civs with only one or two preferences checked?
__________________
The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.

Duas uncias in puncta mortalis est.
Theseus is offline  
Old September 26, 2002, 18:10   #3
alexman
PtWDG Gathering StormCivilization IV CreatorsInterSite Democracy Game: Apolyton TeamApolyton UniversityIron CiversCivilization IV: MultiplayerApolytoners Hall of FameCivilization IV PBEMApolyCon 06 Participants
Firaxis Games Software Engineer
 
alexman's Avatar
 
Local Time: 04:36
Local Date: November 1, 2010
Join Date: Mar 1998
Posts: 5,360
Quote:
Originally posted by Theseus
OK, so, the question is how do we test for the best settings to help the AI civs? Should we just set them all to emphasize production?
Either set them all to emphasize production, or both production AND trade. Since food is over-emphasized anyway, maybe selecting everything EXCEPT food will have a greater effect. OTOH, maybe not!

Quote:
Also, how does this vary by civ? Should commercial civs emphasize trade? What about industrious civs? Are there any civs that should specifically be left alone?
I don't see any reason to give different priorities to different civs except to add personality. Commercial civs have less corruption which affects both shields and trade. Industrious civs just do everything faster: both roads and mines.

Quote:
the AU Mod thread has been TAKEN OVER by unit and building discussions!


Quote:
what does this mean for the settings we currently have in the AU Mod? Any changes re cultural buildings? And should we try a couple of AI civs with only one or two preferences checked?
From my experience, the build preferences do not dramatically affect the way the AI behaves. Cost is still the biggest factor (that's why the AI builds factories late).

I would not remove any non-military build preferences from the AI. It will just allow them to build even more units instead, like the Zulu and the Romans do in the stock version. But that's just IMO. I would love it if someone had time to actually do a systematic test.
alexman is offline  
Old September 26, 2002, 18:21   #4
Theseus
PtWDG Gathering StormApolyton UniversityApolytoners Hall of FameBtS Tri-LeagueC4DG Gathering StormApolyCon 06 Participants
Emperor
 
Theseus's Avatar
 
Local Time: 04:36
Local Date: November 1, 2010
Join Date: Apr 2002
Location: The warmonger formerly known as rpodos. Gathering Storm!
Posts: 8,907
Or if we could get a little help here!!

SOOORRREN... OH SOOORRREN??!!
__________________
The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.

Duas uncias in puncta mortalis est.
Theseus is offline  
Old September 26, 2002, 18:51   #5
Dominae
BtS Tri-LeaguePtWDG Gathering StormC4DG Gathering StormApolytoners Hall of Fame
Emperor
 
Dominae's Avatar
 
Local Time: 04:36
Local Date: November 1, 2010
Join Date: Jan 2002
Posts: 7,017
I've just run a simple test to check out if "Emphasize Production" affects Worker tile improvement. I believe the answer is yes.

I put France and Egypt on a Grassland map covered with Rivers. France was unchanged but Egypt had "Emphasize Production" on. By the time all the tiles around the city were worked, Egypt always had more Mines that Irrigation. In fact, in 5 trials the AI Workers always produced the same pattern around the city.

I'm not sure if this should affect the results, but the civs were "neutered" with respects to building: the only thing they could build was Wealth.


Dominae
Dominae is offline  
Old September 26, 2002, 18:59   #6
Killerdaffy
Warlord
 
Killerdaffy's Avatar
 
Local Time: 09:36
Local Date: November 1, 2010
Join Date: Nov 2001
Location: in other words a gang leader aspiring to Presidency
Posts: 145
I tried nearly the same thing, alternately with 4 civs and with four of my cities (governor set to emph. production or food). Unfortunately I could not reproduce the results I got the first time when accounting for bonus grasslands (on only normal grassland the governor refused to irrigate at all?!?). It gets even more confused once you add other terrain types / resources.
Killerdaffy is offline  
Old September 26, 2002, 19:22   #7
Theseus
PtWDG Gathering StormApolyton UniversityApolytoners Hall of FameBtS Tri-LeagueC4DG Gathering StormApolyCon 06 Participants
Emperor
 
Theseus's Avatar
 
Local Time: 04:36
Local Date: November 1, 2010
Join Date: Apr 2002
Location: The warmonger formerly known as rpodos. Gathering Storm!
Posts: 8,907
I think it's going to be a no-brainer to turn on emphasize production for all AI civs, although our first experiments should probably have a control group.

I'd like to at least TRY emphasize production on a weak commercial civ... how about England and / or Rome?

As to the build preference thing, I'm really intrigued by Bamspeedy's comments about *reducing* the number of build preferences to get a larger AI military. Let me ask this: Are there any AI civs that typically do well in terms of expansion and building, but are usually woefully weak? We'd have to address the AI's flaws at upgrading too... Who does NOT send in SoDs?
__________________
The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.

Duas uncias in puncta mortalis est.
Theseus is offline  
Old September 26, 2002, 19:59   #8
Dominae
BtS Tri-LeaguePtWDG Gathering StormC4DG Gathering StormApolytoners Hall of Fame
Emperor
 
Dominae's Avatar
 
Local Time: 04:36
Local Date: November 1, 2010
Join Date: Jan 2002
Posts: 7,017
Killerdaffy, I read the post where you described your test. I was trying to do a simpler version of the same thing. I eliminated all bonus grassland tiles from around the starting positions; all they could improve was plain Grassland. With this setup, the maximize production civ always built 2 more Mines than the control civ. I don't know if this has to do with the total number of Shields the Governor wants to be producing, or is simply a "build" Worker script (both are obviously related). So, it would seem setting all the civs to maximize production would be a good thing, since they don't appear to do anything stupid like stop growing at size 4 or build no roads.

Theseus, in my games Greece and America are usually pretty weak militarily early on. Also, I think we should focus on the Zulus for the upgrade problem, since they always stay in the Dark ages when it comes to troops.


Dominae
Dominae is offline  
Old September 26, 2002, 21:32   #9
nbarclay
PtWDG Gathering StormInterSite Democracy Game: Apolyton TeamApolyton UniversityC4DG Gathering Storm
Emperor
 
nbarclay's Avatar
 
Local Time: 02:36
Local Date: November 1, 2010
Join Date: Dec 1999
Location: Huntsville, Alabama
Posts: 6,676
I do have one possible concern about having the AI maximize production: How will that affect expansion in the early game? Normally, the ideal pattern is to focus on food early while you're trying to build new cities and then grow existing ones, and then shift the focus to production once cities are as big as you want them. So it's going to be important to make sure that production-oriented settings don't slow down the AI's start too much. Still, even if my concerns have some validity, settings that are better for production as the game goes on might make up for a slower start. (Then again, a slower start might get the AI stomped by a nearby human before it gets a chance to make use of its long-term advantages.)

Nathan
nbarclay is offline  
Old September 26, 2002, 22:35   #10
Theseus
PtWDG Gathering StormApolyton UniversityApolytoners Hall of FameBtS Tri-LeagueC4DG Gathering StormApolyCon 06 Participants
Emperor
 
Theseus's Avatar
 
Local Time: 04:36
Local Date: November 1, 2010
Join Date: Apr 2002
Location: The warmonger formerly known as rpodos. Gathering Storm!
Posts: 8,907
Dominae, you make a good point... early versus midgame military strength. Early: I wouldn't worry about Greece to much, due to Hoplites. America definitely needs help. Mid: Zulu have an gold / upgrade problem. I'll think about the rest.

Nathan, I've got a gut response here... I think that no matter how much we try to increase AI shield production, the core algorithims will *mostly* still provide for enough food (more than enough), especially in the early game. I also question the entire premise of early expansion (REXing) that is at the heart of the AI strategy, not to mention that of most human players; more to come on that as I develop the theory...

(I'm dying for Soren et al to jump in here, but I want to reiterate my TOTAL admiration for Firaxis' accomplishments; yeah, we are trying to create tougher AI opponents, but given the complexity, all the factors that have to be balanced... WOW!)

(And to any Coraclites that might want to attack... yeah, no doubt, the programming is not as good as a human, but I'm still wildly impressed)

Last parenthetical:

(The above was not meant to overly compliment anyone from Firaxis... I really mean it... but if in a blush of authorly satisfaction you deign to reach down and CLARIFY some things... uh, er, we'd appreciate it)
__________________
The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.

Duas uncias in puncta mortalis est.
Theseus is offline  
Old September 26, 2002, 23:14   #11
Dominae
BtS Tri-LeaguePtWDG Gathering StormC4DG Gathering StormApolytoners Hall of Fame
Emperor
 
Dominae's Avatar
 
Local Time: 04:36
Local Date: November 1, 2010
Join Date: Jan 2002
Posts: 7,017
Quote:
Originally posted by Theseus
I've got a gut response here... I think that no matter how much we try to increase AI shield production, the core algorithims will *mostly* still provide for enough food (more than enough), especially in the early game.
I think this is correct. It's probably something like: "I need to get at least x Food and y Shields. Anything else I'll try to optimize according to what my priorities are (they default at none). If I'm told to focus on production, I'll (on average) build more Mines that I usually would, but not overly so".

(And no, I don't think AIs think to themselves in this way... )


Dominae
Dominae is offline  
Old September 26, 2002, 23:35   #12
Random Passerby
Warlord
 
Local Time: 08:36
Local Date: November 1, 2010
Join Date: Jan 2002
Posts: 187
I've been doing some fiddling along these lines too... my main interest was trying to get the AI to use artillery properly, but regrettably, the final result seemed to be that somewhere in the AI procedures there's a big flag that says DO NOT EVER CONSIDER ACTUALLY BOMBARDING LAND UNITS, EVER, EVEN IF THE FATE OF THE ENTIRE UNIVERSE SHOULD DEPEND ON SUCCESSFUL APPLICATION OF ARTILLERY FOR LAND WARFARE. But I digress.

Anyways, any thoughts on Wealth? On the one hand, the AI often runs into financial difficulties on its own and thus can really use all the money it can get. On the other hand, maybe it wouldn't have money difficulty if it actually built useful stuff to begin with.
Random Passerby is offline  
Old September 26, 2002, 23:50   #13
nbarclay
PtWDG Gathering StormInterSite Democracy Game: Apolyton TeamApolyton UniversityC4DG Gathering Storm
Emperor
 
nbarclay's Avatar
 
Local Time: 02:36
Local Date: November 1, 2010
Join Date: Dec 1999
Location: Huntsville, Alabama
Posts: 6,676
Quote:
Originally posted by Theseus
I also question the entire premise of early expansion (REXing) that is at the heart of the AI strategy, not to mention that of most human players; more to come on that as I develop the theory...
I'll be interested to see your theory, but I'm skeptical. The reason I regard early expansion as very important is that there's lots of stuff to build in each city and only so much they can build each turn. The later a city gets started, the later it can start building all its improvements, and the fewer improvements it will have at any given time. (That's also why I hate diverting production for military purposes early in the game.) Of course I will grant that the AI tends to go overboard in trying to grab any conceivable piece of territory even when corruption makes it essentially worthless, but the fact that REXing can be overdone doesn't mean it isn't important.

Nathan
nbarclay is offline  
Old September 27, 2002, 03:51   #14
Killerdaffy
Warlord
 
Killerdaffy's Avatar
 
Local Time: 09:36
Local Date: November 1, 2010
Join Date: Nov 2001
Location: in other words a gang leader aspiring to Presidency
Posts: 145
Quote:
Originally posted by nbarclay
I'll be interested to see your theory, but I'm skeptical. The reason I regard early expansion as very important is that there's lots of stuff to build in each city and only so much they can build each turn. The later a city gets started, the later it can start building all its improvements, and the fewer improvements it will have at any given time. (That's also why I hate diverting production for military purposes early in the game.) Of course I will grant that the AI tends to go overboard in trying to grab any conceivable piece of territory even when corruption makes it essentially worthless, but the fact that REXing can be overdone doesn't mean it isn't important.
Nathan
The fact that in my tests (25-tile islands) the AI still built settlers despite being literally millenia from any ship technology leads me to suspect that REXing is very deeply ingrained in the AI core. Also, at least on the higher difficulty levels (i.e. Deity) all the human player can do is watch and wait for his time, since the early AI REX in INSANE (ok, they start out with two settlers). It would be a welcome change if the game was harder later on, instead of making every effort to build you into the ground by 2000BC.
Killerdaffy is offline  
Old September 27, 2002, 09:49   #15
Arrian
PtWDG Gathering StormInterSite Democracy Game: Apolyton TeamApolyton UniversityC4DG Gathering StormPtWDG2 Cake or Death?
Deity
 
Arrian's Avatar
 
Local Time: 04:36
Local Date: November 1, 2010
Join Date: Jul 2001
Location: Kneel before Grog!
Posts: 17,978
Nathan,

Theseus (and I) came to a realization, as warmongers, that it benifits the human to stop REXing after building a productive core of cities and start building units. The AI will remain in REX mode while you build a massive army. The attack you unleash will capture some cities, raze others, and cripple the opposition. You can backfill later.

-Arrian
__________________
grog want tank...Grog Want Tank... GROG WANT TANK!

The trick isn't to break some eggs to make an omelette, it's convincing the eggs to break themselves in order to aspire to omelettehood.
Arrian is offline  
Old September 27, 2002, 10:27   #16
Harovan
staff
PtWDG Gathering StormPtWDG2 Monty PythonC4DG Gathering Storm
Civ4: Colonization Content Editor
 
Local Time: 09:36
Local Date: November 1, 2010
Join Date: Dec 2001
Posts: 11,117
The AI stops REXing and becomes more aggressive, when it reaches the optimal city number. A viable way to help it out would be to lower this number. Unfortunately, this has 2 downsides:

- The corruption will be vastly increased, including all AIs and the human player.
- On some maps, the AI will stop building cities, when there is still room to build.

This must be carefully balanced out.
Harovan is offline  
Old September 27, 2002, 10:42   #17
lockstep
Apolyton University
King
 
lockstep's Avatar
 
Local Time: 09:36
Local Date: November 1, 2010
Join Date: Aug 2001
Location: Vienna, Austria
Posts: 1,529
Quote:
Originally posted by Sir Ralph
- The corruption will be vastly increased, including all AIs and the human player.
This could be corrected by generally reducing corruption with the slider introduced in v1.21's editor. Bur it would be still a delicate act of balancing.
__________________
"As far as general advice on mod-making: Go slow as far as adding new things to the game until you have the basic game all smoothed out ... Make sure the things you change are really imbalances and not just something that doesn't fit with your particular style of play." - WesW
lockstep is offline  
Old September 27, 2002, 10:50   #18
Harovan
staff
PtWDG Gathering StormPtWDG2 Monty PythonC4DG Gathering Storm
Civ4: Colonization Content Editor
 
Local Time: 09:36
Local Date: November 1, 2010
Join Date: Dec 2001
Posts: 11,117
Quote:
Originally posted by lockstep
This could be corrected by generally reducing corruption with the slider introduced in v1.21's editor. Bur it would be still a delicate act of balancing.
I thought about this, but it would favor the human, because he knows about the toned down corruption, while the AI just evaluates the OCN.
Harovan is offline  
Old September 28, 2002, 13:54   #19
Theseus
PtWDG Gathering StormApolyton UniversityApolytoners Hall of FameBtS Tri-LeagueC4DG Gathering StormApolyCon 06 Participants
Emperor
 
Theseus's Avatar
 
Local Time: 04:36
Local Date: November 1, 2010
Join Date: Apr 2002
Location: The warmonger formerly known as rpodos. Gathering Storm!
Posts: 8,907
Re: The key to AI greatness, Part II
KD, I was looking a this again:
_______________________________

In my test scenario (very simple set up, one city for each civ, three settlers, all industrious, all grassland) I got the following results:

Egypt (Emphasize food) 11, 7, 20 (irrigation, mine, road)
China (Emph. shields) 9, 9, 19
America (Emph. trade) 10, 9, 22
France (baseline) 12, 6, 21
_______________________________

I find this confusing...

First, is this number of tiles worked by type? If so, how could America outperform China so much?

Second, Egypt gets less food and more production than the baseline?

If you want to post the scenario, I'll play with it a bit.
__________________
The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.

Duas uncias in puncta mortalis est.
Theseus is offline  
Old September 28, 2002, 16:22   #20
Killerdaffy
Warlord
 
Killerdaffy's Avatar
 
Local Time: 09:36
Local Date: November 1, 2010
Join Date: Nov 2001
Location: in other words a gang leader aspiring to Presidency
Posts: 145
Theseus,

that was my first test and I don't know if the setup was that good (I changed some things later). Give it a try, I'm currently installing WinXP and will be offline for a while. I hope to be back later, so the Great $atan allows...
Attached Files:
File Type: zip test.zip (25.1 KB, 1 views)
Killerdaffy is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 04:36.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team