How the AI decides to go to War

b7fanatix

Warlord
Joined
Jun 20, 2013
Messages
178
A frequent complaint amongst those new to the game, when playing Vanilla or G&K, is how capriciously AI Civs make war on you.

It seems in these games the overwhelming factor is simply proximity and military strength.

At some point, even the most peaceful leaders are practically certain to backstab the player if strong enough, no matter how good of relations they may have enjoyed in the past. In a recent game, I also witnessed Rome attack Arabia and reduce it to a single city. After peace is declared, Ghandi takes advantage and wipes out the Arabians , because they are now so weak. Everyone is a psychopath.

In a recent thread someone mentioned that this is simply History, that wealthy but weak civs can expect to be attacked by their stronger neighbours.

My counter argument goes thus -

1. We're modern people with modern sensibilities playing this game. In the past this may have been fair game but it would not be so now.

2. The animated, voice acted leader avatars also give an illusion of sophistication and "human" emotion - if everyone acts like a psychopath, it breaks the illusion provided by the quality animations and voice acting.

3. It is true that almost every nation has been to war with every one of its neighbours at some point in history. However, what happened was that leader personalities were getting "randomised" every game turn, as one leader died/was replaced by another. Sooner of later, a warmongering nutjob comes to power, and this is how things get started.

In game however, the player remains in charge for the duration of the game, as do the other leaders, we always interact with the same voices and visuals. We expect them to behave as though a single person was in charge for the duration of the game and have some consistency.

4. What I am not after, is for everyone to sit around on the lawn knitting, singing Kumbaya etc. I want the pantomime bad guys to act like pantomime bad guys, bullying other civs, turning hostile, goading, denouncing, backstabbing, threatening and conquering. And for the "good guys" to behave a little more in accordance with how you've treated them in the past.

BNW is a case in point, i actually can't get a war at all even if i tried. Put all the worst tyrants from history together on one Pangea, nothing happens.

So what should the declare war logic look like?

Obviously, the first consideration should be military strength.

No Civ wants to die, if it is weaker it will not start a war however much it might like, though there could be a "Recklessness" leader trait that allows a small amount of leeway.

Now, assuming a military operation is feasable, it should come down to relations vs. aggression.

The more aggressive a leader, the less he has to dislike you to go to war.

Average agression leaders eg. Washington will attack a weaker neighbour if they have red modifiers indicating negative diplomatic relations. Highly aggressive (Hitler!) will attack any weaker states that aren't full of green modifiers (basically, full military allies). However, even the Nazis had Allies and displayed a limited amount of loyalty towards them IRL.

Another situation i'm wondering about, when you found a city and it turns out the AI covets that plot of land.

IRL, the aggressor Civ will often try to negotiate the sale of that territory , before going to war. Yes, back to good old WWII again - in the 1930s the Germans did try to buy Danzig off the Poles, but were rebuffed. If the AI did such a thing before going to war, it would give the player an option to avoid war. I would probably consider selling a city for 500g (so i can immediately buy another settler) rather than face war with a much stronger opponent, if I had another direction to expand into.
 
Taking advantage of your neighbors weaknesses is not being a psychopath...

If you look at it in game terms, it's good because that's the AI making actually sound decisions on a strategic level.

If you look at it in flavor terms, it's good because history is riddled with backstabbings and leaders taking these kind of opportunities.

I think if you choose no to build a strong military, you should beattacked by your neighbors, otherwise there's no tension in the game, you jus get to do whatever you want in your corner of the world.
 
You've trotted out the standard rebuttal, "build a stronger army".

I know how to play!

Maybe to keep everyone happy, there should be an option in the game then.

I'm all for Atilla, Monty, Caesar etc. being warmongers and attacking whenever a chance presents itself. Perhaps including the more peaceful civs getting wiped out if the player does not stand up for them.

What i don't want is for a Peaceful Civ that i went to war to protect, never forward settled, never told not to spy or to spread religion, to later on attack me because they think they are in a position to do so.

There should be plenty of jeopardy from the warmonger civs and from risking the anger of strong, but reasonable civs as you push for your own victory condition. Risking the Wrath of Washington etc by settling in lands near his.
 
Taking advantage of your neighbors weaknesses is not being a psychopath...

Depends on if the neighbour has been a staunch ally or a rival or an enemy.

