Can something be done about AI declaring wars they aren't prepared for.

Drakle

Emperor
Joined
Jun 28, 2014
Messages
1,285
The AI seems to have a really bad habit, of declaring wars that they aren't actually prepared to carry out. It is particularly bad with maps that involve a lot of water, as the AI never seems to set up a naval invasion properly. I've seen decently planned overland invasions by the AI, but with naval wars they are terrible.

A recent example.

The Zulu were stuck in a corner of the continent, the two overland routes were blocked. The only civ nearby is me as Authority Persia. I essentially ignored the Zulus, bar leaving an excess scout to watch them. The overload route was blocked by two mountains and a lake in between, and when they get past it they enter flat desert. So fairly confident my scout would be a significant roadblock, and their invasion would take a while. So they need a naval invasion. There is two sets of water. An inland sea, in which there are no cities but the Zulus. Aka zero naval opposition, or need for melee ships. The other is the coastal sea.

They declared war on me, while the majorities of my armies were busy invading someone else. Except they sent their embarked units in the open sea. Allowing me to throw back their invasion with a single trireme, allied city-state and a garrisoned Immortal, holding them back until I built up an army. Meanwhile, they have 4 triremes in the inland sea, doing nothing.

At least that one was on paper, a fairly even fight if the AI hadn't ignored geography.

But in another game, as Egypt, I've gotten multiple declarations of wars from behind tech civs, where they didn't do anything. Even when I had a recently settled city nearby, that was still unwalled and had no garrison since I diverted it to save a city-state ally from a barbarian invasion. Nothing for turns, allowing me to build up and counter invade. The civ by declaring war on me, also plunged itself into unhappiness, since they had been buying 5 luxuries off me, and a whole bunch of strategic resources. And lost two trade routes I had been sending them.

The mid to late game YOLO wars really don't slow my roll as the leader, but the AI does often set itself further back.
 
I agree, I often notice that they attack me while not just that I'm more advanced tech-wise, but also I have superiour numbers. It's especially troubling when my neighbours attack me and I just steamroll them into vassalization or whole conquests. Even if they have good defensive pacts (which they do btw), if they attack me I can just bypass it.

I understand if they were bribed or a joint DoW, but the AI seriously underestimates the player quite often. I wonder if it's related to military strength calculations.

Also they often start wars (against each other as well) when their happiness situation is faaaar from ideal... I really hope some restrictions could be made here.
 
100% agree here. I find the AI goes through pendulum cycles each time this is changed.. the AI is too aggressive so it gets pulled back.. the AI is too passive then gets pulled the other way.

The thing is it's not (just) over aggressive AI.. it's like the OP said.. AI making war when it is just not ready or able. I find the majority of the issues stems from being bribed to war. When an AI "plans" a war itself it will often have it's troops lined up against your boarder ready to fight.

From someone who likes to play "roleplay", this frustrates the heck out of me as it makes having long term peaceful relationships with other AI near impossible... Even if you attempt to hold a large army to stop the lesser AI from suiciding itself into you.. they still get pulled into bribed wars

Even the team up wars.. that make somewhat more sense particularly when you have half the world gang up on a winning civ.. the attacking civs should probably attempt to do the "wait 10 turns to prepare" option a tad more. (Does the AI even do this? I hardly ever ask the AI to gang up)
 
Last edited:
I haven't had much time to play recently, but in the past this was happening quite often: a previously long time allied direct neighbor is bribed to DOW me totally unprepared for war. So I march in with my huge advanced army, eliminate all feeble opposition in 1 or 2 turns and then start taking cities almost unopposed.
 
I'm working on this. Are you sure that it's actually bribery that's causing the wars or is this just a guess?
 
I'm working on this. Are you sure that it's actually bribery that's causing the wars or is this just a guess?

Personally I am still of the view that much of the unexpected agression comes from the cut-off method of the wonder-building diplo malus (which as you have noted will be adjusted in the upcoming version).

I found that in my recent game that many civ's visible attitude towards me changed markely right after building a new wonder. When someone else build another wonder that hostility died down. Then I build one more and it came back again. I was suprised to find that as many as five of the twelve civs in my game who I previously had a DoF with backstabbed me at some point - denouncing me before the DoF ended. Later I found myself at war with multiple civs, including one who shared my religion and who I was previously friends with.

Not the only factor of course, I can see that there are other things at play like people's relationship with other people who have denounced me or who I have denounced. That strong red modifier that turned up (and then went away before turning up again after building another wonder) was the most unintuitive aspect though.
 
Personally I am still of the view that much of the unexpected agression comes from the cut-off method of the wonder-building diplo malus (which as you have noted will be adjusted in the upcoming version).

I found that in my recent game that many civ's visible attitude towards me changed markely right after building a new wonder. When someone else build another wonder that hostility died down. Then I build one more and it came back again. I was suprised to find that as many as five of the twelve civs in my game who I previously had a DoF with backstabbed me at some point - denouncing me before the DoF ended. Later I found myself at war with multiple civs, including one who shared my religion and who I was previously friends with.

