Any interest in bringing your work into the fold of the Community Patch? We've got quite a bit of AI dll work already done (from myself, Whoward, Ninaroku, Ilteroi, and others), which may or may not overlap with any plans you have for the future. If so, let me know and I'll see about doing an initial merge of your basecode with the CPs (if/when you feel your basecode is ready for such a merge).
Feel free to look and borrow from my code, I've already split off my development branch (where I'll be uploading bits and pieces for the next version of the mod) from the master branch (the code for the current version of the mod). However, I doubt merging will be an easy process: a lot of my code relies on small but wide-sweeping changes (eg. changing the type of variables used to track scores or flavors internally from int to double, replacing every call for the active grand strategy with the grand strategy ratio equivalent), the stuff that doesn't work well with Whoward's preprocessor defines encapsulation style, so you'll probably have to merge most stuff by hand. In addition, almost all of Ninakoru's original improvements (Smart AI) have either been enhanced or rebuilt (examples: the DoHurry() function for purchasing buildings with gold can now purchase buildings/units that the AI has queued up in addition to the ones it's currently building and also has a faith-based equivalent, the GetMovablePlotListOpt() function now works with raw pathfinder data instead of TurnsToReachTarget() and can also calculate ideal plots for feigned/parthian retreats), so blindly merging my enhanced versions of those functions with Ninakoru's originals will undoubtedly cause problems.
Oh yeah, and I am also still learning as I go along, so my earlier work may contain unoptimized and/or superfluous bits of code.
Still, there definitely are a lot of enhancements that I think would be incredibly easy to merge: the non-AI related stuff listed at the top of AuI.h should mostly fall into this category, as well as most non-Tactical and non-Homeland alterations marked as fixes (their defines' names all have the word FIX in them right after AUI_<scope text>). Ninakoru's original improvements are almost all still recognizable (I'll admit that I've turned the ExecuteAttack() stuff into a bit of a mess though), so while merging won't be automatic, it won't be as painful as some of the other stuff I've changed (trying to read my belief scoring changes in their current form is like asking for a stroke); I've marked the defines whose enhancements originally came from Ninakoru's code as well, so searching for Ninakoru in AuI.h will highlight all relevant defines.
I'd also like to take a look at the community patch's DLL source code to see if I can merge some of its AI and performance improvements with this mod. I know it's all up on GitHub, but I've simply been so preoccupied with getting my current plans to work and Ninakoru's functions to not produce undesired behavior (for example, the original move and shoot functions mess up royally if the ranged unit needs to set up before attacking) that I haven't had a chance to delve into the community patch's code. Plus running test games is quite time-consuming on my roughly 7-year-old rig, and it can often take 4-5 hours of running AI test games before I realize something's wrong and need to change a single line of code. Even now I'm wondering which I should get to work on first for v10: my planned pathfinder alteration that should drastically improve the performance of those turns-to-target checks, my planned overhaul of danger plots so the AI can use danger plot data as reliable tools instead of murky "avoid these tiles"-ish maps, or having a look at the community patch stuff.
Does this mod will make the AI expand in more consistent way?(i see many civs that would found 7 cities in 150 turns in 1 game, and 3 cities in 200 turns in the next one, which is ridicules.)
It really, really depends: there are a lot of little things responsible for the way the AI expands, including the AI's starting position, the map's size, the result of the random personality rolls on Expansion and Growth flavors for each AI player at the start of the game (other flavors only matter indirectly), whether the AI ends up picking up the policy that speeds up settler production (since production time is a huge factor when the AI is determining what to build next), and others.
That said, you do encounter extreme personalities less often with my mod, thanks primarily to having swapped out the
flat-distribution random number generator for a
binomial-distribution one for all those personality rolls, as well as having implemented an overflow roll system for said personality rolls (short version: if a personality roll would take the AI out of the allowed bounds for personality values, the game keeps rerolling the parameter by however much it went over/under the limit until there is no more overflow with which to reroll). The former results in AI personalities usually being somewhere around their initial/default value, while the latter ensures that AIs with very low or very high initial/default values don't end up stuck with the lowest or highest allowed value.
You're on updated architecture, right? I'm on an old machine which apparently, some mods dislike, even though I can't say specifically why that is. It's not performance - whoward said something about "the microsoft linker" .
What's your exact processor type and model? I'll look up its peculiarities and see if I can compile a DLL specifically for your machine.