I'd like to suggest a way for Stardock games to enable access to the AI for modders in a very unique and novel way. If the "player AI" option in settings is enabled a game should simply generate an output file/stream of the game state for each player and then accept input files in return when the end turn function is pressed.
Modders could write a program, I'd do it in C++ for speed but it probably doesn't matter, which would process the game's output and then return it an input for each player. In such a way a blazing fast fully functional AI mod could be made. Mere scripting, which is super slow and generally only exposes a limited set of functions, would no longer be the modder's contribution to AI. The player could essentially write a compiled language AI module for the game without needing access to the source code. Being limited to what the designer thinks of adding as a scripting option is super hard to make a decent AI with.