Neural Network Learns to Play Snake

  Переглядів 4,504,689

Greer Viau

Greer Viau

5 років тому

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: github.com/greerviau/SnakeAI
Twitter: / greerviau
Support me on Patreon: / greerviau
Thanks to Josh Cominelli for the music!
Soundcloud: / josh-cominelli

КОМЕНТАРІ: 2 400
@MrPman1999
@MrPman1999 4 роки тому
You guys think that the snake died because of the lack of left turns, but in reality the snake evolved to the point where it got consciousness and understood that life dedicated to running in circles is not worth living.
@funny3511
@funny3511 4 роки тому
ME: "Hello World">>20 errors found.
@Taikore_
@Taikore_ 4 роки тому
2:26
@cap1819
@cap1819 4 роки тому
My favorite part is every time you think the AI finally has it down, then runs into a wall for no reason
@morphman86
@morphman86 4 роки тому
For anyone who wonders why it seems to prefer right turns, I believe that is because it started at the top-left, going towards the right. There was no way for it to turn left. So with 2000 snakes per generation, a LOT of those learned that left is death. Since right worked every time, it simply had no reason to learn that turning left after leaving the wall would be safe.
@prodkilobyte
@prodkilobyte 4 роки тому
Left turns:
@rutvikrana512
@rutvikrana512 3 роки тому
I think another one reason why this doesn’t get higher because in input it gets -
@kvadityasrivatsa2445
@kvadityasrivatsa2445 3 роки тому
"What is my purpose ?"
@XPimKossibleX
@XPimKossibleX 4 роки тому
I love that the reason it failed is because that's the one flaw of the technique it's honed from the start
@riverrist
@riverrist 4 роки тому
This neural network is incredibly inefficient. Right from the beginning, it learned to not turn left by any means. This video is perfect as a demonstration that neural networks can easily get stuck on a very wrong local optimum.
@zackrodriguez6653
@zackrodriguez6653 3 роки тому
Generation 30:
@nanxhu
@nanxhu 3 роки тому
Humans:
@ItachiUchiha-nx2sw
@ItachiUchiha-nx2sw 4 роки тому
I have deeply learned that in the end, nothing is left.
@uchihatomy
@uchihatomy 4 роки тому
congratulations for the big work you've done, not only at the algorithmic part, but the visual part which i can see it's a huge effort to present us your job.
@sykeassai
@sykeassai 4 роки тому
What I think is most fascinating about this project is that the neural network never learned the dimensions of the game board and kept returning to the start
@SmokeDoinks420
@SmokeDoinks420 3 роки тому
6:07
@Flourish38
@Flourish38 4 роки тому
I think it probably would have learned better if you had started off with a lower number of moves left (maybe like 60?) so that it doesn't have so much security to take its time.
@sciencesyfy
@sciencesyfy 4 роки тому
The mind of the Snake in the first few generations, spinning to infinity a pixel away from the food
@markgeorge447
@markgeorge447 3 роки тому
No one:
@abhiramcd
@abhiramcd 2 роки тому
I can't imagine how happy would be the first guy who developed these algorithms.... ❤️❤️
Watching Neural Networks Learn
25:28
Emergent Garden
Переглядів 1,1 млн
How to Win Snake: The UNKILLABLE Snake AI
17:05
AlphaPhoenix
Переглядів 2,2 млн
Артем Пивоваров х Klavdia Petrivna - Барабан
03:16
Artem Pivovarov
Переглядів 929 тис.
Evolving Genetic Neural Network Optimizes Poly Bridge Problems
9:59
OpenAI Plays Hide and Seek…and Breaks The Game! 🤖
6:02
Two Minute Papers
Переглядів 10 млн
AI Learns to Walk (deep reinforcement learning)
8:40
AI Warehouse
Переглядів 8 млн
How This Pen Changed The World
9:17
Primal Space
Переглядів 79 тис.
Training AI to Play Pokemon with Reinforcement Learning
33:53
Peter Whidden
Переглядів 6 млн
AI Learns to play Snake!
9:28
Chrispresso
Переглядів 108 тис.
A.I. Learns to play Flappy Bird
7:46
Code Bullet
Переглядів 14 млн
MarI/O - Machine Learning for Video Games
5:58
SethBling
Переглядів 11 млн
15 Sorting Algorithms in 6 Minutes
5:50
Timo Bingmann
Переглядів 24 млн