A Better AI.

Blake said:
New version (07), get it on the Source Forge page.

Changes:



This can be summarized as some needed fixes to workers especially for industrial+, some tentative improvements to the tactical side of things and a decent upgrade to the religious aspects. If my changes work as intended you'll also feel a gut-wrenching fear as "Homer" gets popped, however the the target will usually be another AI since AI's tend to found cities more offensively.

The AI should also be more able to hold it's own in border struggles over resources in the early game.

By the way, on the topic of Tech Trading. Try a no tech trading game and you'll see the AI does indeed just tech that fast. "Exclusive" tech trading is not and has never been a crutch the AI uses for faster teching. If you are playing on a "fair" difficulty you should except to be middle of the pack in research much of the time, unless you have a serious edge in research due to terrain and/or wonders.

Excellent work...is the source code going to be released for this version?

We are looking to put this in ViSa soon, but not sure WHEN since you are in the middle of this project :)
 
I think Roland is right and the discussion about difficulty level should be closed. I have said my words and will abstain from discussion (in this thread).

I don't have much experiece with flaws or bugs in the new patch, but what I would like to see is the AI being able to pursue other victory types. It might appropiate to debate in which way this would be able to implement (for modders like Blake). Anyone got ideas?

Wouldn't it be possible for example that the AI will recognize he has very good relations with the world (lots of positive modifiers, can be 'read') and he is near the mass media timeline, it should beeline to the UN and try to win diplomaticly?

Wouldn't it be possible and viable that if a AI manage to capture a certain part of the world, with or without vazals, it gets trickered to pursue a domination/conquest victory, taking into account powergraphs.

My best game would be seeing AI's pursueing different kind of victory's, that would be fantastic.
 
Veritass said:
2. If there was more balance, then at the end of the game there might be one AI that is working toward a cultural victory, one that is racing for the space ship, and another that building up an army. Which one will you try to take out?

This is what I would like indeed. To answer the question, I would bribe the army AI to attack the Space AI and would attack the Cultural AI myself :lol:
 
Hey Blake, a little question, I played yerterday a fast game with your last patch, and to buillone of my cities I got a blue circle beside a resourse(cow) that I already had within my empire, but the problem was that in that blue circle I would grab only the cow,but if I moved to the cow I would get a stone that I didnt have within my empire yet, so I did settle in the cow to grap the stone..But my question is, after your last update the AI wont settle on a resource at all? Or this was just a exception(specially because to grab the stone I would grab a desert as well and leave a oasis in the other side)?
 
voek said:
I think Roland is right and the discussion about difficulty level should be closed. I have said my words and will abstain from discussion (in this thread).

I don't have much experiece with flaws or bugs in the new patch, but what I would like to see is the AI being able to pursue other victory types. It might appropiate to debate in which way this would be able to implement (for modders like Blake). Anyone got ideas?

Wouldn't it be possible for example that the AI will recognize he has very good relations with the world (lots of positive modifiers, can be 'read') and he is near the mass media timeline, it should beeline to the UN and try to win diplomaticly?

Wouldn't it be possible and viable that if a AI manage to capture a certain part of the world, with or without vazals, it gets trickered to pursue a domination/conquest victory, taking into account powergraphs.

My best game would be seeing AI's pursueing different kind of victory's, that would be fantastic.

Personally the Mastery Victory by Sevo solves all the different kind of victory debates/questions :)
 
Here's a thing!

I was playing as Washington on Earth, Noble Epic, got the Great Wall, so expanded without putting more than token units in my cities (I'd already destroyed Montezuma and Huayna was landlocked on south america).

Ragnar turns up with a trireme, 980AD, offers to trade maps, which we do, in about 1100AD he reappears with two galleys and four berserkers and proceeds to amphibiously take New York, Washington and Atlanta while I frantically build swordsmen (!) in the three immature cities I'm left with.

Never seen the AI play like a human like THAT before! Awesome.
 
Anyone can check out the latest sources at any time from sourceforge.

1) Install TortoiseSVN from their downloads page

2) Make a folder on your hard drive where you want to check out the sources. You can call it BetterAI or BetterAITrunk or BetterAIVanilla or whatever you want. (If you like, you can make a folder called BetterAI and then a folder inside that called warlords and a separate folder called vanilla). (Another way to do it is to check out the whole project, but this will be a lot of versions, it is not recommended unless you have a lot of disk space).

