I like this idea, thank you for suggesting it.
I've added a placeholder memory value for it and I'll code something like this soon.
I am honoured to have my suggestion considered to be added to the game and i hope it proves useful.
What about AI vs AI wars though? It's very possible the value never reaches zero for one side, so that AI never considers peace despite having crippling unhappiness.
It may be useful in an AI vs AI wars but the concept is not meant to be a replacement for the existing peace coding but a back up to the existing peace coding to deal with a very specific issue where wars are not ending between a player and the AI but nothing is actually happening.
As my thought process was primarily about AI vs Human wars that is why the figures are biased as Player infrastructure is usually more valuable than AI infrastructure. i.e. the Player losing one unit is usually a great victory for the AI and a significant blow to the Player where as the AI losing one unit is often much less significant.
A legitimate question is does this even need to be included in AI vs AI wars?
Does the human player even notice if the AI is stuck in a war and does it have a noticeable effect on their enjoyment of the game as the core elements that keep the player enjoying the game is fun, interest and challenge, not fairness to the AI. If we weren't having this discussion would anyone have considered or noticed if the AI gets stuck in stalemate wars?
From a player perspective AI's being stuck in wars probably does have a potential effect on the Player experience in an indirect way in that i assume more processing takes place when an AI is at war than when it is at peace which could slow the game down. How much of an effect would that have and is it even noticeable by the player?
How often does the AI get stuck in a war with another AI and does this affect their ability to provide a challenge to the player?
If this was implemented for AI vs AI wars, my Blue Sky Thinking was that the AI would accept white peace if offered and the value was at zero, not that the AI would automatically offer peace or only consider peace once it reached zero. I assume there is other code which tells the AI to consider and ask for peace which would instigate the peace offer and the recipient would automatically accept white peace if their value was zero as a simple back up if other processes fail to do so even though the current conflict is pointless.
For AI vs AI wars the values would really have to be equal which would probably mean different sets of values for Human vs AI wars and AI vs AI wars to ensure that if the recipient value is not zero then they have to be actively participating in the war and having some success as either the countdown timer would reduce them to zero and/or they would be losing more infrastructure than the enemy which would drive them to zero. They would have to be doing more damage to the enemy than they are receiving to stay above zero and significantly more damage and thus have a chance of 'winning' to avoid the coutdown timer driving them down to zero.