Genetics and Evolution Simulation

Additional information on genetics located below

(R) Refresh the simulation and Reset all genetic data

(C) Refresh the simulation and Continue evolution using existing genetic data

Click anywhere to toggle display of genetic data.

  • Use the left/right arrow keys to show each species' DNA, as well as current population size and number of consecutive generations the species has evolved.
  • The selected species is highlighted at the top left in yellow.
  • The genetic data is the current average of the genes for every creature that has been created for the species during the current generation.

Behaviour Rules

  • Predate
    • Move towards prey, bite it.
    • Food chain is located top left. Each creature preys on the creature to its right. The last creature preys on the first.
    • Nutrition adjusted by predator and prey relative sizes
    • Feeding causes creatures to grow, which makes them larger and extends the ranges at which they can sense predators, prey and mates.
    • Growth also increases nutrition gained from a bite.
    • Growth increases hunger rate.
  • Mate
    • Move towards mate, breed.
    • Breeding uses energy (increases hunger)
    • Breeding involves selecting an "ideal" mate, both mates consenting to mate, and movement toward each other.
    • Success of mating is influenced by several genes.
    • Offspring receive DNA combined from both parents, and slightly mutated.
    • Scarcity / abundance of food (prey) will influence the likelihood of mating.
    • For performance reasons, there is also a hard limit on the maximum size of each species' population.
  • Escape
    • Move away from the most dangerous predator.
    • "Most dangerous" is a value calculated based on a number of factors and influenced by the distance to the predator.
    • Any predator that bites a creature immediately becomes its "most dangerous" predator.
  • Wander
    • Explore
    • Stay on screen

Genes

  • Genes are represented by a floating point value, typically ranging from 0 - 1.
  • DNA from parents is combined by randomly selecting each gene from the parent creatures.
  • Once combined, DNA is then mutated slightly.
  • By design, it is possible for gene values to move outside the bounds of 0-1. Low values usually mean the gene is dormant and the creature will not exhibit any of the behavior associated with that gene. This is usually to the detriment of the creature. High values indicate creatures with exceptional ability (or zeal) for the related behaviors.
  • The following describes the primary effects of each gene.

  • hungerRate
    • The speed that the creature's internal hunger meter increases.
    • In the extreme, creatures can starve to death.
    • Starvation has no visual indicator. The creature just disappears.
    • High hunger can block mating, when random() > (hunger/100)^2
    • High hunger is required to bite.
  • biteSize
    • Combined with the creature's size to determine the amount of nutrition gained (and damage delivered) when biting prey.
    • A successful bite reduce's a creature's hunger meter by the nutrition amount.
    • A bite will cause a creature to grow.
    • After growing, hungerRate will increase, as will the sense distances for predators, prey and mates.
    • A bite reduces the required delay until the creature can breed.
    • Creatures flash orange when they bite prey.
  • size
    • Adjusts the initial size of creature
    • Used to calculate bite size
    • Adjusts predator sensing distance
    • Adjusts prey sensing distance
    • Adjusts mate sensing distance
  • growthRate
    • Adjusts how fast the creature's size increases when biting prey
    • Adjusts predator sensing distance
    • Adjusts prey sensing distance
    • Adjusts mate sensing distance
  • runSpeed
    • How fast the creature moves.
    • Influences success at catching prey, escaping predators, catching mates.
  • turnSpeed
    • How fast the creature changes direction.
    • Influences success at catching prey, escaping predators, catching mates.
  • healRate
    • How fast the creature heals damage from bites.
    • Wounded creatures are indicated with a red outline. The brightness of the outline indicates the severity of the wounds.
    • As wounds heal, the outline fades away.
  • health
    • How much damage the creature can take from bites.
  • dangerSenseDistance
    • The distance the creature can detect predators.
    • This distance is adjusted by the creature size.
    • A predator that bites a creature is immediately detected and assigned as that creature's most immediate threat.
  • foodSenseDistance
    • The distance the creature can detect prey.
    • This distance is adjusted by the creature size.
  • escapePriority
    • The importance of moving away from predators.
    • This is adjusted if the creature is wounded.
    • This is adjusted by the proximity of the predator to the creature.
  • feedPriority
    • The importance of moving toward prey.
    • This is adjusted if the creature is hungry / starving.
    • This is adjusted by the proximity of the prey to the creature.
  • matePriority
    • The importance of moving towards a mate for breeding.
    • This is adjusted by the proximity of the mate to the creature.
    • This is adjusted by the suitability of the mate.
  • wanderPriority
    • The importance of moving in a completely random direction.
  • mateSelection
    • The probability of a selected mate to agree to mate with the creature.
    • It works both ways -- the creature must also agree to mate with the selected mate.
    • If either probability fails, the creatures will not be designated as mates (so they will not move towards each other).
  • breedSuccess
    • The probability of creating new creatures when mating (this is averaged with the mate's gene for final probability)
    • When breeding is successful, both creatures will flash green and a new creature will appear between them.
  • matureTime
    • The proportion the creature's lifespan that must pass before the creature is capable of mating. Prior to this time the creature cannot mate.
  • expireTime
    • The natural lifetime of creature.
    • During the last 10% of the creature's natural lifetime, it will begin to turn grey. The creature will die naturally once it is fully grey.