Diplomacy AI Development

World Congress (League) AI =/= Diplo AI, but I'll give this a look over once the upcoming version is released (I believe it's supposed to be tonight).



Close to...

Domination Victory? Player has >= 75% of other players' original capitals

Diplomatic Victory? Player has >= 75% of votes required to win

Science Victory? Player's team has built the Apollo Program or any spaceship part, OR has at least 90% of techs and (num civs ahead of in tech > 2x num civs behind of in tech)

Culture Victory is more complicated:
Code:
Player must at least be in the Modern Era

If >= 4 other civs (not counting this guy) are alive, percent to check is 50%.
If 3 other civs (not counting this guy) are alive, percent to check is 25%.
Otherwise, percent to check is 0%.

If % of civs Influential or Dominant on > percent to check, and player will be influential on the civ they have the lowest influence on within 75 turns, then they are close to a cultural victory

They are also close to a cultural victory if they're currently building the CEP.

(Adding for next version to fix a bug: If player is already influential on all civs, then they are close to a cultural victory.
Reading the code made me realize that it returns "NO_PLAYER" for the civ a player has the lowest influence on if they are already influential with all civs.)

Exceptions
- If the game has already been won and this is the "Just one more turn..." phase, then no one is close to any victory.
- If the victory condition in question is disabled, it isn't counted (except Domination Victory, since you can always win by killing all other players).
- AI won't apply weight for being close to a victory condition if victory competition was disabled in DiploAIOptions.sql or the game has already been won (except Domination Victory).
Then, we have room for improvement.

See, I'm not really scared of an AI that gets to build the United Nations when I am pretty sure that I'll get my victory under 15 turns left. But I have to mobilize my army if I think AI can win in 20 turns when I still need 30. That's the point, first comes, first wins.
 
Vanilla Civ5 diplomacy would actually be good if it properly worked as advertised - in effect it is just a mishmash of biases. Beyond Earth and 6 have tried to improve on it and succeeded in some parts and failed in the others. To complement 0-10 gradients there could be hard states, kind of like personality traits, that outweigh or outright override decisions for specific leaders. E.g. arrogance, pacifism, warmongering, loyalty, honor, respect etc.
- e.g. some would pray on the weak, others would pick fights with opponents of equal power and hate those who pray on the weak
- for some third party conflict would forge a stronger alliance, for others a backstab opportunity
- successful warmongers respect other successful warmongers or see them as dire competition
- cowards are easier to extort from
- respect for uncontested world wonders from cultured nations
- traders would value trade a LOT
- pacifists would go to war as a last resort-
- mercenaries that would declare war for a big bribe
- perhaps, an option for faith war where loser would not lose cities but would adopt victor's religion instead

It would result in something like
Boudicca: religious, loyal, dim-witted, peaceful expansion priority, not interested in trade, ballsy
Dido: coward, opportunist, prays on the weak, prioritizes near settle>war> far settle, doesn't care about religion, hates other warmongers
Alexander: resents religion and science, respects culture,. arrogant, warmongering, respects other warmongers, resents pacifists, not a backstabber but does not become friends either, does not specifically prey on the weak but gives them no pass either.

TLDR: as I see it, AI should get distinct personality traits that would greatly affect their biases thus making them seem more human as a result. That adds a lot of predictability, but only in each leader's specific fields plus random personality option does not go anywhere. That seems like a bloatload of work tho tbh.
 
I think the number of cities each civ has should be taken into account. If you are a very tall civ and take one or two cities from your very aggressive expansionist neighbour, no one should be really worried about that. Also, holy cities and capitals, as you pointed out, are very strong targets.

So, what if you set two kinds of targets: Strong and weak. Strong targets are capitals, holy cities and big cities from a neighbor with fewer cities or population than the aggressor. Weak targets are all the rest. Make weak targets be just a third of the penalty of a strong target. Three low value cities equals one big city.

Pretty sure a city's value is already considered for warmongering, and I'm not certain this is a big issue?

I'll post the warmongering penalty calculation on the forums so people can give more informed feedback.

Seeing some promising stuff in my new game (4-10 patch/standard/king/Germany/progress):

