config_ai_battle.xml
There is really only two lines in this entire file relevant to the Campaign AI:
<sally-out-ratio>2.0</sally-out-ratio>
Self explanatory this is the strength ratio of defender to attacker that is necessary for the AI to decide to sally forth rather then defend in a siege battle. This line quite literally means the defender’s strength must be twice that of the attackers. This is used both in the campaign and during battle to determine whether to defend or counter-attack.
<friendly-to-enemy-strength-ratio>0.8</friendly-to-enemy-strength-ratio>
Again the default explanation explains this line quite well. This is the selected armies strength to selected targets strength to determine whether or not to attack. Like the other line this is used both in battle and campaign mode. In campaign it determines whether to initiate battle or not. In battle it determines whether a defending army will take the offensive. The default setting shown here (0.8) means the AI considers it’s self stronger even if they are really slightly weaker in calculated strength.