advice for threaded/parallel application

Brian Blais bblais at bryant.edu
Sat Nov 3 15:09:29 EDT 2007


Hello,

I am thinking about writing a simple multi-agent robot simulator, but  
I am stumped before I begin, trying to decide how to structure the  
program.  My goals are the following:

1) the entire simulator should not include much beyond the standard  
lib.  I'm comfortable with the scipy/numpy/matplotlib combo but I  
don't want to get into having a lot of dependencies.  For example,  
the PyroRobotics which is great, requires gtk (a pain to install on  
the Mac), it runs in X, etc...  Also, for my needs, I want to write  
non-object-oriented agents as well as, possible, some object-oriented  
agents.
2) the robot agents need to be as simple as possible.  things like:

	Forward()
	while RangeSensor()<25:
	    pass
         Rotate(30)
         etc...
3) the environment allows for multiple agents, operating in parallel

My initial thought was to have a multi-threaded app, with a central  
"environment" program and the robots as threads.  The agents would do  
their thing, modifying their properties, and the environment would  
keep track of positions, orientations, etc...  Given that some of the  
robots might be computationally heavy, and the environment almost  
certainly would be, I wasn't sure about the performance of python  
threads.

I thought maybe using something like Parallel Python, or the  
subprocess module, or the processing package.  I'd hate to make the  
wrong choice, discovering it only after putting a lot of time into  
the development.

Any advice for this sort of thing?


			Brian Blais


-- 
Brian Blais
bblais at bryant.edu
http://web.bryant.edu/~bblais



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071103/6c82533d/attachment.html>


More information about the Python-list mailing list