A Better AI.

Besides, less but more powerful units benifit performance. It´s not the same to calculate moves for 10 units than for 20.
 
I don't think the governor should ever build a drydock (or barracks for that matter). Those are tactical buildings you want to place in cities that are going to be building naval units (or any units in the case of barracks). I've had to take many of my fishing villages off the automatic governor because he insisted on building a drydock in the city which would take forever, plus it was also before many other much more useful buildings were built (such as libraries, markets, etc.) And it shouldn't build walls or castles either (not sure if it does) because the human is better at evaluating the threat level to the city.
 
The text below is a comparison between upgrading units and rebuilding units at monarch level at the normal speed setting for the AI and the human player. (Monarch level was chosen because it seems close to the average difficulty setting of players in this thread.)

Longbowman, cost 50, power rating 4
Rifleman, cost 110, power rating 10

The power rating is a value that is important for the strength of your army. You can read about it here. (power rating times 1000 is the soldiers value in the article). The power rating of a civilization is an important factor in war declarations of the AI.

The human cost of upgrading from longbowman to rifleman is 3 * 60 + 25 = 205 gold. This should be compared to the cost of rebuilding a unit which would be 110 hammers. What is worth more, 205 gold or 110 hammers? This has been discussed by many and some prefer to upgrade while others like to rebuild. Some also like to upgrade the experienced units and rebuild the unexperienced.
But for the AI the question is radically different. At monarch level under the old AI-handicap rules the cost of building a rifleman were: 90% of 110 =99 hammers. The cost of upgrading was 20% of 90% of 205 gold = 37 gold.
Okay, upgrade for 37 gold or rebuild for 99 hammers. Hmm, not such a difficult choise, I would say.

Under the new BetterAI handicap rules, the choise is a bit different again for the AI. The costs of building a rifleman is 99 hammers again. The cost of upgrading is 50% of 90% of 205 gold = 92 gold. Again, I do not think that the AI should consider rebuilding in this case. In civ4, it's far easier to get gold than it is to get hammers and therefore most players would think that 99 hammers are worth far more than 92 gold.
Even using the most inefficient way to spent hammers, namely by building wealth, the AI would still get 99 gold for its 99 hammers.

Another reason to not rebuild is because the AI will have virtually no use for the obsolete longbowmen. It could use them as cannonfodder, but that kind of cannonfodder will only give its enemy experience while not doing a lot of damage. And while giving the enemy experience it will cause massive war weariness for the attacking AI using them as cannonfodder. The other option would be disbanding them, but I do not think that the AI disbands units and you get nothing for disbanding a unit. Keeping the obsolete longbowmen will also increase the AI upkeep, hurting its economy and thus research.

A third reason to upgrade would be that it would give a dramatic increase in the AI's power rating. Riflemen count as 10 in the power rating while longbowman only as 4. This dramatic increase in the power rating might stimulate the AI to go to war against other AI who are not experiencing this increase in power because they have not developed riflemen yet. It would in general be a good moment to start a war when you have a technological edge in weapons over your opponent.
If the AI on the other hand starts rebuilding its army, then this technological edge will not be so apparent and by the time that a reasonable difference in power rating if developing, the other AI will also have developed riflemen.

Some people might ask: Why does the AI get a discount on upgrading at all?
The reason is that the AI is very incompetent in war. And even while Blake and Iustus are improving the AI, it will not rival a somewhat competent human player. Therefore the human plays at a higher level of difficulty giving the AI bonusses in production so that the AI can build more units to challenge the human player. But if the AI has to upgrade all of these units at the same cost that the human would have to, then it will struggle economically and the human player will again have an easy game. So the reduction in upgrade cost is there to make sure that the cost for the AI to upgrade its entire army is close to the cost of the human player to upgrade its entire army.
Most people also agree that the discount on upgrading at the highest levels of difficulty is a bit over the top.
 
Is something out of whack with barbs now? Are AI civs not able to defend themselves against barbs as well as before? I have found the barbs to be a little brainer, or at least I think so, and they can often eff you up if you aren't ready for them.