Staunch ally - like USA & Canada - even though the USA could invade Canada, they have good relations and Canada has taken USA side in times of war. Invading Canada because they are militarily weaker would be psychopath behaviour!

Rival - depends on relations, they may go to war.

Enemy - of course you fight them when you have advantage.

If you think it's perfectly OK to invade a militarily weaker neighbour, why haven't you crushed Luxembourg , Belgium and the Netherlands?

If you look at it in game terms, it's good because that's the AI making actually sound decisions on a strategic level.

No they are terrible decisions. They fail to take into account the human player's skill. They just get large parts of their army destroyed, weakening themselves and the player without gaining anything.

They do this even if the player was a very good neighbour, didn't settle near them, didn't send spies or missionaries, gave help when asked, and sat between them and a much more dangerous warmonger.

The most likely outcome of these backstabbings is that a third warmonger comes along and wipes out either the player's or the backstabber's civilization, then goes on to become the game's "runaway" civ.

If you look at it in flavor terms, it's good because history is riddled with backstabbings and leaders taking these kind of opportunities.

I must admit i only know 20th Century history well. But I can't think of many true backstabbings. Hitler and Stalin? No , that was an obvious marriage of convenience, should have surprised no one when they started fighting.

Earlier in history, a new King would take power and switch his nation's allegiences. But leaders are immortal in this game. Russia is always ruled by Catherine the Great and the player always controls the same nation. It is reasonable to expect her to not rip up an alliance with you for no reason, unless she's one of the "bad guys".


I think if you choose no to build a strong military, you should beattacked by your neighbors, otherwise there's no tension in the game, you jus get to do whatever you want in your corner of the world.

1. you can't always keep up with AI especially on harder difficulties.

2. No tension in the game?

You just said you should build a big army to stop people declaring war on you?

Do you want tension or not?

I do want tension.

I want it to come from the "bad guys", attacking people with no provocation.

Or from having to risk the anger of powerful, but reasonable civilizations, as you expand close to their borders in your pursuit of victory.

I want to do my bit to stop the aggressive civs wiping out the peaceful ones, and try make the world a safer place. At the moment, you cannot do this because ALL of the civs will backstab you as soon as they get a chance. Ghandi and Atilla are just the same. If I weaken Atilla so Ghandi beats him, Ghandi becomes the runaway monster civ and will attack me because he is now stronger than me.

I could live with one Civ being faithless but in reality every last one of them is like that.

If you enjoy that kind of game, sure, tick "random personalities", but you probably just play domination anyway and like to wipe them all out?
 
1. We may be "modern" people, but the games starts BC, and continues.
2. The fact is that many of the "modern" countries in the world are merely interested in co-existing. The goal of the game is to win, regardless of VC ("You play to win the game"). In the real world, countries intent on world domination, even if not militarily, will take advantage of a weaker country.

How many countries out there today are looking for an end game similar to any of the VCs in Civ? Those who do are either warmongerers, or at least sticking their nose militarily where it doesn't belong.
 
The fact is that the AI is programmed to play as the player do, it is to say according to victory conditions. How many times players did invade some country they were allied with some turns before (just to not have a rep hit) ?

The player can be emotion-less when it comes to win. After all, we all know that it's just a program... in higher difficulty levels the player have to be even worse than the AIs. The AIs can occasionnally have declaration of friendship, but the high level player laugh at that, the only thing they want is finding an opportunity to league AIs against each others, and finally have an edge on them all. That's the goal of the game.

It have been said that it was unfair to the AI so was brokening the challenge that the AI roleplayed, or at least was not playing to win, just programmed to oppose a resistance in case of invasion, particularly early invasions. It's obvious that it was different in multiplayer, and that the game was a lot more tensed. (A little too much sometimes, especially on FFAs where not all players know how to ally, even the best, because it can be unobvious or even seen as cheating. Where is the frontier between straight playing and cheating ? Are we really allowed to make alliances in FFAs ? Some tried to ban them from FFAs. Some thought they were normal and needed. But a number of players could have feel helpless when they saw two big armies threw at them, just because they were at the wrong place.)

However it's good to see that AIs don't abuse alliances. (coupled with the bonuses they have in higher difficulty levels) They could abuse them in Civ6 though, but only in higher difficulty levels, with less bonuses maybe. It could be interesting.

However you may miss what the real geo-politics are made of. They are made by INTERESTS. Not feelings, or much more rarely. By ideology also. But ideologies are the interests of the ego / humanist visions of the world.

