A Better AI.

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.

Could you keep the ability for barbarians to whip/draft with raging barbarians on.It is fun to have those barbarians which are a pain for everybody.





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...

What do you mean by relantionship?
About decreasing the number of defenders for some civs, wouldn't be better if for example some peaceful leaders (Hatshepsut,Ganghi,Asoka.....) would build less offensive units like cavalry but would maintain an adequate number of Archer,Artillery and Spearmen in this way these leaders will not be too much weakened by their peaceful approach to the game.



I have an important question: considering that this mod has improved so much AI are you thinking to work on things which haven't been introduced due to AI dumbness.To be clear modern naval warfare in civ4 should function like a rock>scissor>paper>rock system with submarine>battleship>destroyer>submarine; indeed it is implemented with a brainless battleship>destroyer>submarine.
So are you thinking to do "experiments" with modded naval units which should use the rock>scissor>paper>rock system to see if it is possible to make AI capable to make smart choices and at the same time using an interesting and more realistic naval warfare system instead of the actual brainless one?Or will your and Iustus attempt to improve AI tested only on actual gameplay?
 
Forts are useless, end of story.
Which is why most mods buff forts considerably. Without the AI using them that's just adding advantage to the humans though... Oh well. :)
 
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

And IMO you are absolutely on track too. When I said that its pushing teching back, I mean for everyone, not just the AIs. The human players definately have to invest more production in units and gold in upgrades to keep up with the Joneses (or else be overrun). I think that is a good thing in the long run.

Where I see it as a 'problem' is the perennial arms race between otherwise friendly AIs. Another potential problem is the military parity that occurs when everyone has hordes of units. Its much harder to get local superiority (for players AND AIs), often making it generally a bad idea to attack (again, for both). Building up to attack generally seems to simply trigger another rash of AI unit spamming as they start to fall behind the power curve.

But as you mentioned, if changes are made so that AIs aren't max defending, then players will probably complain that the AIs aren't defending well. There should be some sort of middle-ground though where it builds enough to be competitive in defense and to discourage the random conquest, but not building basically defensive military as the primary focus for large chunks of the game.

Perhaps some AIs can concentrate on quality of troops over quantity. As has been noted, piles of Longbows or Archers doesnt matter much once Riflemen and whatnot appear. So rather than having the AIs continually spamming newer units, perhaps make more effort to generate wealth to upgrade the existing units instead?
 
Which is why most mods buff forts considerably. Without the AI using them that's just adding advantage to the humans though... Oh well

I believe the modding Forts (however useless they may be) is beyond the scope of this mod. I believe the intent is to not make any rules changes.
 
I believe the modding Forts (however useless they may be) is beyond the scope of this mod. I believe the intent is to not make any rules changes.
I understand that, and I wasn't asking Blake to make any rule changes. I was making the point that, were he to improve the AI use of useless vanilla forts, that would have the ancillary effect of helping other mods that both use this one, and do buff forts. I didn't expect to change his mind, and I won't bring it up again, but it seemed like a fair point. Apologies if I was wrong.
 
I hope you guys know what you're doing.
Some naked facts.

Resource clustering, too much corn

toomuchcorndn8.jpg


2 starvation pics

starvation1mp3.jpg


starvation2gn9.jpg


Different war declaration penalty, -3 and -6. It's a set up via the world builder
at the beginning of the game 4000 BC.

war3penaltygc8.jpg


war6penaltykg3.jpg


Further, weird barbarian behaviour. It looks the AIs suffer more.
Unbalanced expansion phase, some AIs got stuck with 1 or 2 cities while
their neighbours have 4 or 5. For the AIs it's the most important part of
the game. Not wonder building.
 
Notes on multiplayer OOS from last nights LAN game. (3 machines, with 4 AI players as well)

Appeared to happen when lots of combat was going on (possibly when 1 human was trying to counter attack / bring in defenders against an AI assault)

Out of our 4 OOS messages 3 times it was only one machine that went OOS, and that was the weakest machine on the LAN (it is a 3.2 with 1GB RAM and a geforce 6600GT - it does not perform as well as it should - I do need to format it). It was not this machine involved in the combat though.

