GithubHelp home page GithubHelp logo

world-organization-of-programmmers / tree-evolution Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 1.41 MB

๐ŸŒณ Simulation of the Tree Evolution using genetic algorithms and PyGame library.

Home Page: https://youtu.be/9t3mAgyzeZM

License: MIT License

Python 100.00%
tree-evolution evolution genetic-algorithms pygame-library simulation

tree-evolution's Introduction

Get started

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:

  1. git clone https://github.com/world-organization-of-programmmers/Tree-Evolution
  2. cd Tree-Evolution
  3. python3 ./main.py

Command line arguments

-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 

Examples

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

Video about the project

Presentation

Our results

So, we:

  1. programmed the trees and the evolutionary process;
  2. widened the world;
  3. 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.

License

MIT

All rights belong to their respective owners

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.