Not the only factor of course, I can see that there are other things at play like people's relationship with other people who have denounced me or who I have denounced. That strong red modifier that turned up (and then went away before turning up again after building another wonder) was the most unintuitive aspect though.

Wonders and cities, one more city than the other AI's and some AI's go mental.
Need to test a game where I skip on the early wonders.
 
Going to post the new approach calculation for the upcoming version so y'all can give feedback. :)
 
Going to post the new approach calculation for the upcoming version so y'all can give feedback. :)
I mean if I'm at the top of the board, its not really incorrect.
Maybe some declarations are from city state quests? otoh I dont tribute much.
But there seems to be a lot of declarations where they wont gain much themselves and/or with no intent of even bringing an army.
 
I mean if I'm at the top of the board, its not really incorrect.
Maybe some declarations are from city state quests? otoh I dont tribute much.
But there seems to be a lot of declarations where they wont gain much themselves and/or with no intent of even bringing an army.

Could be a number of reasons - third party deals are one possibility, but it could also be a problem with the tactical/operational AI.

In any case, I've toned down the wonder penalty, modified competition penalties, and fixed a number of bugs by going through the main approach function line by line (with 3900 of them, it takes a while haha), including one that was causing every AI (even pre-Atomic Gandhi :) ) to apply strategic aggression weight as if they were a warmonger once they entered the Medieval Era. Bad set of brackets.

You can see the updated approach calculation for next version here: https://forums.civfanatics.com/threads/diplo-ai-approach-calculation-4-7-beta-patch.656793/

Let's see how things go next version, but it should be more stable.
 
Last edited:
This should be significantly improved for next version.
 
When do you plan to release next version?
 
Some useless wars should be looked at, but some seem to really play a role. Civs suiciding themselves in a hopeless war should be improved, but phony war declarations can also lead to dynamics I really like with current AI and that, if true, should be preserved.

I've recently seen for the first time a run-away England being too greedy and falling from a very dominant first position to last because everyone attacked her at the same time. I'm not sure, but I'd think this is only possible if the AI is willing to declare war without being serious at first, as a trial balloon, to see if others join.

A run-away military might be stronger than the next 2 players, but weaker than the next 3 players combined. And yet might not get attacked by the 3, because each AI can only evaluate the chances of a war with one ally at a time, not a full coalition. This game theory problem is actually solved by the AI willing to declare war without attacking, so following candidates can factor in the first players already at war when piling in. Then when enough have joined the phony war, it can become a serious attempt. Not sure it's really what happens but I love it :p

But then yeah, the first to try shouldn't be a weak neighbour of the target. But if this one gleefully joins the war but for some random reason all others chicken out, then its quite funny.

Another type of phony war I've seen seems related to a tactical evaluation, and if true I'm really impressed. Basically it was a OCC with a very defensible capital location. I was wonder spamming and attracting regular DoWs, with real fleets appearing on the horizon... and falling back. It felt like the AI justifiably decided to attack based on a strategic evaluation of military strength, but saw the actual death trap that my capital was and decided it wasn't worth it, and all those sails disappeared behind the horizon line without firing a shot. Absolutely awesome.
 
Some useless wars should be looked at, but some seem to really play a role. Civs suiciding themselves in a hopeless war should be improved, but phony war declarations can also lead to dynamics I really like with current AI and that, if true, should be preserved.

I've recently seen for the first time a run-away England being too greedy and falling from a very dominant first position to last because everyone attacked her at the same time. I'm not sure, but I'd think this is only possible if the AI is willing to declare war without being serious at first, as a trial balloon, to see if others join.

A run-away military might be stronger than the next 2 players, but weaker than the next 3 players combined. And yet might not get attacked by the 3, because each AI can only evaluate the chances of a war with one ally at a time, not a full coalition. This game theory problem is actually solved by the AI willing to declare war without attacking, so following candidates can factor in the first players already at war when piling in. Then when enough have joined the phony war, it can become a serious attempt. Not sure it's really what happens but I love it :p

But then yeah, the first to try shouldn't be a weak neighbour of the target. But if this one gleefully joins the war but for some random reason all others chicken out, then its quite funny.

Another type of phony war I've seen seems related to a tactical evaluation, and if true I'm really impressed. Basically it was a OCC with a very defensible capital location. I was wonder spamming and attracting regular DoWs, with real fleets appearing on the horizon... and falling back. It felt like the AI justifiably decided to attack based on a strategic evaluation of military strength, but saw the actual death trap that my capital was and decided it wasn't worth it, and all those sails disappeared behind the horizon line without firing a shot. Absolutely awesome.

AI does intentionally do this kind of dogpiling and alliance making, and even gets diplo bonuses with each other for doing so (humans can also benefit from this). It may also be a result of the AI players making coop war agreements with each other (I fixed some broken logic so the AI doesn't always have to declare at the same time for it to count).

Tactical AI has also been greatly improved as time goes on, courtesy of Dr. ilteroi :)
 
Top Bottom