If you're going to be using an external program, getting info back out will be the tough part.
Perhaps an autohotkey program to use the existing SE4 UI... open all the dialogs and extract all the details into a nice text format.
Then it could run your AI.exe to create an orders file to read... and finally some hammering on the SE4 UI to plug the orders into the game before hitting end turn.
To heck with using the built-in AIs

How about writing your AI in whatever language you like, and playing with all the options of the human interface?