Extortion/gunpoint diplomacy

btgwynn

Warlord
Joined
Apr 10, 2008
Messages
139
long time reader, first time poster...

I haven't seen any subjects that covered this, so I hope I can start some discussion.

I'm a noble/prince level player. My most recent strategy has been working toward earlier domination/conquest victories. What I've found is that by picking a nearby civ with a tech or two that I want, and attacking and beating them into submission, I can usually make them give me their technology with a peace treaty, leaving them in a situation they will never be able to recover from. This allows me to center my research solely on the next technology that can expand my military advantage, using extortion/gunpoint diplomacy to fill in the rest of the tech tree. Additionally, because my trading with other countries is considerably less using this approach, other civs are not able to benefit from my research, adding to my advantage.

This strategy has been effective to an extent, but I would like to know what factors into an AI civ's decision of what they will trade in peace treaty negotiations. My expectation was that if I put another civilization in a bad enough situation they would likely pay almost any price for survival. For instance, I took Hannibal's capital, razed all but his youngest city, and attacked that until he only had an archer with .3 HP left. He had Compass, Horseback Riding and Monarchy. I expected he would give me all of those, but even in the face of assured defeat he only was willing to give me one technology. I took Compass, since it cost the most beakers. Later on, I was beating down Huayna Capac, and with three cities remaining was able to get him to include Divine Right in the peace settlement, which, of course, is worth more beakers than Compass, Horseback Riding and Monarchy combined.

Obvious differences here are that there were two different leaders, who may each have their own tolerance to extortion, and by the time I was working Huayna over I'd turned my empire pretty much into a cavalry farm, so the rest of the game was just a marching exercise (that is to say, my relative strength was much greater later when I was taking on Huayna). If anyone has input, particularly specific criteria the AI considers in peace treaty negotiations, it is appreciated.
 
Those techs probably would have been red had you went to the trading table pre-war. I'm pretty sure if they have a reason not to trade a tech, they simply will not, under any circumstances, not even if you are one turn away from wiping them off of the face of the earth.
 
Another part is simply preventing the human player from abusing the system, too...

If all you had to do was whomp on a neighbor to get 3-5 techs each time, warmongering would be even more powerful than it is now.

Besides, if you beat me down to one tiny little city, but I had techs on you. My response would be: "I've already lost. Research them yourself, chump!"
 
a couple thoughts...
Whether or not different AIs have different breaking points for having their techs bullied away from them, I don't know. I don't know where to look in the game coding to find this (maybe someone else could check?)

If your strategy is purely to extort the techs try to sue for peace as soon as possible even if it means you only get one tech. Don't always only settle for the tech worth the most beakers; early on, monarchy is far more useful than compass. You can build more units and heal your veterans outside his border for phase two during the ten turn peace treaty. Keep in mind that he may however offer vassalage to another, more powerful AI in return for protection. Be prepared to change targets. If he hasn't submitted to be another civ's vassal, DOW after ten turns and see what you can get, but eventually you'll probably be best off if he's completely gone or at least your own vassal.
 
If only research was smart were attacking an advanced unit and winning would give some sort of addition to that appropriate technology

"Your spearman destroyed a Tank" +200 beakers towards Industrialism.
 
I agree it's irritating you can't get that tech from an enemy civ, even if they're faced with imminent destruction.

On the hand, this stubbornness is an excellent feature that helps balance the game. I wouldn't want to have it any other way (or indeed you would never need to tech anything yourself).
 
I think this part of code is called when the AI checks if a deal proposed by the player and the list items on the player side is empty.

Code:
	if ((pTheirList->getLength() == 0) && (pOurList->getLength() > 0))
	{
	(1)     if (AI_getAttitude(ePlayer) < ATTITUDE_PLEASED)
		{
			if (GET_TEAM(getTeam()).getPower() > ((GET_TEAM(GET_PLAYER(ePlayer).getTeam()).getPower() * 4) / 3))
			{
				return false;
			}
		}

		if (AI_getMemoryCount(ePlayer, MEMORY_MADE_DEMAND_RECENT) > 0)
		{
			return false;
		}

	(2)	iThreshold = (GET_TEAM(getTeam()).AI_getHasMetCounter(GET_PLAYER(ePlayer).getTeam()) + 50);

		iThreshold *= 2;

	(3)	if (GET_TEAM(GET_PLAYER(ePlayer).getTeam()).AI_isLandTarget(getTeam()))
		{
			iThreshold *= 3;
		}

	(4)	iThreshold *= (GET_TEAM(GET_PLAYER(ePlayer).getTeam()).getPower() + 100);
		iThreshold /= (GET_TEAM(getTeam()).getPower() + 100);

		iThreshold -= GET_PLAYER(ePlayer).AI_getPeacetimeGrantValue(getID());

	(5)	return (GET_PLAYER(ePlayer).AI_dealVal(getID(), pOurList) < iThreshold);
	}

