Do not try and understand the AI behaviour in this game. That way lies madness ;-)
Indeed, it is even more maddening to try and understand the AI code, and then try to improve it!
FWIW, I have made some adjustments to the various AI probabilities to account for difficulty levels. Where the code checks for the major alliance modifiers, I've added +/-1 for medium AI and +/-2 for hard AI. For example, if the modifier is +1 then it become +3 for hard AI. The idea is to drive more traditional behavior at the higher difficulty.
For the "frivolous" DOWs like Austria and Russia being at odds with each other, I've included a modest -3 modifier to reduce these. There's still a chance, but hopefully a little less likely for several MPs. There's still alliances and calls for DOW that heat things up.
Anyways, I'm making a couple other minor adjustments for v1.21.04 which should be the official release version when I wrap it up. Any comments/feedback will help drive further improvements in the next update.
Empires in Arms Development Team