Solving AI's weakness in warfare by increasing AI Combat Strength bonus

Joined
Apr 11, 2015
Messages
438
The AI gets a lot of criticism, on Steam certainly, for not being able to put up a challenge to the human player in matters of warfare. To be fair, this has been an issue throughout the Civilization series, not just the latest version.

While it may not be easy to develop an AI that can effectively compete against the human player in war, there is a very simple solution to make warfare with the AI much more challenging - increasing the AI Combat Strength bonus.

The default scaling value of AI Combat Strength is +1 per difficulty level. So at the hardest difficulty, Deity, the AI has a Combat Strength bonus of +4. This is a really negligible increase per level. For comparison, a Level 1 Melee unit promotion gives +7 Combat Strength vs. melee and ranged units.

I've been playing with a modded Combat Strength scaling of +5 per difficulty level. I've been using Emperor difficulty level, which now gives an AI Combat Strength bonus of +10. This is the same as the difference between a regular unit and a Corps, or the bonus that the Crusade belief gives units near friendly cities following the same religion. It's made warfare with the AI much tougher, and therefore more exciting. I think I could handle still greater AI Combat Strength bonus.

So I would suggest changing the AI Combat Strength scaling from +1 per difficulty level to +5. This would make the bonus on the highest Deity difficulty level as +20 rather than +4.

Potentially, this could be a changeable parameter at game setup, so one could adjust it separate to the overall game difficulty level. It could automatically adjust to the chosen difficulty level, but could then be set independently as one so desired.

Even if not integrated into the main game, the devs should make it possible for players to play with such a system, as there are two or three issues currently:

1) City-state units do not currently get any Combat Strength bonuses at different difficulty levels. This means one could be fighting the AI civs' units at +20 Combat Strength, but city-states' units at +0. These Combat Strengths should match.

Furthermore, it's currently not known whether the AI Combat Strength bonus applies only to AI civs' units when fighting the human player, or also when fighting city-states' units. It's possible that the AI civs' units could be fighting city-states' units at +20 Combat Strength, which would therefore make it much easier to conquer them. They should fight at equal level, whatever difficulty.

2) The AI Combat Strength bonus affects both military combat and theological combat, so one will be fighting religious units with the same Combat Strength bonus as military units. This could potentially be quite tough, as the human player can't use the same tactical intelligence as in military combat, such as through the use of ranged units, terrain bonuses or unit classes. In my current gameplay with the enhanced settings, I haven't had a theological war yet, so I can't comment yet on how difficult it feels. One always has the option, though, to get out of a theological war by declaring a military war. There does not currently, in the game code, appear to be a way to separate AI military combat bonuses from AI religious combat bonuses.

3) Barbarians don't get Combat Strength bonuses with increased difficulty. I think players wanting harder AI difficulty would be able to handle the barbarians getting tougher too. I haven't found a way, in the code, to make barbarian difficulty scale with game difficulty.
 
Last edited:
You have to take into account that the combat strenght difference causes the damage done to grow exponentially. The +20 combat strength on deity would mean, that the AI's 5 starting warriors would almost oneshot your capital city, if it has no garrisoned unit.
 
You have to take into account that the combat strenght difference causes the damage done to grow exponentially. The +20 combat strength on deity would mean, that the AI's 5 starting warriors would almost oneshot your capital city, if it has no garrisoned unit.
Yes, a dangerous AI!

Deity should be really hard. It would mean having to build a City Wall and an Archer early on. I've not seen the AI declare war right from the game's start, so there should be time to build these things.

Anyone know of any scenarios that are basically war and combat, that would be good for testing out these settings?
 
I've not seen the AI declare war right from the game's start

It happens to me all the time. (before walls, at least) Deity AI uses its bonus units it gets from start to attack other civs/city states. Not speaking about barbarians that can be really nasty if they spawn all around you and mass spawn all at the same time.
 
It happens to me all the time. (before walls, at least) Deity AI uses its bonus units it gets from start to attack other civs/city states. Not speaking about barbarians that can be really nasty if they spawn all around you and mass spawn all at the same time.
I play with AI bonus starting units removed.

The highest game difficulty, Deity, should be for Civilization geniuses and insane masochists.

Increased AI Combat Bonuses should mean that the human player loses units in warfare, which will need replacing, and that the military cannot be neglected. This all costs production and takes focus away from pursuing other areas of the game, like science and culture, making it harder overall.

On vanilla AI Combat Bonuses, it's easy to go through a whole game without losing more than a couple of units in warfare. A war with the AI can result in dozens of AI units lost in battle, without a single unit of one's own.
 
Yes, a dangerous AI!

Deity should be really hard. It would mean having to build a City Wall and an Archer early on. I've not seen the AI declare war right from the game's start, so there should be time to build these things.

