Click the green flag TWICE to start/restart! First, choose how much food is given per second. Then choose how many creatures to start the simulation with. The simulation will begin and evolution will start to happen. If you want an explanation of how evolution is represented, see the notes and credits section. Remember that evolution is a slow process, so even in this sped-up representation of it, it will take a while to show. Also note that due to scratch having a clone limit of 300, this limits the total number of organisms at one time, but does not change the average size very much. You will most likely not notice this problem if you only have up to 2 food per minute. At the end of the simulation, a graph will show up. The x-axis represents time. On the white graph, the y-axis represents the population, and on the green graph, the y axis represents the average size.
Credits: All code is my own work. Art by @DoctorJamspoon Thanks to @Virus6120 for help fixing a bug regarding calculating the maximum and minimum size/population. The inspiration for this is from the Youtube channel Primer, which you can see at https://www.youtube.com/channel/UCKzJFdi57J53Vr_BkTfN3uQ Information about the simulation: The apples are food. The larger dots are creatures. Some creatures are faster, however, they don't have much energy, leading to shorter lives. Faster creatures are represented by (from average speed to fastest) orange, yellow and green. Other creatures are slower. They live longer lives but are slower to reach food. They are represented by (from average speed to slowest) red, purple and blue. What is evolution? According to Oxford Dictionaries, the definition of evolution is "the process by which different kinds of living organisms are believed to have developed from earlier forms during the history of the earth." An example of evolution would be a monkey family who lives in a fruit tree. The fruit runs out, meaning the monkeys need to find another tree. One of the monkeys can walk to another tree to get more fruit, while the other monkeys die. The monkey that can walk survives and carries on the ability to walk to its children. This shows how the monkeys evolved from not being able to walk, to being able to walk. How is evolution represented in this simulation? This simulation shows the evolution of one organism, that starts with an average lifespan and average speed. The organism only has one trait: size. The larger animals are slower but live longer. When an organism eats food, it replenishes some energy. If an organism runs out of energy, it dies. If an organism has excess energy, it reproduces itself. When an organism reproduces, it carries on the size trait, but varies slightly between children, just as in real life. The better children have a higher likelihood to survive and reproduce. In what situation in the simulation will the organisms evolve to be slower but longer living? When there is plenty of food, slower organisms will have less trouble finding food, making that not a big issue. This means that the speed of the organism isn't that much of a problem. In this case, the longest living organisms have more time alive to reproduce than the short-living ones, carrying their genes along. In what situation in the simulation will the organisms evolve to be faster but shorter living? When food is scarce, slow organisms will have trouble finding food. Faster organisms will get to the food first, reproducing more children and carrying on their genes.