Experiment definitions summary 

This page summarizes basic experiment definitions that are available within Framsticks. Each section presents one experiment definition along with its properties and short descriptions. All these settings are available in the Framsticks GUI and for scripts.

Jump to experiment definition:

Experiment definition: Standard Experiment    (short name: standard)

This experiment definition can be used to perform a range
of common experiments. It provides

– one gene pool
– one population for individuals
– one "population" for food
– steady–state evolutionary optimization
– fitness as a weighted sum of performance values
– or custom fitness formulas
– fitness scaling
– selection: roulette or tournament
– multiple evaluation option, average and standard deviation available
– can produce logs with average and best fitness
– can detect stagnation and stop automatically
– can save best genotypes

This experiment definition has 39 properties – see table below:

Experiment: Parameters
Initial genotype The gene pool will be replaced with the supplied genotype when the experiment begins.
Use the empty initial genotype if you want to preserve the current gene pool.
Gene pool capacity
Delete genotypes
Simulated creatures
Initial placement For 'Central' placement, newborn creatures are placed at the world center, if possible.
Initial orientation Initial heading of newborn creatures
Initial elevation Vertical position (above the surface) where newborn creatures are placed.
Negative values are only used in the water area:
0 = at the surface
–0.5 = half depth
–1 = just above the bottom
Clear performance info Sets the number of instances of each genotype to zero (as if it has never been evaluated).
Genotype performance values stay intact, yet they are meaningless if a genotype has no instances.
Experiment: Parameters: Selection
Unchanged
Multiple evaluation If more than zero:
– each genotype will be evaluated many times
– fitness will be averaged
– fitness standard deviation will be stored in the 'user1' field of a genotype
– there will be no "Unchanged" genotypes ("Unchanged" value is considered zero).
Mutated
Crossed over
Minimal similarity Only genotypes with dissimilarity below this threshold will be crossed over.
Value of 0 means no crossover restrictions.
Selection rule
Experiment: Parameters: Fitness
Constant Constant value added to total fitness
Life span Weight of life span in total fitness
Velocity Weight of horizontal velocity in total fitness
Body parts Weight of body size (number of parts) in total fitness
Body joints Weight of structure size (number of joints) in total fitness
Brain neurons Weight of brain size (number of neurons) in total fitness
Brain connections Weight of brain connections in total fitness
Distance Weight of distance in total fitness
Vertical position Weight of vertical position in total fitness
Vertical velocity Weight of vertical velocity in total fitness
Criteria normalization Normalize each criterion to 0..1 interval before weighting
Similarity speciation If enabled, fitness of each genotype will be reduced by its phenotypic similarity to all other genotypes in the gene pool
Experiment: Parameters: Energy
Starting energy Base starting energy level (for each stick)
Idle metabolism Each stick consumes this amount of energy in one time step
Automatic feeding Number of energy pieces in the world
Food's energy
Food's genotype The default food model is a simple, single part object:
//0
m:Vstyle=food
p:
(this genotype is used when you leave this field blank).
You can specify another genotype to create "intelligent" or mobile food.
Ingestion multiplier
Aging time Idle metabolism doubles after this period (0 disables aging)
Experiment: Parameters: Extras
Stagnation (auto stop) No improvement period required to stop simulation (stagnation). 0 disables automatic stopping.
Minimal fitness Minimal fitness that allows to automatically stop evolution when stagnation detected
Boost phase after stagnation After stagnation has been detected, switches negative selection to "delete worst", doubles "multiple evaluation" and starts another stagnation detection phase.
"Delete worst" results in extremely quick convergence and high selection pressure, similarly to "local search" optimization techniques.
Sound on improvement Emit sounds on improvements? (frequency depends on the magnitude of improvement)
Save improvements Saves (on each improvement) best found genotype or a complete experiment state to a file in scripts_output subdirectory.
Log fitness Sends [LOG] messages with genotypes count and minimal, average and best gene pool fitness, which can be used to produce graphs by external tools like gnuplot or Excel.
It also sends the [LOGTITLE] message on experiment initialization, which summarizes most important parameters of your experiment. It can be used as a graph title.

Experiment definition: Asexual reproduction in the world    (short name: reproduction)

Spontaneous evolution. Each creature with a sufficient energy level produces an offspring, which is then put close to its parent.
Food is created at a constant rate and placed randomly.

This experiment definition has 11 properties – see table below:

Experiment: Parameters
Initial genotype
Creation height Vertical position (above the surface) where new creatures are revived.
Negative values are only used in the water area:
0 = at the surface
–0.5 = half depth
–1 = just above the bottom
Mutations
Restart after extinction Restart automatically this experiment after the last creature has died?
Experiment: Parameters: Energy
Starting energy Initial energy for the first creature
Reproduction energy Creature can produce offspring when its energy level reaches this threshold
Idle metabolism Each stick consumes this amount of energy in one time step
Feeding rate How fast energy is created in the world
Food's energy
Food's genotype The default food model is a simple, single part object:
//0
m:Vstyle=food
p:
(this genotype is used when you leave this field blank).
You can specify another genotype to create "intelligent" or mobile food.
Ingestion multiplier

Experiment definition: Demonstration of evolution    (short name: evolution_demo)

This experiment definition demonstrates the process of evolution.
Individuals are placed in a circle. A new individual is cloned, mutated or crossed over.
Then it is evaluated in the middle of the circle, and, depending on its fitness, may replace a poorer, existing individual or disappear.

This experiment definition has 19 properties – see table below:

Experiment: Parameters
Initial genotype Initial genotype, mutated to create initial population of genotypes.
You need to (re)initialize the experiment to (re)create initial population of genotypes.
Delete genotypes
Simulated creatures You need to (re)initialize the experiment to change this setting and create initial population of given size.
Initial orientation Initial heading of newborn creatures
Initial elevation Vertical position (above the surface) where newborn creatures are placed.
Negative values are only used in the water area:
0 = at the surface
–0.5 = half depth
–1 = just above the bottom
Predefined setup
Number of steps each creature lives Number of simulation steps for the creature in the center of cratures circle.
Beware to performance sampling period when setting this value.
Number of idle visualization steps Number of idle visualization steps:
– after parent (parents) approaches (approach) the center and before new creature is born in the world
– after new creature is born in the world and before parent (parents) returns (return) to original place (places)
– after central creature disappearance
– after replacement of circle circumference creature by central creature
If this parameter is set to zero, than simulation speeds up.
If this parameter is set to big value, then some simulation details may be better observed.
It is possible to change this value during simulation, to obtain different goals.
Experiment: Parameters: Selection
Unchanged
Mutated
Crossed over
Minimal similarity Only genotypes with dissimilarity below this threshold will be crossed over.
Value of 0 means no crossover restrictions.
Selection rule
Experiment: Parameters: Fitness
Constant Constant value added to total fitness
Vertical position
Velocity Weight of horizontal velocity in total fitness
Body parts Weight of body size (number of parts) in total fitness
Criteria normalization Normalize each criterion to 0..1 interval before weighting
Similarity speciation If enabled, fitness of each genotype will be reduced by its phenotypic similarity to all other genotypes in the gene pool

Experiment definition: Neuroanalysis    (short name: neuroanalysis)

This experiment evaluates all genotypes in the gene pool.
During simulation, the output signal of each neuron is
analyzed, and its average and standard deviation
are computed. These data are then saved in the 'Info'
field of the genotype.

This experiment definition has 3 properties – see table below:

Experiment: Parameters
Evaluation time
Restart from the first genotype
Initial elevation Vertical position (above the surface) where newborn creatures are placed.
Negative values are only used in the water area:
0 = at the surface
–0.5 = half depth
–1 = just above the bottom

Experiment definition: Learn where food is, explore and exploit    (short name: learn_food)

When an individual encounters food, it eats a bit of it and remembers its location.
It also gets "refreshed" (i.e. gets a full amount of energy). Energy of each
individual provides information on how recent (current) is the food location
information that the individual stores. Information recency is visualized as
brightness of individuals (light green ones have recently found food).
When individuals collide, they learn from each other where food is (by averaging their knowledge).
A newborn individual moves randomly and receives (duplicates) knowledge from the
first knowledge–rich individual that it collides with.
An individual that cannot find food for a long period of time dies, and a newborn
one is created.

–=–

An interesting phenomenon to be observed in this experiment is how sharing information
helps explore food location. Food items can be added either close to previous items,
or randomly (in the latter case, the information about food location is not very useful
for individuals). You can turn off automatic feeding and keep adding food manually to see
how learning influences behavior of the population. See the "share knowledge" parameter (on/off).

With learning, individuals do not have to find food themselves.
They can also get in contact with other individuals that know
where the food was, and exchange information (the values learned
are proportional to the recency of information). It is interesting
to see how knowledge sharing (cooperation, dependence) versus
no sharing (being self–sufficient, independence, risk) influences minimal,
average and maximal life span in the neighboring and random food placement scenarios.

Notions of exploration of the environment and exploitation of knowledge
about the environment are illustrated as well in this experiment.

–=–

