Skip to content

Khalil-Zaman/SnakeGameAI

Repository files navigation

mysnake.py Install the necessary modules, and run to play the traditional snake game

mysnakeAI.py My Snake game consists a rectangular grid of a 100 squares. Given what's on each square, feed the data into the Snake Neural Networks.

Starting with an initial population of 25 snakes, select the best 10 (based on their fitness) to breed. A mutation rate dictates how likely it is for a weight to be changed by some random value between (-1, 1).

I save the "brains" of the snake into files that I can load back up when running again.

Currently, the AI's don't do anything impressive, I'm just trying to get them to turn left at some point.

About

Playing the snake game using AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages