Quote Originally Posted by ElectricEel
I have read in the discussions about the AI files that the AI is apparently hardcoded to attack the player if the player is at peace for too long, without regard for the current in-game situation. The lenght of time depends on the campaign difficulty level - if I remember correctly, 4 turns at Very Hard, 20 turns at Easy.
That's not true. The only thing there is is a comment (to non code savvy folk out there, that means a bit of code that is not processed, where the codewriter says what he wants his code to do or explains why it works) saying "special case exists here in code for forcing aggression on player if at peace with everyone for N turns", but that's it, there's no actual code for this. Just the comment to tell people "if you want to do this, here is where you'd put the relevant code".

As to the rest...

Dopp is (as always, it seems :) ) right in saying the apparently weak invasions are actually raids, disruption fodder sent because said faction is too weak to do anything else, but not wanting to bend over either. As katank points out, it's counterproductive through naval invasions most of the time, since ships are costly, but on land it works just fine. If it irritates you, the player, and cuts off one city for even one turn (or cuts trade between cities and forces you to sally to crush them) then mission accomplished .

But naval invasions do bork the AI a lot, and the worst thing is that whatever CA did to enable them, it's hardcoded and we can't touch it, neither to make them go away or just to tweak them into working more sensibly :/