You are welcome to modify and use this code for non-commercial purposes providing you credit the origin (a web address is sufficient eg http://www.rdg.ac.uk/~shshawin/LN ). If you make any clever changes and are happy for these to be published on the web please let me know so that I can update the program. Written by William Harwin, Copyright W.S. Harwin 2002-2007.
This program uses opengl and the glut libraries to simulate a number of 3D wheeled robots that seek out light sources. At a basic level the robots can be braitenberg vehicles that is light seekers and light avoiders. But it is also possible to simulate predator prey interactions etc.
Still needs to be written
Your installation will need opengl (mesa) and the glut libraries. (these are called freeglut3-dev in synaptic)
Compile with g++ *.cpp -L/usr/local/lib -lglut -lGL -lGLU
You will need the Glut32.dll either in the same directory as brait.exe or in the windows system directory.
Objects in the braitenberg world are
lights (food)
organismspredators, prey, bright prey,robots
shy lightseeker agress lightseeker shy lightphobe
Eye model for braitenberg vehicles is Intensity = sum for all lights cos(angle_to_light)/dist^2 to light
Model for preditors and prey is simply to identify the nearest light (or prey) and turn towards it.
Motorspeed= const1/(lightlevel+const2) -const3
Preditors and prey simply choose the nearest light and turn towards it.
Bright prey increases speed and heads in a random direction when near a preditor.
Commands avaliable while running
These are all very simple single letter commands. The Beasts/ Neuron controlled vehicles/N.C.V's can be added by clicking with the mouse when in edit mode. Simulation is begun when the space bar is pressed. To change lights into beasts use the <> keys, a grey dimple shows which beast is currently selected for editing.
Single letter commands are as follows
A list of keyboard commands: