From: astro at nospam.tne.net.au (Tim Auld)
Date: Fri, 30 Apr 1999 23:07:45 +0930
Subject: Using Python for Modular Artificial Intelligence code
References: <newscache$bu0saf$a8n$1@news.tne.net.au> <7g94lp$mdu$1@news.worldonline.nl>
Message-ID: <newscache$ck80bf$rc4$1@news.tne.net.au>
Content-Length: 1490
X-UID: 1212                                                  

>>I've started looking into Python as the AI scripting language for this
>>purpose, but I'm having trouble seeing exactly how I could do this.  I
want
>>a message passing architecture - so one object in the game world sends a
>>message to another for interpretation (along with a Python tuple for the
>>parameters of the message perhaps).  This requires a two way interface
>>between my C++ code and the Python script loaded for the particular game
>>object.
>Wouldn't you be better of using a network or distributed architecture. Use
>Corba or TCP/IP protocol to let your objects interact. Saves you the
trouble
>of language-interoperatablility and provides possibilities for multi-user
>(You're doing a LARGE game project, not?)
>
>Where do you use C++ for anyway? GUI's? Build them in Python, forget C++
>until you are done and than use C++ to speed up critical sections
>
>Ilja


This is an interesting idea, using sockets to communicate with the AI
modules, which would have
to be run in separate threads (but perhaps blocking on socket I/O to save
cycles).  I was naturally going to use sockets for multiplayer, and having
socket connections to AI modules may even generalise (and simplify) the
system further.  The reason I'm using C++ is mainly because I'm familiar
with it, and because of speed.  I'm aware that Python is relatively slow, so
I would rather use C++ as a base from the start, and save myself the trouble
of rewriting it all later.

Thanks for your help :)

Tim






