feedback on AI combat behavior

I have seen a few times when the AI had a unit near a city dead to rights if it had focused fired a little bit more, but it splinters the attack and I manage to withdraw the unit. It’s happened a few times.
Seen this a few times now as well in 8-31...the AI doesn't seem too keen on focusing different attacks on one unit even if there would be no tactical change in movement necessary (e.g. city firing on high health units instead of low health that it could kill, if not this turn then next turn...city attack + garrisoned unit attack on two different adjacent enemy units when they could kill one of them).
 
I know the navy combat is tough, but here is one to note:

upload_2019-9-5_17-41-48.png


Those siam ships were just a moment ago a bit to the southwest (right against Riga). They all just ran to the north...into a brick wall. They are going to get wrecked, and instead of fighting and taking out a few of my ships, I will likely total the whole fleet this round.
 
ok, summing up it seems we're in a good spot overall.

minor issues:
* too easy to snipe settlers from the AI. hard to fix, just don't do it

Not possible to force an escort if the intended settle spot > certain number of tiles from the spawning city? IMO I rarely see unescorted settlers unless I block their escort... or maybe with Progress they move too fast for them?
 
Often times it's better if AI is "smarter" and more careful in making decisions; however, in warfare, it seems that they never know whether it's good time to attack and mount an organized massive push.
I remember that AI used to be more frantic in battle, and it's supposed to be a bad AI behavior but at least they provided the player with a better challenge.
 
In addition to what's been said, I'd point out that I sometimes see the AI stationing its GG on the frontline unit instead of one unit in the back, meaning that if I destroy that unit, I destroy the GG, which means the AI is exposed to needless risk.
 
In addition to what's been said, I'd point out that I sometimes see the AI stationing its GG on the frontline unit instead of one unit in the back, meaning that if I destroy that unit, I destroy the GG, which means the AI is exposed to needless risk.
Yes, but don't forget a couple civs (Sweden and Zulu 3/4 UC) still need to be able to utilize stacking a GG with units because it's part of their kit.
 
Often times it's better if AI is "smarter" and more careful in making decisions; however, in warfare, it seems that they never know whether it's good time to attack and mount an organized massive push.
I remember that AI used to be more frantic in battle, and it's supposed to be a bad AI behavior but at least they provided the player with a better challenge.
I have to agree with this.

Sometimes the AI stalls out too much. By which I mean things like me holding an admittedly good position with a single (logistics) range unit on a citadel while the rest my army is elsewhere because the AI units wouldn't push in force. Admittedly that AI had no way of knowing that I had nothing behind the citadel (he had no vision and no real way to get it) but since he was the one who decided to declare war on me while I fought on 2 other fronts he really should have pushed in force.

A more recent example of a blatant problem was however me stealing a city that the AI took down to 0 HP through naval bombardment because England didn't bring a single naval melee unit along with their huge fleet. Or for that matter a single unit on a boat, but that's just the AI not even trying amphibian assault, which I get since if it tried it'd probably do it wrong and lose tons of units.

In a general sense I must admit I've been exploiting the AI's shyness since forever with cities, citadels, terrain features and ranged units. Whether it be holding the line with a tiny army in peaceful play or leaving most of my empire undefended while I play warmonger, the fact I can count on the AI to attack tentatively in only one area and ignore huge, empty stretches of coast even when they have the navy to escort their units into position and I can't intercept means I make a lot more out of my military than I could or should.
 
Barbarians seem really reluctant to pillage in this version...so far I've seen more than 5 occasions where a damaged barbarian ship could have eaten one of my work boats but didn't...I haven't given them the chance to pillage stuff on land, though, and the non-barbie AI is certainly very keen on pillaging land tiles.
 
I suppose I’ll add some anecdotes to AI timidness. I got a city nice and low for a CS to take (5 tiles away from the CS’s city I might add) and instead of continuing the assault they decided to fortify 2 of their warriors in tiles right next to the enemy city. The city had a combat strength of only 8 (flat land, no walls, a hurt spearman garrison) and the CS units were only slightly damaged. Pretty sure the CS had a damaged trireme they could have used too, but I didn’t see it again after it attacked the city a few times No idea what was going on here, maybe CS’s in general are skittish to actually capture cities but they were definitely helping to damage it when it was at full HP. It was actually detrimental since they got in the way...

