ViktoryaK / Evolution

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Evolution Project

Evolution simulation written in Python3

Description

The project reflects the simplest evolutionary processes and predator-prey relations. In our implementation, there are two species: the first one receives energy from sunlight during photosynthesis, and the second one hunts for the first. There are certain rules by which organisms are guided: if the energy level is lower than a specific number, an organism stops moving or dies if it is lower than zero, otherwise, it is constantly moving (up, right, left or right). Eighteen numbers are embedded in the genome. They will affect the transition from one state to another and determine in which direction the creature will tend to move. At the end of a life cycle, organisms leave offspring, from 3 to 6. Mutations also play an important role in population development, we set a certain probability (5%) of genome mutation. Thus it adds more opportunities for survival and genome becomes more diverse.

How to run the project

To run the project, clone the repository and open main.py module in src folder. Here you can set a total number of cycles, preditors and prey. Wait a minutes and then you get an MP4 video.

Visualisation

ezgif com-gif-maker (2)
*you can find out more details on code and simulation logic on Wiki pages

About


Languages

Language:Python 99.9%Language:Shell 0.0%Language:PowerShell 0.0%Language:Nu 0.0%Language:Batchfile 0.0%