Have you ever wondered why trees look like this?
We were inspired by the foo52ru video and decided to simulate the evolution of trees. To do this, we use genetic algorithms and the PyGame library.
To start, run this commands:
git clone https://github.com/world-organization-of-programmmers/Tree-Evolution
cd Tree-Evolution
python3 ./main.py
-o : folder name to save genom | default TreesGenoms
-i : genome conservation frequency | default None
-t : initial number of trees | default 10
--cli : non_gui mode | default False
--step_mode : step mode | default False
--width : screen width
--height : screen height
--pixel_size : pixels size
python3 ./main.py -t 20 -i 100 --width 1200 --height 1000 -o test
python3 ./main.py -t 10 --cli --step_mode --pixel_size 15
python3 ./main.py -t 20 --width 1200 --height=1000
So, we:
- programmed the trees and the evolutionary process;
- widened the world;
- optimized tree growth and launched our world on powerful graphics processors to see how trees will grow and develop.
34 hours of uninterrupted calculation!
That's the world we got after 2,000,000 iterations:
Note: Resulted TreeGenom folder with trees' genoms at each 10,000 iterations you can find here.
In this very simplified world, it is easy to simulate different situations to see how trees behave.
Next, we want to experiment with sprouts to simulate new tree species.
All rights belong to their respective owners