Modified SDK sources for the AIAutoPlay mod comp for BTS 3.17.
(EDIT 7/9/08: updated for AIAutoPlay 2.0)
After building your own custom DLL, you can either also merge in the AIAutoPlay python component from my Revolution mod or activate autoplay from the in game python console. Enter the cheat code chipotle in CivilizationIV.ini, then press Shift+~ to open the console. You can call any function exposed to python in this console, to activate autoplay for 100 turns enter CyGame().setAIAutoPlay(100). This will show you exactly what the AI sees as it plays out 100 turns.
If you are debugging it can also be useful to use the debug mode set up in Civ4, type CyGame().toggleDebugMode(). This exposes the entire map plus if you hold down alt, ctrl, or shift while mousing over different parts of the map gives you all kinds of information on the AI and the state of the game.
AIAutoPlay sources 2016-10-05