Floys belong to the flocking Alife 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 being territorial animals that defend their territory against intruders. They are implemented as Java applets. The more advanced applets allow changing traits and personality of individual Floys (iFloys & eFloys), and also breeding and evolving the population (eFloys).
The description below covers the eFloys applet, but applies to Floys and iFloys where it is relevant. The rules of behavior are identical to all three species. The parts dealing with evolution apply only to eFloys. Other sections might be relevant to other applets. although the property names and button labels can be different.
eFloys evolve sexually, where each eFloy is the descendent of two parents. Mother and father are selected according to the mechanism of 'Survival of the Fittest by Unnatural Selection'. Fitness is defined by two attributes, energy and safety. If you are an eFloy, 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 both energy and safety)
Food is energy: each time you bite a stranger, your energy is increased. Your best option is to reach the stranger first, and eat him all by yourself.
If you are a stranger, each time you are bitten, your energy decreases. When your energy ends, you die.
If you move fast, your energy decreases. The faster you move, the more energy you lose.
If you are close to your neighbors, your safety increases. The closer you are to your neighbors, the more safety points you get.
Adjust movement to be smooth and calm using the Slower and Faster buttons.
Click several times (if necessary) to reach the desired effect.
Insert a stranger and watch it being chased and attacked by local eFloys.
The attacked stranger loses energy and dies (with a sigh) when his energy ends.
Scramble the scene to get a diverse population.
Each click on the Scramble button will make the population more random..
Enter the Edit Properties screen, where you can:
Change the environment (in the environment page).
Change overall behavior by changing properties and clicking UpdatreAll.
This way you assign the new properties to each member of the population.
Change individual eFloys personalities by assigning properties to specific eFloys.
Select the eFloy ID number from the list box, and click the Update button.
Do not forget to assign a different color to a modified eFloy, to make him easy to follow.
Follow individual eFloys 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 sigh of a dying eFloy).
Display information on all eFloys by clicking the 'Show Info' button.
Display a Help screen by the 'Show Help' button or by pressing F1 key.
Select a predefined population (No. 1 or 2) from the Predefined screen.
Reset everything to default by clicking the Restart button.
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 a stranger is killed a new generation is created (click the Start Evolution button)
You can do the following:
Modify the fitness function by assigning different weighting factors to Energy and Safety.
A larger safety factor will cause evolution to favor eFloys that are keeping together, a larger energy factor encourages high speed and acceleration.
Modify the Max Energy Dose or Max Safety Dose properties.
This is another way to control evolution direction.
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 'UpdateAll' in the 'Edit Properties' screen.
In this case evolution will be slower, because there is no initial genetic variety and it can build only on mutations.
Start with controlled population.
Use a population that you defined previously by assigning each eFloy his own specific traits.
Select a predefined evolutionary process (No. 3 or 4) 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).
The simple behavioral rules produce an interesting emergent behavior. When Floys are not disturbed by strangers, they seem to be very social and playful. They stick more or less together and swim playfully in their home area. However, when they spot a stranger they begin to chase and attack him. They exhibit several sophisticated tactical maneuvers, e.g. lining in a row and heading forcefully towards the intruder, or passing him by, as if ignoring him, and then suddenly turning around and attack the poor victim. They will not rest until they finish him off, and then they return to their calm and peaceful swimming around.
The lowest layer is the genotype: This is the actual chromosomal string on which the genes are encoded. eFloys genetic algorithm is based on a high-order alphabet, where each location on the chromosome represents a specific trait. At this level, we have only character strings that mean nothing until they are interpreted.
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. For example, a specific character in a specific location on the chromosome may define a specific eFloy acceleration. The eFloy 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. An eFloy's fitness is maximized when both energy and safety are maximized. These requirements can be contradictory: To get energy by biting a stranger, an eFloy must reach the stranger before his brothers/competitors do, so he should be adventurous and independent. On the other hand, the safety element of the fitness is decreased when he is far from his neighbors. Moreover, even the energy part itself is not so simple: Biting increases energy, but running fast reduces it, and being fast is required to get at the stranger first.
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 eFloys, even in this very simple system.
Even if you do not program in java you can use the compiled classes for running the applets offline. This is especially required with eFloys: Evolution takes time, even on a computer. Running many generations online is not the most efficient way to use the Internet. So if you want to play with the eFloys applet, download the zip file, unzip it into a directory of your choice, and load eFloys.html to your Java capable browser.