I worked on a wargame game awhile back, and we had a user-modifiable text file based AI for strategic level decisions: research, production, diplomacy, and territory objectives. We also had non-user modifiable AI code for operational and tactical actions.
One aspect that set our AI apart is that it had global variables that were generated at game start; which allowed the AI to have an integrated but varied strategy, and random variables that were generated each time a routine was called.
Global Variables; generated at game start, were used to select a strategy for the AI. This allowed the AI to choose between a range of pre-written strategies at game start. This meant that if it choose Strategy 1 it would apply that same strategy to research, diplomacy, production and strategic objectives.
Simplified Example:
{1,3,1,50} For Country 1 if global variable 3 has a value of 1 to 50 execute Russia First Strategy (and there were Russia first AI rules for research, production, diplomacy and strategic objectives)
{1,3,51,100} For country 1 if global variable 3 has a value of 51 to 100 execute England First Strategy
Turn Based Random Variables were used to vary the turn based choices within that strategy
Simplified Example:
For Russia First Strategy 1: Composition of 10 units would average: 5 infantry, 5 armor and 0 bombers.
{1-51}{2} - Produce Infanry Unit = 50% to product infantry unit that turn
{51,100}{3} - Produce Armor = 50% to produce Armor unit that turn
For England Strategy 2: Composition of 10 units would average: 5 infantry, 1 armor and 4 bomber
{1,50}{2} - Produce Infanry Unit
{51,60}{3} - Produce Armor
{61,100}{4} - Produce Bomber