LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
293 stars 160 forks source link

city AI logs #1155

Closed ilteroi closed 8 years ago

ilteroi commented 8 years ago

so i tried to understand what's going on with city production and immediately the questions crop up. this is kinda long, but bear with me.

CitySpecializationLog.csv:

132, Songhai, Empire-wide specialization weight, Food, 9204
132, Songhai, Empire-wide specialization weight, Production, 1635
132, Songhai, Empire-wide specialization weight, Gold, 670
132, Songhai, Empire-wide specialization weight, Science, 420
132, Songhai, Empire-wide specialization weight, Culture, 0
132, Songhai, Empire-wide specialization weight, Faith, 0
132, Songhai, Empire-wide specialization weight, General Economy, 200
132, Songhai, Empire-wide specialization weight, Production Specialization: MILITARY_TRAINING, 785
132, Songhai, Empire-wide specialization weight, Production Specialization: EMERGENCY_UNITS, 400
132, Songhai, Empire-wide specialization weight, Production Specialization: MILITARY_NAVAL, 250
132, Songhai, Empire-wide specialization weight, Production Specialization: WONDER, 0
132, Songhai, Empire-wide specialization weight, Production Specialization: SPACESHIP, 0
132, Songhai, Gao, New Specialization Type: 0 (CITYSPECIALIZATION_SETTLER_PUMP)
132, Songhai, Tombouctu, New Specialization Type: 0 (CITYSPECIALIZATION_SETTLER_PUMP)
132, Songhai, Jenne, New Specialization Type: 0 (CITYSPECIALIZATION_SETTLER_PUMP)
132, Songhai, Taghaza, New Specialization Type: 0 (CITYSPECIALIZATION_SETTLER_PUMP)
132, Songhai, Tondibi, New Specialization Type: 0 (CITYSPECIALIZATION_SETTLER_PUMP)
132, Songhai, Next Specialization: 1 (CITYSPECIALIZATION_MILITARY_TRAINING)

note that all cities are set to the same specialization. in particular tondibi is freshly founded, size one, doesn't make no sense at all.

CityStrategyAILog.csv:

132, Songhai, ECONOMICAISTRATEGY_NEED_RECON, 1
132, Songhai, Gao, Flavor, FLAVOR_RECON, -268
132, Songhai, Tombouctu, Flavor, FLAVOR_RECON, -268
132, Songhai, Jenne, Flavor, FLAVOR_RECON, -268
132, Songhai, Taghaza, Flavor, FLAVOR_RECON, -262
132, Songhai, Tondibi, Flavor, FLAVOR_RECON, -262
132, Songhai, Tondibi, NEW SPECIALIZATION: Yield Type = Food
132, Songhai, Tondibi, Flavor, FLAVOR_OFFENSE, -224
132, Songhai, Tondibi, Flavor, FLAVOR_DEFENSE, -229
[..many flavor values..]
132, Songhai, Tondibi, Flavor, FLAVOR_AIRLIFT, 7

