A Better AI.

In "My Games/Warlords/" you will find a the ini config file:

-Iustus


Thanks. I changed it this morning.

I didn't have a chance to look at my save files last night (came down with an annoying bug, spent last night lying on my couch watching MI-5 on DVD), but will check.

Another thing also occurred to me: that game I referenced earlier where I won a diplomatic victory at the 59th minute of the 11th hour before Asoka won a cultural victory....well, I think Asoka actually VOTED for me because we were such good friends. As a suggestion for future development, perhaps the AI needs to take into account whether or not it's on the verge of winning before casting a 'diplomatic victory' vote for someone else. (I could not confirm that Asoka actually voted for me, because I wasn't saving as religiously as I should have....)
 
I'm also getting the Out Of Sync error playing multiplayer with the Jan 01, 07 mod. :(

Two of us started a coop game. We played
for about 50 turns without any problems. We had the third person try to join and we received an OOS error.

Then we started playing a saved three human, 6 AI game that went about 5 turns before we received an OOS error.
We took the "better AI Jan 01, 07" mod off and didn't have any problems after that (about 200 turns).

Condorski
 
I've got a brand new computer and occasionally it's paused for 20 sec or so. I could easily see how someone with an older computer might have to wait for a minute or two. Not saying you have an old computer, Uncle Joe, but maybe this is a consideration?

Well, my computer IS geting a little long in the tooth. ;) Its a P4 3.0 with 1GB of RAM and a 256MB card. Its certainly not anything approaching top of the line anymore...

Once the new optimized build is out I expect these issues to disappear.
 
I just had a very odd problem, one that has been reported a few times before. I was invading Augustus, and had one of his main cities (the one that founded Judaism) under seige. For some reason, all the defenders left except for one chariot enabling me to take the city with no losses or bombardment. I don't get it? Sure it didn't make much sense for the AI to just sit in the town, while I bombarded and then took it, but this makes much less sense. I've emailed a save of the game to betterai@gmail.com.
 
So I settle in to play my first 1/1 build game of Better AI last night...random map seems to be a lot of small islands.. random leader got my Kublai Khan. I think I started on a near-Greenland-like small continent that is half ice with room for 1 good and 2 decent city sites - but those last 2 are about 1/3 tundra with enough food/other to be useful.

So I send out the fishing boats and galley and find numerous small islands, several large enough for 2-3 ok to decent city sites, and still have yet to meet an AI! :lol: So I can't report on any of the functionality yet. And the one barb city I found and subjugated in one turn with my axemen. So now I've explored all the coast-bridges available, and have room for 9-10 decent or better city sites... before I get to meet the other AIs at all once I get Astronomy.

