(RFC): List of problems for ConstructionAutomation #11264
Open
Description
Before creating
- This is NOT a gameplay feature from Civ VI, BNW, or outside - see Roadmap
- This is NOT a gameplay feature from Vanilla Civ V or from G&K - If so, it should be a comment in Missing features from Civ V - G&K #4697
Problem Description
Right now I want to try to focus in on cleaning up ConstrcutionAutomation, or at least get the issues with the it documented to work on for later. Right now there's a few issues with the class
- Ais solely looks at cost when deciding to build something. For example, If one building costs 1 and gives 1 culture, it will always be preferred over a building that costs 3 and gives a thousand culture. That's clearly a problem
- Combined stats of a building aren't considered. A building with 2 science and 3 production is seen equal to a building with just 2 science when checking science and to a building with just 3 production when checking production
- AIs don't consider production boosts for building them. I know I attempted to fix that in Allow AI to consider production bonuses when building #11254, but that only fixes the end choice. I.e., a faith building with a production boost is picked over an equally costed production building without one. But a faith building with a production boost won't be picked over an equally costed one without a production boost
- AIs don't build buildings that give cities additional health
- AIs don't consider the benefit of Courthouse styled buildings. Instead they generally assume the benefit is generally good, even in cities that would otherwise be unaffected. Ideally, this should instead be treated as a general stat increase of happiness
- AIs don't consider population increases
- There is a need to genericize some of the wonder logic
- Stat increases are treated via
isStatRelated
. This accidentally includes percentage increases, which generally are different - AIs don't consider stat increases from other scources (policies, nation, other buildings). Just from the construction itself
- Unlike tile considerations, AIs do not consider if they are running out of gold as a reason to build a gold building
- Unlike tile considerations, AIs do not consider lower cities for a larger need for food buildings
- AIs don't consider specialists. This one is a bit lower priority imo, bit still worth looking into eventually
- AIs don't consider tile stat increases. Most notably, AIs don't notice if a building increases the stats of a tile that's not near any city. This could be an expensive thing to check, however
- This file assumes production, making it unusable for gold buying, despite the obvious code overlap in the two ideas
If there's other issues, please point them out. Hopefully we can get the issues crossed off as we go
Related Issue Links
No response
Desired Solution
Fixes to the above
Alternative Approaches
Yes
Additional Context
No response