Skip to content

LeoGuagenti/Natural-Selection-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Natural-Selection-Simulation

Leo Guagenti - 5/22/19

This is a basic simulation of how natural selection works in real life.
Using simple variables that may mutate such as view distance, speed, view twitch, and some others, I was able to create an environment that favors 'organism' with more favorable traits for the environment.
The demo for the simulation can be found here --> https://leoguagenti.github.io/Natural-Selection-Simulation/

Rules of the simulation:

  • Every 'organism' has a view distance, speed, travel direction, current food level, and a desired food level (needed to reproduce)
  • When an organism reproduces, another organism with slightly 'mutated' versions of the parent's genetics is produced
  • In order to reproduce, an organism must find its way to food (represented by a small purple dot)
  • The organism may only see the food and travel toward it if the food is within the viewing distance of a given organism.
  • While searching for food, the organism's current food level decreases (supposedly due to movement energy). If the organisms food level reaches below the value 3, then the organism will die, spawning a food partical in its place.
  • The three numbers that appear by each organism represent (from top to bottom) Generation Number, Current Size, and Desired Size

Where i'd like to take this:
Currently i'd like to implement a way for the organisms to eat one another and to flee when a larger organism is within viewing

About

A Simulation which illustrates natural selection through simple variables and mutations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published