I forward settled Korea and initiated 2 wars, but as soon as I was taking his capital, France (authority) - who I thought was being passive by not attacking Arabia at all - stormed my lands and proceeded to take my vulnerable city that I neglected to build walls in. Almost my entire army was still exiting my newly conquered land, so I couldn't respond and the city fell in 3 turns. I eventually responded once my army was present, and the war ended not too long after retaining the city. By this time Arabia had taken matters into his own hands, and they each traded cities.All of these events combined with happiness crunch left me unable to fortify my lands with the last couple cities I planned to establish; Askia swooped in and settled right behind me after already denouncing me for settling Dortmund and buying a couple tiles. I am about to attack him now that I'm at peace with France.Lastly, England and I had good trade going; I was actually supplying her with horses in hopes she would attack Songhia. Now she has suddenly lost her capital to the Zulu, who've I've yet to even discover. This is all taking place by turn 157.

Seems like good performance! I'm hoping for additional improvement in the upcoming version, particularly in the early game.

If the AI is gonna ask for a liege every time it is losing a war, then capturing vassals is no longer possible.

Just forbid voluntary vassalage when at war.

Maybe something worth polling the community over. I'm not sure this is a problem - why shouldn't the AI seek protection when they're vulnerable? Having a bigger state swoop in and throw their metaphorical shield over them, in exchange for the benefits the master receives, seems like legitimate strategy to me.

Furthermore, I often find myself involved in at least one war during my games. Should a phony war across the ocean also prohibit voluntary vassalage?

Then, we have room for improvement.

See, I'm not really scared of an AI that gets to build the United Nations when I am pretty sure that I'll get my victory under 15 turns left. But I have to mobilize my army if I think AI can win in 20 turns when I still need 30. That's the point, first comes, first wins.

Not seeing the strategic benefit for the AI here. Yes, it may have a sooner projected victory, but that could unexpectedly change, especially with how powerful late game units are. It doesn't benefit them to let you pass Passport System/United Nations/etc. without resistance.

Maybe their fervor for it could be toned down, though. Likewise for World Religion. I do think there are some improvements possible here (in that the AI sometimes puts all their voting power into stopping certain resolutions and lets others pass without resistance).

The World Congress vaguely reminds me of playing Cluedo, when it comes to trying to figure out what everyone will vote for. :)

Vanilla Civ5 diplomacy would actually be good if it properly worked as advertised - in effect it is just a mishmash of biases. Beyond Earth and 6 have tried to improve on it and succeeded in some parts and failed in the others. To complement 0-10 gradients there could be hard states, kind of like personality traits, that outweigh or outright override decisions for specific leaders. E.g. arrogance, pacifism, warmongering, loyalty, honor, respect etc.
- e.g. some would pray on the weak, others would pick fights with opponents of equal power and hate those who pray on the weak
- for some third party conflict would forge a stronger alliance, for others a backstab opportunity
- successful warmongers respect other successful warmongers or see them as dire competition
- cowards are easier to extort from
- respect for uncontested world wonders from cultured nations
- traders would value trade a LOT
- pacifists would go to war as a last resort-
- mercenaries that would declare war for a big bribe
- perhaps, an option for faith war where loser would not lose cities but would adopt victor's religion instead

It would result in something like
Boudicca: religious, loyal, dim-witted, peaceful expansion priority, not interested in trade, ballsy
Dido: coward, opportunist, prays on the weak, prioritizes near settle>war> far settle, doesn't care about religion, hates other warmongers
Alexander: resents religion and science, respects culture,. arrogant, warmongering, respects other warmongers, resents pacifists, not a backstabber but does not become friends either, does not specifically prey on the weak but gives them no pass either.

TLDR: as I see it, AI should get distinct personality traits that would greatly affect their biases thus making them seem more human as a result. That adds a lot of predictability, but only in each leader's specific fields plus random personality option does not go anywhere. That seems like a bloatload of work tho tbh.

I've given each major civ a "diplo type" recently based on a combination of their flavors and traits. The AI does factor some of the things you brought up into the approach calculation.

What you're suggesting, though, is more like the Civ 6 agendas system, and probably modmod territory.
 
Last edited:
I've given each major civ a "diplo type" recently based on a combination of their flavors and traits. The AI does factor some of the things you brought up into the approach calculation.