Anyone know of any scenarios that are basically war and combat, that would be good for testing out these settings?
If you ever play deity with an AI starting next to you, it will always lead to a starting warrior rush, unless that AI preoccupied somewhere. The only way currently to survive is if you have a well dependable position. If the starting AIs would have more combat power, it would be game over every time.
 
If you ever play deity with an AI starting next to you, it will always lead to a starting warrior rush, unless that AI preoccupied somewhere. The only way currently to survive is if you have a well dependable position. If the starting AIs would have more combat power, it would be game over every time.
But if you played on Immortal with a +15 AI Combat Strength bonus, maybe you would find the game as hard, or harder, than a game on Deity with vanilla Combat bonus. So maybe with +15 AI Combat Strength bonus, you would play Immortal, rather than Deity.
 
Maybe there could be an Advanced Options togglebox at game setup. Clicking it would open further options to fine tune the game's settings.

In Advanced Options, there could be a tickbox for 'Tough AI Combat Bonuses' or 'Tough AI Combat Bonuses at higher difficulties', so it would start at King (+5), Emperor (+10) etc.

It would unlock a tough AI Combat Bonuses difficulty setting, which would match whatever game difficulty setting one had chosen in main setup, but could be adjusted to one's preference.
 
Yes, a dangerous AI!
FYI the combat formula is
combat factor = exp(Strength difference /25)

So +10 is approx +50%, but +17 is about +100%.
But this applies to offense and defense. All told a unit at +17 is about 4x better - it deals twice as much damage and lasts twice as long. This is an insane bonus.

The AI also comes equipped with a +80% production boost on deity iirc. The real issue is that the AI for whatever reason rarely continues to pump units out once you've destroyed their standing army. If this single fact was changed deity war would be a nightmare.
 
FYI the combat formula is
combat factor = exp(Strength difference /25)

So +10 is approx +50%, but +17 is about +100%.
But this applies to offense and defense. All told a unit at +17 is about 4x better - it deals twice as much damage and lasts twice as long. This is an insane bonus.

The AI also comes equipped with a +80% production boost on deity iirc. The real issue is that the AI for whatever reason rarely continues to pump units out once you've destroyed their standing army. If this single fact was changed deity war would be a nightmare.
But the human player is better at using ranged units, terrain bonuses and unit classes. To kill a Horseman, one would place a Spearman in some good terrain or behind a river, and shoot the Horseman with ranged units from behind. The AI appears to attack whatever is next to it, regardless of combat odds or opposing unit classes. If the AI is attacking you with lots of Horsemen, you can instabuy some Spearmen to counter. There's lots of ways that the human can outsmart the AI.

For balanced military combat with the AI, the human player should be losing as many units as he/she destroys of the AI's. When I played at +10 AI Combat Bonus, I didn't feel I was close to that level.

I might have to do some testing with the AI at +20 Combat Bonus to see how it is.

What are the combat odds percentages when the AI has a Deity-level +4 Combat Strength Bonus? If +10 is approx +50%, then it's not going to be that much. Especially considering the AI is getting +80% production/gold bonuses and +40% culture/science at that level.

It makes sense that AI Combat Bonus should scale at similar rates to other aspects of the game.
 
It makes sense that AI Combat Bonus should scale at similar rates to other aspects of the game.
The problem is that it is exposed directly to players in the combat preview. While numerical balance could conceivably be achieved by altering the combat bonus, the larger it is, the more players hate it. This isn't even restricted to the "normies" or "casuals:" it's a symptom of how humans psychologically perceive AI. Hidden solutions, like those production bonuses, are always preferable.

I play with AI bonus starting units removed.
Also take very close note that you're disabling extra starting units for the AI which are a critical piece of how the devs balanced the difficulties.
Even the best players when honest will tell you that under current starting conditions, there are games where you simply cannot prevail because of an early warrior rush. Like it's mathematically impossible.
When you strip out the starting units you also remove their extra settlers and workers and massively ****** their early pace of expansion. Recall that the best pantheon is widely considered to be Religious Settlements, and high level AI are getting that for free (deity AI twice) turn one.
If you want a more effective AI you ultimately need to make their empire management suck less. A big part of that which I cannot understate is that they are absolutely abysmal at picking policy cards. Think about the difference between slotting rationalism etc vs only housing and amenity cards. The AI pretty much exclusively slots those cards.
 
The problem is that it is exposed directly to players in the combat preview. While numerical balance could conceivably be achieved by altering the combat bonus, the larger it is, the more players hate it. This isn't even restricted to the "normies" or "casuals:" it's a symptom of how humans psychologically perceive AI. Hidden solutions, like those production bonuses, are always preferable.
Players hate how one-sided combat is against the AI as it is. So the best solution, in my opinion, is to find a find a middle path, where it's neither too easy, so as to be unchallenging, nor too difficult, so as to be unenjoyable.

