How It WorksThis is a featured page

The Simulation Cycle


Simulation Cycle


Genesis

At the beginning of the simulation (or whenever the Reset Button is pressed), initial animals and plants are created. The number of initial plants and animals is determined by configuration settings. Animals have an initial vitality and plants have a nutrient value, both of which are configurable.* An animal's vitality is essential for movement and reproduction (both of which expend vitality), and is replenished when plants are eaten.

After Genesis, the iteration cycle begins (blue boxes).

Reproduction

Reproduction is first step of the iteration cycle. In this step, a certain percentage of plants may regenerate, creating new plants. Animal reproduction may occur as well, but is more complicated than plant regeneration. Plant and animal regeneration is driven by independent reproduction cycles; a cycle consists of a fixed number of iterations. For example, animals may reproduce every fifth iteration, whereas plants might reproduce every sixth iteration. Plant and animals can have the same length reproduction cycle, but be out-of-phase, so that reproduction occurs at a different time for plants and animals. All cycles and cycle offsets are configurable.

Plant reproduction is strictly percentage-based. If there are 100 surviving plants, and 10% regenerate every reproduction cycle; the end result is that 10 new plants will be created.

Animal reproduction is based on two factors. Like plants, only a certain percentage of animals are allowed to reproduce, and only if they have sufficient vitality for reproduction (the Reproduction Threshold). In other words, only a percentage of all animals that have sufficient vitality to reproduce will do so, based on the Birth Percentage setting. Animal reproduction expends vitality from the parent, so that the parent will have less vitality after reproducing (Birth Cost). Child animals are given vitality specified by the Initial Vitality.


Movement

At each iteration, each animal moves one step along their path (as determined by directions specified in their path trait). Each step expends vitality (equivalent to Movement Cost). When an animal moves, it eats whatever plants are in its Capture Radius, and that restores vitality. If an animal's vitality falls path a critical level, it's color will fade. If its vitality reaches zero, it dies. When the last animal has died, an Apocalypse event occurs and the simulation ends.

Genetic Exchange

Assuming there are animals left alive after the iteration, then there is an opportunity for Genetic Exchange between animals. Animals within the Capture Radius of each other may exchange every other Path Segment in their respective path traits. How many actually do so is determined by the the Genetic Exchange Likelihood value.

Mutations

When an animal is born, it inherits it's parent's path trait. However, the path trait may be mutated in one of three ways:
  1. A path element (direction) is changed
  2. A path segment is shortened or lengthened
  3. The number of path segments is less or more than the parent's
The frequency of each type of mutation is determined by the Mutation Rate. More than one mutation and more than one type of mutation may occur.

Statistics

Statistics are collected at fixed time intervals. Statistical values are shown and charted in the panel at the bottom of the simulation. In addition, a sample of animal paths is collected and shown in the Movement Graph.

*When hovering the mouse pointer over each configuration field, context-sensitive help will pop up and provide specific information about the values in that field.


No user avatar
gene.author
Latest page update: made by gene.author , May 3 2009, 7:43 PM EDT (about this update About This Update gene.author Fuller explanations - gene.author

532 words added
138 words deleted
1 image added

view changes

- complete history)
Keyword tags: how program simulation
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)