School of Computer Science Intranet
Welcome to Infestation, a computer simulation of an artificial life form. In this simulation a population of "Blobs" struggles to live and breed in a closed field where the only source of energy is grass that grows under the control of an artificial sun.
Infestation is a simple example of two biologically-inspired computation paradigms in operation at once:
The set-up is as follows:
The field is a square array of "cells". Each cell may contain nothing (in which case it is coloured white) or it may contain grass (green!). In addition it may contain a Blob (coloured red if it has plenty of energy through to black if it is running out of energy) and/or a Blob egg (a small yellow dot).
The grass grows somewhat randomly under the control of the "Sun", and the intensity of the Sun is controlled by a Slider at the top of the display. The other Slider controls the speed at which the simulation runs.
Blobs can move, eat, lay eggs and fertilise eggs under the control of their neural network "brains". Each of these actions consumes energy, but eating when in a cell containing grass gives the Blob more energy; this is how it can stay alive (zero energy means death!).
When a Blob lays an egg the egg takes a copy of the Blob's brain which it stores as a genetic code. When a Blob fertilises an egg (which only works if it did not lay the egg itself) then the genetic code held in the egg is modified by mixing it randomly with that of the fertilising Blob (with a small error rate), so the egg now has a genetic code that is inherited roughly 50% from each "parent" Blob. The egg will hatch as soon as its cell is not occupied by another Blob, and it will then make its own way in the field.
The buttons at the top allow you to start the simulation, stop it, and to carry out a single simulation step. You can also click on the field to toggle the state of a cell between empty and grassy, and if you click on a Blob or an egg you can see some information about it, including its genetic code. If you click just outside the field you will get some statistics on the state of the simulation.
Initially the Blob population will only survive if the Sun is kept pretty strong so that food is plentiful. However, once a few generations have passed the Blobs will be much better at surviving, so the Sun can be turned lower.
The Blob brain
The brain is a binary neural network with 14 inputs and 7 outputs. The first 9 inputs sense the presence of grass in the 3x3 array of cells centred on the Blob starting at the top-left and scanning left-to-right and then top-to-bottom. The next 4 inputs tell the brain when the Blob's energy is very low, low, high and very high, and the last input tells the Blob when it is in a cell with an egg in it.
The 7 outputs control moving left, right, up and down and eating, laying an egg and fertilising an egg.
When the brain is displayed the columns correspond to the inputs and the rows to the outputs.