The other pain is that I have yet to find horses. :( But by the time I meet the other AIs, my UU will be obsolete. :( They seem to be doing a flurry of early wonder building, just a few turns BC.

I'll probably play it through until I find the other AIs, just to see how things seem to have developed, and to see just how far behind I am. :(
 
I just had a very odd problem, one that has been reported a few times before. I was invading Augustus, and had one of his main cities (the one that founded Judaism) under seige. For some reason, all the defenders left except for one chariot enabling me to take the city with no losses or bombardment. I don't get it? Sure it didn't make much sense for the AI to just sit in the town, while I bombarded and then took it, but this makes much less sense. I've emailed a save of the game to betterai@gmail.com.

What do you all think about a set of attacking scenarios and corresponding ruleset how to repel them as a kind of a ruleset of defense? What I have in mind is to think about how to recognize such strategies and implement them as an algorithm from the AI's point of view, so blake has "only" to code it down or improve existing ones...
 
I've been playing the 1-1 build Terra/Epic/Monarch. I was playing Fractal with unhappy (for me) results, so switched over to Terra, which I don't play very often, just as a change of pace.

I am surprised by how close the civs have been starting in each game. Don't know if it's luck or what, but everybody drops by to meet me before my warrior can do a 360 of my capital. I guess this is just the Terra map, but I'm not used to it.

I have been getting killed! At Monarch, the human starts at the bottom of the power chart, so is an attraction to all the aggressive types. What I've been finding is that about the time I get a third city started, I have Shaka or somebody declaring war on me. It's all I can do to hold them off, making no other progress. They haven't been interested in peace, so the war never ends.

I've tried to get more power going early to avoid this problem. Some success there, but then the financials drag the research. To counter that, I've tried being aggressive, but with the nice mix of defenders that the AI has, it is really hard to crack those cities. I've quit a number of games after my dagger fizzled. It is super difficult (for me anyway) to overcome an AI with a dagger attack unless they don't have metals.

So I guess this is all good. But it means back to Prince for me...
 
I am surprised by how close the civs have been starting in each game. Don't know if it's luck or what, but everybody drops by to meet me before my warrior can do a 360 of my capital. I guess this is just the Terra map, but I'm not used to it.

Terra maps are supposed to be slightly larger to account for the (uninhabited) New World, but even so, starts seem to be closer than for Fractal or Pangaea or the others.

I think the start code as pretty close to being what I've been hoping for--players start moderately close to each other, but it's much rarer for players to start very close/too far north/on narrow peninsulas, etc.
 
Been testing the 1/1 build but the sally bug (abandon city under siege) prevents any real playing.

Overall the AIs seem stronger. Great work, think I might have to go down a difficulty level.

But:
10 (as an example, I've seen at least 8) City Garrison longbows in a city is pointless. Why? Collateral damage.

If you have 10 CG defenders, the first one will be hard to defeat, the 2nd one slightly less so, the 3rd one will be reduced in strength and from 4 and on they are walkovers. This assuming you're attacking with collateral damage units.

3 or 4 CG units max per city, plus 3 or 4 DRILL units to withstand collateral, and the rest counter-attack units is much much better than the 10 CG defenders that all the AIs make at the moment.
 
Finished my 1st 1/1 game and as a Noble player I have to agree that things are heading in the right direction. As a builder I definitely enjoyed this game more than recent builds. (Not that the result matters ;) , but with about 80 turns remaining I got to the lead in the score chart, but was overtaken by Roosevelt WITH TWO TURNS REMAINING! Doh!)

I think the type of map I drew played a major factor in the game:I played my usual random Noble map with an extra Civ and raging Barbs, and drew the Zulu (OK) but got the map full of small islands. Grrr :( I know, you say the AI doesn’t handle this map type very well, anyway:

New Good Things.
-The AI Wonder building is a lot better; in fact I think it is exactly as it should be in the early game. (See below for late game).
-The border cities are garrisoned much better now. (If anything perhaps they may be even too well guarded. Well that’s what 10-12 longbowmen seem to me as a casual Noble player but what do I know?)

Few negative things I experienced that others have already reported.
-Definite turn slowdown (I wonder could this also be responsible for the increase in OOS errors in multiplayer that some are reporting?)
-Interior cities (including Capital) relatively poorly defended.
-Although I struggled to compete for wonders in the early game, in the late game I didn’t seem to have any difficulty. Perhaps this is due as others have reported that the AI seems to put less emphasis on hammers. I don’t know. I do think though that it seems to favour putting Windmills on hills more than I would… but again I’m a casual Noble player. :crazyeye:

Some things I haven’t read others report which may have been just a fluke in my game.
-I noticed an unusually large number of ships in cities, (the only AI with whom I shared a land border,-Ragnar, in one city had 3 Caravels and 13 Galleons, and slightly less in another city. I discovered much later in the game, that he still had almost the same amount of ships, but simply upgraded them)
-During the whole game only two religions were adopted, 6 of us were Buddhists, while the other two were Christians. A bit odd in my experience.
-I had requests from 4 diff A.I Civs to join them in defensive pacts, yet I was never that powerful.

Something which may need to be tweaked in future builds.
The reluctance of the AI to go to war if it does not share a land border.
As I mentioned, in this map of islands I only shared a border with Ragnar. He was the only one who declared war on me. Yet through the whole game I was never better than 5th or 6th in the Power graph and I severely annoyed both Huayna and Mao. For the 2nd half of the game Mao was continually annoyed with me (around -8) and Huayna was continually Furious (around –11). I continued to refuse their demands, yet they never declared war on me. I am sure they would have in 2.08. Now is it better that they don’t attack because some argue that the AI can’t launch a proper invasion from sea ? It’s certainly not as much fun. :)

Still, I reckon if I avoid that map type, this build is almost there.
 
-The border cities are garrisoned much better now. (If anything perhaps they may be even too well guarded. Well that’s what 10-12 longbowmen seem to me as a casual Noble player but what do I know?)

Definately concur. And as pointed out above, having those 10-12 defensive units really doesnt provide as much security as it appears. I've also seen 'tundra cities' garrisoned by 18 units when there was NOTHING there (see below) The garrison cost probably was higher then whatever the city might have been making.

-Although I struggled to compete for wonders in the early game, in the late game I didn’t seem to have any difficulty.

Yep, exact same observation. I struggled to get any early wonders, but by the Industrial Age, I was able to get anything I wanted quite easily.

The reluctance of the AI to go to war if it does not share a land border.

Definately agree here too. I realize that the AIs were getting into ridiculous long distance wars before, but I think it might have been turned too far the other way now. This is especially true later in the game when its quite possible to make successful overseas invasions. A few builds back the AI was taking to do those invasions with a vengeance. It would be nice if it would DoW people on occasion and use that capability again.

A side effect of this is that its harder to get 'allies' in a war later in the game. Previously you could bribe AIs to attack an enemy with you and they would often provide sea harassment and occasional invasions. Now I usually get a 'we would have nothing to gain' response unless they share a border. This prevents the ability to bribe the AI (which indeed WOULD provide something to gain!). IMO, relax the restrictions overseas wars a bit more.
 

Attachments

  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    158.4 KB · Views: 113
Blake is there anyway you can post the updated version as you fix them?


If he kept posting updated versions as he fixed particular problems, it would be very difficult to track new problems.

The reason being - a lot of posters state the problem they think they have, but not the version number.

Also, if there are to many versions being played - and reported on - it is confusing to understand if a problem has been solved or not.

Sorry for the bad English - but I guess you get the point of my comments. :)
 
Just curious if anyone else has had the OOS Errors while using this AI in multiplayer. I am turning all my logs on next game and going to see if i can isolate the problem.

I suspect this is a case of a random not being called in both places. Or perhaps being called incorrectly sync or async.

I will post my findings after this weekend when i get a chance to play a few more games.

Is there a zip anywhere containing all the sourcecode for this mod i could look at to try to help find the issues. I am not real familiar with sourceforge and was having trouble finding just a packaged version of the source code.

If you go to the documentation off the Better AI page on sourceforge (or search this thread for a post of mine a while back), you can find directions on how to download BetterAI sources. This is a direct link

-Iustus
 
I'm often confused about the numbers and information shown when hovering over units, tiles, names, etc, with some combinations of CTRL, ALT and SHIFT held. Though there have been some explanations of some things at various posts in the thread, I was just wondering if there is a comprehensve list and explanation of what everything means, somewhere? It would be handy, as there is a lot of useful and interesting information there that I can't decipher.

I do not believe there is a comprehensive list anywhere. I have posted some screenshots, with a little bit of description, earlier in this thread.

If someone wants to tackle trying to document this, I would be happy to help, answer questions and so on (although you can figure it out pretty easy yourself if you are willing to read the C++ sourcecode).

Part of the problem of doing comprehensive documentation is that this, more than just about anything, is a moving target. Blake and I freely add or modify previous changes we have made, in order to better help ourselves. The primary audience of these features is Blake and me, giving us realtime information to help the development effort. The wartime decision display code has gone through at least three iterations alone.

Blake and I are not the only contributers to this either. All of the original chipotle stuff was done by the original Civ4 developers, and we have left all of that more or less intact, just adding more information, rather than removing any. In some cases, there is some unintentional duplication.

If you want to post some specific screenshots here, I would be happy to answer questions about them, whether as part of a documentation effort, or just to help you out individually. Post a screenshot, with some questions, and I will be happy to explain as well as I can what the various numbers mean.

-Iustus
 
Blake if i want to play Earth24civs map or other scenarios with your mod i should delete old Civgamecore.dll and install the new one which comes with your mod or it is absolutely impossible to play that scenarios with Better AI.(I use better AI as a mod)
I have also installed a lot of mods in the game like FfH2,Rhye's RFC, could the Better AI be incompatible with such mods?
Last question can you tell me if your mod improve a lot AI also in the mods aforementioned or the Better AI is good just for Warlords and Civ4 vanilla?
 
Sorry three quick questions

1) does betterai work with smart maps ( I think both are excellent additions to the game!)
2) If you replace the CvGameCoreDLL.dll in the warlords folder so you have the better AI running all the time will the score still show better AI at the top because mines not there anyother way to know if its running? :(
3) if i select smartmaps in custom game does it override the betterai?

