ScratchData LogoScratchData
Back to cabalex's profile

Natural Selection Simulation

CAcabalex•Created June 23, 2019
Natural Selection Simulation
18
17
728 views
View on Scratch

Instructions

W - Kill 1/4 A - Reshuffle Genes S - Kill Least Likely to Die D - Increase Death chance gene in all blobs X - Add 5 blobs Up/Down - Turn movement on/off Space - Blob Analytics. Press 1 - 5 to sort. Red/Purple lines - A visualizer of how many blobs there are since the beginning of the simulation. The red line is the limit of clones at 300. Press Z to reset it! Click on blobs to keep track of their stats while the simulation is running. This is easier to do when movement is turned off.

Description

Made for fun :) A really basic simulation of natural selection over time. HOW DOES IT WORK? --- Each blob has a Death gene, a Reproduction gene, and a Mutation gene. These can range from 5% to 20% on a normally spawning blob. Reproduction Gene - Chance of making a new blob on the next Time Step. Death Gene - Chance of dying on next Time Step. Mutation Gene - Chance that when making an offspring, that offspring will have a different gene than its parent. The colors are dependent on all the blob's factors combined. HOW DOES THIS CREATE NATURAL SELECTION? The way it works is that as blobs mutate, they have a chance to get better genes to adapt to their environment. Even though this simulation has no "environment", as the simulation goes along you can see that the blobs get more and more efficient and produce more blobs at an exponential rate while the death rate goes down.This is kinda the basis for evolution, however I haven't done research on this. Also, of course you can fiddle with the blobs, like the ability to randomize their genes or kill the blobs that are the most efficient at avoiding death (ironic), making them start all over again. WHAT DO THESE OPTIONS MEAN? --- Time Step - Increments by 1 every time. On each Time Step, the dice is rolled on each blob to decide whether they Reproduce, Mutate while Reproducing, or Die. Time Step Length - Governs the amount of time between each Time Step. The larger the number, the longer each Time Step takes. Avg. Generation - What the average generation among all blobs is. Population - How many blobs there are. OTHER STUFF --- For some reason, clones lag really badly in Scratch 3. It didn't really lag as much in Scratch 2, but... whatever. Using raster graphics seems to help a bit though (which is what is in the project) CREDITS --- All coding and sprites were done by me, but this project was inspired by a video by Primer that simulated natural selection. You should check it out at https://www.youtube.com/watch?v=0ZGbIKd0XrM TAGS (SINCE THAT'S A THING) --- #simulation #naturalselection #blobs

Project Details

Project ID318301349
CreatedJune 23, 2019
Last ModifiedSeptember 16, 2019
SharedJune 25, 2019
Visibilityvisible
CommentsAllowed