video thumbnail 17:05
How to Win Snake: The UNKILLABLE Snake AI

2020-02-17

[public] 2.19M views, 52.1K likes, dislikes audio only

channel thumbAlphaPhoenix

I watched the CodeBullet Snake AI video on the morning after Thanksgiving and spent WAAAAYY too much time working on an AI of my own. I present to you: Snake, as played algorithmically with Dynamic Hamiltonian Cycle Repair. The snake can never die - like really, actually, literally, can't be killed - it's just a matter of how fast it wins the game…

If you, like me, enjoy watching snakes run around eating apples for hours on end, enjoy this follow-up where I took the median-length game from my best performing algorithm and posted the whole darn thing on YouTube:

/youtube/video/YqL7bl3I5IE

Check out the other social media for updates and ramblings:

https://www.facebook.com/AlphaPhoenixChannel/

https://twitter.com/Alpha__Phoenix

#Snake #AI #Math

CODE!

https://github.com/BrianHaidet/AlphaPhoenix/tree/master/Snake_AI_(2020a)_DHCR_with_strategy

Snake References:

@CodeBullet

CodeBullet's (Most recent) snake video: https://youtu.be/tjQIO1rqTBE

@johnflux1

John Tapsell's Nokia snake project: https://johnflux.com/2015/05/02/nokia-6110-part-3-algorithms/

Mathworks File Exchange Reference:

A* code originally written by Einar Ueland

https://www.mathworks.com/matlabcentral/fileexchange/56877-astar-algorithm

Actual MATH Papers:

http://mathworld.wolfram.com/GridGraph.html

https://epubs.siam.org/doi/10.1137/0211056

http://www.cs.technion.ac.il/~itai/publications/Algorithms/Hamilton-paths.pdf

https://drops.dagstuhl.de/opus/volltexte/2018/9951/pdf/LIPIcs-ISAAC-2018-3.pdf

https://link.springer.com/chapter/10.1007%2F978-3-642-31770-5_8

https://arxiv.org/pdf/1008.0541v1.pdf

https://arxiv.org/pdf/1707.05994.pdf

https://onlinelibrary-wiley-com.proxy.library.ucsb.edu:9443/doi/pdf/10.1002/%28SICI%291097-0118%28199601%2921%3A1%3C43%3A%3AAID-JGT6%3E3.0.CO%3B2-M

https://www.sciencedirect.com/science/article/abs/pii/002001909090053Z

https://en.wikipedia.org/wiki/Hamiltonian_path_problem#Algorithms

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.23.6765&rep=rep1&type=pdf

http://weber.itn.liu.se/~valpo40/pages/hamtile.pdf

https://www.sciencedirect.com/science/article/pii/S0304397515007719

https://www.sciencedirect.com/science/article/pii/0012365X9500330Y

Other clips in this video:

https://xkcd.com/356/

Morbo "Dooom" (Futurama)

"That's Illegal" meme (Red vs. Blue)

Music in this video:

I Dunno by grapes is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/by/3.0/)

http://ccmixter.org/files/grapes/16626


Introduction
/youtube/video/TOpBcfbAgPg?t=0
The Path
/youtube/video/TOpBcfbAgPg?t=164
Hamiltonian Cycle
/youtube/video/TOpBcfbAgPg?t=247
Code Bullets
/youtube/video/TOpBcfbAgPg?t=296
Hamiltonian Paths
/youtube/video/TOpBcfbAgPg?t=366
NPHard Problem
/youtube/video/TOpBcfbAgPg?t=407
Stats
/youtube/video/TOpBcfbAgPg?t=904
AlphaPhoenix I'm Brian Haidet - PhD in Materials Science, but I'd also describe myself as artist, maker, and Hawaiian shirt enthusiast. On this channel, You'll find my side projects and favorite physics demos - I hope you enjoy!
/youtube/channel/UCCWeRTgd79JL0ilH0ZywSJA
Watch electricity hit a fork in the road at half a billion frames per second 1,015,406 views
/youtube/video/2AXv49dDQJw
Making the World's Smallest Play Button (2^12 subscriber special) 144,724 views
/youtube/video/CRUPBfhWV3o
The UNKILLABLE Snake AI (Entire 30x30 game) 74,095 views
/youtube/video/YqL7bl3I5IE