A Better AI.

I've tried to use the better AI in my internet games with one of my friends. We both have the better AI file in the correct folder. The game goes out of sync every turn. I've read through the thread and do not see any one mentioning it. Anything that I can try to do for this to work?

(The games are with 2 humans and 6 AIs)
 
I've tried to use the better AI in my internet games with one of my friends. We both have the better AI file in the correct folder. The game goes out of sync every turn. I've read through the thread and do not see any one mentioning it. Anything that I can try to do for this to work?

(The games are with 2 humans and 6 AIs)

I will look into this. How did you have the teams set up? Simultaneous turns? Turn timer? What map? Settings?

-Iustus
 
New build, 12/8 on sourceforge

the notes:
- automated build governor for human player cities totally reworked to be useful. It will never build units unless there is no other choice, including processes. (It will prefer building gold/research/culture to building a unit). It whips buildings when appropriate.
- Drama tech should be higher priority for cultural victory AIs
- stack attack setting should work for human player
- AI stacks should now correctly completely attack, no matter the user settings on stack attack
- rare religions will spread better under cultural victory
- AI research choices changed, including wonders that are already built are not counted in value of a tech, scaling with game speed better, better at picking cheap techs, and more
- big changes to working plots: plots that are valued on their overall usefullness
- AI will turn off science when in the late stages of cultural victory
- AI will grow its cities properly when under cultural victory
- city governor no longer takes into account any multipliers (production/commerce), some other changes, significant change
- starting points changed to fix problems with city founding, including mad seafood starts, starts too close together, and more
- bug in 2.08 pop rush code where a building does not finish the next turn, but requires 2 more turns
- BetterAI tag now has the build date in it
- chipotle war info now displays even if you have not met a civ (ctrl-z case)

This build does not have any of the sea battle stuff, hopefully that can make it into the next build.

-Iustus
 
Thank you - the changes look great.
 
I was wondering why Alexander asked me to join his war three times. I hadn't encountered such persistent AI nagging during one war before and wondered if it was related to the AI modifications by the BetterAI team. It did cause some negative modifiers from the Alexander AI since I refused two out of three requests. I actually think the AI should value the one time that I fought alongside him higher than the two times that I refused to join the war. But it is actually slowly forgetting about the joined war while it is remembering the refusals. I know that there are some modifiers that remain and some that slowly dissapear. If the AI asks you to join in its wars so frequently, then I think it shouldn't forget about both the joined wars and the war refusals or forget about both situations. Now it only remembers the bad and forgets about the good. With the many war requests this leads to bad relations. You can't join so many wars.