On another front in the same war, there was a one tile pathway flanked by mountains and the coast, the AI did not attempt to cross through it or sail around it (they had sailing already), which I guess worked for them since there were a horde of archers waiting for me on the other side if I dared pass, but as a result they made 0 effort to retake the city I took from them on my side of the choke. I don’t think playing that passive was by choice. The terrain here was pretty unforgiving so I’m willing to give them the benefit of the doubt.

However, I had a horseman milling about their capital pillaging things (no intention to take it yet since they had walls up), and besides the fact that it was undefended, they made almost no effort to move any of those units that I know they had from the choke back to the capital. None of the archers mentioned ever showed up! As a result I was uncontested pillaging all their luxuries and most other improvements, and they will be easy pickings after the peace treaty, when catapults and my GG will be there to support.
 
Barbarians seem really reluctant to pillage in this version...so far I've seen more than 5 occasions where a damaged barbarian ship could have eaten one of my work boats but didn't...I haven't given them the chance to pillage stuff on land, though, and the non-barbie AI is certainly very keen on pillaging land tiles.

Noticed this too on land on more than one occasion, damaged AI barbs would rather waste their move on one tile past the ZoC city rather than pillage the tile they’re on.
 
Barbarians seem really reluctant to pillage in this version...so far I've seen more than 5 occasions where a damaged barbarian ship could have eaten one of my work boats but didn't...I haven't given them the chance to pillage stuff on land, though, and the non-barbie AI is certainly very keen on pillaging land tiles.
They definitely still pillage fine on land, but they've never been great in the water. It would be nice if they executed on the same level.

I suppose I’ll add some anecdotes to AI timidness. I got a city nice and low for a CS to take (5 tiles away from the CS’s city I might add) and instead of continuing the assault they decided to fortify 2 of their warriors in tiles right next to the enemy city. The city had a combat strength of only 8 (flat land, no walls, a hurt spearman garrison) and the CS units were only slightly damaged. Pretty sure the CS had a damaged trireme they could have used too, but I didn’t see it again after it attacked the city a few times No idea what was going on here, maybe CS’s in general are skittish to actually capture cities but they were definitely helping to damage it when it was at full HP. It was actually detrimental since they got in the way...
I brought this up to Zebo ages ago. Specifically leaving enemy cities for your CS allies to capture, only for them to clog up space while failing to capture...
 
Last edited:
From my recent games, I find the new changes to naval units make the AI weaker. If you have a naval melee unit that isn't overextended, then it will scare off the AI ranged ships and result in their entire navy retreating. I personally see the newer changes favoring the human player more but it might be just me. I would've preferred if ranged ships (if possible) to use up half of their movements on each attack and can still move after attacking. However, I just feel that AI struggle to adapt to these changes.
 
Noticed this too on land on more than one occasion, damaged AI barbs would rather waste their move on one tile past the ZoC city rather than pillage the tile they’re on.

AI barbs are forbidden from pillaging at sea. Firaxis rule choice.

G
 
some updates for you as a preview for the next version

* barbarians are meant to be a little bit stupid, so i don't see a big problem with suboptimal moves here
* settlers will be more likely to use escorts
* melee garrisons should be a bit more daring
* improved the code for bringing in reinforcements, ideally no more idle bystanders now
* exposed two knobs for tuning aggression (in corechanges.sql)

COMBAT_AI_DAMAGEWEIGHT
* controls how much damage an attack needs to inflict to be considered worthwhile
* default value 100. higher -> more aggressive

COMBAT_AI_DANGERWEIGHT
* controls whether ending the turn on a certain plot is acceptable.
* default value 50. higher -> more timid

of course eventually the values should be dependent on leader personality and tactical situation, but how to define a situation? anyway you can experiment on your own now, if there is a consensus we can change the defaults.
 
of course eventually the values should be dependent on leader personality and tactical situation, but how to define a situation?

