Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Diplomacy - Alliance + War interaction

According to the game guide, an Alliance is an obligation to help with War if your ally gets into one.
However, there are some not obvious cases where conflicting interests might blur the action that should be taken.

Currently, the following code parts exist that deal with this :

1. When the Human Player asks the AI ally to declare war on a target, and they are at war with the target themselves, the AI player will always accept the proposal without a roll (they might demand gold at random, and if the player is low on gold this does cause a refusal, simply try again until they accept without demanding gold).
Starting from RC13 and the latest CoM, there is a slight alteration here : if there is an ongoing Peace Treaty between the two AI wizards, the proposal will be refused, to provide consistency with the below effect and prevent abuse by immediately asking this again once the AI players sign peace.

2. When an AI player is allied with someone, and that someone is at war with someone else, they'll declare war on their ally's enemy at a random chance (or break their treaty if there was one).
This cannot happen if there is a Peace Treaty, or another Alliance between the AI player and the target. This code simulates the AI's willingness to help out allies on their own without a request, as well as serving as a replacement for the AI player's request of war declaration between each other. They'll just do so without being asked.
This part works as intended and needs no changes I believe.

3.When an AI player is allied with another AI player who is at war with a third AI player, they'll declare war immediately.
This one was removed because the previous one does the same thing but better, as it works on everyone, and considers peace treaties.

4.When an AI player is allied with two other AI players, and they are at war with each other, both of those AI players will break the Alliance towards the first.
Now this is one which I have large doubts about.
First, this only works if all parties involved are AIs. The human player can maintain an Alliance with an AI who is allied to their enemy, and neither Alliance breaks. Their enemy will demand to break the Alliance when they want to propose a peace treaty, but that's all, and there is no real reason for the player to ever accept that, and if they want the peace, they can propose it on their own.

So basically, the human player has a huge advantage here, as they are allowed to maintain Alliances under a condition the AI player isn't allowed to. Eventually, they can also demand their ally to break the Alliance towards the other AI player, gaining further advantage, while the AI cannot ask the other AI to break the Alliance towards the player, see 2.

I believe either this check need to be completely eliminated, allowing AI players to maintain alliances with two people who are at war simultaneously, OR the AI players should be able to make each other break the Alliance through "2." in this situation which works against the human player as well. (In which case "4." also serves no purpose as they would break the alliance through "2." instead even between only AI players!)

Additionally, this check is actually buggy. It will only work if the player having the two Alliances has the lowest player ID of the three players involved! You can see in the latest Hadriex video that Flandre is maintaining an Alliance with player 1 and 3, despite them being at war, as she is player 2.

Speaking of Break Alliance and Declare War demands....neither considers the army strength of the target, which might or might not be a good thing.
If you are a lot stronger than AI 1 but much weaker than AI 2, you can force AI 1 to break alliance or declare war on AI 2.
This means that
-You can manipulate other weak AIs to help you against the strongest player, fighting him together, which is generally beneficial to everyone in the world, except the strong wizard of course.
-But also means that a weak AI will turn against someone much stronger than themselves, which is obviously bad for them.

I think it should at the very least consider the army strength when asking for a Break Alliance, and not do so if the ally is stronger, but...if the above changes to "2." and "4." are done, this is meaningless as they would do it anyway at a random chance, pretty much making it a 50-50 for breaking their alliance with the player, or the strong AI. So it might be better to leave this unchanged (giving the player a chance to unite the world against a large threat) and go for the changes to "2." and "4." instead.


Edit :
I've decided to remove "4." because it doesn't work correctly anyway.
I've also decided to implement the army size checks for "Break Alliance" and "Declare War" proposals. It's not fair that the player's army is considered, but the target's is not.

The only remaining question :
Should the AI that holds an alliance with two other players (human or not) who are at war with each other
a., randomly break one of the alliances, and eventually proceed to join the war on one side, fighting against the other
b., do nothing at all and wait it out, why get involved?

"b" would be more beneficial to the AI, and to an extent it also helps the human player (enemies won't be able to turn your allies against you), but it's unfair in a sense as being in this situation as the human player will make the AI allies ask you to break your alliances periodically, potentially making you lose both if no action is taken, whereas AI players don't do this towards each other. On the other hand, the player can force the AI ally to break their alliance eventually, if their army strength gets high enough, without the other AI being able to do the same against the player.

"a" would be fair to all sides, but a major game changer, whichever Alliance the AI breaks will have a huge impact on the chances of the human player to win, and would make Alliances a lot less stable than they are now.

So, in short , do we want the AI to get away with maintaining these conflicting alliances simultaneously, or not?
Reply

I don't think I follow your reasoning entirely. So you've opted to eliminate 4, which means that AIs will use 2 to start wars with the ally's enemies. How does option B treat humans and AIs differently? Is it because AIs can't use 1?
Reply

(March 8th, 2016, 10:49)spottedshroom Wrote: I don't think I follow your reasoning entirely. So you've opted to eliminate 4, which means that AIs will use 2 to start wars with the ally's enemies. How does option B treat humans and AIs differently? Is it because AIs can't use 1?

It benefits the player because of what you say, AI can't use 1. So the player has the option to request a "Break Alliance" while the AI does not. So in the situation when the player has one Alliance and one War, it is beneficial to the player. This will be much less of a problem now that I made the Break Alliance request consider army powers, you'd need to get strong enough to be able to profit from this, but it's still there.
It benefits the AI because they can maintain their Alliances instead of getting involved in a war, and save resources, while the player cannot : The AI players would ask for breaking the alliance with the other every time they wanted to propose a trade, and refusal results in a quite large relation penalty. So in the situation where the human player either holds two Alliances, or isn't involved at all, the AI benefits.

"a." on the other hand provides completely equal conditions, but whether the AI ally attacks the player, or helps them and attacks the other ally, is decided by random chance, not necessarily the best thing for gameplay. Such an event can be the deciding factor between an easy victory and a lost game, the stake is a bit too high. It also reduces the value of Alliances a lot, since as soon as someone else also forms one, yours can no longer be relied on.
Additionally, it would result in AI players getting involved in war a lot more often, especially peaceful wizards who have a lot of allies, which can make the game much easier, again not the best thing for gameplay.
It's also a bit counterintuitive as peaceful and charismatic would drag otherwise uninvolved AIs into wars.

As an example, there is the game Hardiex is currently playing in CoM. If "a." was in effect, he would have a 66% chance of losing pretty much instantly, and another 33% to have the strong AI ally eliminate the other AI players for him for the victory. (The strong AI who is like 3 times more powerful as anyone else is allied with Hadriex and two AI players, all of which are at war with each other)
"4." is not taking effect in the game because the AI players are in the wrong order. Due to this bug, the strong AI is effectively doing "b.", and gets even more powerful, while the others fight it out.
Reply

Hm. I think I prefer B, if for no other reason than picking an alliance to break seems like too important a decision to make randomly. Maybe if A could be made to take army strength into account?

Of course, the other way of balancing B would be to disable 1 so that a human player can't get extra benefit that way. That feels like removing functionality, though, which I'm not sure how I feel about.
Reply

(March 9th, 2016, 23:13)spottedshroom Wrote: Hm. I think I prefer B, if for no other reason than picking an alliance to break seems like too important a decision to make randomly. Maybe if A could be made to take army strength into account?

If I did that, it would have to compare the army strength of the person declaring war, their ally, and the target of war. Dobale, but then allies would not help each other at all (even if the target of the war is not another ally but someone else) unless the army strength allows.
Reply



Forum Jump: