Asteroids Game AI

Hello!
I wrote a sketch about a year ago that teaches simulated starships to play the game Asteroids. The program uses a genetic algorithm to train the neural network brains of the starships to play the game. Since a lot of people have been following @shiffman’s neural network and genetic algorithm guides on Coding Train, I wanted to show a practical example that combines the two. I wrote this program (including the Asteroids port) completely from scratch. I have been writing machine learning algorithms to play arcade games for a while now, and wanted to show off a good example. If you want the source code, PM me (In the future I will replace this with a Github link). I have raw footage of the program working here! Feel free to ask any questions about the code/my process!

  • Trilobyte :sauropod:

2 Likes

This is awesome! You must have an impressive CPU to run the program for 4 hours :slight_smile:

1 Like

Hah thanks Dan! Yeah, I use this computer for a lot of Python machine learning stuff so the GPU and CPU are ok! I’m glad you liked it :slight_smile: