The AI isn't broken, it just can't deal with all types of maps equally well.
For example, why doesn't the AI ever use the tactic of hiding their king in an allied country? Also, they not often use the option to go straight through allied territory to exploit it as a means to reach an enemy.