How to Win Snake: The UNKILLABLE Snake AI
Video Statistics and Information
Channel: AlphaPhoenix
Views: 923,294
Rating: 4.9154172 out of 5
Keywords: Alpha, Phoenix, Alpha phoenix, Alphaphoenix, Math, graph theory, game, ai, artificial intelligence, computer, science, teaching, education, Snake, arcade, Hamiltonian, cycle, path, algorithm, win, steps, optimization, solving, efficiency, np-hard, dynamic, repair, statistics, analysis, matlab, simulation
Id: TOpBcfbAgPg
Channel Id: undefined
Length: 17min 5sec (1025 seconds)
Published: Sun Feb 16 2020
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
Rather than hand writing algrothms to account for special cases, I'd like to see a game tree based search approach.
Something that can look ahead to see and exploit those cases where it might block an exit now, but have one open up later.
Cool idea for the AI. Never thought about augmenting hamiltonian paths like this. It's nice since it's easy to see that you can't lose (as in get trapped).
I made a snake AI way back also. IIRC I never saw it fail, but I have no idea if it's really fool proof. The idea was to follow the shortest path to the apple, granted that the snake can then reach its tail. If it can't reach the apple, or if it wouldn't be able to reach its tail after eating the apple, instead follow the longest path to its tail.
If anybody want's to see the detailed goods, I've got it all out on github_DHCR_with_strategy). The video talks about the actual theory of the algorithm, but I implemented in MATLAB (I know I'll get shade for that lol). If anybody just wants to watch the snake play, this is the entire median 30x30 game.
This is excellent and exactly the sort of long-form content I enjoy watching.
Wait what, you didn't do this in 24 hours? /s
It was way more enjoyable than I was expecting. Keep it up.