Improved Combat Odds

Okay I took a look at the function that calculates the odds for the AI and was surprised at what I found there. Apparently only current strength and first strikes are taken into account. But not Defensive bonuses. I adjusted the code and in my short tests the AI was smarter. But hopefully someone more thorough - stares pointedly at Officer Reene - will DL the new version and leave some more feedback.

This is incorrect. It already takes these into account. It is confusing how the defensive and offensive bonuses are applied, but they both are taken into account. (Some are modifications to the attacker's strength, while others are modifications to the defender's strength).

take a look at CvUnit::maxCombatStr

Your code is taking the defensive bonuses into account twice, so it will make the AI more timid.

Honestly, if you are looking for smarter overall AI performance, in warlords or vanilla civ, take a look at this:
Better AI project

-Iustus
 
That would explain why I'm always losing assaults with odds of 75% or better (hell, even 95% or better!).
 
so far not so good....

The AI hasnt declared war on either human player (I think we got too powerful) so we declared war on them :D


my results:

AI still attacking and getting decimated...

Occasionally I would have better odds and get defeated

AI is still attacking against better units, when it probably not in it's best interest since my units are superior to theirs...


I captured a city and defended well

however the AI did not use cannon units to soften up City defenses... before deploying melee/archer/musket/grenadier units to attack city (the stack had a combo of both cannon and other units) -- this is probably a python issue but thought Id mention it...

my brother's results:

he still has problems with odds where he has a 2-4 pt advantage and loses the battle.... (It seems more than that random chance of failure)


Bottomline with this mod AI still attacks with bad odds... but also wins with bad odds alot more than expected..... :sad:
 
Top Bottom