What you're suggesting, though, is more like the Civ 6 agendas system, and probably modmod territory.
Agendas are, basically, polar +15 or -15 attitude
What I am suggesting is giving each leader a dozen different half-agendas out of a pool of 2-3 dozen and making them much more flexible so they may be either only positive or only negative (-5 -3 -1 0 +1 +3 +5) or both or a direct 10-30-50% attitude multiplier (E.g. Harun will love you more the more trade routes you send to him, but Bismarch won't care), trust modifier that grows as time passes during friendship, the more DOF in a row the more trust etc. Some leader would specifically hate a lot if you convert their cities to the point of instant DEUS VULT (Spain?) but being honorable would not go to war if religion got spread naturally by pressure. Agenda system is reasonable if it is flexible enough to produce 5-6 different outcomes under different circumstances for each agenda based on leader personality instead of current 'ME GUSTA] or 'DIEEEEEEEEE'. Some would care for shared religions some won't, some would care for trade, some won't, some would hate you for going to war with them, others will respect you if you put a good fight etc. This would result, essentially, in layering of biases into a matrix rather that just a flat line of numbers when diplomacy is concerned making AI consider much more things when making decisions.and drastically reduce 'let's declare war in exchange for 8 GPT lol' and make AI more reasonable while still using already existing decision making systems number game without the need for a deep overhaul.
 
If the AI waste resources attacking the player that it could have used for winning earlier, then there's an advantage.

As it relates to the World Congress, I don't think this would provide a major strategic benefit (aside from what I already mentioned above) - what resource are they sacrificing? If there was the UN and their World Ideology up on the table at the same time and they were going for cultural victory, I could see your point (the prioritization could use some tweaking). In terms of the late game "panic mode", you may have a point, though; I could do some experimenting with prioritizing the highest victory threats throughout the game, although I want to avoid too much "gang up on the leader (often the human)" diplomacy. There seems to be kind of a fine line between prioritization and the AI behaving like a hive mind.

Agendas are, basically, polar +15 or -15 attitude
What I am suggesting is giving each leader a dozen different half-agendas out of a pool of 2-3 dozen and making them much more flexible so they may be either only positive or only negative (-5 -3 -1 0 +1 +3 +5) or both or a direct 10-30-50% attitude multiplier (E.g. Harun will love you more the more trade routes you send to him, but Bismarch won't care), trust modifier that grows as time passes during friendship, the more DOF in a row the more trust etc. Some leader would specifically hate a lot if you convert their cities to the point of instant DEUS VULT (Spain?) but being honorable would not go to war if religion got spread naturally by pressure. Agenda system is reasonable if it is flexible enough to produce 5-6 different outcomes under different circumstances for each agenda based on leader personality instead of current 'ME GUSTA] or 'DIEEEEEEEEE'. Some would care for shared religions some won't, some would care for trade, some won't, some would hate you for going to war with them, others will respect you if you put a good fight etc. This would result, essentially, in layering of biases into a matrix rather that just a flat line of numbers when diplomacy is concerned making AI consider much more things when making decisions.and drastically reduce 'let's declare war in exchange for 8 GPT lol' and make AI more reasonable while still using already existing decision making systems number game without the need for a deep overhaul.

I see what you mean, and I've thought of something similar - but your suggestions seem to involve making the AI intentionally stupid in some respects (for instance, respecting you for putting up a good fight against them, "honorable" AIs not going to war if religion was spread naturally through pressure). While this can be beneficial for immersion, it's counterproductive to the goal of having an intelligent AI that plays to win, and can be frustrating for players who aren't as into the roleplay aspect of the game, which is why I think it's modmod territory. Immersion is something I'd like to preserve where possible, but it's a second priority.
 
Defensive Pacts...

I'm noticing this seems to be the most broken area of diplomacy right now. I've had a hell of a time ever getting a DP with an AI, yet every AI seems to have 3 of them itself (12player game). It makes international war-diplomacy extremely difficult, and leads to endless "AI DoWs a random half of the map" wars. I feel like this is a feature that might as well be dustbinned in favor of improving general high level strategic AI. AIs should be extremely wary of anyone nearby gobbling up weaker neighbors. Let's say a level 100 AI#1 (totally made up scoring system here) attacks a shared-neighbor with level 100 AI#2 which is like level 50 AI#3, threatening to overwhelm it, AI#1 should see that as AI#2 threatening to become a level 150 neighbor and do what it can to prevent that negative outcome. Probably through the warmonger system, which should function more predictively than reactively, like:

