/snake-genetic-algorithm

A project I worked on summer after freshman year in high school. At this time I became interested in machine learning, and I implemented a neural network structure and genetic algorithm (GA) to learn how to play Snake from scratch. I used a Snake game I had coded earlier. All of the code was built from scratch.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

snake-genetic-algorithm

A project I worked on summer after freshman year in high school. At this time I became interested in machine learning, and I implemented a neural network structure and genetic algorithm (GA) to learn how to play Snake from scratch. I used a Snake game I had coded earlier. I used SFML to render the graphics.

Below are 2 screenshots. The first shows the untrained neural network playing Snake, and the second shows a neural network that I trained for a while playing Snake.

Screenshots

Alt text Alt text