I can really agree with you on this to a large extent. The AI and performance prohibit the game from getting past the Industrial Era at best most of the time, and that needs to be fixed. You mentioned something about multi-threading the pathing, if my profiles are anything to go by you could get the 20% (actually closer to 25%) right there. The AI certainly needs work in those specific areas you listed, as well as just generally on tactics, it can never do well at all in a war against me on Immortal.
The main thing I'm thinking is that I don't think anyone else (maybe AIAndy, but certainly not myself and Thunderbrd) understand the structure LyTning made to be able to implement multi-maps. We can do parts of it but the core of having the DLL handle multiple map objects and the things involved with that (as well as the AI for that) is really beyond me. I do think that if we get Multi-Maps, even if it is just in the Modern Era for going to the moon, that a lot more people will play C2C and we will get a lot more coverage. And then there is always AXXXXE (if you are still interested in that)
I guess what I'm trying to say in so many words is that it would be really nice to see multi-maps, but I understand perfectly if you don't want to work on them, even if it means we don't get them.
I probably won't try to aggressively multi-thread in V29 (likely that will be my performance focus for V30), as I want to extract the still-fairly-easy optimizations from the base algorithms first (I'm confident I'll easily get 20% that way at low risk and relatively low effort, and while we remain largely single-threaded we get the benefit of one-core turbo frequencies on most modern CPUs which is performance we LOSE once we multi-thread).
When it does come to multi-threading the first things will be:
- Processing cities in parallel for CvCity::doTurn(), which is basically just pre-amble to the turn, but takes a lot of time (small amount of locking will be needed here but not much - mostly when considering building wonders/national wonders/unique units)
- Parallelizing the tech valuation of individual techs in the tech-path choice routine
- Parallelizing the civic valuation of individual civics in the civic choice routine
- Parallelizing the evaluation of different choices for an individual unit. This could be done at either (or both) of two levels:
- Investigating different options in parallel (e.g. - looking for a good attack, and defending a city) - the problem here is that the linear structure of the AI which we are seeking to parallelize works by evaluating these serially, in priority order, stopping when it first finds one. If we move to doing this in parallel there will be a lot of cases where the highest priority action succeeds anyway, so the parallel work we have done on the lower priority ones is just wasted cycles (i.e. - heat, and more particularly, wasted core usage that will prevent turboing up that can happen while we are single threaded, which means it might result in SLOWER results overall)
- Investigating different targets for the same option in parallel - e.g. - different cities to go construct a subdued animal building in when running the subdued animal AI
- Parallelizing unit moves between units - this option is FAR the hardest and riskiest though, since there is a huge degree of entanglement between what one unit decides to do and what another then subsequently decides (so tons of locking needed which will make it harder to extract parallel efficiencies). I'm also leery of this option because it will make AI decisions much more non-deterministic, which will reduce our ability to reproduce problems and debug things.