Warmonger score = ( sum of warmonger score for potential capture of every city in DOWed AI's civ x [conquest probability factor] ) x [proximity factor] x [score factor]

Where [conquest probability factor] = relative strength scaling from 10% at 1:1 to about 100% at 3:1.

Where [proximity factor] = 300% for "neighbor" (either DOWer or DOWed), 200% for "close", 100% for "near", 50% for "far" or however those levels go.

Where [score factor] = score of DOWer AI + [conquest prob factor] x score of DOWed AI, versus score of AI calculating warmonger.

Something like that. Then add actual combat-based warmonger scores on top of that once it surpasses the (potential capture x prob factor) score determined at war start.
 
Defensive Pacts...

I'm noticing this seems to be the most broken area of diplomacy right now. I've had a hell of a time ever getting a DP with an AI, yet every AI seems to have 3 of them itself (12player game).
I'm just completing a Germany game that saw me have 3 dp's with 3 different civs throughout the course of the victory. All 3 were very strategic and made good sense; I actually turned down the French offer because I'd planned on attacking him. Also, for the first time that I can recall, I was actually able to initiate a dp myself through the trade screen - 99% of the time it's always "impossible" regardless of the situation, so I was pleasantly surprised! I had a strong military throughout the entire game, so that definitely helps. In terms of the AI establishing insurmountable dp's with like 5+ civs, that has become reduced and much better over the past several versions; in my current game, I never saw any civ have a dp with more than 1 other civs at a time.
 
Defensive Pacts...

I'm noticing this seems to be the most broken area of diplomacy right now. I've had a hell of a time ever getting a DP with an AI, yet every AI seems to have 3 of them itself (12player game). It makes international war-diplomacy extremely difficult, and leads to endless "AI DoWs a random half of the map" wars. I feel like this is a feature that might as well be dustbinned in favor of improving general high level strategic AI. AIs should be extremely wary of anyone nearby gobbling up weaker neighbors. Let's say a level 100 AI#1 (totally made up scoring system here) attacks a shared-neighbor with level 100 AI#2 which is like level 50 AI#3, threatening to overwhelm it, AI#1 should see that as AI#2 threatening to become a level 150 neighbor and do what it can to prevent that negative outcome. Probably through the warmonger system, which should function more predictively than reactively, like:

Warmonger score = ( sum of warmonger score for potential capture of every city in DOWed AI's civ x [conquest probability factor] ) x [proximity factor] x [score factor]

Where [conquest probability factor] = relative strength scaling from 10% at 1:1 to about 100% at 3:1.

Where [proximity factor] = 300% for "neighbor" (either DOWer or DOWed), 200% for "close", 100% for "near", 50% for "far" or however those levels go.

Where [score factor] = score of DOWer AI + [conquest prob factor] x score of DOWed AI, versus score of AI calculating warmonger.

Something like that. Then add actual combat-based warmonger scores on top of that once it surpasses the (potential capture x prob factor) score determined at war start.

This is likely due to a bug in military strength estimations that has been fixed for next version (see earlier in the thread).
 
I see what you mean, and I've thought of something similar - but your suggestions seem to involve making the AI intentionally stupid in some respects (for instance, respecting you for putting up a good fight against them, "honorable" AIs not going to war if religion was spread naturally through pressure). While this can be beneficial for immersion, it's counterproductive to the goal of having an intelligent AI that plays to win, and can be frustrating for players who aren't as into the roleplay aspect of the game, which is why I think it's modmod territory. Immersion is something I'd like to preserve where possible, but it's a second priority.
Within 15 goals you stated in the OP AI has to pick it's allies somehow. Right now it mostly randomly revolves around map placement and military strength so AI goes to war with neighbors when it runs out of settling options, has high war bias or was bribed to do so which makes sense if all AI have primary Domination victory goal. AI going for Science or Culture victory should not go to war period if they are on winning pace and focus on accumulating allies instead.

Outside of deliberately making different leaders stupid in different areas e.g. making Alexander Arrogant ******* to disregard diplomatic repercussions and have +50% multiplier to red modifiers or Pacifist Saint Ghandi -50% to red modifiers +50% to green modifiers I see no real way to prevent the game from devolving into free for all attack of the clones it is now outside of implementing 'threat' system that Stellaris has but that won't be much different than it is now when you inevitably conquer your immediate neighbors every game or die trying while making a pact and expanding in the opposite directions is never an option because of AI coveting lands you currently own. I do not think that deliberately limiting AI in such manner is detrimental. Player can still pick out of 40 AIs the game has so having half a dozen dedicated pacifists, traders or honorable allies would give the game more options, spice up all random and, realistically, there is nothing preventing from giving a -100 modifier for different ideologies or something if needed be. Deathmatch can be team deathmatch or domination. Maybe consider implementing Alliance victory type Galactic Civilizations has where you win domination victory when you conquer all non-allied capitals instead of all of them. There is not correct or easy answer tbh.
 
Within 15 goals you stated in the OP AI has to pick it's allies somehow. Right now it mostly randomly revolves around map placement and military strength so AI goes to war with neighbors when it runs out of settling options, has high war bias or was bribed to do so which makes sense if all AI have primary Domination victory goal. AI going for Science or Culture victory should not go to war period if they are on winning pace and focus on accumulating allies instead.

Outside of deliberately making different leaders stupid in different areas e.g. making Alexander Arrogant ******* to disregard diplomatic repercussions and have +50% multiplier to red modifiers or Pacifist Saint Ghandi -50% to red modifiers +50% to green modifiers I see no real way to prevent the game from devolving into free for all attack of the clones it is now outside of implementing 'threat' system that Stellaris has but that won't be much different than it is now when you inevitably conquer your immediate neighbors every game or die trying while making a pact and expanding in the opposite directions is never an option because of AI coveting lands you currently own. I do not think that deliberately limiting AI in such manner is detrimental. Player can still pick out of 40 AIs the game has so having half a dozen dedicated pacifists, traders or honorable allies would give the game more options, spice up all random and, realistically, there is nothing preventing from giving a -100 modifier for different ideologies or something if needed be. Deathmatch can be team deathmatch or domination. Maybe consider implementing Alliance victory type Galactic Civilizations has where you win domination victory when you conquer all non-allied capitals instead of all of them. There is not correct or easy answer tbh.

I think you've misunderstood how the AI works. It isn't a free-for-all deathmatch. The AI is opportunistic and competitive - but there are a wide variety of reasons why it might go to war with you, and it is definitely possible to befriend other AIs as well. If you're getting declared war on a lot, try building up a stronger military (and their strength estimation has been fixed for the upcoming version, as well).

Additionally, it can be beneficial for scientific and cultural AIs to go to war. They do go to war less often than warmongers, however.

If you're looking for a less intense/competitive game, try disabling victory competition in MODS > (1) Community Patch > Core Files > Core Changes > DiploAIOptions.sql, playing with Domination Victory disabled (1/2 war/hostile weight), or playing on a lower difficulty level.
 
I think you've misunderstood how the AI works. It isn't a free-for-all deathmatch. The AI is opportunistic and competitive - but there are a wide variety of reasons why it might go to war with you, and it is definitely possible to befriend other AIs as well. If you're getting declared war on a lot, try building up a stronger military (and their strength estimation has been fixed for the upcoming version, as well).
.
4) For flavor and smarter decisions, individual civilization leaders should behave differently from each other, but not radically so unless the situation calls for it.
5) The AI should be strong at evaluating the situation and making good decisions. However, the AI's situational assessment should not be the only factor in its decisions - see 4 and 7.
7) Diplomacy should be rewarding for players that invest time and resources into maintaining good relations and treating the AI well. This does not mean always being able to evade challenges (e.g. bribing the AI to avoid war constantly), or being stupid (e.g. allowing enormous warmomgering with no consequences) but there should be a return on investment for assistance, long friendships, etc. even if it sacrifices the AI's win chances slightly. This is a game and meant to be fun, after all.
8) In contrast, however, diplomacy should be punishing for players that do not take the time to invest resources into it - and because resources are limited and also because of global politics, civilizations that are friendly with everyone should be a very infrequent occurrence.
10.Diplomacy should feel realistic and immersive, within reasonable limits. My goal is to make the AI feel less robotic and more like actual civilization leaders.
.
The point is that AI should choose it's rivals wisely and right now it doesn't because it's opportunistic, universally competitive and has no understanding that pissing off human player is very different from pissing off other AI leaders. What do you mean by 'realistic diplomacy' then? E.g. when Soviet Union fell some countries joined EU, some teamed up into so called boreal forest union and others were left hanging and are now slowly consumed. Vox Populi AI having all the Russia's military might would not bother with diplomacy and just steamroll other countries due to military supremacy and close proximity out of opportunism. Unless there are mechanisms that prevent that diplomacy would not work period because if you go to some war and lose a third of your military power on the other half of the map you will be instawardecced by your neighbor if he's not at war because power balance is constantly in motion so if you base AI decision making off of it without at least 10-20 turn delay or other checks and balances it will be extremely erratic regardless of anything.

