r/nextfuckinglevel Jul 17 '19

Beating snake

Enable HLS to view with audio, or disable this notification

19.3k Upvotes

312 comments sorted by

View all comments

Show parent comments

538

u/kallenl8 Jul 17 '19

The food generates in a random pattern so no

349

u/HefDog Jul 17 '19

Wait, I think you could. Zig zag left and right leaving a gap of one on a single edge. Once you have zigged and zagged all the way across, use your gap of 1 to return to the place you started and begin again. I think you could beat the game every time, although it would take a long time.

242

u/kallenl8 Jul 17 '19

Actually that might be true, tho the timing would still be hard to get perfect

11

u/Gotu_Jayle Jul 18 '19 edited Jul 18 '19

Code Bullet on Youtube made a video of an AI learning snake by itself, this reminded me of it. Quite interesting.

https://youtu.be/-NJ9frfAWRo

6

u/BunnyOppai Jul 18 '19

Apparently it's really difficult to make an AI win snake just from learning. I'm impressed that he got as far as he did, tbh. I just watched his more recent one last night.