Giter VIP home page Giter VIP logo

ghevolution's Introduction

GHEvolution

Generations GIF

This project was made for my final math research project at GHP 59 where we were tasked to make a project and presentation on something we found interesting in math or computer science. Heavily inspired by this video, I decided to make a neuroevolution simulation that would task little square "organisms" to travel to a safe zone in a square area. Those who made it would survive and pass their brain "genes" to the next generation. Over time, the best organisms continually replicate, with the occasional mutation to respond to changes in the environment. It does a pretty good job at basic natural selection and is a gateway into the world of generational evolutionary algorithms.

I also implemented this same idea in Roblox, and I also have a video on that.

Quickstart

This project uses python and the poetry package manager. To start, clone the repo and run

poetry install

That should get all of the dependencies. Use this command to run:

poetry run python ghevolution

This will display the pygame window with the generations. There was also a visualizer of the brains and survivor graphs, but I can't get that to work 2 years later and I can't be bothered to fix it, but if you want to see what those looked like, there are still some in the repo: brain_graph.png

Here is the brain, a graph with different weights that is randomly generated at the beginning and evolves over time

survivor_graph.png

This graph shows that over time more organisms surive. At first, those who live are random, but over time all of the organisms get the best geners

For a more theoretical overview, you can watch this video. It is one of my favorite videos on YouTube, please do yourself a favor and watch it!

ghevolution's People

Contributors

b-ricey763 avatar

Stargazers

 avatar

Watchers

 avatar

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.