Triggers for AI Declarations of War?

zenmaster

King
Supporter
Joined
Jul 25, 2007
Messages
790
Location
Hong Kong
I've been playing Civ V since its release, and BNW a lot lately.
Came across a situation that made me wonder again about specific triggers of war for the AI civs:

I know the obvious reasons why AIs declare war after you have amassed enough ill will: Crowding their space, Building wonders they wanted, befriending CSes they covet, just because they like war (certain civs), voting against them in World Congress or suggesting resolutions they don't like, having opposing ideologies, etc.

A few other less obviously hostile actions of my civ over the course of playing Civ V have also seemed to cause Declarations of War (DoW).
The latest example in BNW:

Settings: Epic/Large/Emperor/ All others standard except Diplo Victory turned off.
I had four cities up relatively quickly with Tradition. Two of them were somewhat near Babylon's capital. Though they expanded in the other direction, their units had sniffed around the cities on occasion, so I expected war at some point. 1 of the cities was not really close to a farflung Mongol city (far away from its capitol), but there was no CS or other city between them. I thought that might spell trouble one day too. However, Mongolia was friendly to me and was purchasing a luxury from me for 7gpt.

My four cities formed kind of a crescent shape, and there was a glaring open city spot in the center of it with a new luxury item I could use anyway, so when my happiness was ready for it, I built the fifth city. It was NOT near Babylon or Mongolia. Immediately, though, Babylon and Mongolia declared war. The funny thing was, Mongolia's "war" was pretty much a "phony war" as you may have sometimes experienced if you've played Civ V much. The AI civ will declare war, but then you'll never see a unit of theirs even near one of your cities. A few dozen turns later, they'll ask for peace.

Those "phony wars" often make me wonder what exactly I did to trigger them. Despite being friendly and having a trade agreement, did building that 5th city cause Mongolia to declare as a one-off trigger? Or was Mongolia just working in tandem with Babylon. Or was it coincidence that inevitable war was declared just then?

---

Other activities of my civ which have seemingly brought on wars (often phony wars) with AI civs in Civ V though not necessarily in BNW yet:

Researching or Discovering a military tech like Iron Working
Being close to finishing my civs first iron mine or horse pasture

I've tried searching the forums and come up with a lot of stuff for AI war behaviors for Civ IV but not so much for Civ V. Anyone with good working knowledge of the AI care to enlighten me a bit on non-obvious or specific triggers for AI DoW? Also, what kinds of situations lead to "phony wars"? If this has been covered in another thread somewhere please help me find that thread :). Thanks.
 
I find the general AI attitude is, "How dare you be ahead of me!" That is, if it looks like you're clearly winning, the AI feels obligated to do something to slow you down. If you're concentrating on preparing for warfare, other things will inevitably be allowed to fall behind in their development. That may very well explain the "phony wars": Just something to slow you down for a half-dozen turns or so.
 
Come to think of it, I've seen Ghengis declare a phony war, as well. Mongolia and Portugal both declared on me, but only Portugal sent any units, and only Portugal took any damage.

A bit later, Mongolia declared on Portugal.

I wonder if that was deliberate? Was Ghengis trying to use me to soften up the Portugese before declaring on them, himself?
 
AIs will ask each other for "will we declare war against X" same as you could in the discussions menu. Some AIs (like Mongolia) are always looking for wars and will gladly jump on the occasion. Most of the time, they are no trouble.
Not sure whether they do "bribe" each other (pay with gold or luxes), but i wouldn't be surprised. The devs tried hard to make the AI behave like a real player (and failed on some aspects)
 
Come to think of it, I've seen Ghengis declare a phony war, as well. Mongolia and Portugal both declared on me, but only Portugal sent any units, and only Portugal took any damage.

A bit later, Mongolia declared on Portugal.

I wonder if that was deliberate? Was Ghengis trying to use me to soften up the Portugese before declaring on them, himself?

Oh, I've seen them do that from time to time. They'll either gang on you, then declare war on each other. If one AI loses most of his units, then the other one will attack him, because they are weaker. You know, "how dare you!? He was my friend! Oh, he's weak now. Gonna attack because he is threat to the world. :rolleyes: "

or they will ask you to join them in a war against other AI, but once you move your units, they will declare war on you. One of the many reason I never send all units, and leave few ranged (usually cannons) units in the cities to defend, just in case. Oh and I always keep a stack of gold in case of rush-buying defenses (Castles\units) :goodjob:

PS. I'm often, if not always in a war or hate relationship with Babylon (in any game), but strangely, I've been very rarely in war with Mongols. Khan seems to always like me for some reason. Same with Attila, altho, he might attack sometimes, but after that he keeps being friendly. (says in grey that he doesn't hold a grudge and he gives me full price on trades).
 
There are no "triggers" in this AI, only likelihoods. Almost every possible action (within the game's realm) is coded to increase or decrease one or more possible weights (take them as probabilities for simplicity), one weight for each possible approach (WAR, FRIENDLY, HOSTILE, DECEPTIVE!!!, etc). In each round, the diplo AI calculates and updates these weights, and then "rolls" a sophisticated super-dice (the randomizer is not a simple one), and the APPROACH is decided.

So NO, no single action except for YOUR own DoW acts as a trigger for a DoW, nor any other approach for that matter.

It's all inside CivDiplomacyAI.cpp... a very interesting exploration, if you like coding. ;)
 
"how dare you!? He was my friend! Oh, he's weak now. Gonna attack because he is threat to the world. :rolleyes: "
Yeah, AIs always look like idiots when they come and tell you that the least powerful, beaten up civ, is a "threat to the world". They should at least have 2 different screens, one when they ask you to help defeat a real threat, and another one when they just kindly want to share some spoils of war :lol:
 
Yeah, I know what you mean. It's a coding for sure, but I always find it hilarious when everyone thinks Venice with only it's capital is threat to the world (playing peacefully, btw), while on the other side of the map Austria is marrying CS like crazy and becomes powerhouse. :crazyeye:
 
Top Bottom