Pfft. Just design a bit of code to evaluate the AI's situation and assign it changes based on that. The functions are already there to get military strength, gold, number of cities, and other details the AI could use to evaluate another player or it's own situation. If you want to go to all of that detail. That's probably over designing as the current AI is hardly intelligent enough to do even that kind of basic situational awareness.