I noticed something similar on a recent Terra game (1-8 build, Quick Prince, not using the new handicaps XML). By the time I got to the New World (somewhat late in the game), there were many well-established barb cities of size 8-14, all with many strong defenders -- riflemen, mainly. My AI opponents had settled just 2 cities in the unclaimed area remaining. I came in with an army and took several of the cities, but with so many defenders they were tough nuts to crack. Looking at the replay at the end of the game, NONE of the barb cities had fallen to any AI opponent, which seems odd to me. It seems like the new focus on defense by the barbs is preventing any AI player from taking barb territory.
 
It seems like the new focus on defense by the barbs is preventing any AI player from taking barb territory.

I watched two AI civs seemingly ignore a bordering Barbarian city for a long, long time. I had Scientific Method before I finally decided to go over and take it out. It was chock full of doubly-promoted Longbows, indicating to me that the AIs had repeatedly tried and failed to take the city.

What's really freaky is how the Barbarians can whip or draft or whatever to suddenly bring to life even more defenders, resulting in a pop 1 city.
 
Hmm, the AIs struggling with Barbarian cities is something I've witnessed too. I think what might be happening with the AI is that it's capacity to defend is far outweighing its capacity to attack. This is reflected in the hordes of units in each city and in the general 'peacefulness' of many of the AIs...since they cant get a clear advantage over another Civ's military, they wont attack (and the arms race continues).

Again, this is fine line to tread. I believe people want the AI to defend competently, but it seems to be at the expense of the AIs being able to attack each other. AI to AI wars were never extremely common IMO, but they used to happen with more frequency than with the latest builds. Part of that is probably also the 'distance' code and part is the lack of ability to take ground in the face of myriad defenders.

I've also noticed that the average teching dates have moved back. At the same difficulty level, it wasnt uncommon to see units/techs appearing well before their historical times. The Space Race was occasionally happening in the 1930's or earlier. With the latest builds concentrating on military units, I've seen 2 TIME victories now (something I had never seen before) and Space Races are a true race against time. The added unit building and the maintenance drag are the forces at work here.

Part of me thinks that a good thing, but on the other hand the game is a little less dynamic now. As I said above, some effort to rein in the unit spamming would be good IMO and from there we could evalutate the AIs performance in other areas a little easier.
 
I haven't played a full game with the latest betterAI mod and I don't think I will install the new handicaps. Especially not if they result in this kind of AI behaviour. You don't want AI's building new units while they don't upgrade their old units. 20 units not of the latest technology will do a bad job defending a city compared to 10 units of the latest technology level and they will cost a lot of money in upkeep.
If you play the AI at Emperor or Immortal, its techs are so far ahead of you that its old units are the units that you hope to be getting soon. Figuring out how to keep up with the AI's techs past a few hundred BC is one of the major difficulties at higher levels.

I don't think it's reasonable for the AI to be upgrading huge numbers of units en masse at Prince or Noble. With old AI there was a stack of 3-4 new units at 1500-500 BC that you could take out with a rush of a previous generation of units. If you have to take out a stack of 10 new units ... where are you going to get 25 units from? How are you going to pay for them? That takes away the option to attack a neighbor who's more than a few tiles away from you.

If you want to "curve" the cost of upgrades so that they gradually become cheaper starting at Monarch, that seems pretty reasonable. But as Blake pointed out, the advantages that the AI has at higher levels go way way beyond the costs of upgrades. I personally think it's much more realistic to be attacking garrisons of mixed units.

[Edits]

If the AI didn't spam so many units it would have the ability to upgrade more of them. Maybe some AIs should build more units and some less. Maybe some AIs should receive slightly different discounts for upgrades. I don't think that all AIs should be equally clever or fight/try to win in the same way. Maybe some AIs build too many units and founder because of it. That certainly happens when you play on duel maps. Some opponents just don't do well in that situation.

But basically, I think that if you want to play a harder game with the AI out teching you, you should play a higher difficulty level.

