I have always had a keen interest on how the natural selection and evolution work and the genetic mutations that produce diverse types of organisms. For my Minor Skilled subject, I had the chance of having the freedom of choosing a learning outcome. The duration of the project was around 5-6 months, so I decided to challenge myself by creating a simple natural selection simulator.
Using my knowledge about genetics and biology from my previous studies, I tried to replicate the way genetics work into code. Despite all of this core idea of the project, I set another learning goal of writing clear and loosely coupled code, as in using possible design patterns when it seemed fit and convenient. Another learning outcome was documenting or commenting code so to turn it into a habit and work ethic.
The simulation is entirely run in Editor mode since creating a build was against the idea of having the power of creating and editing new gene types or species. I plan on developing this project further on when I get to have more free time apart from my studies and will improve previous solutions to specific problems.
Overview
Down below you can see the inheritance properties of the genes that I have coded, evading and socializing behaviors for animals, and project running within the editor. You can view the code by clicking the GitHub button at the bottom of this page.
At the end of every simulation run, we keep track of genetic data and population counts per species and depict all this data into graphs.
Dominance & Codominance
Dominance and Codominance (Skin color)
Dominance & Incomplete Dominance
Dominance and Incomplete Dominance (Skin color)
Mutations
Mutations (Skin color)
Socializing and Evading behavior (Blue - herbivore, Red - carnivore)
Simulation Part 1 - Running a simulation in editor mode, here you can see two species, (herbivore - chickens) and (carnivore - foxes) and the time scale for speeding up the simulation.
Simulation Part 2 - The simulation after 20 cycles. Here you can see this simulation generated data depicted into graphs.
Population Count
Population Count
Speed Gene
Speed Gene
Height Gene
Height Gene
Behavior Gene
Behavior Gene
Behavior Gene Socializing
Behavior Gene Socializing
Back to Top