(1) First if you are not pleased (this is the case if you are at war), your power must be at least 3/4 of the AI's power before you have a chance of getting anything.
(2) I am not sure about "AI_getHasMetCounter", maybe it is the number of civs met. :undecide:
(3) The iThreshold get multipled by 3!!!!, if AI_isLandTarget returns true. See below.
(4) The power ratio between the player and AI is considered.
(5) It calculates the value of the deal. If it is lower then the iThreshold, it is accepted.


If this function returns true, the value of techs/gold you can get roughly multiplied by 3. The second "if" makes me think that leave the AI with two small cities and wait to have at least 8 adjacent land plots is better. Can anyone test this? If the last city is isolated on a island, it will be harder to get techs.

Code:
bool CvTeamAI::AI_isLandTarget(TeamTypes eTeam)
{
	if (!AI_hasCitiesInPrimaryArea(eTeam))
	{
		return false;
	}

	if (AI_calculateAdjacentLandPlots(eTeam) < 8)
	{
		return false;
	}

	return true;
}

Looking the the function below, I guess it is called both at war and peace. For techs it's important the number of known civs that knows it, how much the AI values it, etc. At (6) the value of AI_endWarVal is summed up with everything. The AI_endWarVal function takes into account the number of cities, population, power and war success. That's why if the AI has declared war to you, it's easier to get peace if you pillage, kill his units, take his cities, etc.


Code:
int CvPlayerAI::AI_dealVal(PlayerTypes ePlayer, CLinkList<TradeData>* pList, bool bIgnoreAnnual)
{
	CLLNode<TradeData>* pNode;
	CvCity* pCity;
	int iValue;

	FAssertMsg(ePlayer != getID(), "shouldn't call this function on ourselves");

	iValue = 0;

(6)	if (atWar(getTeam(), GET_PLAYER(ePlayer).getTeam()))
	{
		iValue += GET_TEAM(getTeam()).AI_endWarVal(GET_PLAYER(ePlayer).getTeam());
	}

	for (pNode = pList->head(); pNode; pNode = pList->next(pNode))
	{
		FAssertMsg(!(pNode->m_data.m_bHidden), "(pNode->m_data.m_bHidden) did not return false as expected");

		switch (pNode->m_data.m_eItemType)
		{
		case TRADE_TECHNOLOGIES:
			iValue += GET_TEAM(getTeam()).AI_techTradeVal((TechTypes)(pNode->m_data.m_iData));
			break;
		case TRADE_RESOURCES:
			if (!bIgnoreAnnual)
			{
				iValue += AI_bonusTradeVal(((BonusTypes)(pNode->m_data.m_iData)), ePlayer);
			}
			break;
		case TRADE_CITIES:
			pCity = GET_PLAYER(ePlayer).getCity(pNode->m_data.m_iData);
			if (pCity != NULL)
			{
				iValue += AI_cityTradeVal(pCity);
			}
			break;
		case TRADE_GOLD:
			iValue += pNode->m_data.m_iData;
			break;
		case TRADE_GOLD_PER_TURN:
			if (!bIgnoreAnnual)
			{
				iValue += AI_goldPerTurnTradeVal(pNode->m_data.m_iData);
			}
			break;
		case TRADE_MAPS:
			iValue += GET_TEAM(getTeam()).AI_mapTradeVal(GET_PLAYER(ePlayer).getTeam());
			break;
		case TRADE_OPEN_BORDERS:
			iValue += GET_TEAM(getTeam()).AI_openBordersTradeVal(GET_PLAYER(ePlayer).getTeam());
			break;
		case TRADE_DEFENSIVE_PACT:
			iValue += GET_TEAM(getTeam()).AI_defensivePactTradeVal(GET_PLAYER(ePlayer).getTeam());
			break;
		case TRADE_PEACE:
			iValue += GET_TEAM(getTeam()).AI_makePeaceTradeVal(((TeamTypes)(pNode->m_data.m_iData)), GET_PLAYER(ePlayer).getTeam());
			break;
		case TRADE_WAR:
			iValue += GET_TEAM(getTeam()).AI_declareWarTradeVal(((TeamTypes)(pNode->m_data.m_iData)), GET_PLAYER(ePlayer).getTeam());
			break;
		case TRADE_EMBARGO:
			iValue += AI_stopTradingTradeVal(((TeamTypes)(pNode->m_data.m_iData)), ePlayer);
			break;
		case TRADE_CIVIC:
			iValue += AI_civicTradeVal(((CivicTypes)(pNode->m_data.m_iData)), ePlayer);
			break;
		case TRADE_RELIGION:
			iValue += AI_religionTradeVal(((ReligionTypes)(pNode->m_data.m_iData)), ePlayer);
			break;
		}
	}

	return iValue;
}


