Sid Meier's Civilization VI

Sid Meier's Civilization VI

[OBSOLETE] AI Strategy Conditions Fix
FearSunn  [developer] Mar 17, 2018 @ 8:40am
How strategic AI works
On strategic level (not tactical and not operational) AI follows predefined "grand" strategies. There are 13 AI strategies in total (4 victory strategies and 9 grand strategies). Excerpt from game database:

"VICTORY_STRATEGY_CULTURAL_VICTORY"
"VICTORY_STRATEGY_MILITARY_VICTORY"
"VICTORY_STRATEGY_RELIGIOUS_VICTORY"
"VICTORY_STRATEGY_SCIENCE_VICTORY"
"STRATEGY_EARLY_EXPLORATION"
"STRATEGY_RAPID_EXPANSION"
"STRATEGY_NAVAL"
"STRATEGY_CLASSICAL_CHANGES"
"STRATEGY_MEDIEVAL_CHANGES"
"STRATEGY_RENAISSANCE_CHANGES"
"STRATEGY_INDUSTRIAL_CHANGES"
"STRATEGY_MODERN_CHANGES"
"STRATEGY_DARKAGE"

For each strategy to start (or to stop) AI checks against certain predefined conditions listed in StartegyConditions table. For example for AI to start following Early Exploration strategy it should have "Fewer Cities". For Naval Strategy condition "Is On Island" should be satisfied and so on.

After AI starts following certain strategy Strategy_Priorities table kick in. It contains so called ListTypes where all necessary changes to AI behavior are listed.

Lets take strategy "Medieval Changes". This strategy has 3 ListTypes associated with it:
MedievalYields
MedievalPseudoYields
MedievalSensitivity

Specific changes to AI behavior are predefined in AiFavoredItems table where each this list sets certain specific changes to AI behavior.
MedievalPseudoYields for example makes AI to favor more certain GreatPerson types (Engineer, Merchant and Scientist). Where MedievalYields encourage AI to favor food, gold and production and nerfs religion.

But due to coding error this Medieval Strategy preferences is now not working in the base game. Instead all Medieval era priorities stack together with Classical era priorities and as a result AI follows some mixture of both during Classical era and no specific strategy during Medieval era.