Inside the Minds of AI
An AI’s Opinion for what it’s worth
An overview of their Opinion
One of the crucial aspects of how an AI acts towards another AI is their Opinion of that AI. Are they BFF, Mortal enemies, or somewhere inbetween? It affects many of their decisions, from how they approach the Civs they have met to Denouncements and Declaration of Friendships.
So how do they decide how they feel about each other? And what impact does their Opinion have on whether they decide to go to war or not?
Types of AI Opinions
There are 7 different types of Opinions:
Each turn the AI determines a score based on a series of factors which then gives rise to the opinions
If the score is 50 or more then the AI will have an opinion of the other as UNFORGIVABLE, or “Once a dick, always a dick”.
If the score is less than -50, then the opinion will be ALLY, or “a Dinky-Di Mate”.
And obviously the remainder of the opinions are between -50 and 50, respectively
How do they determine the opinion score?
What’s in an Opinion?
There are many factors that contribute to the opinion score, 62 in fact, spread out in the categories below:
The 62 factors are added together to give an opinion score that will range from a score below -50 to a score above 50.
Let’s look at one of these factors in more detail, as it is a talking point for many, and how it affects the AI’s opinion of the others.
Warmongering. What is it good for?
Given that Battle Royale is a Domination only game, Warmongering is especially relevant in this discussion about what is going on in an AI’s mind. Or more precisely, Australia is clearly a warmonger so why doesn’t every AI hate them?
The one of the reasons is that Warmongering is only one of 62 factors that determine an AI’s opinion. Another is how Warmongering factor is calculated.
Warmongering. Not as much as we think.
The AI determines the Warmongering score with the equation below:
Warmonger Score = (OtherPlayersWarmongerAmount* GetWarmongerHate)/100
OtherPlayersWarmongerAmount is the amount of warmongering points that the other player has accrued. 250 (DOW) to upwards of 2000 (after capturing several cities).
GetWarmongerHate is how much does the current AI hate a Warmonger. Is it a little bit or a lot? It is determined from their personality plus a random element.
The average score should be 5, and max out to 100. These figures are taken from the code directly.
What does it all mean?
As you can see from the previous slide, the contribution of warmongering to an AI’s opinion is from 0 to 100. The higher the score, the more likely that the Opinion will be UNFORGIVABLE. With an Opinion of UNFORGIVABLE is then more likely to denounce the player, and to declare war against them.
As from my previous post about how the AI works out the best approach to take with another AI and declare war, an AI’s Opinion is only one factor in calculating the prospects of war. And while Parksey is busily racking up warmonger points, it is not a forgone conclusion that the other AIs will declare war on him anytime soon.
References
Civ 5 SDK : CvGameCoreDLL_Expansion2/CvDiplomacyAI.cpp