Improving AI priorities

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
EDIT: In Gem v1.053 I updated all policy priorities to match the plan below. I will next work on techs, then buildings.

If you're playing the GEM beta, please glance at the AI priorities of stuff you get (techs, units, buildings or policies). These priorities should exist on every tooltip, and should roughly match your own view of the importance of stuff. If you find anything that seems wrong, please post here. :)

You can open the green "Leader Priorities" and "Policy Priorities" tabs of this mod file to see a layout of those priorities:
\Documents\My Games\Sid Meier's Civilization 5\MODS\G&K Enhanced Mod\Civ5Modding.xls

I'm organizing the priorities into tiers something like this:

Policies
0 None
4 Low
8 Average
16 High​

Techs & Buildings
2 Ancient
4 Classical
8 Medieval
16 Renaissance
32 Industrial
64 Modern
128 Atomic
256 Info

Double for wonders
Double for powerful
Half for weak





For example you could post...

techA should have 8 gold 4 food
policyB should have more growth flavor
etc...​

I explained some priorities below when their purpose is not obvious:

Priority | Example | Purpose
Military Training|Barracks|Experience for units
Offense|Swordsman _ |Conquering territory
Defense|Archer|Defending territory
Recon||(not important until GEM:Armies)
Ranged|Archer|Ranged damage
Mobile|Horseman|Fast units
Naval|Trireme|Ships
Naval Recon|Trireme|Exploring seas
Naval Growth|Lighthouse|Food
Naval Tile Improvement|Workboat|Worker
Air||
Nuke||
City Defense|Walls|City strength
Expansion|Colosseum|Getting new territory
Science||
Culture||
Happiness||
Growth|Granary|Population
Production||
Gold||
Great People|Garden|Great People
Tile Improvement|Worker|Improvements (unit)
Infrastructure|Railroad|Improvements (tech)
Water Connection|Harbor|Trade routes
Diplomacy|Patronage|Citystate policies
Wonder|Pyramids|World wonders
Spaceship||
Religion||
Espionage||
 
Does this include evaluating the new civs or is that for the other thread?

Also, doesn't GK add religion and (presumably) espionage as priorities for the AI? At the least we should perhaps identify civilisations that for flavor and gameplay reasons could favor a harder religious push (Izzy, Rashid, Gandhi for the first, Boudicca, Pacal, Selassie, Egypt, Askia for the latter for having faith-based UU/UBs and obviously Theodora for the UA)
 
@mystikx21
Units, buildings, etc each have their own AI priorities. This thread focuses on those individual objects instead of leader preferences. I explained it a bit in AI Priorities thread. :)

@glider1
Priorities are relative - all that matters is comparing that number to other options with the same priority. There's no inherent meaning to a 10 number, and Firaxis assigned wildly different value ranges to different priority categories. I organized unit priorities into a logical pattern, but buildings/techs/policies are in their original disorganized state.
 
Possibilities.

Espionage buildings should be slightly prioritized with science. (say espionage 8, science 4, but lower science priority than science buildings or possibly growth buildings), and then any other priority would depend on what we do with them to improve them or use policies to do so. I haven't checked much to see how effectively the AI uses these in conjunction with its best science cities versus the capital or not as I usually don't need to spy on them but it might help itself defending against other AIs to make it flow with higher science production.

Growth buildings could have some association with pretty much everything but happiness, espionage (and unit classes) as they can add from their construction science, production, gold, culture, GPs, religious benefits, city defence and so on. Say growth at 10, 2 for everything else.

Culture and gold buildings could have a slight expansion aspect to them (less than units or happiness or settlers or tile expanding wonders/policies).
 
I think a science priority on espionage buildings is a good idea. :)

However, we should not make the AI focus more on growth buildings. It does not predict future happiness well, so it would max out its population and be unable to settle new cities.
 
However, we should not make the AI focus more on growth buildings. It does not predict future happiness well, so it would max out its population and be unable to settle new cities.

Good point.

Notes on so far.