The dynamics of this system depends on the following parameters:
– number of individuals and world size
– size and shape of their body (affects collisions and sharing of knowledge)
– food eating rate
– food placement (neighboring or random)
– learning strategy (e.g. weighted averaging of food coordinates)
– behavior (e.g. move within circles, small after finding food, then larger and larger)

–=–

Technical:
Food location (x,y) is stored in user1,2 fields of each individual.

This experiment definition has 11 properties – see table below:

Experiment: Parameters
Number of creatures
Share knowledge Share knowledge about food position when two creatures collide?
Initial genotype
Creation height Vertical position (above the surface) where new creatures are revived.
Negative values are only used in the water area:
0 = at the surface
–0.5 = half depth
–1 = just above the bottom
Experiment: Parameters: Energy
Starting energy Initial energy for the first creature
Idle metabolism Each stick consumes this amount of energy in one time step
Feeding rate How fast energy is created in the world
Food's energy
Food placement Random placement contradicts 'learning food location' and therefore constitutes a test/benchmark for this experiment definition.
Food's genotype The default food model is a simple, single part object:
//0
m:Vstyle=food
p:
(this genotype is used when you leave this field blank).
You can specify another genotype to create "intelligent" or mobile food.
Ingestion multiplier

Experiment definition: Boids    (short name: boids)

Boids, developed by Craig Reynolds in 1986, is an artificial life program, simulating the flocking behaviour of birds.

As with most artificial life simulations, Boids is an example of emergent behaviour; that is, the complexity of Boids arises from the interaction of individual agents (the boids, in this case) adhering to a set of simple rules. The rules applied in the simplest Boids world are as follows:

* separation: steer to avoid crowding local flockmates
* alignment: steer towards the average heading of local flockmates
* cohesion: steer to move toward the average position of local flockmates

(http://en.wikipedia.org/wiki/Boids)

This experiment definition has 6 properties – see table below:

Experiment: Parameters
Number of boids
Rule 1 - Separation
Rule 2 - Alignment
Rule 3 - Cohesion
Neighborhood range
Separation distance

Experiment definition: Generational evolutionary optimization experiment    (short name: generational)

A simple "genetic algorithm" experiment:

– two gene pools (previous and current generation)
– one population for individuals
– generational replacement of genotypes
– selection: roulette (fitness–proportional)
– fitness formula entered directly into the group's field

This experiment definition has 8 properties – see table below:

Experiment: Parameters
Initial genotype
Gene pool size
Evaluation time
Restart epoch Re–evaluate all genotypes in the current generation
Initial elevation Vertical position (above the surface) where newborn creatures are placed.
Negative values are only used in the water area:
0 = at the surface
–0.5 = half depth
–1 = just above the bottom
Experiment: Parameters: Selection
Unchanged
Mutated
Crossed over

Experiment definition: Mazes    (short name: mazes)

This experiment definition can be used to evaluate (and evolve)
creatures moving between two specified points in a maze. These points
are indicated by start and target marks (in the second population).

Genotype's user1 field (which acts as a maximized fitness) contains
– energy left (when target found during lifespan)
– distance to the target (as a negative value)
when a creature died away from the target.

Press "SHIFT" and click the right mouse button to manually set
the start and finish points.

Use maze[1,2].sim settings for this experiment definition.

This experiment definition has 39 properties – see table below:

Experiment: Parameters
Initial genotype The gene pool will be replaced with the supplied genotype when the experiment begins.
Use the empty initial genotype if you want to preserve the current gene pool.
Gene pool capacity
Delete genotypes
Simulated creatures
Initial placement For 'Central' placement, newborn creatures are placed at the world center, if possible.
Initial orientation Initial heading of newborn creatures
Initial elevation Vertical position (above the surface) where newborn creatures are placed.
Negative values are only used in the water area:
0 = at the surface
–0.5 = half depth
–1 = just above the bottom
Start X positions A comma–separated list of X positions (based on the world map) of starting points
Start Y positions A comma–separated list of Y positions (based on the world map) of starting points
Start headings A comma–separated list of initial headings (in degrees)
Target X positions A comma–separated list of X positions (based on the world map) of target points
Target Y positions A comma–separated list of Y positions (based on the world map) of target points
Target radius The target is a circle with the radius defined here
Clear performance info Sets the number of instances of each genotype to zero (as if it has never been evaluated).
Genotype performance values stay intact, yet they are meaningless if a genotype has no instances.
Experiment: Parameters: Selection
Unchanged
Multiple evaluation If more than zero:
– each genotype will be evaluated many times
– fitness will be averaged
– fitness standard deviation will be stored in the 'user1' field of a genotype
– there will be no "Unchanged" genotypes ("Unchanged" value is considered zero).
Mutated
Crossed over
Minimal similarity Only genotypes with dissimilarity below this threshold will be crossed over.
Value of 0 means no crossover restrictions.
Selection rule
Experiment: Parameters: Fitness
Constant Constant value added to total fitness
Life span Weight of life span in total fitness
Velocity Weight of horizontal velocity in total fitness
Body parts Weight of body size (number of parts) in total fitness
Body joints Weight of structure size (number of joints) in total fitness
Brain neurons Weight of brain size (number of neurons) in total fitness
Brain connections Weight of brain connections in total fitness
Distance Weight of distance in total fitness
Vertical position Weight of vertical position in total fitness
Vertical velocity Weight of vertical velocity in total fitness
Criteria normalization Normalize each criterion to 0..1 interval before weighting
Similarity speciation If enabled, fitness of each genotype will be reduced by its phenotypic similarity to all other genotypes in the gene pool
Experiment: Parameters: Energy
Starting energy Base starting energy level (for each stick)
Idle metabolism Each stick consumes this amount of energy in one time step
Automatic feeding Number of energy pieces in the world
Food's energy
Food's genotype The default food model is a simple, single part object:
//0
m:Vstyle=food
p:
(this genotype is used when you leave this field blank).
You can specify another genotype to create "intelligent" or mobile food.
Ingestion multiplier
Aging time Idle metabolism doubles after this period (0 disables aging)

Experiment definition: Text writer    (short name: text_writer)

This experiment definition displays formatted (and flowing) text using
creatures as letters and digits. It requires the "fonts.gen" file.
Only big letters and digits can be used in the text.

Initialize the experiment to situate the text.

The text can be formatted using HTML–like tags:

<left>
<center>
<right>
<justify> – are used to start a paragraph

<hNUMBER> – sets the height (elevation) of the text (see also the 'Gravity' setting)

<hsNUMBER> – sets hotizontal spacing between letters

<vsNUMBER> – sets vertical spacing between lines

<f0>
<f1> – select the font (f0 is more regular)

This experiment definition has 3 properties – see table below:

Experiment: Parameters
Text The text you want to see
Collisions When turned on, nearby letters will collide and bounce
Speed Text movement: 1–slowest, 100–fastest

Experiment definition: Dance    (short name: dance)

A synchronous framsdance :–)

