Ok, just so that I put my money where my mouth is (and I don't appear like an obnoxious bastard belittling other people's work), here is all the AI-related code I could find in Granto's OiM script - which I believe was taken by Germanicu5's ReallyBadAI.
Code:
;;;;;;;;;;better aI
declare_timer battle_timer
restart_timer battle_timer
declare_timer battle_timer_flank
restart_timer battle_timer_flank
monitor_conditions I_InBattle
and I_TimerElapsed battle_timer > 30000
ai_active_set off
wait 0.5
ai_active_set on
restart_timer battle_timer
end_monitor
monitor_event BattlePlayerUnitAttacksEnemyUnit BattleDirectionOfAttack != front
and I_TimerElapsed battle_timer_flank > 30000
and I_InBattle
ai_active_set off
wait 0.5
ai_active_set on
restart_timer battle_timer_flank
end_monitor
What that does is: Every 30 seconds or when an AI-controlled unit is attacked from the flanks or rear by a player-controlled unit (and 30 seconds have passed from the last time that happened) the AI is switched off and then on again.
So, by turning the AI off and on again, every 30 seconds, the AI somehow learns to split its forces, and flank, and time its charges, and manoeuvre better? I must say I'm sceptical.