I ended up gravitating towards Superpowers + Various Mod Componenets custom DLL and having/writing a mix of diplomacy mods that make AI prioritize rivalry over opportunism, making green and red modifiers grow in power as eras advance, warmonger score overhaul that accumulates slower, does not decrease over time and uses relative calculations.so you are considered warmonger if you have most/90%/80%/70% warmonger score in the game and get warmonger score based on the score other nation has so attacking pacifists gives up to 400% more warmongering and attacking the worst warmongers in the game gives less warmongering etc.

I played like 6 or 7 separate installation Vox Populi games on 5-6 difficulty the last one being on august patch and AI indeed plays the game as a deathmatch with random wardecs across the map for brownies and the only way of being friendly with AI is having no shared borders and bigger army. Maybe just my personal experience tho, but ALL of my 'friends' tried to conquer me randomly from being 'friendly' (Ghandi, Ghengis, Dido, Caesar, Napoleon, Suleiman, China, Casimir) and while it is understandable for leaders with high deceit, for others it made no sense. Yes, I had smaller standing army, but I also had the economic and production potential to triple my military power in 10 turns which I did and chewed all their faces off except my engagement with Caesar because I was greedy, forward settled twice and had no roads to move troops fast enough. A very questionable experience tbh. Player does not need a strong standing army to be very successful in defensive wars and by the time AI can muster together a defensive force it has already lost half of it's cities and is forced into vassalage. Strong military never works as power estimate unless you drastically decrease military unit production speed during war and remove option to buy troops with gold outright.