The AI can only ask you to help it in its war once every x turns. Since wars in the early game tend to go on longer ( fewer units, AI rarely has enough troops to stampede their opponenet, peace deals are difficult to barter pre-currency except with cities, which the losing AI will almost never give up), that counter resets more often than you might expect (now with BetterAI's cull of the automatic 50 turn AI-AI war length limit or whatever it was) and you get more requests. However, the AI does forget refusal to help it in war fairly quickly, whereas if the "Common Military Engagement" goes above 2, it tends to come down very slowly in my experience.
 
I have sent a report from my game until 430 BC in post 681. Now, I've played a bit further. I'm still doing ok.


Here's the save from 215AD:

The last save that I sent you was from 215 AD. I've played a bit further with the 2-12-2006 build and I would like to give you some more savegames until 410AD. My economy has been improving and the relations with some of the AI-nations have improved.

http://forums.civfanatics.com/uploads/31106/Roland_AD-0275.CivWarlordsSave

http://forums.civfanatics.com/uploads/31106/Roland_AD-0365.CivWarlordsSave

http://forums.civfanatics.com/uploads/31106/Roland_AD-0410.CivWarlordsSave

I'm going to install the new 8-12-2006 build now and continue playing with that version.

You might want to take a look at the northern Russian city in the last savegame. It's located very far from the homeland and it won't expand fast because in order to use the food resources, if will need one border expansion. But to get that border expansion, it will need to produce a cultural building and that is almost impossible due to the best tile available for use is a coastal tile without the lighthouse food bonus. The cheapest cultural building available is a library. It will take ages to build that. If I were controlling that city, I would have shipped a missionary there a long time ago in order to get a low culture production to get a border expansion. But I don't think the AI will do that (maybe the galley has one, that would be great, allthough a bit late, the city has been there for a while). And if it will, it will take a long time to get the missionary there. Untill that time the city is costing far more than it can possibly bring in revenue. The city is also virtually undefendable. In a war, it will be mine even though the Russian empire has a far bigger military than mine. Here are also two screenshots of the situation:

Russian outpost 1.JPG
Russian outpost 2.JPG

I also wonder why Huayna Capac of the Incans is still barely expanding. He has build a large army for such a small nation. But in my opinion he could use some more cities to support that army and to expand it further. Maybe a dagger strategy is preventing him from expanding. I guess, I'll be his target again. He might have a decent chance since I can't financially support such a large army (at emperor level the upkeep costs are very high compared to the AI). He might even upgrade his army before attacking. In that case, he might crush me. But still, all of that would also be possible while expanding a bit more.

That's it. I'm going to install the new version and play on.

Good work! :goodjob:
 

Attachments

  • Russian outpost 1.JPG
    Russian outpost 1.JPG
    133.3 KB · Views: 117
  • Russian outpost 2.JPG
    Russian outpost 2.JPG
    89.5 KB · Views: 111
The AI can only ask you to help it in its war once every x turns. Since wars in the early game tend to go on longer ( fewer units, AI rarely has enough troops to stampede their opponenet, peace deals are difficult to barter pre-currency except with cities, which the losing AI will almost never give up), that counter resets more often than you might expect (now with BetterAI's cull of the automatic 50 turn AI-AI war length limit or whatever it was) and you get more requests. However, the AI does forget refusal to help it in war fairly quickly, whereas if the "Common Military Engagement" goes above 2, it tends to come down very slowly in my experience.

Okay, I hope it starts forgetting soon as the penalty has been there (at -2) for over 1000 years now. It's probably a random thing and I'm having a bit of bad luck with the random number generator. Maybe it will forget soon. The common military engagement went up to 2 and when down to 1 when I signed a peace treaty. I guess a peace treaty means an automatic drop of 1. I think all of these values can be found in the xml-files. I've browsed through them a while ago, but have forgotten which modifiers were permanent and which weren't.


To the Better AI team:

A different issue: It would be nice if the AI could use the airforce in a competitive way. I will typically move my city attack stack close to a city while moving my fighter/bomber fleet in a city within range of that city. Then I'll bomb the city into submission and attack with the land army in the same turn. This results in almost no casualties on my part. Because the large fighter/bomber fleet attacks in one turn, it will overwhelm the AI air defenses. A few fighters which were sent in first will prabably draw away the air defenses. Usually they even survive the interceptions (air interceptions are rarely lethal for some stupid reason). And then the bombers can do their job, bombing the city defense bonus and then doing collateral damage to the defenders. The land army attacks in the same turn and finishes the job usually without any casualties. To do this, you need a rather large airforce (say 8 fighters, 20 bombers).

I usually see the AI use its bombers in random bombing missions which seem to have no goal other than destroying some tile improvements in range. Occassionaly the attacking AI bombers will die when intercepted. While the destroying of my tile improvements is a nuissance, I would be much more worried if the AI could assemble an airforce to help support a city attack stack in the way I do myself.

Is this a feasible AI improvement?
 
Does the latest build, apart from tweaking the starting spots, mess also with how often tribal villages get spawned? I started two games and the number of villages I got near the capital was noticiably above average..
Maybe I was just lucky or it was a wrong impression.. but still worth to ask.

EDIT
Just got a very weird starting position with the latest build.. here's a screen:

my.php


As you can see.. the settler was placed over a cow with not other servicable resource in the fat cross. Now.. this is probably the worst starting point I ever got in Civ4... but the very weird thing is that the settler was placed over the cow instead of near it... the Ai would have founded its capital there.. and it would have sucked. This never happened to me before.. so probably the starting point code still needs some love..

EDITD2:
Just restarted.. and this is my starting point:

my.php


Again... very weird.. the settler was placed over the sheeps and this is no sense as there are no other resources in the fat cross apart from those 3 in the screen... now.. this is not a problem for me as I can move my settler in one of the hills below and get a good starting point... the Ai, on the other hand, would found it's city there.. wasting the sheeps.

This is the forth time I try to start a game with the latest build... the first two times I got good starting points (actually.. the second one was really nice)... so this doesn't happen always... but there's surely some work to do!
I will now try to start a couple of more times and post screens if I get something weird again, hoping to be helpful.

Ah.. another thing... I'm keeping finding tons of tribal villages... way more than what I used to do before.. really too many!

EDIT3:
Restared another 3 times.. the first 2 were ok, but this is what I got the third time:

my.php


I was getting this even before.. but if I'm not wrong this is one of the things you was trying to fix, it seems to still happen!
 
New build,

- city governor no longer takes into account any multipliers (production/commerce), some other changes, significant change

-Iustus


A thought on that, the one time those Are useful is when building Settlers and Workers, I remember a game I had where I Wondered why the Governor was working a production tile while building a settler while I had it set for food (to keep it whip ready while Not building Settlers) and it was becauise of the Bureaucracy bonus that made that tile better for building settlers.

So in the case where two resources (food +hammers) are interchangable, but have different bonuses, like when building Workers or Settlers, but it would also apply to building Culture, Wealth or Research, then I think the Governor Does need to take account of the different bonuses
 
A thought on that, the one time those Are useful is when building Settlers and Workers, I remember a game I had where I Wondered why the Governor was working a production tile while building a settler while I had it set for food (to keep it whip ready while Not building Settlers) and it was becauise of the Bureaucracy bonus that made that tile better for building settlers.

So in the case where two resources (food +hammers) are interchangable, but have different bonuses, like when building Workers or Settlers, but it would also apply to building Culture, Wealth or Research, then I think the Governor Does need to take account of the different bonuses

It actually does still take them into account when food is production ;)

-Iustus
 
I've tried to use the better AI in my internet games with one of my friends. We both have the better AI file in the correct folder. The game goes out of sync every turn. I've read through the thread and do not see any one mentioning it. Anything that I can try to do for this to work?

(The games are with 2 humans and 6 AIs)

I am guessing you had something installed incorrectly.

Blake and I ran a test, using two different builds no less, and we had no sync issues.

We had the BetterAI dll in our custom assets folder using Warlords 2.08 exe.

Were you by chance using vanilla civ?

-Iustus
 
So no one else is noticing a large drop-off in the AI's productivity with the newer AIs? When I first downloaded 2.08 I was struggling to keep up with the AI in many categories (custom difficulty level, but the AI plays largely as if on Noble).

With the later builds, I'm easily 2-3x the next best AI in hammer production and sometimes more than that. Again, note that I'm not out-teching them to any great degree.

My gut feeling is that it is doing too much chopping and/or pop-rushing and that is leaving it with low production by the late Ren/early Ind periods. Either that or they are favoring too much Commerce and not enough Production in the tiles worked.

In any case, the military AI seems definatley improved, but I'm constantly outnumbering the AI's armies quite heavily and that is definately not something I was able to do in the earlier builds.

Any ideas? Did my playing skills suddenly shoot up? ;) My guess is no, unfortunately.... But the result is that games are all but won by Industrial now since the AIs production capabilities are so pathetic in comparison.
 
