On Mon, Oct 24, 2005 at 21:56:23 +0200, Nicolas Weeger <[EMAIL PROTECTED]> wrote: > Hello. > > Python -> C++ / Python binding function -> checking function -> core > > First is more straightforward. Second lets create more interfaces with > other languages (LUA? Perl? PHP? You name it :p) without redoing the > checks, may enable library plugins (ie checked at runtime). > We can of course do 1) first, then move to 2) later on when we want > other languages.
I think you want it like this. In theory whatever is making the moves (player through GUI, AI, or external AI ala Rogamatic) should all be able to share the same code when it comes to executing moves. > 4) have the script run only when it's the player's turn, would make > things easier but maybe less challenging? This is probably the simplest. I think at the stage AIs are at now running when it isn't their turn to act isn't going to be very productive anyway. > * script will probably need a way to persist values between runs if > called only at each turn, to maintain some state. Also all initial > values must be stored in order for replay to work (think random seed for > the Python random function). Why not handle their moves the same as any player's? So that replays don't call the AI. If they need random numbers they shouldn't share state with the one used to execute actions.