VMC AI does take player gold reserves and manufacturing into account so while wars are much less frequent, they rarely result in attrition stalemates because AI only goes to war as a last option, it is certain it will overwhelm and win or sees that it failed at it's victory goal and declares a war of despair with a specific 'I don't see myself winning so i can only pray that my armies will succeed' message or just totally hates your guts from diplomatic modifiers.
 
The point is that AI should choose it's rivals wisely and right now it doesn't because it's opportunistic, universally competitive and has no understanding that pissing off human player is very different from pissing off other AI leaders. What do you mean by 'realistic diplomacy' then? E.g. when Soviet Union fell some countries joined EU, some teamed up into so called boreal forest union and others were left hanging and are now slowly consumed. Vox Populi AI having all the Russia's military might would not bother with diplomacy and just steamroll other countries due to military supremacy and close proximity out of opportunism. Unless there are mechanisms that prevent that diplomacy would not work period because if you go to some war and lose a third of your military power on the other half of the map you will be instawardecced by your neighbor if he's not at war because power balance is constantly in motion so if you base AI decision making off of it without at least 10-20 turn delay or other checks and balances it will be extremely erratic regardless of anything.

I ended up gravitating towards Superpowers + Various Mod Componenets custom DLL and having/writing a mix of diplomacy mods that make AI prioritize rivalry over opportunism, making green and red modifiers grow in power as eras advance, warmonger score overhaul that accumulates slower, does not decrease over time and uses relative calculations.so you are considered warmonger if you have most/90%/80%/70% warmonger score in the game and get warmonger score based on the score other nation has so attacking pacifists gives up to 400% more warmongering and attacking the worst warmongers in the game gives less warmongering etc.