3) After making the folder(s), however you want to organize them, right click the folder into which you want to put the sources, and select "SVN Checkout..." from the menu. (You will have this choice if you installed TortoiseSVN properly).

4) In the window that comes up, for "URL of repository" you want one of the following:
a) "https://svn.sourceforge.net/svnroot/civ4betterai/trunk/": to check out the latest version to run on the warlords codebase
b) "https://svn.sourceforge.net/svnroot/civ4betterai/branches/vanilla/": to check out the vanilla version (that is the 1.61+ version), this code may be slightly behind the trunk, as it has to be manually syncronized. It is generally about a week behind.
c) "https://svn.sourceforge.net/svnroot/civ4betterai/": to check out the entire project, this will be over 6 complete versions of the code (one for each branch or tag), it is not recommended.

5) Click "OK" and wallah you have the sources! Whenever you want to update to the latest sources, right click the folder again and just select "SVN Update" and it will automatically update you. You can click on the "Show Log" button (or select that from the menu) to read the individual checkin comments and/or get a list of which files were changed with each revision.

The first time you do a checkout, it will take a while, because all the boost and python files are checked in as well. Subsequent checkouts will be much faster. (Another reason not to check out the whole project). If you select the checkbox "Only check out the top folder" you will not get the boost or python files, so it will go faster, but in the future its possible you may miss something else that is important. It is probably smarter to suffer the pain of the longer checkout the one time.

Hope this helps,

-Iustus
 
Thanks Iustus, I'll try that.

Edit: Ok, followed your instructions, I have an error, probably doesn't matter though.