132, Songhai, Tondibi, AICITYSTRATEGY_LANDLOCKED, 1
132, Songhai, Tondibi, Flavor, FLAVOR_NAVAL, -318
132, Songhai, Tondibi, Flavor, FLAVOR_NAVAL_RECON, -268
132, Songhai, Tondibi, Flavor, FLAVOR_NAVAL_GROWTH, -102
132, Songhai, Tondibi, Flavor, FLAVOR_NAVAL_TILE_IMPROVEMENT, -95
132, Songhai, Tondibi, AICITYSTRATEGY_ENOUGH_NAVAL_TILE_IMPROVEMENT, 1
132, Songhai, Tondibi, Flavor, FLAVOR_NAVAL_TILE_IMPROVEMENT, -195
132, Songhai, Tondibi, AICITYSTRATEGY_NEED_IMPROVEMENT_PRODUCTION, 1
132, Songhai, Tondibi, Flavor, FLAVOR_PRODUCTION, 76
132, Songhai, Tondibi, AICITYSTRATEGY_FIRST_CULTURE_BUILDING, 1
132, Songhai, Tondibi, Flavor, FLAVOR_CULTURE, 106
132, Songhai, Tondibi, AICITYSTRATEGY_RIVER_CITY, 1
132, Songhai, Tondibi, Flavor, FLAVOR_GROWTH, -7
132, Songhai, Tondibi, Flavor, FLAVOR_GOLD, 20
132, Songhai, Tondibi, AICITYSTRATEGY_MOUNTAIN_CITY, 1
132, Songhai, Tondibi, Flavor, FLAVOR_SCIENCE, 23
132, Songhai, Tondibi, AICITYSTRATEGY_HILL_CITY, 1
132, Songhai, Tondibi, Flavor, FLAVOR_PRODUCTION, 86
132, Songhai, Tondibi, AICITYSTRATEGY_TINY_CITY, 1
132, Songhai, Tondibi, Flavor, FLAVOR_OFFENSE, -226
132, Songhai, Tondibi, Flavor, FLAVOR_NAVAL, -322
132, Songhai, Tondibi, Flavor, FLAVOR_NAVAL_RECON, -272
132, Songhai, Tondibi, Flavor, FLAVOR_EXPANSION, -16
132, Songhai, Tondibi, Flavor, FLAVOR_GROWTH, 3
132, Songhai, Tondibi, Flavor, FLAVOR_TILE_IMPROVEMENT, -49
132, Songhai, Tondibi, Flavor, FLAVOR_SCIENCE, 18
132, Songhai, Tondibi, Flavor, FLAVOR_HAPPINESS, 3
132, Songhai, Tondibi, Flavor, FLAVOR_WONDER, -254
132, Songhai, Tondibi, Flavor, FLAVOR_DIPLOMACY, -368
132, Songhai, Tondibi, Flavor, FLAVOR_SPACESHIP, -295
132, Songhai, Tondibi, Flavor, FLAVOR_NUKE, -266
132, Songhai, Tondibi, Flavor, FLAVOR_ESPIONAGE, -96
132, Songhai, Tondibi, Flavor, FLAVOR_AIR_CARRIER, -96
132, Songhai, Tondibi, AICITYSTRATEGY_POCKET_CITY, 1
132, Songhai, Tondibi, Flavor, FLAVOR_EXPANSION, -216
132, Songhai, Tondibi, AICITYSTRATEGY_NEED_HAPPINESS_GOLD, 1
132, Songhai, Tondibi, Flavor, FLAVOR_GROWTH, 33
132, Songhai, Tondibi, Flavor, FLAVOR_GOLD, 80
132, Songhai, Tondibi, Flavor, FLAVOR_I_LAND_TRADE_ROUTE, 34
132, Songhai, Tondibi, Flavor, FLAVOR_I_SEA_TRADE_ROUTE, 35
132, Songhai, Tondibi, Process, Wealth, 800, 1
132, Songhai, Tondibi, Process, Farming, 165, 1
132, Songhai, Tondibi, Building, Granary, 9, 51
132, Songhai, Tondibi, Building, Monument, 1, 53
132, Songhai, Tondibi, Building, Market, 1, 87
132, Songhai, Tondibi, Building, Tabya, 0, 87
132, Songhai, Tondibi, Building, Water Mill, 0, 114
132, Songhai, Tondibi, Building, Forge, 0, 114
132, Songhai, Tondibi, Building, Colosseum, 0, 114
132, Songhai, Tondibi, Building, Barracks, 0, 87
132, Songhai, Tondibi, Building, Walls, 0, 87
132, Songhai, Tondibi, Building, Library, 0, 114
132, Songhai, Tondibi, Building, Aqueduct, 0, 163
132, Songhai, Tondibi, Building, Shrine, 0, 51
132, Songhai, Tondibi, Building, Caravansary, 0, 163
132, Songhai, Tondibi, Building, Herbalist, 0, 87
132, Songhai, Tondibi, SEED: 3574299116831213342, CHOSEN: Wealth, Do not rush, TURNS: 1
LoneGazebo commented 8 years ago

Are you using the latest DLL? All the info on building/unit selection should be in the CityStrategyAIProductionLog.csv file.

To answer questions:

1.) Specializations are weird and I don't understand them. Yes, but I don't know why. 2.) I think that's because specializations focus on 'target yield values,' not flavors. 3.) Anything with a flavor below zero that is passed into a function (such as chooseproduction) is ignored. 4.) Agreed, but I think this has been fixed somewhat in latest. 5.) Perhaps because size, but this is also fixed. 6.) Flavors are set in XML - you can view the tables in SQL. They are often adjusted/modified by city flavors and player/grand strategy flavors.

ilteroi commented 8 years ago

so there's no logfile for the current, final, effective flavor affinities?

anyway, i used to think i am on latest, but i don't have that logfile you're referring to. hmm.

in other news, i just pushed an update. some pathfinder improvements etc. check the commit message.

LoneGazebo commented 8 years ago

I'll merge and then push my latest so you can be on the latest version.

G

ilteroi commented 8 years ago

i've got another update too, forgot one small thing

LoneGazebo commented 8 years ago

Cool. When you have a chance, will you look at: https://github.com/LoneGazebo/Community-Patch-DLL/issues/1126

I can't figure it out, and it seems to have something to do with the observer slot marking all tiles as revealed (thus barbs can't spawn).

G

LoneGazebo commented 8 years ago

Corrections to my answers above 2.) Specializations have flavors and target yields. 'Settler Pump' is a misleading name - really it is a food focus.

ilteroi commented 8 years ago

so now i've got your log. interestingly, not every city ends up making a choice, is that expected?

161, The Shoshone, Moson Kahni, POST: Process, Farming, 440, 1 161, The Shoshone, Moson Kahni, POST: Building, Caravansary, 0, 5 161, The Shoshone, Te-Moak, PRE: Building, Customs House, 28060, 14 161, The Shoshone, Te-Moak, PRE: Building, Borobudur, 10275, 32

anyway, pushed a small fix for the blockaded lakes and a possible crash. also merged

LoneGazebo commented 8 years ago

I think I fixed the issue with no cities making a choice (should at least choose a process, as processes are only evaluated by sanity if there is at least one thing in the potential list).

I'll grab your fix, merge it, then push my current code.

I could use a second pair of eyes on the custom map issues we're seeing. Seems that the Communitas map is crash-prone during regeneration and/or going to menu then starting a new game. Also skodkim's custom map isn't making barbarians (and I've made a custom tester to see and it does the same to me).

So no barbs on custom maps and crashes/generation errors on others. Blegh.

I wonder if (re: crashes) there's something that isn't being properly zeroed out/refreshed on reload? G