BtS, the powergraph, and AI DoW decisions

magicalsushi

Prince
Joined
Aug 14, 2006
Messages
573
Location
Oxford, UK
Okay, so by my understanding, a major factor in whether AIs will decide to declare war on you is where you stand on the power graph relative to them. In Warlords games, I was able to avoid most wars by staying at the top of the power graph.

In BtS, you can't *see* the power graph unless you invest in espionage. If you have a lot of opponents, it takes forever until you're able to see everyone's demographics. What I'm wondering is, if the AI leaders can't see this information, how do they work out whether they want to attack someone? Am I safe from attacks if they can't see my demographics?

Or perhaps the AIs get to see everyone's demographics for free. What a surprise that'd be.

Does anyone know?
 
Actually, the AI gathers most of its military information with units sent into your territory during open border agreements. If you keep a high EP advantage and close borders, I've noticed that you can get away with a smaller defensive army. Conversely, whenever I let my defense slack, I can usually expect a DOW after I've noticed heavy scouting.
 
Open borders requests aren't just for trading you know.

I find it useful to keep a few explores in auto-explore mode in all game phases.
 
Open borders requests aren't just for trading you know.

I find it useful to keep a few explores in auto-explore mode in all game phases.

Yeah, but I'm not talking about how the human player should get information on rival armies, I'm talking about how the AI calculates doWar decisions. Prior to BtS, my understanding is that AI did not think particularly deeply about this kind of thing; it more or less just glanced at the powergraph and picked on anyone who looked relatively weak. There's not much point in talking about what the 'right' thing to do is, because the AI isn't particularly smart (or at least, it didn't used to be).

Actually, the AI gathers most of its military information with units sent into your territory during open border agreements. If you keep a high EP advantage and close borders, I've noticed that you can get away with a smaller defensive army. Conversely, whenever I let my defense slack, I can usually expect a DOW after I've noticed heavy scouting.

That's interesting. It'd certainly make sense to do it this way in the absence of powergraph data, although I'd be surprised if the AI analyses the position of rival armies particularly deeply. Is your explanation based on observation, or actually reading the code? It sounds quite plausible, but we can't be certain of anything unless someone checks the code itself.
 
Yes but that does not mean they are using their exploring to evaluate their chances of going to war with you. More than likely they're exploring your land enthusiastically because it's still unrevealed land to them. I think you might be missing magicalsushi's point again.

Magicalsushi, my gut feeling would be that the AI still somehow knows the power values and uses them in the calculation. I cannot imagine how it would otherwise evaluate the strength of a player in an efficient way.

I'm certainly interested in hearing from someone with some skill in interpreting the code.
 
If we're strictly talking DoW decisions by the AI here, then I think it's more than just the powergraph. Last game, for example...

I have the Greeks pinned in on the bottom part of a tall, skinny continent - placed a city to prevent them from growing north while I leisurely soaked up all the unclaimed land myself. Went on for quite some time, but eventually the Greeks (despite being below me in power) went to war.

At the time, I was impressed, thinking 'wow - the computer figured out I was screwing it badly on the land grab, and it's only chance to expand was through me - annoying, but still kinda cool'. Though, to be honest, in the years prior I had rejected numerous open borders requests (I generally do, I hate having strangers wandering around!) and the combined neg modifiers may have been what pushed him to DoW.

Anyone happen to know (if it's not too much of a threadjack) if you get a neg modifier for EACH TIME you refuse a request (say, open borders) if it's the same request? i.e. if they spam the request at you and you keep saying no, do you end up with a huge neg diplomacy penalty?
 
At the time, I was impressed, thinking 'wow - the computer figured out I was screwing it badly on the land grab, and it's only chance to expand was through me - annoying, but still kinda cool'. Though, to be honest, in the years prior I had rejected numerous open borders requests (I generally do, I hate having strangers wandering around!) and the combined neg modifiers may have been what pushed him to DoW.

Anyone happen to know (if it's not too much of a threadjack) if you get a neg modifier for EACH TIME you refuse a request (say, open borders) if it's the same request? i.e. if they spam the request at you and you keep saying no, do you end up with a huge neg diplomacy penalty?

I don't think you get neg modifiers for refusing open borders. As far as I know, it's only for refusing tribute or "requests for help" - any trade where you get nothing in return. To the best of my knowledge, there's no negative modifer for refusing an ordinary trade, not even a hidden modifier.

As for the land-grab/peninsula issue, my theory is this: the AI makes DoW decisions using simplistic criteria I've described elsewhere (powergraph, number of tiles of overlapping culture, some random numbers and a % chance to change its mind because it likes you so much - all this in the absence of other triggers, such as refusing tribute or being bribed by someone else) ... BUT if you're the only person they can reach (like in your situation), it stands to reason that if they declare war on anyone, it has to be you. They can't send troops towards anyone else unless you open your borders. Because they can't expand further, all of their production is poured into buildings and troops, rather than settlers. Their tech level is low because their empire is small, so they can't build wonders and they don't have as many buildings available as other civs. Soon, even the peacemonger civs run out of things to build, and have to stick to building units. They end up with a powerful army, and you're the only person they can use it on. (note: that's just my musings on the matter - perhaps being crushed on a peninsula genuinely does wind them up!).

If I'm right, then even in a situation like this, they'd never consider attacking you when friendly (or even pleased, in some cases). In such a situation, it wouldn't matter how badly you messed up their expansion.
 
Hmmm... maybe you're right, as after a while at war in that game, I eventually gave a tech for peace (got tired of trying to fend off all those units you mentioned - you were absolutely right about that, they had quite a few despite having only 2 cities!) and then later in the game (long after the war was over) we ended up with pleased relations. Other than some spy business occasionally, not really any trouble from them. So, you're most likely right... :)
 
I now think of AI war declarations in the terms outlined in dj_anion's excellent guide, which is based on the xml code. It think it comes down to the different leaders' personalities and the other game factors all calculated together each turn of the game.

so for example: Brennus
his aggressive level is coded as "high"
his peace probability ranking is (%): 20/70/100/100
his base peace weight is 0

So copying from the guide:

Aggression level refers to war planing probability (very high, high, medium, low, quite low, very low)

Peace probability (percentages are for Annoyed / Cautious / Pleased / Friendly relations.) Each round, every AI will run a Declaration of War check against every other civilization. This check involves an evaluation of relative military strengths, defensive pacts, logistical considerations (shared borders, ocean crossings), existing conflicts, etc. The Peace Probability percentages above indicate the likelihood that an AI will ignore a decision to declare war due to diplomatic factors. Note: While a decision to go to war is immediate, the actual declaration may take a dozen turns or more)