Speaking of trying to win in the same way, the builder AIs clearly need some help, because I haven't seen Gandhi, Masa Munsa, or Asoka come anywhere close to being a factor in a recent game, whereas space race losses to Asoka were de rigeur in the good old days. The peace-lovers are not getting their tech lead, for whatever reason. Mehmed and Roosevelt are still doing okay. In fact Mehmed has been a horror lately.

Isabella's whole character has changed, because if she manages to snag 3-4 religions, she's going to have a serious chance at a cultural victory. I don't know if that's the intent or not, but it's certainly a threat.

I've also noticed that the average teching dates have moved back. At the same difficulty level, it wasnt uncommon to see units/techs appearing well before their historical times. The Space Race was occasionally happening in the 1930's or earlier.

Isabella would have won a cultural victory around 1600 in my current marathon game if I hadn't captured a couple of her cities. (!)
 
Hmm, the AIs struggling with Barbarian cities is something I've witnessed too. I think what might be happening with the AI is that it's capacity to defend is far outweighing its capacity to attack. This is reflected in the hordes of units in each city and in the general 'peacefulness' of many of the AIs...since they cant get a clear advantage over another Civ's military, they wont attack (and the arms race continues).

Right, it's not trivial to capture a barb city when it's full of grenadiers and riflemen. The AIs don't seem to have much luck with them nowadays after the start of the game, whereas in the past if a barb city popped up, it was usually fodder for the AIs. For a human player, ehh, do I really need to go take that now? Not like the good old days. And a steady stream of double promoted grenadiers headed your way can be a pretty good nuisance. I had a game a while back where they were coming in waves of close to a dozen from two or three large (size 10) barb cities.

I still can't believe how thoroughly stunted that other continent is in my game. At 1600 AD Monty still needed Meditation. I'm surprised they both survived the barbs. I think that's probably because barbs don't seem to be trying as hard as before to capture cities.
 
I'm not sure if this is the appropriate forum for such a request, but I'm guessing that Better AI could address it.

I always dread squeezing in a new city among existing mature ones because it usually steals tiles from surrounding cities, usually to the detriment of all cities involved. I have to go visit each of them, claim the tiles back, and try to restore everyone's citizens back to normal. I ALMOST NEVER want these new cities to steal any tiles. Why in the world does Civ4 do this by default?

So, I'd love to have a new tile-assignment algorithm that only offers unused tiles to new cities.
 
Pls someone be kind enough to explain this mod to me and if i have to use both files or only one (The dll and the other xml one)

Im srry but i just dont have the time to go tru 50 + pages of interaction and conversation at this time.

Thanxs a bunch.
 
Short version: Download the dll and be happy :) (and be smashed by the improved AI) :p
 
Only the DLL or do i have to fix the other file also?

Thanxs in advance.

Maybe Elhoim didn't know that Blake just (as of Saturday) released his version of CIV4HandicapInfo.xml in addition to his CvGameCore.dll. I would also appreciate some simple instructions in Blake's first post reminding folks what each one does.

My guess is that you can use either or both, as you please. I think the two files are independent of each other. The DLL gives you the improved AI, and the XML changes the handicaps.
 
Maybe Elhoim didn't know that Blake just (as of Saturday) released his version of CIV4HandicapInfo.xml in addition to his CvGameCore.dll. I would also appreciate some simple instructions in Blake's first post reminding folks what each one does.

My guess is that you can use either or both, as you please. I think the two files are independent of each other. The DLL gives you the improved AI, and the XML changes the handicaps.


What handicaps you talking about exactly?

Some info in the first post will help a great deal definatelly.
 
What handicaps you talking about exactly?

Some info in the first post will help a great deal definatelly.

In short, "handicaps" are adjustments that make things easier or harder for human and computer players. It's the stuff that changes when you progress to harder difficulty levels.

The SourceForge pages for Better AI have a documentation page for the handicaps:

http://sourceforge.net/docman/display_doc.php?docid=37200&group_id=178407

I think that page is a discussion of the _default_ handicaps, the ones that exist in Civ4 before using CIV4HandicapInfo.xml that you can download at SourceForge.
 
I don't buy this:
I haven't played a full game with the latest betterAI mod and I don't think I will install the new handicaps. Especially not if they result in this kind of AI behaviour....

