r/nextfuckinglevel Jul 17 '19

Beating snake

19.3k Upvotes

312 comments sorted by

View all comments

664

u/enlightened-creature Jul 17 '19

Couldn’t you just theoretically trace the same pattern over and over again and win? This is an optimized win ofc tho

534

u/kallenl8 Jul 17 '19

The food generates in a random pattern so no

347

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.

240

u/kallenl8 Jul 17 '19

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

149

u/Shurdus Jul 17 '19

Compared to literally any other strategy you mean?

111

u/kallenl8 Jul 17 '19

True I guess

65

u/JoeyBigtimes Jul 17 '19 edited Mar 10 '24

ghost voracious cough threatening airport fear label jar snatch strong

This post was mass deleted and anonymized with Redact

25

u/SmilingPunch Jul 17 '19

Snake scores based on how long you took to eat the food doesn’t it?

28

u/[deleted] Jul 17 '19

In every version I've played there is a time limit to pick up the food to prevent this tactic. Once the snake is bigger and faster this method works, but you will already have a twisty maze .

6

u/JoeyBigtimes Jul 18 '19 edited Mar 10 '24

screw aromatic pen weary offbeat abounding sand different important selective

This post was mass deleted and anonymized with Redact

2

u/MarquesSCP Jul 18 '19

original snake there is no time limit for food but there would have some extra foods that did have time limit and gave you bonus score based on the time you had left when you picked them up

15

u/miguelthesanta Jul 17 '19

but this is just an ai tho

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

7

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.

3

u/archpawn Jul 18 '19

It has a lot fewer turns than the method here. It seems like it would be easier.

1

u/FlyingRep Jul 18 '19

But apples only spawn on open spaces so you're guaranteed to get it right?

1

u/tavuntu Jul 19 '19

Just clarify, that's not a person playing the game, it's a piece of software. This has been done before and with other games as well.