GOOeFloys Description
Contents
- Overview
- Rules of Behavior
- Rules of
Evolution
- Changing the Population
Characteristics
- Discussion
- Download
Overview
GOOeFloys belong to the flocking
Artificial life creatures variety, sharing with them the social tendency to stick
together, and the lifelike emergent behavior which is based on a few simple, local
rules. They differ from most other Alife flocking (Boids-type) implementations
by having to survive as either predator or prey. GOOeFloys is implemented as a
Java applet. The applet allows the changing of traits and personality of the population,
and also breeding and evolving the population.
The description below covers the
GOOeFloys applet. The applet was heavily modified from the original written
by Ariel Dolan aridolan@netvision.net.il
Rules of Behavior
GOOeFloys behavior is governed by
two rules:
- A rule specifying how to relate
to one's own kind.
- A rule specifying how to relate
to strangers.
1. How to relate to one's own kind
- Prey - Identify two members of
your flock that are near to you and try to stay close to them, but not too
close
- Predator - Eschew your own in
favor of moving toward prey
2. How to relate to strangers
- Prey - move away from predators
- Predator - move toward prey and
attack
Rules of Evolution
GOOeFloys evolve sexually,
where each GOOeFloy is the descendent of two parents. Mother and father are selected
according to the mechanism of 'Survival of the Fittest by Unnatural Selection'.
Asexual reproduction can occur with the last of the species. Fitness is defined
by three attributes; energy, safety, and cooperation. If you are a GOOeFloy, you
can gain or lose these during your lifetime, and the more you have, the fitter
you are.
These are the Rewards and Penalties
that influence fitness:
(The overall fitness is calculated as
a weighted function of energy, safety, and cooperation)
- Food is energy: Predators get
food by biting prey resulting in an energy increase for predator, and decrease
for prey. The metabolic inefficiency of the predator decreases net gain, so
only a portion of the energy removed from prey goes to predator energy. Prey
obtain food by moving more slowly, feeding on the microorganisms freely floating.
If either predator or prey run out of energy, they die.
- When prey dies, other, fitter
prey breed on its carcass (or predator excrement) and come in from the
left to join the flock
- When a predator dies, prey
breed on its carcass and come in from the left to join the flock
- When the last predator dies,
a new generation begins
- At the start of a new generation,
when predators are born, they can appear where the last died or come in
from the right
- It is necessary for lower
lifeforms to first exist before breeding on remains of higher forms So
if predators consume all prey, no more prey can spawn.
- Obviously, prey get harder
to kill as they get stronger
- Predators only eat 'live'
prey. When prey die, they decompose, vanish, and new prey are born.
- Moving: For both Predator and
Prey moving results in an energy decrease. Prey moving slowly: Likelihood
of energy increase is based on slower movement since prey eat freely floating
microorganisms
- Moving toward ones own kind:
Cooperation increase
- Prey bumping into prey: Safety
increase
- Predator bumping into predator:
Cooperation decrease
- Prey moving toward predator:
Cooperation decrease
Changing the Population Characteristics
How to use the applet
Modifying the static population
You can do the following:
- Insert a predator and watch how
prey are chased and attacked. Notice how emergent flocking behavior of both
predators and prey influence the predation process
- A barking sound means a predator
has expired from energy drain
- A chirp sound means prey has expired
from energy drain or being eaten
- Go to 'Edit Properties' and modify
the environment, Click 'Update' to apply the new environment then (Optionally)
Insert a predator"
- Follow individual GOOeFloys easily
by displaying their ID numbers.
The' Show Numbers/Show Shapes' button toggles between these display modes.
- Turn off (or on again) the sound
effects (such as the bark or chirp of a dying GOOeFloy).
- Display information on all GOOeFloys
by clicking the 'Show Info' button.
- Display a Help screen by the 'Show
Help' button.
- Select a predefined population
from the 'Predefined' screen.
- Reset everything to default by
clicking the Restart button.
Modifying the evolutionary factors
Evolution occurs when new generations
are formed from older ones. You can either create generations manually (click
the Breed button) or start a continuous process where every time the last predator
dies a new generation is created (click the Start Evolution button)
You can do the following:
- Modify the fitness function. Go
to 'Edit Properties' and assign Energy and Safety and Cooperation Weight Factors
- If Energy weight is higher,
GOOeFloys will evolve to be braver and possess higher speed and acceleration.
- If Safety or Cooperation
weight is higher, GOOeFloys will evolve to be more cautious and they will
keep together
- Modify the Max Energy Dose or
Max Safety Dose properties. This is another way to control evolution direction.
- Start with a diverse, random population:
Click 'Scramble' several times. Each click will make the population more diverse.
Click 'Start Evolution'
- Create a single new generation
by clicking the Breed button. Each selection of 'Breed' will produce a new
generation out of the current one.
- You can start the evolution process
with various types of populations:
- Start with a diverse, random
population.
Click 'Scramble' several times before selecting 'Start Evolution'. Each
click will make the population more diverse.
- Start with a homogeneous population.
Use the default population, or one you defined by changing environmental
parameters using 'Update' in the 'Edit Properties' screen.
- Select a predefined evolutionary
process from the Predefined screen.
- Limit the possible variation by
clicking Limit Ranges button.
This will ensure a more homogenous, less wild population.
- Examine the history of the evolution
by looking in the History page in the Info screen.
- Stop the evolutionary process
by clicking the Stop Evolution button.
(This toggle button displays the label 'Stop Evolution' when evolution is
on).
Discussion
The Emergent Behavior
The simple behavioral rules produce
interesting emergent behavior. When prey GOOeFloys are not disturbed by predators
they stick more or less together and swim playfully in their home area. However,
when a predator is introduced it will begin to chase and attack them. The emergent
flocking behavior they exhibit seems by its inherent mechanics to disrupt the
process of predation. The effect also takes place in nature; in schools of fish,
herds of gazelle, and flocks of birds. One of the goals was to see if this behavior
evolves over time. As you use the GOOeFloys Tank you can draw your own conclusions.
The behavior is also present in the predators, although they make no attempt
to move toward each other, their sharing of common goals and penalties for colliding
with each other result in cooperative predation. Whether this too models the
world of nature is left as a consideration.
The Evolutionary Process
The evolution mechanism is built
on three layers:
- The lowest layer is the genotype:
This is the actual chromosomal string on which the genes are encoded. The
GOOeFloys genetic algorithm is based on a string of hexadecimal characters,
where each group of 4 characters on the chromosome represents a specific trait.
At this level, we have only character strings that mean nothing until they
are interpreted.
-
Here is an example
of an encoded chromosome and each trait:
- The middle layer is the phenotype:
Here the information encoded in the genes is translated into behavior, which
can be seen in the real world; The Tank. For example, a specific character
group in a specific location on the chromosome may define a specific GOOeFloy
acceleration. The GOOeFloy movement we see on the screen is influenced by
this value.
- The third layer is the evolutionary
fitness:
The fitness depends on the phenotypic properties, but not always in a direct
and simple way. There are no genes for fitness. A GOOeFloy's fitness is maximized
when both energy, safety, and cooperation are maximized. These requirements
can be contradictory: To get energy by killing prey, an predator GOOeFloy
must reach the prey before his brothers/competitors do, so he should be adventurous
and independent. On the other hand, the cooperation element of the fitness
is decreased when he is far from his neighbors. Moreover, even the energy
gain is complex: Biting increases energy, but moving quickly reduces it, and
being fast is required to get at the prey first. For prey, moving more slowly
increases the chance of finding food, but increases the chance of being food,
and moving quickly uses energy and reduces food intake.
So we have this chain:
Evolutionary selection is done by fitness, fitness depends on the phenotypic
traits, and these are defined by the genetic string. The evolutionary operators
themselves (reproduction, crossover and mutation), act on the chromosome string.
The whole process is quite involved and indirect.
And the result can be unpredictable:
By modifying specific traits, we influence the emergent behavior in ways that
are not always easy to predict. When the evolution mechanism throws its blind
operators, there is almost nothing we can tell in advance. Therefore it is quite
interesting to watch the behavior and evolution of GOOeFloys, even in this very
simple system.
Download
Both source code and
compiled classes are available for Download for the GOOeFloys Tank.
For non-programmers:
Even if you do not program in Java you
can use the compiled classes for running the applet off-line. So if you want to
play with the GOOeFloys Tank applet, download the zip file, unzip it into a directory
of your choice, and load alife.html to your Java capable browser.
J. Groff
groffj@neocoretechs.com