This experiment definition has 38 properties – see table below:

Experiment: Parameters
Initial genotype The gene pool will be replaced with the supplied genotype when the experiment begins.
Use the empty initial genotype if you want to preserve the current gene pool.
Gene pool capacity
Delete genotypes
Simulated creatures
Initial placement For 'Central' placement, newborn creatures are placed at the world center, if possible.
Initial orientation Initial heading of newborn creatures
Initial elevation Vertical position (above the surface) where newborn creatures are placed.
Negative values are only used in the water area:
0 = at the surface
–0.5 = half depth
–1 = just above the bottom
Land dance
Water dance
Number of dancers
Dance tempo
Change arrangement
Beat
Experiment: Parameters: Selection
Unchanged
Multiple evaluation If more than zero:
– each genotype will be evaluated many times
– fitness will be averaged
– fitness standard deviation will be stored in the 'user1' field of a genotype
– there will be no "Unchanged" genotypes ("Unchanged" value is considered zero).
Mutated
Crossed over
Minimal similarity Only genotypes with dissimilarity below this threshold will be crossed over.
Value of 0 means no crossover restrictions.
Selection rule
Experiment: Parameters: Fitness
Constant Constant value added to total fitness
Life span Weight of life span in total fitness
Velocity Weight of horizontal velocity in total fitness
Body parts Weight of body size (number of parts) in total fitness
Body joints Weight of structure size (number of joints) in total fitness
Brain neurons Weight of brain size (number of neurons) in total fitness
Brain connections Weight of brain connections in total fitness
Distance Weight of distance in total fitness
Vertical position Weight of vertical position in total fitness
Vertical velocity Weight of vertical velocity in total fitness
Criteria normalization Normalize each criterion to 0..1 interval before weighting
Similarity speciation If enabled, fitness of each genotype will be reduced by its phenotypic similarity to all other genotypes in the gene pool
Experiment: Parameters: Energy
Starting energy Base starting energy level (for each stick)
Idle metabolism Each stick consumes this amount of energy in one time step
Automatic feeding Number of energy pieces in the world
Food's energy
Food's genotype The default food model is a simple, single part object:
//0
m:Vstyle=food
p:
(this genotype is used when you leave this field blank).
You can specify another genotype to create "intelligent" or mobile food.
Ingestion multiplier
Aging time Idle metabolism doubles after this period (0 disables aging)