Also upgrading old units is cheaper for the AI as building new ones. One costs gold and the other hammers, but the conversion factor of gold into hammers for upgrading is very good for the AI. Upgrading is cheap for the AI and a really attractive way to get strong up to date units.
I believe this is a circular argument. i.e., the AI has cheap upgrades, therefore it's cheaper for it to upgrade.

And, the conclusion seems to have no foundation. i.e., Therefore, the BetterAI and handicap mods are a bad idea.

The following, however, is more persuasive:
Under the new BetterAI handicap rules, the choise is a bit different again for the AI. The costs of building a rifleman is 99 hammers again. The cost of upgrading is 50% of 90% of 205 gold = 92 gold. Again, I do not think that the AI should consider rebuilding in this case. In civ4, it's far easier to get gold than it is to get hammers and therefore most players would think that 99 hammers are worth far more than 92 gold.

Most people also agree that the discount on upgrading at the highest levels of difficulty is a bit over the top.

I think the conclusion here is threefold:
1) changing the handicaps is a good idea, after all
2) building more units is a good idea, after all, but only to have more units (not as a substitute for upgrades)
3) it would be nice if the AI had some emphasis on adjusting its slider to generate some gold for the express use of upgrading, and then it did the upgrades... one unit at a time if necessary. A simple check every turn would do the trick.

However, this means that the AI will only have gold available for trades if/when all units are upgraded and current. Perhaps the upgrade check should be 1/10 turns (instead of 1/turn).

Wodan
 
If you play the AI at Emperor or Immortal, its techs are so far ahead of you that its old units are the units that you hope to be getting soon. Figuring out how to keep up with the AI's techs past a few hundred BC is one of the major difficulties at higher levels.

I've never played a game of civ4 at a level lower than emperor and nowadays I usually play at immortal or deity. And I disagree that you will always be behind in the tech race. I went back to emperor in my present game with the BetterAI mod and I'm leading the tech race.

HardCoder said:
I don't think it's reasonable for the AI to be upgrading huge numbers of units en masse at Prince or Noble. With old AI there was a stack of 3-4 new units at 1500-500 BC that you could take out with a rush of a previous generation of units. If you have to take out a stack of 10 new units ... where are you going to get 25 units from? How are you going to pay for them? That takes away the option to attack a neighbor who's more than a few tiles away from you.

It seems that you prefer the AI to be stupid about upgrading its troops so that you can capture its cities with obsolete units. I believe the goal of this mod is to improve the AI to let it offer the maximum level of resistance and even try to go for a victory condition to a certain extend. It should play as optimal as possible while keeping a personal flavor. It shouldn't enable you to capture cities if it could defend those by playing smarter.

If immortal level bonusses with a smart AI would cause you to be unable to capture cities, then there are two things you can do. You could give the AI lower bonusses or you could make the AI more stupid about defending its cities. My preference is to give the AI lower bonusses, for instance by playing at a lower level or adjusting the handicaps of the difficulty levels (really doesn't make a difference how you lower the bonusses).

HardCoder said:
I personally think it's much more realistic to be attacking garrisons of mixed units.

Realistic? Where in history was a city defended by warriors, archers, longbowmen, riflemen and infantry of the same nation? What exactly is realistic about that. This was by the way a major complaint in civ3, people disliked the fact that the AI didn't upgrade its troops so that they would encounter pikemen next to infantry.

Pls someone be kind enough to explain this mod to me and if i have to use both files or only one (The dll and the other xml one)

Im srry but i just dont have the time to go tru 50 + pages of interaction and conversation at this time.

Thanxs a bunch.

This mod improves the AI. It is often in a beta stage because the creaters keep coming up with new ways to improve the AI. They are at present working towards version 1.0 which should be a stable version.

Download the files from sourceforge.net. Click the green section "Download Civ4: Better AI". Download the version of betterAI that you need (depends on which version of civ4 you are using, vanilla or warlords) and you can also download the new handicaps. The handicaps lower the AI bonusses at higher difficulty levels, the other download contains the file that improves the AI. Save them whereever you want to and can find them back. You will get two zip files. Extract both files in that location. Go into the folder Civ4W_BetterAI_Warlords_07-01-08 and then in the folder BetterAI and then in the folder assets. If you use the vanilla version, then copy the file CvGameCoreDLL.dll to
C:\Documents and Settings\[administrator name]\My Documents\My Games\Civilization 4\CustomAssets
If you use the warlords version, then copy the file to
C:\Documents and Settings\[administrator name]\My Documents\My Games\Warlords\CustomAssets

Then go back to the zip files and copy the directory xml to C:\Documents and Settings\[administrator name]\My Documents\My Games\Civilization 4\CustomAssets if you use the vanilla version and to C:\Documents and Settings\[administrator name]\My Documents\My Games\Warlords\CustomAssets if you use the warlords version.

Start a game of civilization 4 and when in the main map press the ALT button and move over the name of your civilization with the score next to it. It should say BetterAI (plus a version number, at the moment 8 januari). If not, then something has gone wrong with the above installation process.

You can always delete the whole CustomAssets directory in C:\Documents and Settings\[administrator name]\My Documents\My Games\Civilization 4\CustomAssets
and try again. It can't harm your installation of civ4 (if you haven't installed other gamemodifications there).

