Diplomacy AI Development

Venice on the other side of the world can be scary though. Especially when you're going DV and he starts buying all your spheres.
 
Venice performs well on crowded maps. It really is a dice. If Montezuma spawns next to him not so good you know what I mean.

Speaking of which in my current game I have a rare situation of the worst warmongers spawning right next to each other. Montezuma, Greece, Huns, and Zulu right next to each other nicely packed into mutual borders. Nobody yet has conquered the other as of early Renaissance.

I am there too but isolated by water and just patroling the borders. I am with Indonesia and have significant naval force in case some of them gets the wrong idea. My issue is with India rather. He is becoming a headache. His borders have swollen very large and he is disrupting city connections.
 
I must conquer India. It is imperative if I want to win this game. But my forces are split between land units and naval units. And I am sure Gandi has a carpet of units. It will be very tough.

So I am thinking to amass a sizeable army for this war. Large enough. I am considering going well above the military cap and sacrifice temporarily all city growth and construction due to military cap beyond the limit. But I must take Gandi down imperative
 
I've pushed some changes to Github. Not fully tested yet as I didn't get the time (hoping someone on Github can run a couple AI test games for me, if not it may be a short while, since I'm away for the weekend).

It'll need beta testing but the focus is on fixing the AI's wacky war logic.

Changelog:
Code:
Removed tons of useless code and five unused memory variables (there was leftover code for "trade agreements" and other untradeable items, plus unused vanilla code, that was taking up around 2,500 lines of code)

AI should no longer agree to start additional wars if they are already doing badly in an existing war or in general (very unhappy, bankrupt, lost their capital)

AI now has an aggressor flag in memory that sets whether or not they WANTED to start the wars they're currently involved in. So if they declare war, it is set to true. If they were planning on it and you declare war on them first, it is also set to true.
- Aggressor flag decreases reluctance to conquer cities and makes the AI less likely to make peace

AI now has a function to identify "phony wars" that they have no interest in waging, especially if they were declared on rather than the other way around. If it considers itself to be in a phony war it will agree to make peace at the earliest opportunity.

Completely rewrote coop war logic for saner, cleaner code
- Removed exploits where you could chain coop wars to avoid war weariness: you are now capped at 15 turns where you cannot make peace, and when the lock is set your war duration is subtracted from those 15 turns.

- When a coop war agreement is made, you will automatically declare war after 10 turns has passed (no prompt to back out). If one of you goes to war before then, both of you will (regardless of whether you or your target declared). While this slightly sacrifices player choice, it's more consistent, much less exploitable and more strategic of a choice. The AI will benefit from this a lot.

- You can still back out of a coop war agreement by ending your DoF, denouncing or declaring war on your ally - or by making a DoF or DP with the target. All of these will be treated as breaking your promise and apply a minimum -50 penalty to diplomacy and a reluctance to agree to future coop wars. The person who broke the agreement gets the penalty, of course. If something makes the coop war invalid (like the target becomes a vassal) then it is cancelled automatically with no penalty.

- AIs now start a sneak attack operation against the target when they are preparing a coop war, and are more likely to request that others join their planned war, so you may see alliances of more than 2 civs declaring war at the same time

- Warmonger penalty for coop wars is fixed. No penalty for declaring, and penalty for conquering cities is reduced by 90%.

- You are no longer able to request that AIs declare war on their friends, DPs, or on vassals and other invalid players. The button is disabled (previously it was still enabled but asking would do nothing except potentially get you a penalty with the target AI). AIs also can't request this from you.

- Rewrote coop war desire evaluation. AIs should utilize coop wars more often, be more likely to start coop wars with players that have a track record of agreeing to their requests, and choose targets more wisely. Penalty for refusing to agree also scales based on the AI's Forgiveness flavor now (ranges from -10 to -30 to recent assistance)

Improvements to approach selection
- AI should be AFRAID less often

- AI will be far more reluctant to wage distant wars before they're able to cross the ocean, and more aggressive towards neighbors in the early game

- AIs that have agreed to a coop war or are planning an attack will now always have the WAR approach

- AIs that are NOT *currently* planning an attack will no longer have the WAR approach. This should result in saner, more strategic diplomacy.

All of this is subject to change based on testing, but hope you guys will like it.

These changes are exactly whats needed. These last few games have been so easy- first time on deity that im ahead culturally, scientifically, economically and militaristically before mid game with 20 civs. That because I think the AI has been wasting all its resources and relationship diplomacy on these constant phony wars. Because I can be much more selective I feel like these phony wars have been hugely to my advantage. On top of that I have been able to get distant AI to pay me to declare war against my neighbors that they are at war with. I'm rolling in gold per turn from these deals. Hopefully these changes will make a big impact. Thank you as always.
 
Hey, I am facing this wierd bug, after liberating Siam, suddenly he broke our DoF and now there is a diplo penalty saying "I was caught plotting against them". But i didnt do anything of the nature.

whatsapp-image-2020-09-22-at-8-39-39-am.jpg


PS. if there is a way i can remove this modifier manually through editing in some way as I dont want to play with it?
 
Hey, I am facing this wierd bug, after liberating Siam, suddenly he broke our DoF and now there is a diplo penalty saying "I was caught plotting against them". But i didnt do anything of the nature.

whatsapp-image-2020-09-22-at-8-39-39-am.jpg


PS. if there is a way i can remove this modifier manually through editing in some way as I dont want to play with it?
That seems way too much to be normal. Probably report on GitHub.

Also, I would recommend taking a screenshot next time, on windows you can do: Windows key +shift + s and then Ctrl+v into civfanatics or GitHub.
 
is there a way manually change it by editing the savegame or something? The weird thing is the AI still showed as friendly and later as afraid rathher than gaurded.
 
is there a way manually change it by editing the savegame or something? The weird thing is the AI still showed as friendly and later as afraid rathher than gaurded.

Yeah, I have no idea what's causing that. But I think it's fixed for next version since I rewrote all that code.

In the meantime just disable the penalty. Go to (1) Community Patch > Core Files > Core Changes > DiploOpinionWeights.sql and search for "plotted".
 
Is it intended, that other AI civs claiming, Iam settling too close to them, after THEY have settled a very close city at my borders?
 
I have noticed that tradition civ boder growth is very big at the moment.
I would love to see an India with increased border growth UA. Iam permanently running out of tiles if I let my cities grow like they want.
But you are right, it's the tradition policy which lead to it maybe a little nerf to it would fit.
 
Is it intended, that other AI civs claiming, Iam settling too close to them, after THEY have settled a very close city at my borders?

Did it trigger after you settled a new city or after they settled their city?
 
I am amazed!

In the early game Egypt, which I had angered, demanded 3 luxuries. I refused, and during the same dialog they were like "F U, we are gonna take them anyway." And declared war against me right away. Felt like human to me :)
 
You will lose your original Pantheon and gets replaced with the Pantheon of the majority religion of another Civ. But when you spread your own religion you keep your Pantheon.
 
They have troubles keeping their religion though.
 
Indian cities can grow very big borders with God of Expansion Pantheon. Bigger than anybody else. Plus India often gets a religion and keeps its Pantheon.

Sorry, what does this mean?

You will lose your original Pantheon and gets replaced with the Pantheon of the majority religion of another Civ. But when you spread your own religion you keep your Pantheon.

They have troubles keeping their religion though.

Maybe discuss this in a different thread? ;)
 
Back
Top Bottom