Quote Originally Posted by FactionHeir
Realistically, at least as a human you would realize that you cannot win if your ally is close to achieving victory or already has done so. You'd want to stay on good relations with that ally just to make sure you won't be the next target and may just end up as the ally's best friend. Consider the real world as an example.

If the AI does want to attack its trusted ally, it ought to do so when it can actually win and not a suicidal attack just to make a point. Attacking a random allied general with odds of 1:1 in the ally's lands isn't really smart nor is besieging a town that is heavily garrisoned with a small force that may give you good pre-battle odds (i.e. 6 dismounted feudal knights vs 10 horse archers)
I disagree entirely. Second place is the first loser. The goal of the game is not to survive, nor to treat your faction like you would in real life. Surviving beyond someone else meeting victory conditions is entirely moot. The only goal of the game that matters, as Rickooclan pointed out, is the singular goal of meeting your victory conditions. Upon realizing that you are nearing a win, or that it can no longer realistically win, it makes perfect sense for a weak AI faction to launch every sort of attack possible against you in order to at least try to prevent you from winning, because if you do so it has immediately lost the game. Moreover, its seemingly futile attacks may weaken your perimeter defenses enough to allow a different AI faction to follow up on the attack and actually break through. This would further serve the weak faction's goals, since before it can consider trying to win itself, it must first make sure you do not win. Even in a situation where all the faction can hope to do is make it a little easier for a different faction to damage you, that choice is still clearly more in the AI's interest than simply sitting there allowing you to win.