swarm-modeling
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Interfacing GALib to Swarm


From: Rob Kewley
Subject: Interfacing GALib to Swarm
Date: Thu, 09 Oct 1997 18:28:20 -0400

To anyone with interest:

        I am about to embark on a project which (I hope) will provide a
capability that may one day be fundamental to swarm's applications. 
Building a swarm simualtion of a system can provide some very useful
insights into the workings of that system.  Once complete, we may want
to tune the controllable variables in that system to optimize some
measure of performance.  A genetic algorithm is probably the most useful
and widely applicable method of doing this.  While the existing
Breeder-1.0 library does provide this capability, it restricts the user
to binary representations and only those genetic operators encoded in
the library.  If you want more versatility, you must code it yourself. 
I want more versatility.
        GALib from MIT, provides this versatility

        see http://lancet.mit.edu/ga/

        Unfortunately, it is written in C++.  The NeXT book on Objective C
claims that Objective C can be used in conjunction with C++.  I have not
been able to do this successfully in the gnu compiler.  I believe that
it does not provide this capability.  If it does, I would like to know.
        Assuming that C++ code and objective C code cannot be compiled
together, I can either attempt to translate GALib to Objective C, write
my own code, or provide an interface between swarm and a GALib
application.  I have chosen the latter.  That way if GALib (or swarm) is
later improved, only that interface need be updated.  The two packages
can develop independently.
        Having done some programming research, I believe one good way to  do
this is to use a named pipe of fifo to pass data back and forth between
the two processes.  GALib would initialize and pass, one at a time, the
chromosomes to a swarm simulation for evaluation.  The swarm simulation
would run the simulation and pass back a fitness score.  GALib would
then evolve successive generations and pass more chromosomes to the
swarm simualation.  It would be nice to have some control over the GA
parameters from swarm and to have some visualization aids.  I belive all
of this is possible, but perhaps difficult.
        Because I am far from an expert programmer, I am posting this message
to see if anyone knows of a better approach, or something that may
improve this approach.  Any comments would be appreciated.  I hate to go
blindly into a bad idea, but it wouldn't be the first time.

Rob Kewley


                  ==================================
   Swarm-Modelling is for discussion of Simulation and Modelling techniques
   esp. using Swarm.  For list administration needs (esp. [un]subscribing),
   please send a message to <address@hidden> with "help" in the
   body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]