Are you saying that humanism lacks in Civ5 ? It may as well lack in real world, ruled by interests and egos. We don't even know if humanism is realistic.

If you want them to respect alliances, it should be implemented first. AIs do not calculate who could help them temporarily and don't make global plans. They act as blocks like in FFAs with forbidden alliances, each on their own. They are just supposed to play to win and mimic the multiplayer gamer, not always for its own advantage.
 
1. We may be "modern" people, but the games starts BC, and continues.

2. The fact is that many of the "modern" countries in the world are merely interested in co-existing. The goal of the game is to win, regardless of VC ("You play to win the game"). In the real world, countries intent on world domination, even if not militarily, will take advantage of a weaker country.

How many countries out there today are looking for an end game similar to any of the VCs in Civ? Those who do are either warmongerers, or at least sticking their nose militarily where it doesn't belong.

I'm not quite sure what you're trying to say?

1) that this is a game set in the ancient world, where there were no morals at all and therefore that is what it should simulate?

2) that the modern world (20th century) does not apply because no-one is playing to win - that the last leader intent on domination was probably Hitler?

I'd argue that every nation out there is trying to "win" or at least do the best it can economically, scientifically, culturally or diplomatically. But there are no agressive civs remaining, who will attack a weaker neighbour even if they've done nothing to antagonise them - at least none in charge of major powers.
 
The fact is that the AI is programmed to play as the player do, it is to say according to victory conditions. How many times players did invade some country they were allied with some turns before (just to not have a rep hit) ?

I've got 800 hours in single player and have never done that. I have started a war maybe half a dozen times, only with civs that i never accepted DoF with or have previously attacked/backstabbed / attacked a city state ally.

This does raise an intriguing idea. Inter-game memory (obviously make it an optional feature but..) , have AIs hold grudges from game to game. I think that'd be a lot of fun, it certainly applies with the way human players treat the AI sometimes!

The player can be emotion-less when it comes to win. After all, we all know that it's just a program... in higher difficulty levels the player have to be even worse than the AIs. The AIs can occasionnally have declaration of friendship, but the high level player laugh at that, the only thing they want is finding an opportunity to league AIs against each others, and finally have an edge on them all. That's the goal of the game.

I feel like i'm wasting my breath here and should just give up.

No matter how carefully i try to explain my reasons, it appears that nobody agrees with me and would at least like the option of having the AI play in the way i describe.

I appreciate you've learned how to exploit and abuse the diplomacy AI and gain an advantage playing on extremely high difficulty settings, it took a lot of skill no doubt so you don't want that taken away from you.

Or perhaps that's just the confirmation bias of the internet, where people who disagree with you are more likely to step in than those who agree. Particularly as experienced players who look at this forum are more likely to be happy with the status quo.

I don't see how this would affect your deity games though. I can't imagine there's a single Civ that you won't have antagonised in some way by the time you're only a couple of capitols from domination - you should be seen as a backstabber, forward settler or warmonger at the very least. Therefore you can still play with the "tension" of knowing a Civ could DOW you at any minute, because they overtook you in military buildup temporarily and you've been doing something that narks them off.

However you may miss what the real geo-politics are made of. They are made by INTERESTS. Not feelings, or much more rarely. By ideology also. But ideologies are the interests of the ego / humanist visions of the world.

Are you saying that humanism lacks in Civ5 ? It may as well lack in real world, ruled by interests and egos. We don't even know if humanism is realistic.

If you want them to respect alliances, it should be implemented first. AIs do not calculate who could help them temporarily and don't make global plans. They act as blocks like in FFAs with forbidden alliances, each on their own. They are just supposed to play to win and mimic the multiplayer gamer, not always for its own advantage.

I appreciate the real world runs on Realpolitik but there are limits. While Britain sailed it's armed forces halfway round the world to retake the Falkland Islands in 1982, America did not invade the defenceless UK mainland, even though militarily , they could have done so.

Again i'm not asking for everyone to sit around singing kumbaya. I'd like there to be a difference between aggressive leaders who will simply attack anyone even their staunchest ally if they think they can get away with it, and moderates who only do so if you're weak AND annoying.



If you have an aggressive playstyle you will be annoying so not much should change, everyone is a potential enemy. If you are more passive but enjoy feeling like you can trust no-one, hand pick a load of the worst leaders or tick the "random personalities" box.
 
