The best example I have see of AI is the modular AI of C-evo.
There is an issue of having robust AI and maintaining game flexibility. There is no absolute cure for this, as the AI will perform best in an environment that is nailed down. The partial solutions include:
abstracting key concepts that are generic to any scenario created by users of the game - for example the concept of defence, and the selection of units based on their defensive value to act in defensive roles
allowing scenario makers to give hints to the AI in the form of unit roles
The game should have AI vs AI mode (i.e. no human players) for AI testing. This will allow millions of games to be simulated, limited only by the computing power throw at the problem. Within the AI testing there are two phases:
Algorithmically-equivalent AIs with randomly generated (or mutated) variables are pitched against each other to identify optimal variables
Algorithmically diverse AIs pitted against each other to identify the optimal algorithms
The game should play itself (particularly at the economy layer) without input from either human or AI player. The AI has the roles of diplomacy, military, and tweaking of the economy.