[BTS] Leader's affinities towards a technology

Timo33

Chieftain
Joined
Mar 25, 2011
Messages
97
Hello there.


First of all, i apologize if this question has been answered elsewhere.

I'm trying to get back to playng Civ4 regularly, currently at Monarch difficulty (i used to play at Emperor some years ago - slowly catching up to it).

I just played a game as Suleiman, and i had Marble in my capital. I figured it would be a good idea to go for the Great Library, since i had Marble and i was Philosophical... So i beelined Aesthetics, and my plan was tech to Litterature while trading Aesthetics for the techs i skipped along the way - including ALPHABET.

And here's the thing : nobody in the game had Alphabet at 1AD.

Is that something to expect at Monarch difficulty? (I usually tech Alphabet myself so i'm not really aware of how fast AIs go for it).

I'm guessing it depends on the AI's affinity towards the tech. In my game, there were 2 or 3 Financial leaders, some non-Fin but still good techers like Mao... I was actually very surprised nobody went for Alphabet for such a loooong time.


How/Where can i find some details on every leader's affinities towards each tech? Is it even a thing, for instance in the game python files or something? Or is there a guide in here on the subject, about how much each leader prioritize key techs like Alphabet, Rifling, Feodalism, Liberalism..?

More generally speaking, is it a bad idea to hope for a Aesthetics-for-Alphabet trade on a "low" difficulty level like Monarch, or does it really depend on the AIs in the game ?
 
Sounds about right for monarch. It can be awkward if the ai take longer than you'd like to research alphabet, but if you are so far ahead of them in tech I guess it doesn't really matter.

As far as trading Aesthetics for Alphabet, at higher levels you need to give the ai more beakers worth of tech than they give you. Since alphabet/aesthetics cost the same number of beakers, I think you can only trade them 1:1 is Noble and below. Higher than Noble and you'll either have to add another small tech like meditation or put a turn or two into alphabet before they will accept.
 
If you're really curious about how the AIs value techs, it's in CvPlayerAI::AI_bestTech(). Which is a very long, messy additive function - it basically just adds up every way a tech could benefit the AI with scores for each. E.g., Alphabet gets a bonus score of (500 + 500 per civilization met) in the AI's evaluation. Then there's a decent chunk of random weight added to the evaluation, and it picks the highest-score tech. I don't think you're going to get a lot of insight out of looking through it though, to be honest.

There are three types of leader-specific tech preferences. They have a modest flat boost for techs that would unlock their favorite civic, and if nobody else has discovered it yet they also get a potentially large but pretty random boost for picking up techs that would found their favorite religion.

There's also a "flavor" system that gently nudges AIs towards picking techs that suit their personality. Each leader has "flavors" to their personality, set in Civ4LeaderHeadInfos.xml. Assuming you don't have any mods changing them, each leader will either have one flavor with a score of 10 (e.g., Hammurabi has 10 culture flavor), or they will have two flavors: one with a score of 5 and another with a score of 2 (Elizabeth has 5 gold flavor and 2 culture flavor). And each technology has flavor scores set in CIV4TechInfos.xml. E.g., Alphabet is 2 flavor religion, 8 science, and 4 gold. For each overlapping flavor, the AI's tech score is boosted by 20 x Leader flavor x tech flavor. So Elizabeth would have 20 x 5 x 4 = 400 additional points in her prioritization of Alphabet compared to, say, Hammurabi.

These flavors are usually not decisive - they make it more likely that the AI will pick that tech, but there's a decent chunk of random chance involved in what the AI actually chooses and also a few factors that can potentially greatly outweigh flavors (if the AI thinks a tech is really really good, they're probably going to pick it even if some other tech suits the personality better). Alphabet actually fits that bill in games with a lot of players meeting each other early. If the AI has met 6 or 7 neighbors, that's a hefty +3000 or more to their Alphabet value - which is why it tends to go pretty early regardless of personalities. Unless you're at a difficulty level where nothing goes early, because the AIs are just researching really slowly in general, or there aren't many players on the continent.
 
I'm just piping in here with a hint to check my signature for a good overview of all the AIs in the game, which also includes the flavours that coanda mentions above. Great post that!
 
^^^this

Although, for teching, don't really see any affinities per se, other than typical AI priority techs. Techs like Feud, Machinery, Construction, Engineering are ones AIs will get pretty fast and that I usually trade for.
 
Top Bottom