Experiment definition: Framsbots - Game    (short name: framsbots)

Framsbots is a simple game inspired by the classic Robots game.
The aim of this game is to run away from hostile creatures and make all of them hit each other.
Just click somewhere (left–click or double–right–click) to move your creature (the one that is in the middle of the world in the beggining). Your creature will go towards the point you clicked.
All the enemies will move towards you. Use this information to make them hit each other, so they will loose energy and die.
If you see an apple, try to get it. You will gain energy and you may even get a new life!
Use shift+left mouse drag to rotate world.

Read more about this game:
http://www.framsticks.com/wiki/FramsBots

This experiment definition has 16 properties – see table below:

Experiment: Parameters
Enemy creature type
Player creature type
Level Number of a level to play (–1 is random)
Show additional debug messages
Experiment: Parameters: Enemies
Number of enemy creatures
Starting energy of enemy creature Base starting energy level
Multiplier of energy taken by Enemy
Multiplier of energy taken by frozen Enemy
Multiplier of energy taken when Enemies collide
Multiplier of energy taken from alone Enemy
What to do when Enemies die
Experiment: Parameters: Player
Starting energy of player creature Base starting energy level
Experiment: Parameters: Food
Starting energy of food Base starting energy level
Amount of energy lost How much energy food looses each step
Food probablity Probability of food appearing after enemy killed
Experiment: Parameters: Azimuth
Maximum length of positions history vectors

Experiment definition: Batch evaluation of loaded genotypes    (short name: standard-eval)

Use this experiment to evaluate all genotypes one by one.
Use gene pool capacity parameter to set the required number of evaluations of each genotype.

The genotypes for evaluation _must_ be different.

First load your genotypes for evaluation, then initialize experiment,
then adjust all simulation parameters, and finally run the simulation
to perform all evaluations.

After evaluation, fitness of each genotype contains the average fitness,
user1 field contains standard deviation, and user2 field contains the
average time (in seconds) needed for single evaluation.

This experiment definition has 33 properties – see table below:

Experiment: Parameters
Initial genotype The gene pool will be replaced with the supplied genotype when the experiment begins.
Use the empty initial genotype if you want to preserve the current gene pool.
Gene pool capacity
Delete genotypes
Simulated creatures
Initial placement For 'Central' placement, newborn creatures are placed at the world center, if possible.
Initial orientation Initial heading of newborn creatures
Initial elevation Vertical position (above the surface) where newborn creatures are placed.
Negative values are only used in the water area:
0 = at the surface
–0.5 = half depth
–1 = just above the bottom
Clear performance info Sets the number of instances of each genotype to zero (as if it has never been evaluated).
Genotype performance values stay intact, yet they are meaningless if a genotype has no instances.
Experiment: Parameters: Selection
Unchanged
Multiple evaluation If more than zero:
– each genotype will be evaluated many times
– fitness will be averaged
– fitness standard deviation will be stored in the 'user1' field of a genotype
– there will be no "Unchanged" genotypes ("Unchanged" value is considered zero).
Mutated
Crossed over
Minimal similarity Only genotypes with dissimilarity below this threshold will be crossed over.
Value of 0 means no crossover restrictions.
Selection rule
Experiment: Parameters: Fitness
Constant Constant value added to total fitness
Life span Weight of life span in total fitness
Velocity Weight of horizontal velocity in total fitness
Body parts Weight of body size (number of parts) in total fitness
Body joints Weight of structure size (number of joints) in total fitness
Brain neurons Weight of brain size (number of neurons) in total fitness
Brain connections Weight of brain connections in total fitness
Distance Weight of distance in total fitness
Vertical position Weight of vertical position in total fitness
Vertical velocity Weight of vertical velocity in total fitness
Criteria normalization Normalize each criterion to 0..1 interval before weighting
Similarity speciation If enabled, fitness of each genotype will be reduced by its phenotypic similarity to all other genotypes in the gene pool
Experiment: Parameters: Energy
Starting energy Base starting energy level (for each stick)
Idle metabolism Each stick consumes this amount of energy in one time step
Automatic feeding Number of energy pieces in the world
Food's energy
Food's genotype The default food model is a simple, single part object:
//0
m:Vstyle=food
p:
(this genotype is used when you leave this field blank).
You can specify another genotype to create "intelligent" or mobile food.
Ingestion multiplier
Aging time Idle metabolism doubles after this period (0 disables aging)