While I agree that diplomacy is the major short coming of the total war series it seems to me that the AI acts within a set parameter of behavior that ignores diplomacy altogether.

Time and time again in STW and MTW I have been backstabbed by the AI while in alliance. Upon reflection, in most cases the AI had a numerically superior advantage to me when that backstab took place (by way of florins, provinces, armies). Seems to me that the AI acts rather simplistically and acts from some math equation that determines its action.

Why not shoot for the moon, but my fear is that in order to do a decent diplomacy model, the entire AI methodology would have to be rewritten. Can the Ai be programmed to think 5-15 turns ahead? If so I say, yeah lets go for it, but in fairness to the AI simplicity is sometimes better in the long run.

Predictable and inefficent yes, but hardly disfunctional. Part of the solution might be to have more stats for agents and give them influence as well along with titles. If you build a bishop he should be able to attain the title of "archbishop" and raise his influence and maybe be influential enough to become pope.

The rulers influence needs to be considered as well, and dread and command (taking mtw terms) should the AI attack and alliance member, who at the time might be weak militarily but has a king with superior influence?

My points are it seems to be (in MTW and STW) a simple math calculation, by province whether the Ai attacks or not. Can we do better? yes we can, but there has to be some definable formula for the procession of diplomacy. And there in lies the strength of the current system, its simplicity allows you to plan accordingly.