Nicolas Brodu     
          
            C R O G A I
Nicolas
Brodu
C R O G A I

Crogai: Description

This is Crogai, an experiment to introduce some artificial intelligence in crowd behavior scenarios. This is an experimental project, a framework for research in this domain.

It is possible to set up simulations and test different AI in a full 3D environment: small physics engine, terrain, collision handling, etc. The first goal was to build a good enough environment, which allows for interesting AI to take place. In this respect, Crogai is strongly inspired from the OpenSteer projet, and actually reuses the steering behaviors presented by Craig Reynolds during the game developper conference '99.

In addition, agents can emit spores in the environment, and those are in turn used in a genetic algorithm to evolve the agents. Many interesting behaviors are observed, population explosions and extinctions are common. A framework is also available to use machine learning algorithms instead of the currently explicit AI, like neural networks, but not only.

Crogai is working in both graphics and batch mode thanks to a simulator-base architecture, allowing a real time / simulation time ratio of any arbitrary value, depending on the machine capacities.

Screen shots

genebasic
Evolution of agent species. Agents can hunt, graze, emit spores and reproduce. We see here clouds of spores from different species, and patches of ground where the grass was eaten. Will the system reach a stable regime, or is it inevitably doomed to global extinction?
genebasic
A closup of a similar run. We see 3 blue agents grazing in the foreground, but cyan and magenta predators are coming... Now look in the background: each specie can both graze and hunt at the beginning of the simulation. As time passes, they may evolve and specialize.
populations
Some results of population evolution in time. These plots show the numbers of each specie, till one specie goes extinct.
swarm
An example of swarm obtained with an AI close to the Boids rules, plus an additional effect to bring back agents toward the center.
colliterra
Another AI which tends to produce groups and successions of agents following each other. We can see here an agent taking off, and others deciding to follow.
predator
An early experiment predator fight! Each AI was programmed to stay in groups, attack the other species, and avoid getting eaten. Agents get energy when eating, and spend it to move. No spores, no grazing. Unfortunately, this system was quite unstable...

Download

Version 0.2.1 fixes compilation with recent Open Scene Graph. You can download the source package here. Old Binaries for Windows users are also available.

The 3 most playful programs, and therefore the most interesting for a non-specialist user :), are: Genebasic, the example with the spore clouds et the different species presented in the screen shots. Swarm, which can also be used as a nice screensaver! Colliterra, an example of collision detection and avoidance. Use the mouse (all three buttons) to navigate in 3D. The most useful keys are 'space' to pause the simulation, 'c' to cycle the terrain, and 'p' to display the population graphs in the Genebasic program. 'g' and 'G' may also be fun in the Colliterra program (tip: use pause), and 'v' for the Swarm program.

The Crogai project is now hosted on Gna!. Thanks to the Gna! team for setting up the development portal. You can have a look at the latest source code in the subversion repository. To download it, you may point your subversion client to the anonymous Gna! SVN server.

Crogai, including its simulation engine, are under the GNU GPL license. Thanks to send me a word if you decide to use it. And may you have as much fun hacking it than I had creating it!

Crogai uses OpenSceneGraph as its graphics engine. You thus have to install it properly before compiling Crogai. Note: the simulation engine is independent and can be re-used without OpenSceneGraph.

Crogai works best under Linux. I cross compiled the Windows binaries presented above.

Documentation

To understand the difficulties and implementation choices encountered while developing Crogai, you can read my project report. This is the report I submitted for the graphics course of Concordia University for which I initially created Crogai. It's now somewhat outdated, but still presents some of the problems and the choices made to solve them.

An experiment using Crogai is described in "Environmental fitness for sustained population dynamics". This was published in September 2005, in the IEEE Congress on Evolutionary Computation, Vol 1, p 343. See the IEEE Electronic Information Dissemination Policies for copyright information.

For developers wishing to have an idea of the code works, you can also read the automatically generated Doxygen documentation. It is available online here.

Style:
      S O F T W A R E 
C
R
O
G
A
I
C
R
O
G
A
I