Mass AI Groveling

Biologist

Emperor
Joined
Dec 12, 2012
Messages
1,100
Location
Hurricane Central
Just experienced some strange AI behavior and wanted to know if anyone else has seen something similar.

I'm playing a King-level game as the Shoshone, in the Information Era, a few parts away from a completed spaceship. I have the most techs and the largest army, everyone has chosen Order (I was first), and I have a DoF with every civ except Austria (who was Friendly with me).

Suddenly, every single one of my DoF partners pops up with "Afraid" status and starts going on about what a great leader I am, while Austria turns to Guarded status. Negative modifiers have suddenly appeared for Austria and some of the "Afraid" civs. The Iroquois think I am a warmonger even though I haven't fought anyone for centuries and they have annexed Venice (usually par for the course, but a bit strange to start the accusations this late in the game).

Has anybody else had late-game mass groveling from the AI? Even the Celts, Carthage, and Assyria are afraid of me, and I'm not that much more powerful than they are. Is this some new AI backstab ruse (instead of the incredibly transparent Hostile > Friendly > Backstab cycle from G&K)? Or just a freak diplomatic occurrence?
 
I had the exact same thing happening to me. I was relatively peaceful as Venice having fought only one brief war with Spain during medieval era that didn't went anywhere. Then my direct neighbor Ramses suddenly Dowed me. The war went poorly for him. And I captured a couple of his cities. The rest of the world watched with relative indifference as Ramses had very few friends and had been at war no long ago with another civ.

I refused a peace proposal, then another to teach him a good lesson. And then it suddenly happened. The whole world kind of went from friendly to cautious, with warmonger modifier on me, with 2 guarded civs and 2 afraid going on how I was a great leader but asking me to be merciful toward the weak .... This was... unexpected. I was far from having the mightiest army but it remained like that for the rest of the game no matter what I would do... Was it because I refused 2 peace proposals? It was so sudden it looked almost like some kind of bug to me.. It didn't even happen right when I refused peace, but only 4-5 turn after.
 
Thanks for the responses. Glad to know it wasn't just me that this happens to. I did complete an Atomic Bomb (and might be the only one to have nukes) shortly before the Afraid "cascade", so maybe that had something to do with it.
 
Thanks for the responses. Glad to know it wasn't just me that this happens to. I did complete an Atomic Bomb (and might be the only one to have nukes) shortly before the Afraid "cascade", so maybe that had something to do with it.

Would make sense that they woudl be afraid of you... kinda makes sense if you think about it... Wanna insult me? Here' Have a Bomb! BOOM!
 
And the answer is right here:

(see third IF statement, WE is each AI and THEY is any other player, including human)

Code:
	////////////////////////////////////
	// NUKES
	////////////////////////////////////

	int iTheirNukes = GET_PLAYER(ePlayer).getNumNukeUnits();
	int iOurNukes = m_pPlayer->getNumNukeUnits();
	int iHowLikelyAreTheyToNukeUs = GET_PLAYER(ePlayer).isHuman() ? 100 : 0; // assume humans will use 'em if they've got 'em
	if (iHowLikelyAreTheyToNukeUs == 0)
	{
		if (IsNukedBy(ePlayer) || GET_PLAYER(ePlayer).GetDiplomacyAI()->IsNukedBy(eMyPlayer)) // nukes have been used already
		{
			iHowLikelyAreTheyToNukeUs = 100;
		}
		//else if (GET_PLAYER(ePlayer).GetDiplomacyAI()->GetWarProjection(eMyPlayer) == WAR_PROJECTION_DESTRUCTION) // they are surely going to lose a war with 
		//{
		//	iHowLikelyAreTheyToNukeUs = 100;
		//}
		else
		{
			int iFlavorNuke = GET_PLAYER(ePlayer).GetGrandStrategyAI()->GetPersonalityAndGrandStrategy((FlavorTypes)GC.getInfoTypeForString("FLAVOR_USE_NUKE")) + 1;
			iHowLikelyAreTheyToNukeUs = iFlavorNuke * iFlavorNuke; // use nukes has to pass 2 rolls
		}
	}
	// do we have nukes and they don't
	if(iTheirNukes == 0 && iOurNukes > 0)
	{
		viApproachWeights[MAJOR_CIV_APPROACH_WAR] += 25;
		viApproachWeights[MAJOR_CIV_APPROACH_HOSTILE] += 25;
		viApproachWeights[MAJOR_CIV_APPROACH_DECEPTIVE] += 25;
		viApproachWeights[MAJOR_CIV_APPROACH_GUARDED] -= 25;
		viApproachWeights[MAJOR_CIV_APPROACH_AFRAID] -= 50;
	}
	// do they have nukes and we don't
	else if (iTheirNukes > 0 && iOurNukes == 0 && iHowLikelyAreTheyToNukeUs > 50)
	{
		viApproachWeights[MAJOR_CIV_APPROACH_AFRAID] += 50;
		viApproachWeights[MAJOR_CIV_APPROACH_GUARDED] += 50;
		viApproachWeights[MAJOR_CIV_APPROACH_DECEPTIVE] -= 25;
		viApproachWeights[MAJOR_CIV_APPROACH_WAR] -= 50;
	}
	// do we both have nukes
	else if (iTheirNukes > 0 && iOurNukes > 0 && iHowLikelyAreTheyToNukeUs > 25)
	{
		viApproachWeights[MAJOR_CIV_APPROACH_GUARDED] += 25;
		viApproachWeights[MAJOR_CIV_APPROACH_DECEPTIVE] -= 25;
		viApproachWeights[MAJOR_CIV_APPROACH_WAR] -= 25;
		viApproachWeights[MAJOR_CIV_APPROACH_NEUTRAL] += 25;
	}
 
I built a nuke, all my FRIENDS (DOFs, and only they) became Afraid; I then DELETED my nuke and they reverted to friendly.
Later I proposed nuke non-poliferation and my warmongering friend Japan was NOT pleased. It turned out that he completed their Manhattan Project a couple turns after the proposal was passed.
 
Seems pretty straightforward then. The AI assumes that human players will use nukes, and they become Guarded or Afraid if a human has nukes and the AI doesn't. That actually makes sense, it just seemed weird because it was everybody all at the same time.
 
Seems pretty straightforward then. The AI assumes that human players will use nukes, and they become Guarded or Afraid if a human has nukes and the AI doesn't. That actually makes sense, it just seemed weird because it was everybody all at the same time.

Almost exactly. Each condition, if hit, adds/subtracts some weights to different components of a vector of weights where each "cell" holds the weight given to a different approach (Hostile, Guarded, etc). Plenty of other modifiers affect each of these weights also.

In other words, the specific condition debated here (human has nukes and AI player has not), adds a significant amount to the weight of AFRAID and GUARDED, but does not guarantee the AI player will choose that approach, it only makes it more likely (much more, given the values +50 while at the same time reducing other approaches, like WAR and DECEPTIVE).
 
Top Bottom