Skip to content
nhpackard edited this page Apr 5, 2013 · 3 revisions

This repository contains the code for Bugs, a simple artificial life model.

Requirements:

  • python with pygame module (currently tested with python 2.7)
  • C compiler; currently tested with: Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) Target: x86_64-apple-darwin12.3.0 Thread model: posix

To get going: compile the C code with make, to make the executable "bugs". Run bugs using one of the scripts dobugs or dobugsnog (for no graph monitors).

Bugs communicates with graph monitors through pipes. Currently there are two, for:

  • population as a function of time (piped to graphpop.py)
  • evolutionary activity as a function of time (piped to graphact.py)

Asocciated scripts dobug and dobugnog (for running without the realtime graphs of population and activity) set up the pipes and launch bugs.

dobug sets up the pipes, launches the python monitors and then also launches bugs. Arguments to dobug are passed down to bugs. (dobugs -h should get you the help message for bugs arguments).

The data monitors show graphics in real time, but the data going to the real time graphs are also captured in a data file. This gets put in the data directory; each time bugs is run, a new data subdirectory is created using PID to create a unique label. In this directory go the following files:

  • seed: random number seed
  • git: git version used
  • population: data that made the population graph
  • activity: data that made the activity graph

The activity graph monitor is interactive: it can be rescaled by hitting + or - to multiply or divide the maximum activity in the graph by two. For this to work you have to click the activity graph window first.

The representation of the bugs' world shows food in green, and bugs in magenta, ranging in intensity according to each bug's internal food.

Clone this wiki locally