I want to know what you guys think. Is doing better than the AI in some way shape or form just asking for war? Based on my current game I think so. I played as Washington and was doing extremely well. All of a sudden Germany and Pocatello just DoW me out of nowhere.
As far as I could explore, there is no code specifically checking for other players levels of success (winning the game). There is code that checks something they called Victory Dispute Levels, which assigns a considerable penalty to opinion if the AI "guesses" that some player is going for the SAME victory, but that's about it. If you ask me, there SHOULD be a block of code checking for a general level of victory, and that would be a "to do" for the Better AI project... then again, they might have decided to leave such code out based on the horrible experience of civ1 where such type of coding ensured a World gang against the human in the end game if he was winning. This is a very delicate issue, that if included can break the balance of the game to a point of no return: not everyone, and I could even dare to say almost no one, will like to be ganged up by other players "because he is winning"... on the other hand, that is exactly what happens in multiplayer.
Bottom line, it boils down to the core question presented by Soren in his lecture at Stanford (?): do we want a good AI or a Fun AI? (or the best possible mix of both)
I've been friends with them the whole game, liberated a city state, brought a Civ back to life and I'm getting DoW'd. I think it definitely is true that if you're doing better than the AI, you're going to get DoW'd. I may be wrong, but in my experience, this is the case.
Again, no code for checking general level of victory.
I understand I had a different ideology. Does having a different ideology result in war?
There is specific code that checks if a player (AI or human) has a different or similar ideology, and assigns a big penalty/bonus to opinion weights accordingly. Ideologies have a considerable influence in stances in the mid to late game as coded.
The AI will be friends with you the whole game, then all gang up on you, if you're doing better than them.
So would you guys agree, does doing better than the AI result in an inevitable DoW?
No, not according to the code. Many other factors influence the approach and opinion of each civ towards each of the other civs (human or AI, no distinction), but not how well the player is doing in general. Given the factors that are part of the code and calculations, you could say that indirectly, the better you are doing, the more factors you will "trigger" when the AI calculates its stance every single turn and changes the approach accordingly. In a way, your level of success is then indirectly included in such calculations, but not directly. That is why, if you play to "over compensate" what you know/feel are the main factors against you, you will not see a gang up against you: one big and well known example, carrying a big stick (and even better, if said stick is radioactive

), as military threat levels have a big influence in AI opinion and stances.
On the other hand, there is code that makes the AI check if a player has become a good target due to being at war with other civs (the more the better) and if such player is loosing that war; if the multiple checks give TRUE, then the AI will consider joining the onslaught... you can see that happening almost every game, and not necessarily to the human (in fact, the better the human plays, the less likely he is to see this effect, as we can assume such player is using the diplo/force counters to its max to prevent it from happening)...
Hope this answers your questions.