Well, uhm, it still sounds like we agree with each other here. Maybe it's really me who misunderstood the OP. Of course such a hypothetical algorithm would "need" to account for all costs, opportunity costs, strategic costs, whether the province in question belongs to a vassal or its demesne, not just those costs directly expressed in a number in game... And this would mean that, sometimes the AI would fight a war it knows it will lose if draining the enemy is worth it, of course. But the right now, the usual result is the AI wrecking itself completely and being pounced on by everybody who can get a CB on them (slight hyperbole but I think this phenomenon isn't as pronounced as it could be simply because of the relative scarcity of CBs. And because every AI wrecks itself...).I'm in favor of AI considering opportunity cost, but it is very complicated, AI really need to understand how the situation would develop if both enemies get drained. Who has better reserves, whose realm can handle larger stress, who is more lukely to get backstabbed.
No, I'm not in favor of formulas that establish how much AI should lose before giving up on war. And, I'm not in favor of AI giving up on wars in which it is objectivly stronger just because AI lost a few battles. Eve just making AI recognise wars where it only wants to defend and would peace out on white peace, and woyldn't waste troops on sieges would be a good start.
I absolutely didn't mean to say I'm in favor of having a formula to make the AI give up after a certain amount of losses. In fact, this is pretty much the current system! Instead, in an ideal world, the AI would calculate how much it will likely lose (or rather, still in an ideal world, it would calculate how likely each possible result would be), and then decide whether to fight or give up. Naturally, this would probably make a little more hidden information necessary, or there wouldn't be any wars
And of course this algorithm is almost impossible to get "right" (or even as good as the one the player effectively uses).
What we maybe disagree on is whether an actual, realistically implementable algorithm could be better than the current "always total war always" system.
- 1