It still says 12-7 on sourceforge. Is that a problem? Is it 12-8 but with the name 12 -7?
 
So no one else is noticing a large drop-off in the AI's productivity with the newer AIs? When I first downloaded 2.08 I was struggling to keep up with the AI in many categories (custom difficulty level, but the AI plays largely as if on Noble).

When I play Prince and Noble games, the AI can't keep up with me in anything. I've noticed that the AI workers irrigate quite a bit more than I do. I'd prefer to see them build more cottages, but I suppose workshops and lumbermills would help, as well.

If the AI players chose better civics, I think they might be able to dislodge me, but, frequently, I find them in Hereditary Rule, Mercantilism, Theocracy, and/or Vassalage. Those are useful civics, of course, but I've found Universal Sufferage, Free Speech, Bureaucracy, Free Market, and Free Religion to be quite superior for gaining (and keeping) a tech and production lead. Maybe the AI should push more toward those civics when it feels safe (ie, a comfortable power rating). That's what I do. Obviously, I'm playing below my level, but, hey, I have fun. One of these days, I'll take a more serious stab at Monarch and Emperor. My fear is that there's too much micromanagement.
 
I played a game with 26-11 build on deity. The game does seem somewhat easier than vanilla warlord. I was able to rush build pyramid, great wall, colossus, great light house, great library and sistine chapel. Where previously I can get pyramid if I'm lucky and thats it. Did anything changed the bonus AI gets for building stuff or what?


Also, Is it possible to modify the better AI .dll to support 24 civs? I wanna play with lots civs on huge player made earth map. But some of the good maps are made for 24 civs.
 
Yeah, there is definately something screwy going on with AI Production. I reverted back to the standard 2.08 AI (same difficulty setting) and the AIs were FAR, FAR better at keeping up with (or exceeding) my production levels.

To me, its almost crippling for the AI and its night and day between 2.08 'stock' and the newest builds.

Is this intended (ie, supposedly beneficial) behavior and if so, what is the rationale for having the AIs pretty much forsake production capacity for nothing but commerce?

Thanks!
 
One mistake that the AI keeps making in my games is to found a worthless city on some isolated piece of land that I havn't bothered with. Its even further from the AI's palace than from mine, so it must be really hurting the AI financially for maintenance.

If a city isn't worth building, then dont build it.
 
Twice, I got an error while warmongering. Both times, I was playing with the latest build (Dec 8).

Test #1: I was playing vanilla Civ 4, not Warlords. This is, of course, with the correct vanilla Civ 4 "better AI" dll installed. I like how the build version is included in the mouseover info now. Very handy. Anyways, I was warmongering as Washington, moving units around, and the game suddenly crashed. I wasn't doing anything particularly interesting, either. I think one of the AIs must have built something, because I didn't. Not anything in particular, anyway. I didn't capture a city, build a wonder, or change my civics. I wish I could give a better bug report, but I don't know what to say.

Test #2: Very similar to the previous test, except this time, I was in Warlords, with the correct Warlords AI installed (Dec 8, again). Again, I was warmongering, but as Ragnar this time. I had just made a bunch of Berserkers, whipping most of them, and was moving on Paris (Napolean). Unfortunately, before they could arrive, the game crashed. Again, I didn't do anything out of the ordinary -- I didn't change my civics, complete a wonder, or capture a city.

I'll definitely add more if I can actually write a useful bug report.
 
Guys I wish to point something out regarding production and stuf.

In the last couple of builds the default governor has been made DRAMATICALLY more powerful, in other words if you don't use emphasis buttons then you'll be enjoying MUCH higher production (the default governor in 2.08 is very bad). Now previously what happened is that I wrote some code so the AI used the Emphasis buttons very well - it knew when to maximize production and maximize food. This meant that it could outgrow a human naively using the default governor (but not a player who used the governor well or manually allocated workforce optimally).

Now the default governor is a really smart guy - he is really good! This is largely in thanks to Iustus and in the latest version I removed some things which were holding the governor back from his full potential.

What I am saying, is that if you aren't in the habit of tweaking your workforce, that YOU will be enjoying increased performance under the latest build because the governor is optimizing your cities so much better, the AI is enjoying no such increase in production because it was already optimized. And I ask, might this explain what you are seeing?

I really don't understand weimingshi is seeing on Deity level, I've found on Monarch that the AI is snatching away Stonehenge at 2400BC and Pryamids sometimes by 1400BC, I had to tone this back a bit, but I don't think I toned it back too much. Now the AI is heavily tested by me on Monarch difficulty (I think Iustus tests it more on noble or prince) and thus it is more optimized for the middle difficulties, due to production multiplier freebies builds are much cheaper for the AI on deity, this does screw with it's logic, like it can't effectively whip thing because all early units will cost 1 pop because they cost such little hammers. I'm not sure though how this would lead to the AI not building wonders, unless it's a Duel and the AI is daggering.
 
Uncle Joe said:
Is this intended (ie, supposedly beneficial) behavior and if so, what is the rationale for having the AIs pretty much forsake production capacity for nothing but commerce?
It's probably a side effect of something else being changed.

That's the problem with playing with AI: Screw around with one thing and it changes other things.

edit: oh ok. So basically this is rebalancing the boost that the AI got in the 2.08 AI update (where people were experiencing the big boost the AI got).
 
Back
Top Bottom