A simple simulation of Natural Selection (Survival of the fittest). ------------------------------------------------------------------------- V - Show Variables C - Show Colors E - Show Energy ------------------------------------------------------------------------- - How does it Work? - Each generation (day), creatures start on the edge of the board then venture out to find food. They use energy to move randomly until they collide with a piece of food. At the end of the day, if a creature doesn't find any food then it dies. If a creature finds one piece of food and makes it back to the edge, it survives to the next generation. If a creature finds two or more food, it will survive and reproduce. If a creature uses all it's energy up before the end of the day, it dies. - Traits - Speed - How fast a creature moves. The faster the creature, the more energy it uses. Size - How big a creature is. Being big enables the creature to eat bigger food, but uses more energy. When a creature reproduces, it's offspring gets its traits but has a chance of mutating (getting faster, slower, i.e.) ------------------------------------------------------------------------- - Variables - Food Rate - The rate that food increases each gen Time Mod - Num of secs in each day Mutation Rate - 1 in __ chance of mutation (the rest are pretty self-explanatory) ------------------------------------------------------------------------- - Colors - When 'C' pressed, it shows the number of food a creature has found. (Blue = no food, Green = 1 food, Yellow = 2+ food) Otherwise, the color symbolizes the creature's speed. (Darker blue = slower, Lighter blue/green = faster) ------------------------------------------------------------------------- *Speed up the simulation with Turbo Mode (Shift + Green Flag)
#all #simulation Leave a Heart and Star if you liked it! ------------------------------------------------------------------------- - Inspired by a video from Primer - https://www.youtube.com/watch?v=0ZGbIKd0XrM - All code and art is by me - Music is 'Investigations' and 'Scheming Weasel Faster' by Kevin MacLeod ------------------------------------------------------------------------- Shout out to for first heart! Shout out to for first star!