thanks to any answer anyone can provide to thesE?
 
Blake if i want to play Earth24civs map or other scenarios with your mod i should delete old Civgamecore.dll and install the new one which comes with your mod or it is absolutely impossible to play that scenarios with Better AI.(I use better AI as a mod)
I have also installed a lot of mods in the game like FfH2,Rhye's RFC, could the Better AI be incompatible with such mods?

You can only have one Civgamecore.dll in use at a time. If the mod you wish to use with BetterAI does not have a custom Civgamecore.dll, then you can use both together.

If it does use a custom Civgamecore.dll, then you need to ask that mod maker to make a version of their Civgamecore.dll which includes the BetterAI changes. I have posted here and on SourceForge under documentation instructions on merging the BetterAI code with other dll code. These instructions should help that mod developer to make a version that includes BetterAI.

Last question can you tell me if your mod improve a lot AI also in the mods aforementioned or the Better AI is good just for Warlords and Civ4 vanilla?

We have tried to make our changes generic, so they will work in all mods. There are a few very specific cases where this was not possible, but that is the exception. For the most part, everything should work fine for other mods. I would expect BetterAI to do better even with the stranger rulesets out there.

That said, it has less testing with different ruleset mods, so just like the regular game, it may have problems with some unusual rules changes. Overall, I think it is going to be better than the default game even with strange rulesets, but it is entirely possible that it would start doing something really stupid under some strange ruleset that the default AI does not do. I do not know of any specific cases of this happening. If anyone found such a case, I would be happy to look into fixing it.