I just test did a little test of +20 AI Combat Strength, and it was pretty tough. Could potentially lower the scaling a little from 5 to 4, so it would be +16 on Deity.
Also take very close note that you're disabling extra starting units for the AI which are a critical piece of how the devs balanced the difficulties.
Even the best players when honest will tell you that under current starting conditions, there are games where you simply cannot prevail because of an early warrior rush. Like it's mathematically impossible.
When you strip out the starting units you also remove their extra settlers and workers and massively ****** their early pace of expansion. Recall that the best pantheon is widely considered to be Religious Settlements, and high level AI are getting that for free (deity AI twice) turn one.
If you want a more effective AI you ultimately need to make their empire management suck less. A big part of that which I cannot understate is that they are absolutely abysmal at picking policy cards. Think about the difference between slotting rationalism etc vs only housing and amenity cards. The AI pretty much exclusively slots those cards.
I appreciate that removing AI starting units makes the selected difficulty level easier. The AI civs still found new cities at a rate quicker than I can. I see the extra starting units for the AI as a way to try and make it harder for the human player to declare an early war and knock out a neighboring civ.
 
I just had a quick war against the AI at +16 Combat Bonus. I won the war, killed around half a dozen AI units and lost two of my own. It was a good difficulty level, which I will use in my next game at Immortal. I think Civilization geniuses and insane masochists could handle higher than +16.
 
I just confirmed in testing that the AI gets its Combat Strength bonus against city-state units too. The human player fights city-state units at equal level whatever difficulty level.

It's annoying that these bonuses - civs, city-states, barbarians - don't all scale together, or are able to be modified.
 
The game needs to make this more moddable.

It currently has:

HIGH_DIFFICULTY_COMBAT_SCALING

It needs:

HIGH_DIFFICULTY_MAJOR_CIV_COMBAT_SCALING
HIGH_DIFFICULTY_MINOR_CIV_COMBAT_SCALING
HIGH_DIFFICULTY_BARBARIAN_COMBAT_SCALING
HIGH_DIFFICULTY_RELIGIOUS_COMBAT_SCALING

It makes no sense to not be able to give city-states' units the same combat bonuses as AI civ units.
 
It makes no sense to not be able to give city-states' units the same combat bonuses as AI civ units.
Is the difficulty level exposed to modifiers? I'm not familiar with the exact mechanics but i know players can technically add new difficulty levels to the table. Then it's just a matter of carbon copy modifiers that grant universal combat boosts conditional on which difficulty and if it's a city state etc.
 
Is the difficulty level exposed to modifiers? I'm not familiar with the exact mechanics but i know players can technically add new difficulty levels to the table. Then it's just a matter of carbon copy modifiers that grant universal combat boosts conditional on which difficulty and if it's a city state etc.
Sorry, I'm not understanding this.
 
Sorry, I'm not understanding this.
When you make your own modifiers you can create new ones using existing in game effects. Since you decide what requirements to add, all that you need is some method to figure out what difficulty level the game is on and stick that into a requirement.
But that's probably wishful thinking for SQL/XML based modding. It might be available in LUA.

Speaking of modifiers, if you refer to LeeS' wonderful modding guide, page 158 mentions that:
There's a very rarely used column in the modifiers table called Type, its always defaulted to ARGTYPE IDENTITY. But there are other choices for it, namely ScaleByGameSpeed and LinearScaleFromDefaultHandicap. That second one may have the answers you seek.
I'd suggest asking about using it in the mod creation help forum.
 
When you make your own modifiers you can create new ones using existing in game effects. Since you decide what requirements to add, all that you need is some method to figure out what difficulty level the game is on and stick that into a requirement.
But that's probably wishful thinking for SQL/XML based modding. It might be available in LUA.

Speaking of modifiers, if you refer to LeeS' wonderful modding guide, page 158 mentions that:
There's a very rarely used column in the modifiers table called Type, its always defaulted to ARGTYPE IDENTITY. But there are other choices for it, namely ScaleByGameSpeed and LinearScaleFromDefaultHandicap. That second one may have the answers you seek.
I'd suggest asking about using it in the mod creation help forum.
Thanks. This is all above my modding level, so I'll ask in the help forum.
 
But the human player is better at using ranged units, terrain bonuses and unit classes.
Personally I'd prefer to change those mechanism than add an arbitrary combat bonus to the AI. There is already too many immersion breaking elements in the game for my taste.

For example introducing limited combat unit stacking (3-4) would already allow the AI to reflect its higher production at higher difficulty on the field. 1UPT combined with 2 tiles ranged combat is killing it, literally.
 
Last edited:
Back
Top Bottom