Videos

Neural Network Learns to Play Snake



Greer Viau

In this project I built a neural network and trained it to play Snake using a genetic algorithm.

Thanks for watching! Subscribe if you enjoyed and Share if you know anyone who would be interested!

GitHub Repo: https://github.com/greerviau/SnakeAI
Twitter: https://twitter.com/greerviau
Support me on Patreon: https://www.patreon.com/greerviau

Thanks to Josh Cominelli for the music!
Soundcloud: https://soundcloud.com/josh-cominelli

Source

Similar Posts

50 thoughts on “Neural Network Learns to Play Snake
  1. It's like watching my son growing, so frustrating, but so fascinating that I felt proud for the snake.

    But with the 30th generation I think it's time to make him stop playing videogames, they're ruining his brain, DAMNED CALL OF DUTY DON'T YOU SEE WHAT YOU'RE DOING TO MY BOY?

  2. 4:44 It feels like the reason that clockwise direction is orthodox instead of anticlockwise rotation is just because it comes from the natural selection?! Or would it be a coincidence?

  3. This is mind blowing!!
    Great work @Greer Viau
    One way it can avoid this kind of a death is if the locations of all the pixels of the snake are given as input to the neural network and not just the start and the end.
    You can see that it learns that when the head is just above the tail (or above and diagonally left of the tail), then it has to go right to avoid eating itself. But, when it gets stuck in a loop of its own body, it does not know that it's body is there. So, it would become very difficult for it to learn that it should avoid its own body when the tail is far away.

  4. The snake fails because it can't see as much as we can. If it knew about spacial awareness it would work better, but that would require a very complicated network to be evolved.

Comments are closed.

WP2Social Auto Publish Powered By : XYZScripts.com