I played like 6 or 7 separate installation Vox Populi games on 5-6 difficulty the last one being on august patch and AI indeed plays the game as a deathmatch with random wardecs across the map for brownies and the only way of being friendly with AI is having no shared borders and bigger army. Maybe just my personal experience tho, but ALL of my 'friends' tried to conquer me randomly from being 'friendly' (Ghandi, Ghengis, Dido, Caesar, Napoleon, Suleiman, China, Casimir) and while it is understandable for leaders with high deceit, for others it made no sense. Yes, I had smaller standing army, but I also had the economic and production potential to triple my military power in 10 turns which I did and chewed all their faces off except my engagement with Caesar because I was greedy, forward settled twice and had no roads to move troops fast enough. A very questionable experience tbh. Player does not need a strong standing army to be very successful in defensive wars and by the time AI can muster together a defensive force it has already lost half of it's cities and is forced into vassalage. Strong military never works as power estimate unless you drastically decrease military unit production speed during war and remove option to buy troops with gold outright.

VMC AI does take player gold reserves and manufacturing into account so while wars are much less frequent, they rarely result in attrition stalemates because AI only goes to war as a last option, it is certain it will overwhelm and win or sees that it failed at it's victory goal and declares a war of despair with a specific 'I don't see myself winning so i can only pray that my armies will succeed' message or just totally hates your guts from diplomatic modifiers.

The diplo AI has changed significantly since August (if you win a lot of combat engagements it will bump up your projected military strength, for instance) - recent feedback is far more useful. :)

There's "FRIENDLY" AIs and FRIENDLY AIs. An AI with high WAR and FRIENDLY biases who wants to go to war might adopt the FRIENDLY "war face" even if not particularly deceitful.

Diplomacy being realistic is secondary to it being strategic. There are a few adjustments for flavor, but in general it's programmed in an attempt to win the game.

As for the rest of this...I'm not sure what you want me to do here? I'll take your feedback into consideration, but there are limits to how smart the AI will be, because you're a human and they're not. It can't do long term strategic planning the way a human player can. That said, I don't think it needs to be made intentionally stupid in order to improve it - feedback since I've started modifying the AI has been indicative of better performance.

If you want to propose specific changes to parts of the code, you're welcome to - likewise to make a modmod so diplomacy is more to your liking. Without something more specific to work with, I can't really help you.
 
The diplo AI has changed significantly since August (if you win a lot of combat engagements it will bump up your projected military strength, for instance) - recent feedback is far more useful. :)
Ok, I'll set aside a couple of days and try playing with the most recent patches. You did ask for inputs on how diplomacy could make more sense, but if you want to stick with survival of the fittest jar of snakes peer doctrine then military conquest of your peers is always the best solution to all your problems and that doesn't leave much space for actual diplomacy.
 
I played like 6 or 7 separate installation Vox Populi games on 5-6 difficulty the last one being on august patch
That's before Recursive, took on his mission to make Ai diplomacy make sense. He's not finished, though.
A big chunk of the work apparently was to change how base code expected AI to behave, which prevented development in this area.
 
Last edited:
Ok, I'll set aside a couple of days and try playing with the most recent patches. You did ask for inputs on how diplomacy could make more sense, but if you want to stick with survival of the fittest jar of snakes peer doctrine then military conquest of your peers is always the best solution to all your problems and that doesn't leave much space for actual diplomacy.

I did ask for inputs, but I'm not going to change the entire structure of how the AI works based on a single person's relatively general input, particularly not if it isn't based on recent information or a complete understanding of the mechanics (you say you've written diplomacy mods before, which is also why I suggest bringing up more specific changes).

I also don't have unlimited time to work on the diplomacy AI and while I take all feedback into consideration, I'm prioritizing certain changes over others.

I don't exactly get paid to do this, and the pandemic/various other things in my personal life have been keeping me busy! :)

