Game Mechanics: How AI choose policies in detail - Why tradition/piety/aesthetics are

Ninakoru

A deity on Emperor
Joined
Nov 14, 2002
Messages
658
Location
Madrid, Spain, Europe
Again, while looking to mod some AI behaviours, wanted to know why AI is so fond of tradition/piety and later aesthetics, why liberty, exploration and commerce are rarely seen?

Lets explain how the AI choose the next policy when has enough culture:

There's a wheight value calculated for each policy branch, and another for each individual policy. This wheight is calculated based on the policy flavor, multiplied by the current AI leader flavor of that policy flavor type, plus some values that modify flavors based on AI current grand strategy.

For opening a branch, all the containing policies are wheighted and added, then reduced to 22% of the value. In practice an opening branch usually has a much lower value than the individual policies.

For all the possible options (branchs unlocked and policies inside of an opened branch), the system get the two higher value and randomize witch option will get, with higher chance on the most valued option (all this is quite important).

On the leader flavors, unless random personalities is selected, the have a preset value and a variance from +2 to -2 in each game, in each flavor type.

There are four grand strategies, Culture, Domination, Diplomacy and Spaceship. There are many variables to decide witch grand strategy the AI will follow, but basically:

- Theres a bias based on the leader flavors, but usually not decisive.
- By default, fall into the culture strategy.
- Domination get more relevance if the AI meets other leaders and have them near, and any negative interaction with those other leaders.
- Spaceship is only meaningful once the AI complete apollo program.

At the beginning, most of the leaders will follow culture grand strategy, with occasional diplomacy/conquest and no one will follow spaceship early (I didn't see it on my testing)

Each grand strategy affect leader flavors in policy selection, some key values:

- Domination give +2 offensive, +1 expansion.
- Culture give +2 wonder, growth and culture, -2 expansion and spaceship, +1 religion.
- Diplomacy give +2 gold and +3 diplomacy.
- Sciente give +2 science, +3 spaceship and -5 religion.

About policies, some key knowledge is:

- Each policy has 20 in a flavor, or splited into 2-3 flawors usually in multiples of 5. Rationalism has usually a sum of 22, ideology tenets have much higher values from 33 to 66.
- Liberty is mostly expansion, tradition is mostly a split of culture/growth and the only ancient with wonder flavor. Honor is mostly offensive and military training, and piety is religion flavor.


Knowing all this, and doing some calculations:

AI will have usually Tradition and Piety as first options if he's going culture (most of the time). Going domination there's a preference on Honor or Tradition/Liberty. Going diplomacy, there are not clear preferences.

Once higher tier policies unlocked and finished a branch, Aesthetics is king on culture strat, and Patronage is relevant in the diplomatic path. If goes spaceship, rationalism is prevalent (usually doesn't count much because by the time is a great options is already filling 2 branches, witch is the maximum, and once ideologies are open, will clearly go for the tenets instead).

There are two big loosers here: Commerce and Exploration, witch are rarely seen. Why? because there's a little mess in the policies: Wagon Trains in Commerce and Treasure fleets in Explotion have a Flavor of 1 instead of 20 (gold in both cases), so the possibilities of being selected are quite low, even if the leader has a nice gold/naval flavor value.

TLDR: The fondness of the system on culture, plus the big modifiers that mostly benefit tradition and piety, marginalizes the use of honor and liberty for the AI. The two failed values in Commerce and Exploration leave them as rare policies for the AI.

Finally as the system works, there is no real preference on higher tier policies witch are more powerful, over the ancient ones witch are of much less use once in the mid game, Exceptions are Aestherics and Patronage.

Hope you find it useful/interesting!
 
Amazing. Well done and thanks again!

Edit: Besides the clear bug with Commerce and Exploration, why did the devs default the grand strategy to culture? Why not.... Nothing? Like have a default grand strategy with no bonuses besides the leader flavors?

The AI would be better at winning and more diverse if it can do whatever it wants. Seems like an easy improvement.
 
It could be because to have a chance of pursuing a culture victory you need to start building wonders early in the renaissance. You can change tack at industrial and later to pursue other VCs, you can't really do that with culture. With culture the earlier you start investing in it the better your chances of getting there.
 
Amazing. Well done and thanks again!

Edit: Besides the clear bug with Commerce and Exploration, why did the devs default the grand strategy to culture? Why not.... Nothing? Like have a default grand strategy with no bonuses besides the leader flavors?

The AI would be better at winning and more diverse if it can do whatever it wants. Seems like an easy improvement.

I think they are coded for culture as a speed bump to human cultural pursuits.

Commerce and Exploration are probably low to avoid human exploits and possibly encourage internal AI trade. Can you imagine cargo and caravan spam on the same scale a missionaries? We would all be swimming in gold.

Again, they aren't meant to win, they are meant to shape our game experience.
 
AI is limited by routes no?

And, they'd shape our experience better if more of them went for science, like almost all human players do. Provides diversity. If one more civ likes art funding over science...

Sure, but can you imagine all 7 opponents building them? As soon as you killed one its replacement would appear next turn.

I use their love of art to my advantage. It increased turn count but they like me more.
 
Sure, but can you imagine all 7 opponents building them? As soon as you killed one its replacement would appear next turn.

I use their love of art to my advantage. It increased turn count but they like me more.

I'm just saying diversity would be better. Not 75% of civs living for art. You can have two focuses, so the AI should have 50% for each focus of diplo, science, culture, domination. Right now, science focus lags the most behind, but domination and diplo are also less common.

In any case, wouldn't you replace a trade route after it's pillaged? The thing is easily the most efficient resource source in the game. All AI currently DO build trade routes fully.... It's very high on the priority list for all AI playstyles. I really don't see your AI trade route point.
 
Good work, that explains why on the first WC proposal %99 of the time Art's funding gets passed and Science funding does not. In my last game the reverse happened(Science funding was passed over Arts funding), and I won a t320 CV without any GM spam(go figure).
 
Top Bottom