Reply
 
Thread Tools
Old January 11, 2004, 11:31   #1
ducki
C3C IDG: Apolyton TeamPtWDG2 Cake or Death?Apolyton University
King
 
ducki's Avatar
 
Local Time: 09:59
Local Date: November 2, 2010
Join Date: Sep 2002
Location: Our house. In the middle of our street.
Posts: 1,495
AI Stupidity - not quite a bug, but really weak
We all know about part of this one.
The AI should never irrigate Bonus Grassland under Despotism. They lose worker turns AND production. Soren fixed this in PtW, and it's mentioned in the bug thread, IIRC, so maybe this will get refixed.

The other part - well, parts, really, just astound me.
1) A sole citizen working a 1-food tile. Unless he's in serious hock on a gpt deal to another AI, this is double-plus-ungood. Even then, surely he could find a single gpt somewhere else, no? Switching to one of the roaded, riverside tiles will pick up two of those gold, and had the BG tiles been mined, he would gain 1 food and maintain shields.
2) Growth to size 2 in 5 turns paired with a settler build complete in 5 turns. This one I've seen in several other games, where the AI is going to finish a settler and have to wait for +10 food to build up for pop-growth. No wonder he's growing so slowly.

(I would have put this in the bugs thread, but it's not really a bug, per se, just funky AI behavior.)
Attached Thumbnails:
Click image for larger version

Name:	stupidai.jpg
Views:	148
Size:	83.7 KB
ID:	61513  
__________________
"Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos
ducki is offline   Reply With Quote
Old January 11, 2004, 12:01   #2
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: 11:59
Local Date: November 2, 2010
Join Date: Mar 1998
Posts: 5,360
The reason behind the above behavior is that the AI usually wants to maximize shield/commerce output and keep at least a +2 food surplus. That's what it's doing in the example above.

Given the AI happiness problems, growth at just +2 food is not a bad idea, although in this case (producing a Settler), it sure seems silly!
alexman is offline   Reply With Quote
Old January 12, 2004, 11:30   #3
ducki
C3C IDG: Apolyton TeamPtWDG2 Cake or Death?Apolyton University
King
 
ducki's Avatar
 
Local Time: 09:59
Local Date: November 2, 2010
Join Date: Sep 2002
Location: Our house. In the middle of our street.
Posts: 1,495
I agree that +2 food is normally more than the AI can handle, happiness-wise, but he's wasting 10 turns here. Also, working a mined BG instead of forested silks, he could grow in 7 instead of 10 since he's Ag. But that's getting rather obscure. The main point is, he'll be doing nothing but collecting food and wasting shields for at least 10 turns after he grows in 5. If he was working on anything besides a settler, I wouldn't even have posted this.

And he cuould get the same shields and one less commerce if Soren's mining vs. irrigating fix from PtW was pt back in. It seems minor, but when the player can crank out a settler every 4 turns(on this map), an AI wasting 10 turns(and while trying to build the pyramids in another of his cities) is a serious setback for him.
__________________
"Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos
ducki is offline   Reply With Quote
Old January 12, 2004, 11:40   #4
Dominae
BtS Tri-LeaguePtWDG Gathering StormC4DG Gathering StormApolytoners Hall of Fame
Emperor
 
Dominae's Avatar
 
Local Time: 11:59
Local Date: November 2, 2010
Join Date: Jan 2002
Posts: 7,017
The algorithm that selects the Laborer assignments for a city and the algorithm that select the build items do not communicate. Us humans have the advantage of tailoring our tile output to fit our strategy (production, research, or otherwise), while the AI simply plays out what's best in the average case every time.


Dominae
__________________
And her eyes have all the seeming of a demon's that is dreaming...
Dominae is offline   Reply With Quote
Old January 12, 2004, 12:45   #5
Mad Bomber
King
 
Mad Bomber's Avatar
 
Local Time: 11:59
Local Date: November 2, 2010
Join Date: Nov 2002
Location: Columbus, Ohio
Posts: 1,119
Quote:
Originally posted by Dominae
The algorithm that selects the Laborer assignments for a city and the algorithm that select the build items do not communicate. Us humans have the advantage of tailoring our tile output to fit our strategy (production, research, or otherwise), while the AI simply plays out what's best in the average case every time.


Dominae
But the algorithm for build tasks should check to see that food would be available before building settlers and workers. Look at this, the AI will lose at least 5 turns of production to produce the settler simply waiting for the city to grow to size 3.
__________________
* A true libertarian is an anarchist in denial.
* If brute force isn't working you are not using enough.
* The difference between Genius and stupidity is that Genius has a limit.
* There are Lies, Damned Lies, and The Republican Party.
Mad Bomber is offline   Reply With Quote
Old January 12, 2004, 14:20   #6
steven8r
Prince
 
steven8r's Avatar
 
Local Time: 09:59
Local Date: November 2, 2010
Join Date: May 2002
Location: of Central Texas
Posts: 561
Perhaps Montezuma should read the, "Ducki Does C3C at Emperor" thread on Apolyton. He could then learn all about 'pumps' and be able to give those pesky Japanese to his NothWest a real hurtin'.

As it is (even w/o the Oracle), I forsee a probability of Samurai in Tenochtitlan and Teotihuacan in the next age.

Steven
__________________
"...Every Right implies a certain Responsibility; Every Opportunity, an Obligation; Every Possession, a Duty." --J.D. Rockerfeller, Jr.

Last edited by steven8r; January 12, 2004 at 14:26.
steven8r is offline   Reply With Quote
Old January 12, 2004, 14:36   #7
ducki
C3C IDG: Apolyton TeamPtWDG2 Cake or Death?Apolyton University
King
 
ducki's Avatar
 
Local Time: 09:59
Local Date: November 2, 2010
Join Date: Sep 2002
Location: Our house. In the middle of our street.
Posts: 1,495
Quote:
simply waiting for the city to grow to size 3.
MB - Actually, he's going to lose 10 turns if I've calculated correctly. The town is currently size 1 and the settler will finish shield-wise the same turn the town hits size 2. He's running +2fpt, and let's assume he'll keep it at +2fpt once he hits size 2 in 5 turns - which leaves him 10 turns away from size 3 when the settler can finally complete.

Doing some quick mental math, it seems like the AI is trading 40 gold for 40 shields with the "maximize commerce and production" orders - he gets 40 extra gold from start to finish and wastes 40 shields(not to mention precious time). Is my math correct?
If so, is 40 gold worth 40 shields?


Edit: An AI that can 4-turn pump? Eek! Scary! I'd be happy if they mined Bonus Grassland under despotism and didn't spin their wheels on settlers when short on pop units like this. No wonder I'm covering him like kudzu, and yes, he's going to learn not to like the Samurai as soon as Chivalry comes online. Until them, I'll let him live and perhaps build me a wonder and some roads.
__________________
"Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos
ducki is offline   Reply With Quote
Old January 14, 2004, 10:31   #8
dexters
Apolyton Storywriters' Guild
King
 
dexters's Avatar
 
Local Time: 15:59
Local Date: November 2, 2010
Join Date: Nov 2001
Location: Vancouver, Canada
Posts: 1,141
Interesting discussion.

I think a limitaiton here though is that if these algorithms must communicate, they must do so for every AI city every turn. Performance could take a hit.

A solution might be a staggered system where only say 10% of the cities do this and it rolls through the list, effectively giving AI cities a 'review' of its food/shield allocation every few turns.

Alternatively, I was thinking a new set of strategies should be programmed into the AI so that the AI can shoot for a shield city, or a food city and stick with it, based on some calculation of the terrain features when a city is first plopped down. But im not sure how feasable this is.
dexters is offline   Reply With Quote
Old January 14, 2004, 11:18   #9
ducki
C3C IDG: Apolyton TeamPtWDG2 Cake or Death?Apolyton University
King
 
ducki's Avatar
 
Local Time: 09:59
Local Date: November 2, 2010
Join Date: Sep 2002
Location: Our house. In the middle of our street.
Posts: 1,495
I don't think there would be that much of a CPU hit if the build queue algorithm did something like
if(city_size < 2 && build_queue = 'Settler') {
ChangeBuildQueueFromSettler();
}

I'm not looking for complex decisionmaking that would enable a settler pump. I'm looking for the AI to say "am I wasting shields/turns? how many?" and if it's above a given threshold, change the queue.

There doesn't need to be two-way communication.
Let the governor continue to assign tiles like he does, just make him check the estimated build time against the estimated time-to-growth-to-build-pop-cost +1.

No MM, no tile-assignment mods.
Just minimize wasted turns and wasted shields beyond a given threshold. Even I will waste a turn or two on occasion, but never more than 2.

At a time when growth is so important, 10 (wasted) turns is an eternity even without a human using a pump.
__________________
"Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos
ducki is offline   Reply With Quote
Reply

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 11:59.


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