About flavors

Salamandre

King
Joined
Aug 4, 2003
Messages
612
Location
France
In my mod, completing a whole policy branch gives extra bonuses, both human and AI. Now I am trying to make AI complete branches, but even with 12 AI players at deity, they complete 4 branches at max (while culture is enough to complete 20) and very often same branches. Despite the fact that I scattered the flavor values rather similar everywhere.

Can anyone give me more precision about how flavor works and what could I do to tease AI to be more aggressive on this?
 
You mean that the AI doesn't adopt new policies despite having enough culture? That's not even allowed for the human player, unless the policy saving option is turned on.
 
How that? When culture reaches the value required, a policy is proposed. Human can save it indeed if that option is enabled, but it has nothing to do with my question before. I wanted to know how to make sure AI selects this or that when is offered. Equal values will help or even more confuse AI?

For instance, the map I was playing had no water. The values I use for Exploration branch were quite low, compared to others, yet one of the AI still completed that branch, which means he spent hundred of thousands culture points for nothing. I saw every civilization is inclined to prefer one flavor more than another, so I wanted to know: for a civilization which prefers culture over growth, what difference in values must be there between culture and growth so that civ chooses growth?
 
My understanding of flavours is very incomplete, but flavour values on buildings, units, policies, techs, etc are at the very end of the AI's decision making process. "Strategies" play a far more important role in what the AI does.

A civ has a leader. The leader has base flavours (see table <Leader_Flavors>). The flavours help the leader choose the victory condition it's going for. The VC then helps determine the associated Grand Strategy (see CIV5AIGrandStrategies.xml), which adjusts the leader's flavours.

During the game, the AI adopts various Military and Economic Strategies (see CIV5AIMilitaryStrategies.xml and CIV5AIEconomicStrategies.xml) the rules for adopting these are in CvMilitaryAI.cpp and CvEconomicAI.cpp (yep, you're going to have to dig into the C++ code to fully understand this). The military and economic strategies currently adopted set base flavour values, but we're not quite done yet.

Each city also adopts various City Strategies (see CIV5AICityStrategies.xml and CvCityStrategyAI.cpp) as the game progresses, for example, after it's just founded it will want to grow, but once it's reached a certain size it will start to specialise depending on the AI's VC, the current Economic and Military Strategies adopted and partly its surroundings (inland cities will not specialise in naval production!) The cities base flavour values are then the Leader's base flavour values adjusted for the specific City Strategies currently active for the specific city.

When a city needs to build something, it pretty much already knows what it's got to build from the base flavours - the real driver for what is actually built are the currently active strategies. Building/unit flavour values only really affect decisions like "I need to build a culture building, which of the two available shall I build" or in the early game (when very few strategies are adopted) "which of these three similar cost buildings should I pick based on my leader preferences (flavours)"

Policy and tech flavours are similar. The currently adopted grand, military and economic strategies are pretty much driving the AI down a path, and the policy/tech flavours just influence what to do at junctions.

So if you have the AI players all adopting the same policies, it's either because they've all adopted the same VC and hence the same Grand Strategy, or your modifications have forced the AI to adopt similar Economic and/or Military strategies - possibly because you've stopped the AI expanding by settling and it's stuck in expansion mode - either by founding new cities (economic) or by conquest (military).

And the part of your OP we don't understand is " they complete 4 branches at max (while culture is enough to complete 20)" which implies the AI is not spending all of its culture.
 
Yeah thats what I was also thinking, thanks for details. About culture, mod gives a bunch of bonuses based on great persons growth, policies branches completed and so on. Those bonuses are available to both human and AI so I was surprised that while I had 5 branches completed, AI had only 3, while from visual observation, it gets twice more great persons than I (big cheat there, + the tons of missionaries it gets is hallucinating). I don't think AI keeps its culture value growing without selecting policies when offered, is that possible?

And AI has no blocks in my mod, it can do whatever he likes to, the expanding feature is only blocked for human.

I saw that each leader had its flavors (flavours by my english correcter, flavors by american one, go figure), but I see one flavour is always predominant in all leaders -growth. So I think I will place growth value high on each policy, maybe this will help.
 
I don't think AI keeps its culture value growing without selecting policies when offered, is that possible?

If you mean can the AI elect not to pick a policy when it has enough culture, no, the AI always picks a policy when it has enough culture. The "Save Policy" game option only applies to human players.

(Basically the AI does no "look ahead" - so it doesn't know that in two turns it'll enter another era so will get better policy picks.)
 
Top Bottom