Table Of Contents
Introduction [top]
Blobs
are the inhabitants of a little simulated world (sometimes called arena).
They look like little colored dots.
There are two types of Blobs
, predators (red) and prey (blue).
- Predators run around and eat prey.
- Prey run around and eat grass.
Both kind of Blobs
start reproducing as soon as they are old
enough and have accumulated enough energy to do so (by eating).
Genetic Code of a Blob [top]
All Blobs
have a simple genetic code.
It consists of several little genomes which are triggered by external or internal events. Once triggered a genome is executed until another genome is triggered.
Triggers are:
- normal
normal genome when nothing else is active
- north
triggered when the Blob
ran into the north wall
- south
triggered when the Blob
ran into the south wall
- east
triggered when the Blob
ran into the east wall
- west
triggered when the Blob
ran into the west wall
- predator
triggered when a predator is visible
- prey
triggered when a prey is visible
- hungry
triggered when the Blob
will die soon because it is running out of energy
- born
triggered when the Blob
is newly born
Each genome is a little program of simple commands.
It is repeated for some time, then the Blob
falls back into normal
state.
The simple commands are mainly for movements
(others might be added at a later time).
- N = Absolute North
- W = Absolute West
- S = Absolute South
- E = Absolute East
- NW = Absolute NorthWest
- NE = Absolute NorthEast
- SW = Absolute SouthWest
- SE = Absolute SouthEast
- n = Relative North (forward)
- w = Relative West (left)
- s = Relative South (backward)
- e = Relative East (right)
- nw = Relative NorthWest (forward-left)
- ne = Relative NorthEast (forward-right)
- sw = Relative SouthWest (backward-left)
- se = Relative SouthEast (backward-right)
- o = Nothing
- r = Random
The absolute movement commands are the most obvious ones.
The Blob
will do one step in the specified direction.
The relative movement commands where introduced to give the
Blobs
more possibility to react in a useful way to the triggers.
Whenever a Blob
is triggered by something (e.g. seeing another Blob
)
it will automatically face toward it.
If the genome for this trigger contains only a single 'n' the Blob
will react by walking toward the other Blob
(this might be a good
idea for a predator but obviously a rather bad one for a prey).
And here we touch the really interesting part of the Blob
simulation.
Evolution [top]
In the beginning of the simulation all Blobs
start with the same genetic code:
All genomes contain only one random
move.
This will result in a behaviour where all Blobs
will jitter randomly around.
After some time some Blobs
have reached the age and have enough energy to reproduce. These Blobs
will create clones of themself (which consumes some amount of energy).
As in nature, these clones will not be exact copies but will have some mutations.
The mutations can be of various kinds with different probabilities:
- insertion of a command
- deletion of a command
- duplication of a command
- exchange of a command
A genome will always contain at least one command (deletion will not happen if the genome has a length of 1).
The children of a Blob
will therefor behave almost the same as the Blob
itself but will have some minor changes.
In many cases these changes will be bad
(like walking north
when the Blob
runs into the norther wall)
but in some cases the change will be good (like running away from a predator).
Blobs
with stupid genetic code will have a tendency to die early,
Blobs
with smarter genetic code will have a tendency to survive longer and reproduce more.
Here it is: evolution
Cycles [top]
Watching the Blobs
in the arena show that the number of predator/prey will show a similar cyclic behaviour as similar predator/prey animals do in the real world.
- There are only few predators and the prey will reproduce explosively.
- Since now there a lot of prey around the predators have a lot to
eat and will reproduce a lot.
- Now there are too many predators and start killing too many prey.
- The predators do not find enough prey to eat and many die in a famine.
- The cycle can start again.
This rather simple cycle gets a little bit more complicated by evolution.
It is interesting to observe that whenever one group of Blobs
is in a high cycle no strong selection happens to ineffective Blobs
.
But as soon as the high cycle swings down and survival gets tough only the smart individuals will get through (most of the time, but it is rather frustrating to watch the only smart Blob
die in an unfortunate situation whereas in a another corner an incredibly stupid Blob
reproduces like hell).
Please not the complete absence of any external control of the simulation.
You can not
protect or kill a specific Blob
.
This means also that there is no safety valve.
If the predators are successfull in eating all prey... thats it, they will all die soon of hunger.
On the other side it might well happen that when the prey is scarce all predators might die in a terrible famince and the prey will now explode almost uncontrolled.
I say 'almost' unchecked because there is another factor in the simulation: grass
Grass [top]
The prey Blobs
get their energy from eating grass.
The grass gets eaten aways but will grow back slowly.
Every patch of grass will therefore only feed a certain amount of prey.
If too many prey try to eat from the same patch of grass (e.g. don't walk away) some of them will sooner or later die.
This will tend to select for prey that walk around a little bit.
Completely immobile prey will die out sooner or later, because their offspring does not move away and will have to share the food with their parents (until a predator walks by and eats them).
On the other hand has prey that runs around too much a higher probability of running into a predator.
Life is truly harsh.
|