Skip to content
A pretty NEAT library
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


A NeuroEvolution of Augmenting Topoligies library to evolve a nerual network to perform any task given inputs, outputs, and a fitness function.


Currently, Snake and Tetris exist to test the capabilities of the library (and because AI playing games is really cool!)
Below is one of the better results from using the library to learn to play Snake

Haven't been able to get a great Tetris model going, but I'm working on it!


Make sure you are using Python3.6+ (for the sweet sweet fstrings)


Install the dependancies using pip
pip install -r requirements.txt
Also make sure you have TkInter installed on your machine for Python3.
E.g. (For Ubuntu) sudo apt install python3-tk

Make sure the root directory of the repo is in the python path, as we will run everything from there.
export PYTHONPATH=$PYTHONPATH:. (while in the root directory)


To train models for the given apps, simply run their respective file. For example, to train Snake
python apps/snake/
This will run the algorithm, save the best genome in the genomes directory (in pickle format), and display one game of the model playing.
For those more familiar with NEAT, or if you just want to play around with things, many training configurations can be found at NEAT/


To play the games yourself (to understand the rules or just for fun) run the file in any app folder.
To see a genome play run the file with the path to the genome as an arg.
For example, to see a game of the snake model (from the GIF), run
python apps/snake/ apps/snake/genomes/pro.pickle

You can’t perform that action at this time.