Thanks Chumchu, Joncnunn and JooseGoose
Chumchu I agree with you that we were focusing on how to beat the adaptive system. However think about the base game. Players have also adjusted their playstyle to beat the AI, which is also about beating the base game's default handicap system....
Everybody has got a good point on this. I personally think the adaptive system as it currently stands is broken. It doesn't work properly for all phases:
Here is my take:
- Early game: The restrictions in happiness make the AI way too tentative. The AIDeclarWarProb system is broken and does not work as I intended.
- Midgame: The mod starts to improve, but the tech funnel boosts the AI in too a predictable a way.
- Endgame: The mod plays really well, about as well as could be expected with the AIs low intelligence.
- On a general level, the adaptive system does not regulate the AI as I intended, for the huge variety in map types and play styles.
Heres what I am hoping is the solution, would be interested in your thoughts.
- Delete all my handicaps and restore them to default
- Regulate the AI adaptively based on the per-era-modifier (PEM)
I've already written the code for it and have started testing it. The idea is simple. The player starts on whatever difficulty they want, for the flavour of game they want. If you want the AI to have reduced happiness, you play it on prince (for example). If you want the AI to come out blazing, you start it on deity.
Once the difficulty is chosen, the code merely monitors the progress of the AIs in tech rate, and regulates the AIs PEM on an ongoing basis. It doesn't mean that the AI gets a once off boost at each new era. The boost is happening every time the code wants to know what the bonus is.
So if you are a prince player that chose deity, the AI initially would be immense but very quickly slow back to prince in progress.
If you are a deity player that chose prince, the AI would initially start slowly but very quickly start to build up in power.
I've worked out the algorithm for it. The question is whether the PEM is able to regulate the AIs science performance as well. The PEM would have an indirect effect on science, because PEM boosts the AIs growth, gold and production.
The experiment will be to see how quickly changes in PEM have an effect on AI performance during the game.
The way I have set up the algorithm at the moment you can see here. I have deleted the adaptive buff system and all the handicaps I previously assigned. It is just the base game handicaps plus the AI improvements already existing in this mod plus this algorithm:
EDIT:
The algorithm is very crude at the moment but hey that is what an alpha is! It is just proof of concept.
Let me know if you want to try the V19 alpha or if you have alternative suggestions. If I can get it to work, it will mean that the AI is playable at all phases of the game (I hope), because the selection of difficulty decides what style of game the player wants initially, and the adaptive buff adjusts itself to fit the players progress so that a game completes through all phases. It is capable of both boosting and retracting AI performance, something the previous adaptive buff could not do.
Fire away if you think the idea is lame!

Factor in that my own motivation to make genuine improvements to the AI is limited to small qualitative improvements that make the game more enjoyable for me to play (things like its diplomatic choices, or easy to fix tactical weaknesses etc).
AI improvements that make the AI quantitatively better, would take too much time and effort for me to be bothered with. I just don't have the motivation and energy to make quantitative improvements because there are soooooooo many to make, and I have got better things to do with my life than slave away fixing the mega mountain of convoluted code that is the AI.
I also realise that this idea smashes peoples idea of making progress. The better you play, the more buffs the AI gets. The worse you play, the more the buffs are withdrawn. For me personally, the fix players want is gained by beating the base game until you get to immortal/deity. This mod is for players that have exhausted the games potential, but want a relaxing yet challenging and diverse game.
Think about it. With this adaptive mod, you could start out on deity and full piety and still possibly survive. Sounds like fun to me!
The other feature of this concept is that because the DLL is independent of other code, including the handicaps file, it would be able to cope with mods that break the AI's performance but that are fun for the player to play in any case.