Skip to content

Latest commit

 

History

History
60 lines (36 loc) · 2.57 KB

File metadata and controls

60 lines (36 loc) · 2.57 KB

forthebadge made-with-python

Python 3.6 LinkedIn-profile GitHub license GitHub followers GitHub stars

Terry_Rex

A genetically evolved dinosaur that is scared of Cactus!

The game is developed using Pygame and NeuroEvolution of Augmenting Topologies (NEAT) Algorithm is the brain of the Dino.

It alters both the weighting parameters and structures of networks, attempting to find a balance between the fitness of evolved solutions and their diversity.

NEAT is based on applying three key techniques:

  • Tracking genes with history markers to allow crossover among topologies
  • Applying speciation (the evolution of species) to preserve innovations
  • Developing topologies incrementally from simple initial structures ("complexifying").

This algorithm is so powerful that it learns the optimal policy to dodge cactus in under a minute.

The AI can take the actions of moving left, right or jump.

Cloning

$ git clone https://github.com/7enTropy7/Terry_Rex.git

Dependencies

$ pip3 install -r requirements.txt

Instructions

$ python3 t_rex.py

Now sit back and watch my AI play the game!

Training

Initial phase of training:

GIF-191101_110546

Finally after training:

GIF-191101_110810

Author

LinkedIn-profile

License

License

This project is licensed under the MIT License - see the LICENSE file for details