Base peace weight (scale: 0 – most warlike, 10 – most peaceful)

Brennus therefore is always planning for war, but he will not declare on you if you have Pleased or Friendly relations, no matter what your power ranking is, etc. And even on Cautious there is still a 70% chance he will not declare each turn. This is good to know, as other warmonger leaders will have a much higher chance to declare on you, even at Pleased.

reference: http://forums.civfanatics.com/showthread.php?t=236346
 
One caveat there:

"he will not declare on you if you have Pleased or Friendly relations"

The "you" in that statement refers to the average ranking of your entire team, including Vassals. It also applies to the turn the war declaration is being considered.

So if you are Cautious with him, he may decide to go to war. Before he declares, your relationship may improve to Pleased. That doesn't mean he'll scrap his war plans. He's still going to attack you, because the decision was already made.

Or, he might be "Friendly" with you, but you have a Vassal. And he's Furious with your Vassal. The average of "Friendly" and "Furious" is "Cautious", therefore you would again be a candidate for attack, despite the fact you personally have a Friendly relationship.

Bh
 
Oh, and some AIs (Monsterzuma!) has a chance of Dowing at pleased.
Also, you might find an AI DoWing you on friendly, because they decided to DoW you before they got friendly with you.
 
I seem to recall Blake saying that a factor in the AI deciding to go to war was when the AI's movement was blocked. Please note that I'm not saying that it's the only factor. This was in Warlords and I don't know if the same applies in BTS although it seems likely.
 
So if you are Cautious with him, he may decide to go to war. Before he declares, your relationship may improve to Pleased. That doesn't mean he'll scrap his war plans. He's still going to attack you, because the decision was already made.
Bh

you're right, that's an important clarification for this note: "While a decision to go to war is immediate, the actual declaration may take a dozen turns or more"
 
I seem to recall Blake saying that a factor in the AI deciding to go to war was when the AI's movement was blocked. Please note that I'm not saying that it's the only factor. This was in Warlords and I don't know if the same applies in BTS although it seems likely.

yes I think that's supposed to be covered in this part: logistical considerations (shared borders, ocean crossings), existing conflicts, etc.
 
I seem to recall Blake saying that a factor in the AI deciding to go to war was when the AI's movement was blocked. Please note that I'm not saying that it's the only factor. This was in Warlords and I don't know if the same applies in BTS although it seems likely.

In fact didn't he say that a necessary condition for declaring war was that the AI attempted to move a unit into the enemy territory (it's the first thing that gets checked)? This would have the obvious effect of AIs never declaring war on those they can't reach. It also seems to explain why AIs will always move units into your territory on the first turn of war. But maybe because BtS has what one might call Blake's BetterAI, these things are history.

jeffreyac, I think AIs may still be willing to declare war if they "believe" they have a higher power but don't. I think, for example, Aggressive AI makes AIs think they're more powerful than they are, usually resulting in more war declarations from AIs in a game.
 
jeffreyac, I think AIs may still be willing to declare war if they "believe" they have a higher power but don't. I think, for example, Aggressive AI makes AIs think they're more powerful than they are, usually resulting in more war declarations from AIs in a game.

some give themselves credit for more power than they have, if that's what you mean. in Warlords they all had a value for "iMaxWarNearbyPowerRatio". it was a measure of how strong the target's power could be compared to the AI, and the AI would still declare, on a nearby target. they all have ratings, isabella and montezuma are the most fearless, with the max rating of 130. anyone who's shocked to hear that monty's not afraid to attack when you have 130% of his power, i dunno what game you're playing :crazyeye:! liz is the wimpiest, at 80. on Agg AI, they all multiplied their own power by 4/3 for that factor.

there's a "iMaxWarDistantPowerRatio" too. the range on that one is a lot broader. isabella's again the top, 100. tokugawa is at the very bottom, 30. i guess he really doesn't want to leave his closed borders to fight that far away :lol:.

again that's all for Warlords, i haven't picked thru BtS to see if it's exactly the same.
 
Back
Top Bottom