The word psychopath has been thrown around way too much against the Civ5 AI. I was re-reading some Civ3 ARR stories in the stories and tales section and if you want psycopathic AI that's where you'll find it.

Soren Johnson also confirmed at some point Civ3 (and likely Civ4) AI play turn to turn and evaluate their position on a turn to turn basis, there are no long term planning involved. The only thing that the AI remembers is the attitude modifiers and programming slight of hands like deciding to go to war at Turn X then executing that plan by asking for open borders/tech for gpt trade knowing full well they will attack by Turn X+10. Makes the AI look like its planning ahead of time, but it's just coded behavior.

Civ5 AI enters phases of high level re-examination of its environment and there will be inflection points, often not immediate, but lagged. where to take a few capitals and your friends slowly drop away by choosing to not renew DoF then denouncing you later There is certainly long-term strategic planning going on when a runaway AI decides to keep a capital around or not attack a CS when they could have and you later find out they were going for a SS VC and not domination.

More generally as your power and stature increase, you'll begin to see Civs move away and oppose you. That's realistic and how it should be, but not overly canned where they are friends one turn and your enemies the next turn. The shift is gradual.
 
1. You are the one who brought up the point of being "modern people". My point is that the game is just not a modern time frame.

2. You are saying how to use modern logic and morals. My point is that most modern countries are not trying to do the equivalent of "winning" this game. No, most countries are not trying to win, but survive - the equivalent of finishing in the middle of the pack.

What countries are trying to "win" a cultural, economic, science etc. victory over the world (won't get into military) - who are trying to dominate over everyone? China, the US, Russia. None of whom are exactly loved through the world. Finishing third or fourth doesn't achieve a victory in CIV5.
 
I've got 800 hours in single player and have never done that. I have started a war maybe half a dozen times, only with civs that i never accepted DoF with or have previously attacked/backstabbed / attacked a city state ally.

Well you are the kind of pacifist player ! I used to be so in Civ2, but soon I understood the power of war. :D I feel sorry for you because you seem to have been mistaken in your choice of game. You will understand AI constantly declaring war on you only if you played Civ3-Civ4 multiplayer. Other than that, I can imagine that all those wars are annoying. :) Myself when I play Civ5 I take DOWs pretty personnally today yet. :lol: But I have my revenges most of the time, too bad the AI seems so fair when dying while it have been such a dickhead when alive. :D

This does raise an intriguing idea. Inter-game memory (obviously make it an optional feature but..) , have AIs hold grudges from game to game. I think that'd be a lot of fun, it certainly applies with the way human players treat the AI sometimes!

Yes, I happened to have that idea also. That was back in the times when I wanted AIs to play to win. :rolleyes:

I feel like i'm wasting my breath here and should just give up.

No matter how carefully i try to explain my reasons, it appears that nobody agrees with me and would at least like the option of having the AI play in the way i describe.

I appreciate you've learned how to exploit and abuse the diplomacy AI and gain an advantage playing on extremely high difficulty settings, it took a lot of skill no doubt so you don't want that taken away from you.

Or perhaps that's just the confirmation bias of the internet, where people who disagree with you are more likely to step in than those who agree. Particularly as experienced players who look at this forum are more likely to be happy with the status quo.

I don't see how this would affect your deity games though. I can't imagine there's a single Civ that you won't have antagonised in some way by the time you're only a couple of capitols from domination - you should be seen as a backstabber, forward settler or warmonger at the very least. Therefore you can still play with the "tension" of knowing a Civ could DOW you at any minute, because they overtook you in military buildup temporarily and you've been doing something that narks them off.

I'm sorry that you perceived my post like that, because this is precisely what i hate in this forum. Actually I was just trying to help you, but was pushed towards loud thinking before i realised. Not trying to go against you, I want to be with you on contrary, but not at the expense of my sincerity obviously. All what I can say to you is that I may have encountered the same problem than you, but it was not really a concern of first importance for me. I was more concerned by happiness penalties and other stuff during my progresses. But now I understand better, you are a builder type of player, pacifist for the most part... too bad you didn't played multiplayer in previous iterations ! That's what I'm deducing at least. In my first civ game i was a builder also, but the increasing difficulty of the levels made me have an enlightment : WAR !

