Diplomacy AI Development

Perhaps; let's see if using the median rather than the mean has an effect, though. :)

My main concern is that the penalty comes all at once. Say the average is 10, why should the AI be completely fine with me having 19 cities but then gives a penalty 3x worse than denouncement for settling one more city? It forces the player to constantly calculate the average - or median - number of cities in the game to determine when settling is allowed.

I am also curious, and could not find by search, is the AI "omniscient" to the players military strength? I see that it is used in determining the AI response to many situations, but how are they receiving this information? I can understand that if you are last (and well below average) in military on demographics you should be a clear target. But unless there is some other menu feature I'm not aware of, how else would the AI have any knowledge of your military strength?
 
My main concern is that the penalty comes all at once. Say the average is 10, why should the AI be completely fine with me having 19 cities but then gives a penalty 3x worse than denouncement for settling one more city? It forces the player to constantly calculate the average - or median - number of cities in the game to determine when settling is allowed.

I am also curious, and could not find by search, is the AI "omniscient" to the players military strength? I see that it is used in determining the AI response to many situations, but how are they receiving this information? I can understand that if you are last (and well below average) in military on demographics you should be a clear target. But unless there is some other menu feature I'm not aware of, how else would the AI have any knowledge of your military strength?

Military advisor gives you the same info in a roundabout way, and you can see players' comparative military powers on the scoreboard, but otherwise, yes, the AI does know your military strength. Would be too complicated and dysfunctional otherwise.

The penalty scales now, it isn't all at once (at least it will be next version).
 
Military advisor gives you the same info in a roundabout way, and you can see players' comparative military powers on the scoreboard, but otherwise, yes, the AI does know your military strength. Would be too complicated and dysfunctional otherwise.

The penalty scales now, it isn't all at once (at least it will be next version).

Thanks! Looking forward to the next version.

As for the scoreboard, I can not seem find to info about military strength of other players. I assume this is the screen you're referring to? I also clicked on "details" but it only seemed to display the overall score for each player. Is there something I need to hover over, or is this the wrong screen?

Spoiler scoreboard? :
upload_2020-4-3_23-48-49.png
 
Thanks! Looking forward to the next version.

As for the scoreboard, I can not seem find to info about military strength of other players. I assume this is the screen you're referring to? I also clicked on "details" but it only seemed to display the overall score for each player. Is there something I need to hover over, or is this the wrong screen?

Spoiler scoreboard? :

I meant the score list on the right side of the UI - mousing over the score numbers for each player reveals a score breakdown. Look for "# from Military Power".
 
I meant the score list on the right side of the UI - mousing over the score numbers for each player reveals a score breakdown. Look for "# from Military Power".

I see it now. I always just moused over the leader icon and not the number. Can't believe I was playing without knowing this. Thank you!
 
In my recent game the Zulus settled 3 tiles next to one of my cities and bought land to get horses. Ok they want to claim strategic resources aggressively, fine. As they were very close to my cities they now have a -20 modifier due to territorial dispute, which eventually led them to declaring war on me. I managed to defend myself and kill most of their units and even captured two of their cities. But now I have a significant warmongering penalty with the rest of the world for capturing those two cities, significant enough to be constantly at war with 4-5 civs at the same time. I know this penalty decays at rate of 2% per turn, but still this is where the warmongering penalty needs a fix, in my opinion, when you are the defender.

I think warmongering penalty should be more reduced if you capture one city after being dowed.
 
In my recent game the Zulus settled 3 tiles next to one of my cities and bought land to get horses. Ok they want to claim strategic resources aggressively, fine. As they were very close to my cities they now have a -20 modifier due to territorial dispute, which eventually led them to declaring war on me. I managed to defend myself and kill most of their units and even captured two of their cities. But now I have a significant warmongering penalty with the rest of the world for capturing those two cities, significant enough to be constantly at war with 4-5 civs at the same time. I know this penalty decays at rate of 2% per turn, but still this is where the warmongering penalty needs a fix, in my opinion, when you are the defender.

I think warmongering penalty should be more reduced if you capture one city after being dowed.
Did you try making peace after destroying his army, and bringing the first city to zero health? Opponents are generally more willing to make peace if they are about to lose a city, and less willing after losing that city.
 
Did you try making peace after destroying his army, and bringing the first city to zero health? Opponents are generally more willing to make peace if they are about to lose a city, and less willing after losing that city.

I could have but that was not my point. A civ built a city right next to me to get horses and after a few turns declared war on me because of territorial dispute. If you say that I should just kill his units and make peace? No, I want to capture his forward settled city as retaliation and not be hated by all civs for that. That's a conflict between Zulus and me and Zulus can hate me all they want but I should not become the n°1 bad guy in the world just because of that. That's just my opinion.
 
I think warmongering penalty should be more reduced if you capture one city after being dowed.

That's a reasonable idea. Taking a city is a way to say "you hit me, and this is my retaliation". More than that should be considered "now I am the aggressor".
 
Seems that they're considered "World Wonder class" buildings. I'm looking for a flag or something that differentiates them from ordinary Wonders (might need to add one), as it's best to avoid hardcoding exceptions. However with the nerfs there shouldn't be a huge problem.

Code:
               if (!pBuildingInfo->IsUnlockedByLeague() && !pBuildingInfo->IsCorp())
                   owningPlayer.ChangeWondersConstructed(1);

Found a fix for next version: World Congress and Corporation buildings will no longer count towards the wonder spammer penalty. :)

