Skip to content

A foray into genetic algorithms. I wrote a quick pendulum balancing game, and then wrote a neural network that tried to get highscores in it. This was trained with a genetic algorithm

License

Notifications You must be signed in to change notification settings

JacobInwald/pendulum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pendulum

Introduction

A foray into genetic algorithms. I wrote a quick pendulum balancing game, and then wrote a neural network that tried to get highscores in it. This was trained with a genetic algorithm. Running this is more of a demo of this training technique than a game.

Installation

  1. Install all the requirements from the requirements.txt
  2. To play the game yourself, you can run python game.py
  3. To see the genetic algorithm learn, you can run python trainer.py. If you want to edit the variables such as gen_size, go into the trainer.py and fiddle all you want

Misc

  • Clicking on the window will spawn your mouse cursor as a box with collision if you want to mess around with the networks.
  • Report any other errors under issues, and I may or may not get onto to solving it.
  • Enjoy!!!

About

A foray into genetic algorithms. I wrote a quick pendulum balancing game, and then wrote a neural network that tried to get highscores in it. This was trained with a genetic algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages