A simulation of a multi-agent swarm performing the retrieval of resources.
This project has two main components:
- a simulator that can run either headless or visual simulations of swarms
- an evolver that uses Evolutionary Programming to evolve the FSM of the swarm
To get started quickly, I would recommend that you create a virtualenv for the code and install the requirements and libraries for the code into that environment. If you don't have virtualenv installed you can do so with the following command:
$ pip install virtualenv
Then to install both the evolution packages and the swarm package:
$ mkvirtualenv venv
$ python setup.py install
Running the code is now fairly straight forward; to run a visual simulation of the particle swarms use the runsim.py
program in the bin folder:
$ python bin/runsim.py visual
Note that you can get help and the various options using the --help
flag. At this point you should see the visual simulation start running with the default configuration. If you would like to use a different configuration (say one that has been evolved) pass it in with the -c /path/to/conf.yaml
option.
Please let us know if you have any trouble!
NOTE: It turns out that this library requires the installation and compiling of several C libraries, particularly for PyGame, Numpy, librabbitmq, amqp, etc. The discussion for this will be different depending on your machine, but we'd be glad to help out any way we can to get it running for you!
This package is designed to implement an offline (non-visual) search and retrieval simulation based on the implementation in [1]. This offline simulation will then be used to evaluate the fitness of various parameters that are loaded via YAML configuration file.
The package also has a viz library which implements a PyGame visual version of the simulator.
The evolver class makes use of Evolutionary Strategies and Evolutionary Programming to evolve the finite state machine that controls the behavior of each of the particles. This package uses Celery to do parallel, distributed processing of each simulation to compute fitness.
[1] A. Rodríguez and J. A. Reggia, “Extending self-organizing particle systems to problem solving,” Artificial Life, vol. 10, no. 4, pp. 379–395, 2004.