That's a reasonable idea. Taking a city is a way to say "you hit me, and this is my retaliation". More than that should be considered "now I am the aggressor".

There is an "aggressor" flag in the code, so this could be done, although I'd need to add another memory variable. But simply counting the number of cities isn't really a solution, because retaliation to a DoW by capturing the other player's capital or some other major & more distant city would be an exploit.
 
There is an "aggressor" flag in the code, so this could be done, although I'd need to add another memory variable. But simply counting the number of cities isn't really a solution, because retaliation to a DoW by capturing the other player's capital or some other major & more distant city would be an exploit.
I don't think I'd really consider it an exploit. I mean if I've taken their capital we are already in capitulation discussion anyway, and if I take a distant city that just means it will be hard to hold when someone decides to DOW me later. I still think taking a single city is fair play for a DOW.
 
That's a reasonable idea. Taking a city is a way to say "you hit me, and this is my retaliation". More than that should be considered "now I am the aggressor".
Gazebo has always considered this as a fishy exploit. Provoking poor AI, then taking one city from it without worldwide penalties.
 
Gazebo has always considered this as a fishy exploit. Provoking poor AI, then taking one city from it without worldwide penalties.

Well you do have a lot of logic in that diplomacy AI for assessing military strength. An AI shouldn't be trying to attack a military powerhouse just because I start saying nasty things :)
 
Gazebo has always considered this as a fishy exploit. Provoking poor AI, then taking one city from it without worldwide penalties.

AI's shouldn't be declaring wars they can't win. Even then, the AI would have to be declaring war every time the peace treaty expires for this to be a viable exploit. I think it would be something worth testing in the beta, at the very least.
 
I don't think I'd really consider it an exploit. I mean if I've taken their capital we are already in capitulation discussion anyway, and if I take a distant city that just means it will be hard to hold when someone decides to DOW me later. I still think taking a single city is fair play for a DOW.

Gazebo has always considered this as a fishy exploit. Provoking poor AI, then taking one city from it without worldwide penalties.

Well you do have a lot of logic in that diplomacy AI for assessing military strength. An AI shouldn't be trying to attack a military powerhouse just because I start saying nasty things :)

AI's shouldn't be declaring wars they can't win. Even then, the AI would have to be declaring war every time the peace treaty expires for this to be a viable exploit. I think it would be something worth testing in the beta, at the very least.

Diplo AI has been getting a lot smarter over time with my modifications, however whether they choose to DoW if you insult them is actually random (friends will never declare, and friendly approach/opinion reduces the chances, but still). Perhaps that's something to be looked at.

I see your point, although I still feel there's a distinction between capturing a forward-settled city and using a one city exemption to capture a capital with lower penalties.

I could have but that was not my point. A civ built a city right next to me to get horses and after a few turns declared war on me because of territorial dispute. If you say that I should just kill his units and make peace? No, I want to capture his forward settled city as retaliation and not be hated by all civs for that. That's a conflict between Zulus and me and Zulus can hate me all they want but I should not become the n°1 bad guy in the world just because of that. That's just my opinion.

You aren't intended to be the #1 bad guy in the world for capturing two cities - I captured three in my most recent game, two of my neighbors hated warmongering and yet I didn't get massive penalties for it (I did get massive penalties with Morocco for capturing his cities, but that's to be expected). Perhaps your neighbors just rolled 10's for warmonger hatred scores or something? :)

---

We could try something like (in pseudocode):
Code:
If other player is aggressor and we've only captured one city:
- And the other city is a border city with ours,
- And the other city isn't an original capital or Holy City,
- And the other city isn't the other player's only city,

Then reduce warmongering penalties for city capture by 50%.

Remember, though, that warmongering penalties aren't just for realism, they're meant to signal to the AI whether you're dangerous and risk attacking them - and to apply a mechanical penalty to unit CS and make conquest harder.

Another thing to consider: the player who declared war may be the aggressor, but perhaps they declared war in response to being backstabbed, or having their capital captured, or to regain their lost cities, or for any number of other "legitimate" reasons. In this case, reducing warmongering penalties wouldn't be a smart move for other AIs - even if the AI "shouldn't" have DoW'd someone stronger, the other player is still the real aggressor here.

The Casus Belli system from Civ 6 comes to mind...
 
Last edited:
If it hasn't been mentioned, it would be tremendously valuable if there was a screen where I can see how much "worth points" each resource of mine has to each Civ.

This way it can save me tons of time and clicking on each individual Civ to see who is giving me the best bargain for my resources.
 
If it hasn't been mentioned, it would be tremendously valuable if there was a screen where I can see how much "worth points" each resource of mine has to each Civ.

This way it can save me tons of time and clicking on each individual Civ to see who is giving me the best bargain for my resources.

Not feasible. The problem is that different amounts of a resource have different values; for instance, a luxury is worth more when the AI is happy, but once that luxury is traded the AI might no longer be unhappy, and this affects the value of other luxuries within a single deal.

If it were implemented for maps and cities it would also be a substantial drain on performance.

Also, even if it were feasible, it would be a lot of work to implement (UI work is particularly annoying and time-consuming) and I'm not skilled with LUA. I'm not adding this.
 
Last edited:
The Casus Belli system from Civ 6 comes to mind...

Man, no wonder why I was wondering why that feature was missing... completely forgot it was in Civ 6, not Civ 5. Been a while since I've played Civ 6. Didn't it have a religious war option too?

Probably out of scope for this thread, but something like that would help alleviate a lot of the aggression/warmongering balancing issues.
 
Top Bottom