Evolution Simulation is a fun project to visualise how organisms evolve according to their environment over a period of time. We have made a simple set of rules as to how the organism may travel, eat, reproduce or die. Every generation has some random variation and the traits of organisms alive are plotted. The Zoo directory contains multiple such environments with variations in rules and organisms type. For instance, the Prey-Predator directory has organisms which are either prey or predator and the graph of their populations over time resembles the corresponding differential equations. More such simulations with different rules are to be added.
This project was inspired by the Evolution playlist by Primer on Youtube.
Present code is written in Python 3 and pygames is used to visualize simulation and Matplotlib is used to plot graphs.
- numpy
- pygame
- matplotlib
- os (to simplify testing)
$ git clone https://github.com/Tanmay-Kumar-Sinha/Evolution-Simulation.git
$ cd Evolution-Simulation
$ cd Zoo/
$ ls
Now select which simulation you want to run. Let's choose Simple_Ecosystem.
$ cd Simple_Ecosystem/
$ python3 simulation.py
A pygame window will pop up and the simulation begins. Many variables that can be tweaked are present in simulation.py. Feel free to modify and experiment with them. Each simulation has certain features that we are plotting w.r.t. time and the details can be found in their corresponding folders.
We will be glad to receive support and new ideas from our visitors. If you find any problem/bug in the code, feel free to raise an issue and/or a pull request after resolving it. Given that this is a fun project, all creative ideas are welcome. A few major things in our minds are
- Code optimization
- Visualize using unity
- Better Graphs
- Making more simulations with different rules and organisms
MIT License