Foundry is available at Engineering, which is required before it can build any smithies at Metal Casting. This is harmless unless might cause AI to value Engineering more than it "should."
Bomb Shelters looked like they were still in?
Spoiler :
(you listed the building as a building class but didn't label the text as a building class) <Where BuildingClass="BUILDINGCLASS_BOMB_SHELTER" />

Opera House and Museums had 8 and 10 :c5culture: base respectively. (Base GK yields weren't deleted and were doubled....
Spoiler :
<Building_YieldChanges>
<Delete BuildingType="BUILDING_MUSEUM" />
<Delete BuildingType="BUILDING_OPERA_HOUSE" />
<Delete BuildingType="BUILDING_CEILIDH_HALL" />
</Building_YieldChanges>)


Priorities.
Harbor could probably have a mild gold flavor, or a water tile improve one (5?)
Alhambra seems to have a religion flavor when it should have a culture one.
Steam power and especially Iron Working could have a mild production flavor.

Policies may depend on what final values are used.
But for what's in the game right now...
Order
doesn't have a production/expand value, could be 20-30?
Planned Economy has the science value that should be on communism.
Populism has a defence value, should be a tile value.
United front has a diplomatic value (and off/def), should be espionage.

Tradition
Monarchy should have a culture flavor (15-20)
Landed Elite has a happiness flavor and should have growth (20) and defence (5) instead
Ceremonial Rites should be culture (10)

Patronage
CD shouldn't have happiness, all diplomatic
Trade deal should have no GP value, and some production (10)

Commerce
Guilds has no GP value.
Protectionism shouldn't have happiness, should be all gold
Mercentalism shouldn't have GP, should be all tile.

I'll refrain from Liberty because I just don't like the tree right now. ;) (at least in the order it's in).

Piety
Should have some happiness value: 10 happy, 30 religion
Inspiration should be 20 culture.
Charity should be 10 happy.
Unity 20 religion
Tolerance 10 happy
Devotion 20 religion.
 
On a related question, should National Epic be changed from temples to amphitheaters?

Otherwise you would need to plant some crossover effects on the priorities for temples toward wonders/GPs and/or culture that don't really work with the building so the AI would know to build them for that purpose as well as faith-generating effects.
 
On a related question, should National Epic be changed from temples to amphitheaters?
Yes, good catch. Also note that the national wonder city requirements still don't seem to be working.
 
Thanks for pointing out the National Epic.

In the next version I temporarily disabled the National Wonder %-based prerequisite mechanism until I can get the production popup working in cities. It's complicated because Firaxis changed a lot in that file in G&K.
 
Thal,
Could you post an Excel sheet or something that has all the existing values (as of the latest version, where you tuned them to the first post values)?

It would be much easier to give feedback looking at all of them at once, rather than trying to go through in-game.
 
Good point! In the mod folder, open Civ5Modding.xls and look for the green "priorities" tabs at the bottom. I added info about that to the first post now. So far I only have policies and leaders, which are both in a partial state of completion, since we're still tweaking those. I'm working on techs and buildings now. Other than the leader table, the other tables visually have too many entries to post here... though perhaps I could upload it at a super-size to an image hosting site so people can take a look. It's probably easier to just open the file.

You can ignore anything below the "xml" line in the spreadsheet; it's formulas I set up to automatically create xml data from the visual table. XML is impractical to work with in its native format for large data sets. :)
 
Leaders you'd need to add the expansion leaders to the spreadsheet, and then commentary could begin in earnest if any civs are relocated.

Probably Kamehameha is about the only one I'd move because I rarely play him as a peaceful diplomat. Usually plays expansionist or coalitional because the Maori fear bonus sticks when you upgrade and they last long enough to get a few of those out to form a core assault group (sort of like 3 city attack promoted macemen upgraded to rifles/infantry in Civ4 but not as powerful) and you can scout out and settle island expansions far quicker. Extra space can be overcome culturally from quicker CS alliances afar and moai statues instead of villages on coast.

I'm not sure about the buildings or wonders yet as there's a lot of ground there. Happiness buildings could be 16 happiness/ 16 expansion/ 8 growth/4 offense (or something like that adjusted for era), as a general thought.
 
Should Taj Mahal still have a high production priority since GAs no longer boost production?
 
If golden ages are not boosting production in GEM, it's a bug. Golden ages give +25% to all basic yields (growth, production, gold, science, culture, faith).
 
If golden ages are not boosting production in GEM, it's a bug. Golden ages give +25% to all basic yields (growth, production, gold, science, culture, faith).

I didn't confirm - I just assumed it adopted the G&K mechanics. Assume this isn't an issue until I check in game.
 
Thought it was 20% to basic yields, but otherwise, should be doing that yes.
 
I did get to play this evening, but forgot to disable parts of civup to look for the lag, duh! Nevertheless, is this what you want?

With Gem 1.6.6

Ancient Era
Stonehenge has 10 Culture, 10 Expansion. With Faith effect should be Religion and Wonder.
Great Library and Pyramids have offense. Is that intended? (to give conquerors a wonder to build? I don't think that's necessary).
Walls have only defense (intended?). Might add a bit of Food/Production due to Policies?
Scout have no priority at all (reason for spam?)
No priorities for tile improvements, he?
The whole liberty tree has 8 culture, why? (it only fits with merito)
Meritocracy needs to lose Great Person and maybe offense*, but gain happiness
Representation loses city-defense
Military Tradition can gain defense
Professional Army may have a higher gold value (4 atm) as conquerors often seem to need gold?
Ceremonial Rites may lose growth and wonder, gain expansion (or whatever is for tile range)
Monarchy loses Culture, Growth and Wonder.**
Landed Elite loses Culture and Wonder**
Oligarchy loses Culture, Growth and Wonder. Gains gold (4?) and Defense (8?)


*I guess this priority should be more focused for warmongers, no?
**unless we add some links?

Classical Era
Terracotta Army could get something for its 3-tile radius (expansion? growth?)
Oracle could get a lot of low numbers, as a free policy may be used for everything...
Petra can have higher numbers as it's sometimes a very good wonder (make AI competitive)
Move Growth and Expansion from Temple to Amphitheatre as well.
Why does the Circus have Growth (ok) and Expansion (?).
Lots to clean up at Piety (but that will change, right?) Why offense there though?

PS: I now know where the unit maintenance problem often comes from. Workers cost 3 maintenance, and you get two for free with that one liberty policy. Might also be aproblem for the AI?
PS2: The Liberty Finisher isn't supposed to give 3 hammers per specialist, right? (bug?)
 
Back
Top Bottom