"Report request failed on '/svnroot/civ4betterai/!svn/vcc/default'
Report of '/svnroot/cvi4betterai/!svn/vcc/default': Could not read chunk delimiter: Secure connection trucated (https://svn.sourceforge.net)"

Edit: Maybe the error does matter, I seem to be missing some files, I only one that I would appear to need is CvSelectionGroup.cpp.

Edit: I was using option 4a from above, Warlords.
 
GIDS888 said:
Here's a thing!

I was playing as Washington on Earth, Noble Epic, got the Great Wall, so expanded without putting more than token units in my cities (I'd already destroyed Montezuma and Huayna was landlocked on south america).

Ragnar turns up with a trireme, 980AD, offers to trade maps, which we do, in about 1100AD he reappears with two galleys and four berserkers and proceeds to amphibiously take New York, Washington and Atlanta while I frantically build swordsmen (!) in the three immature cities I'm left with.

Never seen the AI play like a human like THAT before! Awesome.

Hahaha.. almost the same thing just happened to me.

It was around 1800 vs 3 other civs, I was miles ahead on tech, had almost 2/3 of all the wonders, and my score was 50% higher than the next civ, and more than double of the last place one.

So I got complacent and decided to go for max infrastructure, figuring they would do their usual attacks around 1950 AD. My military was a joke - pretty much nothing but a couple of archers or a single rifleman in each city. Two of the civs had ganged up on Churchill, so I figured chances of me getting attacked soon were about 1%.

So then that wimp Churchill sign peace treaties. And about 3 turns later that stupid Viking attacks me. Ok, no biggy, In 3-4 turns I can build enough tanks to wipe him out.

But then about 2 turns later, that stupid Aztec declares war on me. Hmm.. getting a bit tight here because I don't have coal, thus no railroads, so very slow moving units around. But I am holding my own at least.

Then a couple of turn later, that jerk Churchill joins in on me also.

So there I am with much better units than any of them, but they are all attacking on different fronts, I am spread out all over a huge continent and by then have maybe an average of 2.5 units per city. And almost no ships. And then I see that I cannot build destroyers any more.... WTH??? <insert bad name here> AI's took or destroyed all 3 oils sources, and then all of my Iron sources. They were landing 6-12 shiploads at a time at one point. I saw a stack of ships in one city that had at least 25 caravels and up in it.

So about then I just conceded and retired. :mad:

Moral of the story is, if you are playing against Ragnar, start building military EARLY - like around 12,000 BC.
 
"So about then I just conceded and retired."

I like it! Leave the problem for the new guy :lol:
 
Blake,

Incredible job, thanks for almost certainly knocking me down from Monarch to Prince. I am still going to try a few more at Monarch but even playing the relentless warmonger game I find the AI significantly more difficult to handle post-patch. As a fellow Monarch player, I do agree with much of what Drewbledsoe wrote especially with regard to Tech pacing. It is insane how fast the world has been teching in my recent Monarch games (myself included) and it should be dialed back some IMO.
 
Blake & Soren, any chance of improving the AI so it respond better to choking strategy in the early game? Perhap come back with a choke of its own against the player?

Also, maybe AI can also go for worker steal on the aggressive AI setting.
 
I've seen a few complaints about agression being the necessity on harder levels.

This is true, and it has to do with game mechanics, not the AI. Try playing a mulityplayer game. These are basically always war games, and are very agressive. If you're playing a multi that is not like this, then to be honest, your adversaries suck. This is just the nature of the game itself, not anything blake can do to change that. As the AI gets more difficult, you are required to play more agressive to keep up. If you have a problem with this, move down a level.

Like I said, try multi if this doesn't make sense to you, you'll realize that agression and warmongering really is the name of the game with civ, and that's just the way it is.
 
Well I didn't get knocked down a level, but I was already trying out Emperor the last time, this only means I get to stay on Monarch for a while. Good job, Blake!
 
phungus420 said:
I've seen a few complaints about agression being the necessity on harder levels.

This is true, and it has to do with game mechanics, not the AI. Try playing a mulityplayer game. These are basically always war games, and are very agressive. If you're playing a multi that is not like this, then to be honest, your adversaries suck. This is just the nature of the game itself, not anything blake can do to change that. As the AI gets more difficult, you are required to play more agressive to keep up. If you have a problem with this, move down a level.

Like I said, try multi if this doesn't make sense to you, you'll realize that agression and warmongering really is the name of the game with civ, and that's just the way it is.

Not at all...just play with builder strategy people...higher levels or MP don't ONLY play warmonger styles :)
 
You will be crushed by a warmonger if you try to be a builder in MP. Only way it works is if you're playing with all builders, but since a warmonger, and by that I mean a well played warmonger, will destroy you, your builder strategy is inferior. Just part of the game mechanics. I went 12-0 in the ladders when I played MP games, and I always crushed because too many people are builders, they can't handle the agression of a real player, that is playing to win, if they are accostomed to the always spaceship shooting AI. I welcome Blakes mod that will drive certain AI's to work toward domination, it's more like playing an adept human.
 
phungus420 said:
You will be crushed by a warmonger if you try to be a builder in MP. Only way it works is if you're playing with all builders, but since a warmonger, and by that I mean a well played warmonger, will destroy you, your builder strategy is inferior. Just part of the game mechanics. I went 12-0 in the ladders when I played MP games, and I always crushed because too many people are builders, they can't handle the agression of a real player, that is playing to win, if they are accostomed to the always spaceship shooting AI. I welcome Blakes mod that will drive certain AI's to work toward domination, it's more like playing an adept human.

But you make the false assumption that there is no other way....

The beauty of Civ and Blake's Better AI is a more varied Civ experience...it appeals to more than just the warmonger now :) And there are more than just warmongers that play this game.
 
phungus420 said:
You will be crushed by a warmonger if you try to be a builder in MP. Only way it works is if you're playing with all builders, but since a warmonger, and by that I mean a well played warmonger, will destroy you, your builder strategy is inferior. Just part of the game mechanics.

And that is precisely what my main gripe has always been about CIV4. Although advertised as being able to play many different ways, at higher levels war becomes the ONLY viable way to win.

The game mechanics are broken.

The fact that Blake has managed to improve the AI to such a huge degree all by himself tells me that the original programming for both AI and game mechanics was poorly done.
 
"Report request failed on '/svnroot/civ4betterai/!svn/vcc/default'
Report of '/svnroot/cvi4betterai/!svn/vcc/default': Could not read chunk delimiter: Secure connection trucated (https://svn.sourceforge.net)"

This is a network error. I have seen this from time to time. Select "SVN Update" to do another checkout and you should get any files you were missing.

-Iustus
 
Top Bottom