This mod won't function together with other mods that change the file CvGameCoreDLL.dll.

Good luck!
 
About the "new handicaps" - they might have put the difficulty levels back where they belong/used to be. It was getting pretty boring finding garrisons of 10 longbows a few turns after an opponent got feudalism. Now, I'm still seeing garrisons of up to 20, but they're not the latest and greatest.

The goal of the handicaps files is that the difficulty should be close to what it used to be. I'm not sure how close they are to that... but it's the goal.

Could you please remove the drydock (or whatever it is called) from the list of govenor buildings to build.

Could you add in bunker and jail if the city can build them quickly (say less then 5 turns)
On this topic, there's no "list" of things to build - the governor only looks at the characteristics of a building. I can tell the governor to build domain-land exp buildings providing at least 3 exp and to only build domain-sea exp buildings if they provide at least 5 exp. I can't say "Build barracks and don't build Drydocks" because the concept of Barracks and Drydocks does not exist in the AI code - that's why it works well with mods.

Are you considering adding in Fort AI?

Short answer: No.
The long answer would still be No.

Forts are useless, end of story.

How the heck does this happen? Is something out of whack with barbs now? Are AI civs not able to defend themselves against barbs as well as before? I have found the barbs to be a little brainer, or at least I think so, and they can often eff you up if you aren't ready for them.
The AI has always had some trouble against barbs at Prince and lower - I've actually seen barbs eliminate civs on Monarch as well. The possibility of AI's being stunted and even destroyed by barbs is nothing new.

That said there are some problems with the Barbs, it's not really intended that they whip/draft defenders and this will probably be changed. Some AI code is working for the barbs when it probably shouldn't be.

The AI will march less far to capture barb cities and if you use the new handicaps the AI gets lesser bonuses against the barbs, which compounded with the barb over-defense means the AI will experience some trouble taking the cities.

So it´s confirmed that there is a bug with bombarding? Any news on a fix? At least a quick one?

Well it's been reported enough :). If I had to guess I'd say it's a change Iustus made to allow AI's to declare war with a bombarding action - at least I recall seeing something like that in the change log.

Again, this is fine line to tread. I believe people want the AI to defend competently, but it seems to be at the expense of the AIs being able to attack each other. AI to AI wars were never extremely common IMO, but they used to happen with more frequency than with the latest builds. Part of that is probably also the 'distance' code and part is the lack of ability to take ground in the face of myriad defenders.
It's worth noting that Defending is pretty easy in CIV - in multiplayer it's generally easier to defend than attack. In order for there to be dynamic wars some AI's basically have to play the role of noobs - they'd have to almost deliberately leave themselves open to attack. Then people would complain the AI isn't defending itself properly :rolleyes:.

There will be changes to the number of defenders trained though, it will vary on difficulty level, it will vary by leader, it will vary more by relationships. At the moment the AI's all train pretty much the same number of defenders for a given empire size...

I've also noticed that the average teching dates have moved back. At the same difficulty level, it wasnt uncommon to see units/techs appearing well before their historical times. The Space Race was occasionally happening in the 1930's or earlier. With the latest builds concentrating on military units, I've seen 2 TIME victories now (something I had never seen before) and Space Races are a true race against time. The added unit building and the maintenance drag are the forces at work here.

Part of me thinks that a good thing, but on the other hand the game is a little less dynamic now. As I said above, some effort to rein in the unit spamming would be good IMO and from there we could evalutate the AIs performance in other areas a little easier.

It is certainly my intention to slow down tech pace! If you think that'll allow the human to trivially out-tech the AI - think again! It's my intention that the AI should pose sufficient threat to "techers" that they'll have to slow down too in order to get real defense.

jray said:
I'm not sure if this is the appropriate forum for such a request, but I'm guessing that Better AI could address it.

I always dread squeezing in a new city among existing mature ones because it usually steals tiles from surrounding cities, usually to the detriment of all cities involved. I have to go visit each of them, claim the tiles back, and try to restore everyone's citizens back to normal. I ALMOST NEVER want these new cities to steal any tiles. Why in the world does Civ4 do this by default?

So, I'd love to have a new tile-assignment algorithm that only offers unused tiles to new cities.
Hmmm. This is something which bothers me too. I think I'll implement "no tile shuffle" for human players and possibly amend the algorithm for the AI's. The Human will probably always open the new city window and adjust the tiles as needed so why make them do it for multiple cities?
 
It seems that you prefer the AI to be stupid about upgrading its troops so that you can capture its cities with obsolete units. I believe the goal of this mod is to improve the AI to let it offer the maximum level of resistance and even try to go for a victory condition to a certain extend. It should play as optimal as possible while keeping a personal flavor. It shouldn't enable you to capture cities if it could defend those by playing smarter.

I never said anything about it being "stupid" about upgrading troops, but if you like, "stupid" is upgrading them en masse. Any idiot can upgrade troops if upgrading is essentially free. As far as I can tell, one of the goals of this mod is to allow the human to play against AIs that have less in the way of "cheat" bonuses, like free upgrades. I don't know what you like, but I don't think all that many players finding the cities of neighboring civs filled with stacks of shiny new units that are basically untakeable. In addition to that it's dull going through 20 rounds of combat just to take a city. I like the animations (it's still one of my favorite parts of the game) but when a turn takes 10-15 minutes, bleah. The AI doesn't care about doing all that dull stuff, which is one of the very important advantages it has over a human - that a human just can't stand to do all that micromanagement or doesn't think it's fun.

If immortal level bonusses with a smart AI would cause you to be unable to capture cities, then there are two things you can do. You could give the AI lower bonusses or you could make the AI more stupid about defending its cities. My preference is to give the AI lower bonusses, for instance by playing at a lower level or adjusting the handicaps of the difficulty levels (really doesn't make a difference how you lower the bonusses).

I'm not sure what you're saying here. "Lower bonuses" sounds like "more expensive upgrades."

Realistic? Where in history was a city defended by warriors, archers, longbowmen, riflemen and infantry of the same nation? What exactly is realistic about that. This was by the way a major complaint in civ3, people disliked the fact that the AI didn't upgrade its troops so that they would encounter pikemen next to infantry.

What's realistic about it is that if you're a human player, that's the situation you are in unless you just scored a trade mission. If the AI can't afford to upgrade 20 units in a stack with moderate discounts, maybe it shouldn't be building 20 units.

Historically, as if that matters, many cities have been defended by everything from tanks to kids throwing stones, all at the same time.
 
I've noticed that the new AIs love to raise taxes when in war and accumulate huge amounts of money. However, unless they are running USuf, this is a total waste of commerce at the higher levels (where upgrades are anyway very cheap).

In fact, this AI trait greatly helps me conquer Immo/Deity AIs in early game, when my military maintenance would be crippling without the loot from AI cities. I believe the AIs should run deficit when in (defensive) war and not on USuf.
 
Back
Top Bottom