Sorry three quick questions
1) does betterai work with smart maps ( I think both are excellent additions to the game!)

Smartmaps does not have a Civgamecore.dll (it is just a map scrpt), so they are compatible. I have not looked into the custom start point stuff in Smartmaps to see if there are any weird conflicts there, its possible, but not highly likely. I do seem to recall that SmartMaps does some unconventional things as far as map scripts go.

2) If you replace the CvGameCoreDLL.dll in the warlords folder so you have the better AI running all the time will the score still show better AI at the top because mines not there anyother way to know if its running? :(

I would strongly recommend against replacing any files in your main warlords folder in program files. Put CvGameCoreDLL.dll in MyGames/Warlords/CustomAssets as described in this post. Hopefully soon Blake will get those instructions up in the first post of this thread (hint hint!).

If you install inside CustomAssets, then it will be used all the time, including in every mod when possible. This has the same effect as replacing the main file, without the side effects of blocking future firaxis patches. If a mod has its own CvGameCoreDLL.dll, then it will override BetterAI, and BetterAI will not be active for that one mod.

3) if i select smartmaps in custom game does it override the betterai?

No. Selecting a map script from custom game has no effect on any mods. If you made a special mod, that was called smart maps, and selected that from advanced, load a mod, and that smart maps mod had its own CvGameCoreDLL.dll, only then would you override BetterAI.

Go back to this post to check to see if your installation is correct. It describes, with pictures, how to tell if BetterAI is running (you have to hold down the alt key)

Hope that helps

-Iustus
 
Playing my second 1/1 game I was on the receiving end of (what I presume was) a dagger attack by Alex. It was 600BC and he came with half a dozen archers. I had no metals either, but I was playing Inca!

Although his attack itself was a dismal failure, it did have the side effect of distracting me to allow Peter to plop down some cities on ground I'd have otherwise claimed.

In the late renaissance, I bribed Peter to attack Alex. By this stage, Peter had a big garrison in Rostov to stop it flipping (I was going for a culture win). This weakened him to the extent that he lost Moscow to the Greek. Is there any way of making the AI let go of a city in such circumstances?

Keep up the good work!
 
Iustus when i play i don't see Better AI on the grid of civilization list.Anyway as soon as the mod is loaded i see Blake better AI and its build on the top of the opening screen of Warlords (the general which handles the sword).Is the mod installed well also for me or it is necessary that better AI appears during the game on civ list as a proof that the mod is installed without any error?
 
Iustus when i play i don't see Better AI on the grid of civilization list.Anyway as soon as the mod is loaded i see Blake better AI and its build on the top of the opening screen of Warlords (the general which handles the sword).Is the mod installed well also for me or it is necessary that better AI appears during the game on civ list as a proof that the mod is installed without any error?

If you do not see "=== Better AI ===" at the top when you hold down the alt key over your player name, as shown in this picture, then you do not have it installed correctly.
betterai.jpg


Please look again at this post. If your CvGameCoreDLL.dll is not not in one of the two places pictured, then you have it in the wrong place.

Based on what you said, I am guessing that you have it burried too deep in your mod folder. Look at the second picture, it has to be exactly there for it to work. It also has to be in a folder called "assets" not "custom assets" if it is a mod. (On the other hand, if you want it to work all the time, which is what I personally recommend, then you want it in the regular custom assets folder, as shown in the first picture in that link).

Look very carefully and compare with how you have it installed.

-Iustus
 
Back
Top Bottom