Now I kinda want to have a poke at this Civ AI business. Or at least look at the code so I can get a better idea of how the AI is implemented and why it's so bad.
Edit: that is, assuming this version has similarly bad AI to the original.
Now I kinda want to have a poke at this Civ AI business. Or at least look at the code so I can get a better idea of how the AI is implemented and why it's so bad.
Edit: that is, assuming this version has similarly bad AI to the original.
Most of the work goes into iterating over all units and giving each an action based on certain metrics. Thus coordinating units and strategy isn't really present.
Now with some work you could add a higher level planner system. Vox Populi, a Civ5 mod, has done some really clever stuff with organizing units into formations for battle.
I think Monte Carlo methods might be more promising. Maybe with some simplified gamestate, allowing you to modify it more cheaply, reducing the overhead per node. "Computing a turn" can take a long time in late game civ5. Probably a lot of probabilistic stuff is needed to get it cheap enough. Like you could have credences based on current information about which win condition is most likely for each civ. Then you could feasibly decide what the long term goal should be.
Kinda feels like a cognitive architecture(like soar) is necessary to get anything even resembling decent play.
It's sort of hard to have an intuition of what kind of heuristic search is feasible without having some idea of the branching factor, though.
Top level AI is going for Domination Victory? Higher weight on making Military Units at your Cities. Pick a target and weight movement of the army towards it. Etc.
Pick a win condition. Science. Ok, what are the subgoals you want for that? You want growth, first and foremost. And you want to get to plastic asap. How do you get growth? Improve food tiles tiles, research civil service and chemistry, spec into tradition, unlock more caravan. Which of those are more worthwhile? Chemistry kinda conflicts with getting to plastics faster, and so on.
Sort of feels like some sort of SAT problem. Which isn't great news, I admit.
I need to read more papers and maybe have a peek in my Russell & Norvig because now I can't stop thinking about this.