Game finished due to Koreans taking out 1 human, and another human (me :() being so far behind in tech that the game was conceeded.

Will connect these 3 machines via direct IP to another machine for a 4 player (with 4 AI) game tonight.
 
I understand that, and I wasn't asking Blake to make any rule changes. I was making the point that, were he to improve the AI use of useless vanilla forts, that would have the ancillary effect of helping other mods that both use this one, and do buff forts. I didn't expect to change his mind, and I won't bring it up again, but it seemed like a fair point. Apologies if I was wrong.

It would also have the "side effect" of making the AI build and use useless forts in normal games :rolleyes:.

If I get an impassioned plea to implement fort AI for some mod in particular then I might consider doing so.

Tatran
I hope you guys know what you're doing.
Some naked facts.

Resource clustering, too much corn
Take it up with the (Great Plains?) map generator, outside the scope of Better AI.

Please ask the facts to wear some clothes.

2 starvation pics
The spy screen is not accurate - it often shows the city with one less worker than is actually working on that turn, especially after growth (ie it shows the city for THIS turn, but the worker placement for LAST turn). Ie St.Peters is a size 2 city, there is only 1 worker visible. This is only a "display bug" afaik and also outside the scope of Better AI - probably.

Different war declaration penalty, -3 and -6. It's a set up via the world builder
at the beginning of the game 4000 BC.
Eh? There is a -3 war penalty for every time war is declared and it stacks.

Further, weird barbarian behaviour. It looks the AIs suffer more.
Unbalanced expansion phase, some AIs got stuck with 1 or 2 cities while
their neighbours have 4 or 5. For the AIs it's the most important part of
the game. Not wonder building.
Some AI's are noobs and build too many wonders.
More seriously wonder building will be tweaked so the AI balances wonder building with expansion better.
 
Take it up with the (Great Plains?) map generator, outside the scope of Better AI.
The map was random custom continents. Replacing the patch 2.08 dll file
only gives 2 (max) of the same food resources at the start. (corn, sheep)

Eh? There is a -3 war penalty for every time war is declared and it stacks.
I know. This was right from the start in an always war situation.
 
Does anyone intentionally put attack units on explore to get them to automatically attack cities and pillage? I am very temped to stop human units on explore for attempting to either attack units or explore cities.

Anyone have any thoughts about this? Any reason not to do it?

-Iustus
 
People do it im multiplayer and pitboss game and then clame that double move resulted of stack been in explore mode!
 
Roland Johansen said:
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.

I shouldn't have used the word stupid in my post. It of course clearly wasn't directed at you, but at the AI (allthough it has been improved, it is of course still stupid). But I'll leave out the word stupid just to not complicate things and diffuse this discussion a little. :)

I calculated in post 1603, that it is more efficient for the AI to upgrade its troops than it is to build new troops. It doesn't matter if you use the old handicap values for the AI or the new ones from Blake. In both cases, it is more efficient for the AI to upgrade its troops than it is to build new ones. So this is not about changing the handicap files, this is just about the AI behaviour considering "should I upgrade or should I rebuild troops".

Next to that the AI gets the advantage that it takes less time to upgrade its troops than to build new ones. So the AI defences are quicker at full strength and thus the AI can offer a better resistance to AI and human opponents.

A third advantage of upgrading is that the AI needs less troops to defend its lands. 10 infantry do just as good a job at defending a city as 5 infantry, 5 riflemen, 5 longbowmen and 5 archers. The 10 infantry are probably even better at defending the city. But their upkeep is far lower. So the AI military defense doesn't hurt its economy that much.

A fourth advantage of upgrading is that it allows the AI to realize what strength the new weapons technology has given them. A fast upgrade results in a spike in AI military strength and the AI could then decide that the new military strength allows them to attack their neighbours who haven't researched the technology yet and thus have a far lower military strength. This is in general a smart decision (as far as an AI decision can be smart) because a military advantage caused by a technological lead can result in a very succesful war. Human players try to do this all the time in their games.

Seeing all the advantages of upgrading for the AI, I don't see a reason to let the AI play less efficient and not upgrade its troops.

I would like to see the AI change its economy in a gold producing economy (100% gold, 0% science) after a military discovery that allows the AI to upgrade its army. This gold should not be available for trade but just for upgrading. After the upgrade rush, the AI should continue its research path. I hope to have cleared up my position on upgrading versus rebuilding for the AI a bit with this post. :)
 