The fact is that war is not that important in Civ5. At least, for a newcomer it doesn't seem important. Probably just annoying. But, it IS important. OK, it could change. It may have to. Especially with BNW (I don't own it, only vanilla) where you have more pacifist possibilities and more penalties on war, what is kinda contradictory with the vanilla philosophy where AIs will be more realistic and declare often. I have nothing against declaring war (you understood it ;) ) but don't put so heavy penalties for doing so then, that's contradictory ! If you want a realistic game with many wars, just don't cripple them !

I think there is also possibly a misunderstanding about leaders. They cost time and money to create, but I really don't like them. All douchebags, parodies of humans. It can be mentionned that they are hostile for example. But it much more looks like as if they were hating you, considering the insults you get from them. I don't see what feelings are doing here. You are first facing civilizations with interests, not persons with feelings. Kings have few to no feeling in politic in history.

I appreciate the real world runs on Realpolitik but there are limits. While Britain sailed it's armed forces halfway round the world to retake the Falkland Islands in 1982, America did not invade the defenceless UK mainland, even though militarily , they could have done so.

Again i'm not asking for everyone to sit around singing kumbaya. I'd like there to be a difference between aggressive leaders who will simply attack anyone even their staunchest ally if they think they can get away with it, and moderates who only do so if you're weak AND annoying.

You are still taking an example you probably don't know the deep part of it, and neither I. I'm not president. I don't even vote. I don't know, in 1982 there are nuclear weapons and any war between countries that possess it or allied with a country that possess it could cause the end of several powerfull countries power in a finger snap, not to mention casualties. (presidents included) That plays a lot in modern politics. Also, Belgium, Suiss and Netherlands are probably not attacked because it creates a defensive buffer between secular enemies like France and Germany ? Etc. etc. things that may not be taken into account in Civ5, granted. (But the game handles probably more than we think, we would probably be surprised)
 
When all is said and done, what i was asking for is for the decision to code something like this >>

IF OUR_STRENGTH + RECKLESSNESS > YOUR_STRENGTH

AND

AGGRESSION > RELATIONS

THEN

WAR

Someone mentioned that earlier CiV variants took account only of relations, leading to endless wars that restart as soon as the 10 turns of the peace treaty expire if you don't wipe out the defeated civ.

The current game takes account of strength, and I appreciate what you say about it playing one faction against another - it does this rather well and is impressive programming.
 
All what I can say to you is that I may have encountered the same problem than you, but it was not really a concern of first importance for me. I was more concerned by happiness penalties and other stuff during my progresses. But now I understand better, you are a builder type of player, pacifist for the most part... too bad you didn't played multiplayer in previous iterations ! That's what I'm deducing at least. In my first civ game i was a builder also, but the increasing difficulty of the levels made me have an enlightment : WAR !

The fact is that war is not that important in Civ5. At least, for a newcomer it doesn't seem important. Probably just annoying. But, it IS important. OK, it could change. It may have to. Especially with BNW (I don't own it, only vanilla) where you have more pacifist possibilities and more penalties on war, what is kinda contradictory with the vanilla philosophy where AIs will be more realistic and declare often. I have nothing against declaring war (you understood it ;) ) but don't put so heavy penalties for doing so then, that's contradictory ! If you want a realistic game with many wars, just don't cripple them !

I don't mind getting DoWed, i enjoy the challenge, it makes the game exiting.

To win a science game you need a large pop and a good number of cities, if some of those came from the idiot that mistook you for a victim. so be it.

However, i'd like to put the world to rights along the way, or at least keep it from going up in flames. Blasting off in my space ship while the land below goes up in mushroom clouds or ends up military dominated by Atilla is not much of a victory. If I play the diplo game correctly and manage to keep a few of the decent guys friendly, and stop them getting crushed, i don't expect them to repay me by declaring war! I can deal with it, but it's just not very nice!

Of course to win on harder difficulties, you need to be the aggressor, and be single minded. And i probably build too many buildings and too many wonders.

I appreciate your frustration at the barriers the game places in the way of conquest - going wide at all in fact. Gods and Kings seems a little better than Vanilla, in that it's got more ways to shed warmonger penalty and more ways to keep your happiness up (religion, buildings) but BNW is about as exciting as an old people's home.

I'm certainly not in favour of boosting warmonger penalties, or of reducing the number of wars, don't mistake that for my position!
 
Back
Top Bottom