What I'm saying is that simply saying "fix everything!" and proposing major structural changes without being more specific is not really helpful to either of us, and that some of what you propose may not be suitable for how the AI in VP works (it has been opportunistic and competitive for quite a while, and generally others here haven't given negative feedback about the way it's structured or behaves in general - outside of specific instances, like the wonder penalty being overtuned in a recent beta - so I'm hesitant to make fundamental changes like this in a community project - a modmod may be more suited to what you're looking to accomplish).

Re: war being used as a solution to everything - the AI does try to use diplomatic tools other than war, friendship and Defensive Pacts being two of the big ones. It's inherently limited in this, however, by how poorly written its interaction logic with other players is. It's like Firaxis wasn't even trying sometimes. Fixing this is one of my main priorities going forward.
 
Last edited:
That's before Recursive took on his mission to make Ai diplomacy make sense. He's not finished, though.
A big chunk of the work apparently was to change how base code expected AI to behave, which prevented development in this area.

It certainly hasn't helped that a lot of Firaxis code is hot, steaming garbage full of hardcoded values. The base approach function is a perfect example of this.

There's still a lot of work to do. Some of my next priorities are:
- Respond to player feedback about the latest beta version's changes

- Try to fix the terribly coded Firaxis memory management system for diplomacy, followed by revisions to a number of opinion modifiers and penalties tied to those memory values (including backstabbing penalties)

- Better logging for approach and DoRelationshipPairing, to allow for players to give more useful feedback (and follow this with more adjustments)

- Major overhaul of diplo AI interaction logic, including leader dialogue and trade deals (Firaxis logic for this is truly asinine; they didn't even proofread a lot of their dialogue for typos!)
 
Last edited:
I did ask for inputs, but I'm not going to change the entire structure of how the AI works based on a single person's relatively general input, particularly not if it isn't based on recent information or a complete understanding of the mechanics (you say you've written diplomacy mods before, which is also why I suggest bringing up more specific changes).

I also don't have unlimited time to work on the diplomacy AI and while I take all feedback into consideration, I'm prioritizing certain changes over others.

I don't exactly get paid to do this, and the pandemic/various other things in my personal life have been keeping me busy! :)

What I'm saying is that simply saying "fix everything!" and proposing major structural changes without being more specific is not really helpful to either of us, and that some of what you propose may not be suitable for how the AI in VP works (it has been opportunistic and competitive for quite a while, and generally others here haven't given negative feedback about the way it's structured or behaves in general - outside of specific instances, like the wonder penalty being overtuned in a recent beta - so I'm hesitant to make fundamental changes like this in a community project - a modmod may be more suited to what you're looking to accomplish).

Re: war being used as a solution to everything - the AI does try to use diplomatic tools other than war, friendship and Defensive Pacts being two of the big ones. It's inherently limited in this, however, by how poorly written its interaction logic with other players is. It's like Firaxis wasn't even trying sometimes. Fixing this is one of my main priorities going forward.
Perhaps I have misconstructed my arguments, but I only give Ideas to consider that you may have not come upon yourself, not making suggestions or requests. No overhauling - adding a dozen additional modifiers akin to shared religion and 'we fought together against a common foe' that use already existing game-tracked stats like culture output, relative army strength, land coveting priorities etc that would add more tiebreakers and personality flavor. You've already said that you are not interested in the sim aspect and are going for strategic performance instead so just forget I brought this up.
 
Perhaps I have misconstructed my arguments, but I only give Ideas to consider that you may have not come upon yourself, not making suggestions or requests. No overhauling - adding a dozen additional modifiers akin to shared religion and 'we fought together against a common foe' that use already existing game-tracked stats like culture output, relative army strength, land coveting priorities etc that would add more tiebreakers and personality flavor. You've already said that you are not interested in the sim aspect and are going for strategic performance instead so just forget I brought this up.

Ah, I think there's been some miscommunication - I didn't entirely understand what you were trying to say. Well, regardless, thanks for your ideas. I do appreciate the feedback! I only challenge suggestions in an attempt to improve the final product :)

It isn't that I'm not interested in the sim aspect at all, more that I'm trying to build a highly functional base that works for the most people; I'll keep this in mind if I ever write a better agendas system modmod for more roleplay-centric players.
 
It Seems impossible to trade back cities, (haven,t tried last version.)

Should it be like this? They don't even want their capital back.
 
Back
Top Bottom