A post directed at Blake and Iustus.

Half a year ago, I read an article on how the military strength (as in the ingame graph) was calculated. (The Inner Workings of the Demographics Screen Explained, the section about soldiers). As far as I know the military strength is an important figure for the AI to decide whether it should go to war or not. (If I'm wrong about this, then the rest of this post is meaningless.) I don't think the way it is calculated is a great representation of the AI's strength in war.

For instance, the value of the military technologies is a fixed value. This means that the value is a large factor in the total AI military strength on duel sizes maps with few units and totally unimportant on huge maps with large numbers of troops. Also a technology like military tradition which allows cavalry isn't considered at all. I think that the value of a military technology should scale with the size of the map.

Another example would be the value given to wonders like Heroic Epic and West Point. The value is only half the value of a unit like the infantry. So having one unit of infantry is twice as important as having West Point and one unit of modern armor is 5 times as important as having West Point. The value of West Point should actually scale with the availability of more powerful units.

Population points are very important for military strength at the start of the game. But as more powerful units roll onto the scene, its importance becomes negligible. Maybe it should also scale a bit with the strength of the units available.

There are probably more things that are pretty strange in the calculation of military strength. If this is indeed an important value in the AI war declaration decision, then it should be calculated better.
 
I have posted a new build for testing purposes only on sourceforge

This build is intended for testing purposes only.

This build contains "asserts" which means that the code will run slower, but if any unexpected conditions arrise, an alert box will come up, saying what failed.

It is very important to capture everything in this message if you get an error. A save game file prior to the assert is ideal, with instructions on what to do to trigger the assert (ie, end turn or move the tank northeast to London).

This build has some extra error checking in it, which will cause it to run slower than normal. Some of the checks are to verify that some faster algorithms work (it is doing it both ways).

The 'Out of Sync' bug in multiplayer may be fixed in this build.

The 'bombard bug' is fixed in this build.

In particular I would like those who were getting OOS errors to try this build. Anyone can use it, the more the better, but it may run a bit slower.

If you get an assert, please post the info here. There still might be a few that are not really a problem (Blake and I have squashed most of those from the regular 2.08 release), but it is most likely that any asserts you see are actual bugs we need to fix.

Thanks to anyone who takes the time to try this build!

I will get a real release posted in the next few days, after getting some feedback on this release.

Bonus points to the first person to mention the new 'feature' I snuck into this release.

-Iustus
 
On a related note, I have found that saving the game after the AI has made its move it not very useful at all. For example, you may have spent who knows how long making moves only to forget something and end your turn.

I couldn't agree more! I would love to see Autosave kick in at the END rather than the BEGINNING of the turn. I'll post this in the Ideas & Suggestions forum.
 
Last edited by a moderator:
I apologize if this question has already been addressed in this thread. I have read about 30 of the 80ish pages with no luck as of yet and thought maybe someone could more easily direct me to the answer.

After loading the mod as directed, I do not see the "=== Better AI ===" text when scrolling over my name in the game point breakdown, thus I do not know if the improved AI (or the handicap balancing) is running.

I am running the Vanilla version of Civ4.

I copied both the CvGameCoreDLL.dll and the CIV4HandicapInfo.xml to C:\Documents and Settings\[admin account]\My Documents\My Games\Civilization IV\CustomAssets

After this, I also tried overwriting the original CvGameCoreDLL.dll in the real Civ4 folder with the new one (after backing up the original, of course). I still did not see the "=== Better AI ===" text.


I would appreciate any suggestions. Thanks!
 
After loading the mod as directed, I do not see the "=== Better AI ===" text when scrolling over my name in the game point breakdown, thus I do not know if the improved AI (or the handicap balancing) is running.

You need to move the cursor away from the scores, THEN press & hold Alt, THEN move the cursor back over the scores. It's a bit finicky.
 
Back
Top Bottom