I don't think the AI tactics should too heavily depend on leader personality. Ultimately the strategy of whether to war with another civ should...but once your in the trenches the AI should just use the best strategy it can.
 
I don't think the AI tactics should too heavily depend on leader personality. Ultimately the strategy of whether to war with another civ should...but once your in the trenches the AI should just use the best strategy it can.
I would disagree; risk is a variable that is hard to optimize, even for humans. The fiercer AI personalities should ideally risk more, especially in offensive war, while the more mellow should at most be aggressive (heavy risk taking) in defense. If a mellow leader decides to take some cities offensively it would make sense that he do so in a manner that takes less risk than a fierce leader, making him more likely to withdraw and peace out when met with somewhat greater than expected resistance, for example. These things meld into strategy, they are not completely disjointed from it.
 
I would disagree; risk is a variable that is hard to optimize, even for humans. The fiercer AI personalities should ideally risk more, especially in offensive war, while the more mellow should at most be aggressive (heavy risk taking) in defense. If a mellow leader decides to take some cities offensively it would make sense that he do so in a manner that takes less risk than a fierce leader, making him more likely to withdraw and peace out when met with somewhat greater than expected resistance, for example. These things meld into strategy, they are not completely disjointed from it.
The problem is the AI can currently tend to be timid to the point of being ineffective even in wars they themselves start. When your mellow leader declares war on someone for a change, by definition it's because he feels he needs to do something about that someone. If he's not going to make a credible attempt at taking a city, he shouldn't bother declaring, it just costs him units and cuts off useful trade routes.

Basically, if the AI declares war it needs an objective, and it needs to pursue this objective as hard as it can. If it is declared on, it can certainly be as conservative and defensive as it likes. Unexpected resistance is a factor, but in many cases I faced it did not meet any resistance beyond the units already placed there because it never pushed hard enough for me to need to divert anything.
 
Last edited:
The problem is the AI can currently tend to be timid to the point of being ineffective even in wars they themselves start. When your mellow leader declares war on someone for a change, by definition it's because he feels he needs to do something about that someone. If he's not going to make a credible attempt at taking a city, he shouldn't bother declaring, it just costs him units and cuts off useful trade routes.
This is about risk assessment in the scope of tactical decisions, though; if the mellow leader has chosen a good moment and location to attack (he'll have good diplomatic relations so he probably can and will have brought others into the war to distract the opponent and draw his troops away) then he'll have an overwhelming force that will take a city or two even with low risk tolerance. If the opponent manages to peace out with the others, however, and turns on the mellow leader in full force, he will now be more keen to defend his borders and peace out rather than to try to push on further; this is where the low risk tolerance would constrain further offensive action, as it should.
I'd say that the AI being too timid really depends on the situation; the biggest problem that I've seen so far and that has been described by others as well is the AI not using available idle units in the area to reinforce the besieged unit/city. If this happens in the AI's territory it's a "bug" and it looks like ilteroi fixed it for the next version.
 
If a mellow leader decides to take some cities offensively it would make sense that he do so in a manner that takes less risk than a fierce leader, making him more likely to withdraw and peace out when met with somewhat greater than expected resistance, for example. These things meld into strategy, they are not completely disjointed from it.

I think where we disagree is where our definition of tactics and strategy lie. What you described to me if a strategic decision...am I in a situation where peace is preferable to war. That is strategy.

Tactically, the risk decision comes down to this:

1) How much damage will I inflict with this attack?
2) How much damage will I take?

Lets look at the human risk calculus for a moment. At high levels, humans tend to be extraordinarily risk averse. In effect, almost any attack that would lead to the loss of a unit is too risky to take. That is a pure tactical decision, based on the units in the area. If I'm playing a more passive game, than I will peace out whenever I get the chance to, where in a more aggressive game I will commit to the war longer. But even when warring, that risk calculus is still the same, I am still approaching a war with the prime focusing of never losing my units.

That's a starting point for the AI, and that may not be where we ultimately want them to end up, but once you set the level, I don't think you need to include personality factors. The AI plays tactically the "smart way", and then makes strategic decisions (like whether to commit to peace) based on its personality.
 
Top Bottom