Code:
// XXX this should consider area power...
int CvTeamAI::AI_endWarVal(TeamTypes eTeam)
{
	int iValue;

	FAssertMsg(eTeam != getID(), "shouldn't call this function on ourselves");
	FAssertMsg(isAtWar(eTeam), "Current AI Team instance is expected to be at war with eTeam");

	iValue = 100;

	iValue += (getNumCities() * 3);
	iValue += (GET_TEAM(eTeam).getNumCities() * 3);

	iValue += getTotalPopulation();
	iValue += GET_TEAM(eTeam).getTotalPopulation();

	iValue += (GET_TEAM(eTeam).AI_getWarSuccess(getID()) * 20);

	iValue *= (GET_TEAM(eTeam).getPower() + 10);
	iValue /= max(1, (getPower() + GET_TEAM(eTeam).getPower() + 10));

	// XXX count units in enemy territory...

	if ((!(isHuman()) && (AI_getWarPlan(eTeam) == WARPLAN_TOTAL)) ||
		  (!(GET_TEAM(eTeam).isHuman()) && (GET_TEAM(eTeam).AI_getWarPlan(getID()) == WARPLAN_TOTAL)))
	{
		iValue *= 2;
	}
	else if ((!(isHuman()) && (AI_getWarPlan(eTeam) == WARPLAN_DOGPILE) && (GET_TEAM(eTeam).getAtWarCount(true) > 1)) ||
		       (!(GET_TEAM(eTeam).isHuman()) && (GET_TEAM(eTeam).AI_getWarPlan(getID()) == WARPLAN_DOGPILE) && (getAtWarCount(true) > 1)))
	{
		iValue *= 3;
		iValue /= 2;
	}

	iValue -= (iValue % GC.getDefineINT("DIPLOMACY_VALUE_REMAINDER"));

	if (isHuman())
	{
		return max(iValue, GC.getDefineINT("DIPLOMACY_VALUE_REMAINDER"));
	}
	else
	{
		return iValue;
	}
}
 
Besides, if you beat me down to one tiny little city, but I had techs on you. My response would be: "I've already lost. Research them yourself, chump!"

Yeah, even though there's a ten-turn peace treaty, does the poor, downtrodden civ really think you're just going to take your techs and NOT stomp him into oblivion the moment that eleventh turn comes around? :lol:
 
Yeah, even though there's a ten-turn peace treaty, does the poor, downtrodden civ really think you're just going to take your techs and NOT stomp him into oblivion the moment that eleventh turn comes around? :lol:

probably not. but it does give them a chance to whip out walls and some archers.
 
Thanks everyone, for your input, particularly AnitaGaribaldi, whose post was pretty much exactly what I was hoping for.
 
@Anitagaribaldi
Thanks, that's very usefull information :goodjob:

Then I gather it's possible for a furious AI that is more powerfull than you to accept a demand, provided your power is at least 3/4 of his and the value of the demand falls below the threshold. Is that right?

Do you think the fact the AI is about to DOW you would alter this ecuation? That would be very valuable, because you can use the demand to get a 10 turn peace treaty.
 
Top Bottom