dhruv-tailor / excelmakesbelhappypack

Combination of Governments Expanded, Missions Expanded and Ideas Variation
36 stars 15 forks source link

AI fixes #93

Closed SpiritBaker closed 4 years ago

SpiritBaker commented 4 years ago

Tweaks to Building order New AI logic for giving subsidies New AI logic for Edicts

SpiritBaker commented 4 years ago

"Small fix" I tweaked building order a bit, to compensate for building cost from development.

stackpoint commented 4 years ago

Whoops, spoke too soon:

[meantimetohappen.cpp:171]: unknown command '{' for MTTH in file common/ai_army/10_AI_forts.txt line : 8
[meantimetohappen.cpp:171]: unknown command 'FROM' for MTTH in file common/ai_army/10_AI_forts.txt line : 9
[meantimetohappen.cpp:171]: unknown command '{' for MTTH in file common/ai_army/10_AI_forts.txt line : 10
[meantimetohappen.cpp:171]: unknown command 'fort_15th' for MTTH in file common/ai_army/10_AI_forts.txt line : 11
[meantimetohappen.cpp:171]: unknown command 'fort_16th' for MTTH in file common/ai_army/10_AI_forts.txt line : 12
[meantimetohappen.cpp:171]: unknown command 'fort_17th' for MTTH in file common/ai_army/10_AI_forts.txt line : 13
[meantimetohappen.cpp:171]: unknown command 'fort_18th' for MTTH in file common/ai_army/10_AI_forts.txt line : 14
[ai_army_database.cpp:81]: Unsupported type army AI type }
stackpoint commented 4 years ago

Forgot to encase the conditions with "modifier = { }"

SpiritBaker commented 4 years ago

Made a fix 10_AI_forts.txt

stackpoint commented 4 years ago

Looks good.

stackpoint commented 4 years ago

I'm seeing the AI bounce between fort defense and manpower edicts when not being sieged or having +90% manpower.

SpiritBaker commented 4 years ago

There is no changes to defense edict in this commit, but I can reduce the base Ai will do value to reduce the chance of this happening. Personally I've never seen this happening.

About manpower edict, economic considerations work both ways. Why would AI disable the edict if the cost of running it is tiny percentage of his total income, or he have -100% to state maintenance.

stackpoint commented 4 years ago

If economic considerations isn't a concern then wouldn't running trade edict be better than running the MP edict while at +90% MP?

SpiritBaker commented 4 years ago

Why do think it's good idea to put % of total MP in a condition for the edict that increases total MP? It's not the micro human player can repeat, AI does that in one in game tic. Also I'm pretty sure AI factors total MP when he is trying to estimate his opponent strength.

stackpoint commented 4 years ago

If you want to extend the length of the edict to make it more like imperator to balance the AI's ability to micro then that's a completely different (valid) discussion. But looking at your 10,000 manpower pool and seeing you have 9990 manpower doesn't really seem like a difficult calculation for the human player to make. It's a difference of the ability to micro, but that shouldn't be a reason to deliberately affect the AI's ability to make a decision.

SpiritBaker commented 4 years ago

For edict with base manpower in it, the difference was very substantial. In a single tic AI had the ability to double his manpower pull. With current lvl 1 edict it essentially half of that.

stackpoint commented 4 years ago

I definitely agree that flat manpower modifier was overpowered. I made a couple of tables on discord quantifying that.