AI Plays Snake Using Pathfinding
HTML-код
- Опубликовано: 29 май 2019
- Thanks for 2000 subscribers! I really appreciate it.
I'm still working on putting together the video for my GAN project, I want to make it as in depth as I can which is taking a while.
In the meantime this project was made over a year ago and I just thought I'd share it in light of the SnakeAI videos boom in popularity.
GitHub Repo: github.com/greerviau/SnakeAI-...
Twitter: / greerviau
Support me on Patreon: / greerviau
Song: Ode to Her - Josh Cominelli
Soundcloud: / josh-cominelli Наука
"The path isn't very elegant"
It's the coolest thing I've ever seen.
i think you misunderstood, you got 2k subs beacuse you make interesting videos and put the code up on github for us to fool around. congrats and keep it up.
Thanks!
3:05 - And the snake thought "Screw this square in particular".
It's really a cool video. I am amazed with the fact that your algorithm can do some predictions of which path it should follow even though there's a snake body present at the moment 3:31
If I am not wrong, he basically calculates the total length of the body and the total number of blocks needed to reach the food and then calculates how many wraps around the body would be needed to reach the point where the body is exactly when it moves out.
Love it! And I love your videos. Just discovered your channel from that snake video (hehe) but it’s really enjoyable to watch. Keep up the great work :)
It's really a great pleasure to see your video, keep doing your stuff cause I love it
The music makes me feel so comfortable
That's actually fucking sick my dude 👏👏 great job
Amazing work dude loved this video
amazing improvement.
This is awesome.
This video inspired me 😍
Excellent !
AMAZING!!!!!!!
Mind blowing :)
Wow amazing work dude. Do I find your AIs also on your github? I want to understand how this works
Broo... Keep doing videos, I need your help! You are motivationg me. I'am recent on your channel, but I interested in AI too. Also don't forget it, never give up, because everything is possible.
Awesome
Dude thats genius
thank you for ai playing game video
Awesome work! I was just wondering if the evolutionary algorithm could be used for better heuristics, Is there even a perfect snake agent?
The heuristic in this case is simply Manhattan distance to the food. I dont think using an evolution algorithm to model a heuristic would be beneficial.
Now this is Snake played right!
Wow!)
Asombroso
I wonder if this snake also uses the AI algorithm similar to your last snake but just changes the pathfinding method?
wow
Ok, two things, number one, how the hell did you get A* to account for the fact that certain blocks may not be there by the time it gets to a location. All implementations I've seen of A* assume the map is static and don't account for movement so please explain. I'm really curious as to how you did this!
did anyone find an answer for this?
I haven't, I'd love to know how he got A* to account for movement
I think this can be achieved by 3-dimensionalizing the map. In particular, let's say a[x][y][z] is the square (x, y) at the time z. You can realize that a square can only be either occupied / unoccupied at a unit of time. So by doing that we created a 3D map that is static, thus we can do A* on it like normal maps.
The only flaw I could think of this approach is the z dimension is infinitely expanding, so we'll reach a point when we run out of memory.
maybe you can minimize a function that measures the energy taken by the snake to reach the red dot. maybe it should be able to create more elegant paths.
I think that such an algorithm will be useful for driving unmanned vehicles in a future automatic traffic control system.
Андрей Стрельцов too much work. Sensors are much more efficient.
круто
Hey ..may I know how do you learned all of this? Any sources/references?.. I just know the basics of AI, but never knows how to develop this kinda thing
RUclips tutorials are a great place to start if you have a project in mind. If you want to look into the academics of different algorithms I'm a big fan of mit open coursesware. Mit 6.S094 is a great course on deep learning.
Hi you done a great job I want learn AI where I start
RUclips tutorials and online lectures are where I started
Is there any link to the code?
Just linked it in the description. Code is pretty gross though
20,000th
Do you like to apply genetic algorithm for this
Why java damn it, I can't even run it because the damn javac.exe doesn't exist and refuses to with the download...
1st
What do you code this in... java?!
Ya
+
Wow! Can that ai win this game?
Beatiful video, I think this version (compared to the neuronal network + genetic algorithm) it's better and more elegant with the solutions
Codebullet
You are so beautiful)
is the whole game syncing itself with the music or is it just me?
after a day of crying in the corner and 17 energy drinks ive done it... also why is this comment section so wholesome lol
would you please share your code. this youtuber does amazing projects but no comments in his code. some parts of the code i just cant understand.
would be really nice of you to share it
not as fun as your old one but you did it Great. Always love this snake: ruclips.net/video/zIkBYwdkuTk/видео.html (give him more Neuron, and more random, more senses to see himself with his body)
this is a cheating algorithm
It's not AI, it's a clickbait.
Ah, A*, one of overrated, and in top most stupid algorithms to use guide Snake. Really, waste of everyone's time.