I Created a PERFECT SNAKE A.I.

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2019
  • I used math, science and tears to create a snake AI which always wins (sometimes).
    Massive thanks to brilliant.org for supporting this episode, check them out here: www.brilliant.org/CodeBullet
    Also check out John Tapsells work: johnflux.com/
    Heres my stuff
    Twitter: / code_bullet
    Patreon: / codebullet
    Discord: / discord
    Art created by @Dachi.art / dachi.art

Комментарии • 20 тыс.

  • @sirapple589
    @sirapple589 4 года назад +5433

    CB Viewers: “Why is he taking so long to upload?”
    Code Bullet: *Throwing out entire weeks of progress for shits and giggles*

    • @ewan7746
      @ewan7746 4 года назад +111

      CBT viewers: ouch my balls

    • @Sarah12471
      @Sarah12471 4 года назад +145

      CB veiwers:.... Wait what the fuck? Why?
      Code Bullet: cause fuck you and fuck me that's why

    • @hydra9070
      @hydra9070 4 года назад +6

      -

    • @seeker4430
      @seeker4430 4 года назад +2

      Also no sharing code

    • @sirapple589
      @sirapple589 4 года назад +1

      tremonk
      I don’t play Fortnite.

  • @TheTruth-si5zq
    @TheTruth-si5zq 4 года назад +6538

    “He didn’t die, he just kinda gave up” This hit to close to home 😂

    • @PunkyPlays
      @PunkyPlays 4 года назад +8

      Me comment first

    • @AHotLlama
      @AHotLlama 4 года назад +98

      I couldn't tell if that referred to an AI snake or to Code Bullet, both seem appropriate

    • @conormcguinness3215
      @conormcguinness3215 4 года назад +13

      Punky Plays So?

    • @punbug4721
      @punbug4721 4 года назад +35

      This snake Ai is my digital spirit animal.

    • @Texan.Insomniac
      @Texan.Insomniac 4 года назад +11

      5:44

  • @randorookie8587
    @randorookie8587 2 года назад +402

    A code bullet GPS would just be “keep doing random shit till something works” and then take the best of all those failing methods rinse repeat till we’ve got a route

    • @wilbo_baggins
      @wilbo_baggins Год назад +10

      Also new roads won't be added for months to a year

    • @timdadwagan
      @timdadwagan 18 дней назад

      Just go for the longest path duh

  • @samurai2871
    @samurai2871 2 года назад +1250

    Dude if your GPS was actually like that, I'd totally buy one.

  • @hackhair5832
    @hackhair5832 4 года назад +7022

    This guy always sounds like someone just told him a clever joke that wasnt quite good enough to make him laugh but made him smile widely through the rest of the conversation

    • @Lone_Rocket
      @Lone_Rocket 4 года назад +367

      Strangely specific.

    • @rozh996
      @rozh996 4 года назад +211

      Satisfying and specific

    • @HelpOTWx3
      @HelpOTWx3 4 года назад +169

      Strangely specific, but not wrong

    • @levelup6243
      @levelup6243 4 года назад +33

      Basically exactly like Daniel Ricciardo...

    • @ConnorMeagher
      @ConnorMeagher 4 года назад +49

      Which translates to the viewer. The process is fun to watch though

  • @nikscerniss6429
    @nikscerniss6429 4 года назад +5654

    If: gonna run into self
    -don't.

    • @alejrandom6592
      @alejrandom6592 4 года назад +340

      deep shit you got over there

    • @romankalinchuk2750
      @romankalinchuk2750 4 года назад +389

      If: hungery
      -eat
      Function.repeat

    • @shaunclarke04
      @shaunclarke04 4 года назад +43

      Evija Cernisa what bloody syntax is that??

    • @laserbeem6692
      @laserbeem6692 4 года назад +81

      accualy it goes like this in java
      if(head of snake touches self){
      user is dead;
      }
      this is pseudocode

    • @foxfyre3600
      @foxfyre3600 4 года назад +73

      @@laserbeem6692 else { dontDie(bool justDont = true) }

  • @iwtbwiw
    @iwtbwiw Год назад +97

    I love how it doesn't even look like a game of snake at one point on, it just looks like a green box with random changing lines and holes

  • @blenderium
    @blenderium 2 года назад +408

    4:36 the rare footage of a coder actually *writing its own code* instead of copying.....
    what an amazing discovery

    • @WinterNox
      @WinterNox 2 года назад +3

      Hi bro >:)

    • @uhohitsatrap9989
      @uhohitsatrap9989 2 года назад +3

      Yep, that's Code Bullets content and it's so satisfying to write out working codes and scripts.

    • @Billy-jo3bt
      @Billy-jo3bt 9 месяцев назад +1

      If you’re not recording a video to showcase your talent what’s the problem with using a code that’s already been written to speed up your process?

    • @lumin_curse
      @lumin_curse 7 месяцев назад +1

      In light mode too

    • @DawnAfternoon
      @DawnAfternoon 13 дней назад

      We meme it all the time but usually we do get our hands down with programming the details in lol

  • @mermer3572
    @mermer3572 3 года назад +3728

    First rule of snake: snake eat apple
    Second rule of snake: under absolutely zero circumstances does snake eat apple

    • @sethstersbench
      @sethstersbench 2 года назад +118

      Third rule of snake: NO HOLES

    • @BobBob-ye4vz
      @BobBob-ye4vz 2 года назад +54

      Fourth rule of snake: don’t die lol

    • @mynameisjoseph7848
      @mynameisjoseph7848 2 года назад +30

      Fifth rule: dont not cheat

    • @user-cd4bx6uq1y
      @user-cd4bx6uq1y 2 года назад +9

      The thing at 19 40 looks like plant vines. Also I randomly pause and it was at 19:55, funny number.

    • @Finn_the_Cat
      @Finn_the_Cat 2 года назад +9

      Paradoxically paradoxical

  • @InappropriatePolarbear
    @InappropriatePolarbear 3 года назад +2337

    "The snake will get pissed off and take an angry nap" is a phrase I need to use more in my life.

    • @myak5754
      @myak5754 2 года назад +21

      Ig im a snake then

    • @abacussssss
      @abacussssss 2 года назад +16

      finally 👨🏾‍🔬 sleeps furiously

    • @y_onis7038
      @y_onis7038 2 года назад +6

      @@abacussssss can you sleep depressed

    • @sinuslebastian6366
      @sinuslebastian6366 2 года назад +3

      Y_onis I do it everyday

    • @pacifistichuman82649
      @pacifistichuman82649 Год назад +3

      @@y_onis7038 what about sleep neutral, happy, ecstatic, manic, sad, miserable, angry, enraged, afraid, (mostly me LOL) and stressed out?
      yes, omori reference

  • @nathanmay9694
    @nathanmay9694 Год назад +33

    I’ve been watching him for a good bit now, and just now realized he codes IN LIGHT MODE. Anyone that codes in light mode is secretly burying some bodies in their backyard

    • @bestintheband5114
      @bestintheband5114 6 месяцев назад

      Me: no, Michael Reeves codes in light mo... no that checks out
      (In some of his old videos at least idk if he still does don't @ me)

    • @Thelongestshrimp
      @Thelongestshrimp 20 дней назад

      Checks out. He killed Adrian. And Adrian killed like 5 fully-trained soldiers, but Adrian died nonetheless.

    • @alooinfinite2912
      @alooinfinite2912 День назад

      @bestintheband5114

  • @Helladamnleet
    @Helladamnleet 2 года назад +215

    You should figure out a way to convert these AIs to be screensavers. I'd legit pay 99 cents for them

    • @dooplets._.5776
      @dooplets._.5776 11 месяцев назад +6

      Same

    • @ratt__mann9220
      @ratt__mann9220 6 месяцев назад +6

      I'd pay atleast one dollar and 1 cent

    • @nubbyboi6523
      @nubbyboi6523 6 месяцев назад +9

      I would pay a whole Enigma Machine Part 2 video

    • @Wall-knight
      @Wall-knight 5 месяцев назад

      @@ratt__mann92201 dollar and two cents

  • @Lucerne9
    @Lucerne9 4 года назад +4088

    "The snake will get pissed off and take an angry nap"
    This is me trying to do calculus hmwk

  • @brodyfrable4250
    @brodyfrable4250 3 года назад +7164

    I like that everyone just looked over the fact that adrian single-handedly killed _at least_ 5 fully-trained soldiers

  • @mprocks6522
    @mprocks6522 2 года назад +69

    Near the end Even losing his sanity over 2 blocks is like the Sargent losing his mind and screaming "4 FUCKING PIXELS"

    • @ziyadessoufi2052
      @ziyadessoufi2052 Год назад +3

      Thats some serius 096 lore right there for how long have u been in the scp community?

    • @alexaltaccount7812
      @alexaltaccount7812 Год назад +1

      that isnt even serious lore, i think its a pretty well known thing

    • @pacifistichuman82649
      @pacifistichuman82649 8 месяцев назад

      "Two. FUCKING. BLOCKS."
      *SANITY*

    • @ourlordandsaviorsquirtle3278
      @ourlordandsaviorsquirtle3278 6 месяцев назад

      @@ziyadessoufi2052 thats literally the most common piece of 96 lore aside from its abilities

  • @refl9630
    @refl9630 2 года назад +55

    3:37 there are only three possible moves at any time, since the snake can't go back.

  • @sophiacristina
    @sophiacristina 4 года назад +638

    Programming:
    "Omg, i can't believe this really works!"
    "Omg, of course it didn't!"

    • @Hunnter2k3
      @Hunnter2k3 4 года назад +10

      I can get like that half-way through the first sentence sometimes.
      "omg I can't believe it didn't works!"

    • @SomeRandomDude821
      @SomeRandomDude821 4 года назад +3

      My teacher gave us an assignment. This was a comp 101 course, easy stuff. I spent days fixing output spacing. When it was done, I couldn't tell you why the spacing worked. I couldn't tell you why some lines were needed. But it passed the test class so...

    • @tafua_a
      @tafua_a 4 года назад +2

      Programming is like trying to teach how to swim to a tomato.

  • @Furrett
    @Furrett 4 года назад +3920

    i love how Code Bullet can disappear for months on end consistently and then release a video that'll almost immediately get on trending, i like to think he's created the perfect AI to beat RUclips

    • @NatapixAS
      @NatapixAS 4 года назад +88

      its the two AIs trying to communicate

    • @k96man
      @k96man 4 года назад +54

      @@NatapixAS Maybe the snake is trying to spell 'send help'

    • @Nate-bd8fg
      @Nate-bd8fg 4 года назад +4

      DaBlackFoxAlt 'cept trending is hand selected by RUclips staff

    • @GymRat-7192
      @GymRat-7192 4 года назад +25

      @@Nate-bd8fg wait, does that mean that they picked a "vulgar unfamily-friendly" channel for trending? Since he swears in almost every video, including this one.

    • @Ramondorez
      @Ramondorez 4 года назад +12

      He's the Jontron of coding.

  • @cottagcheese
    @cottagcheese 2 года назад +27

    18:32
    it now just looks like a black snake in a field of grass

  • @TheSinnerReloaded
    @TheSinnerReloaded Год назад +8

    20:51 When your download gets stuck at 99% and gives you an error after 12 hours of waiting.

  • @formularogue
    @formularogue 4 года назад +1304

    RIP Adrian 2019 - 2019
    Forever in our hearts

    • @joshuaboyd487
      @joshuaboyd487 4 года назад +30

      Even though he was a fucking disappointment, he's still somewhere in there. Probably.

    • @aceofdiamonds2218
      @aceofdiamonds2218 4 года назад +5

      I feel attacked

    • @advaithremesh1698
      @advaithremesh1698 4 года назад +8

      bro Adrian's a menace, he killed a lot of soldiers

    • @aceofdiamonds2218
      @aceofdiamonds2218 4 года назад +1

      @@advaithremesh1698 good

    • @honkhonk3137
      @honkhonk3137 4 года назад

      Ace Of Diamonds ehhhh

  • @BalconyDog
    @BalconyDog 4 года назад +6159

    Plot twist: it was him playing the whole time, hes spent years training

    • @jacobalexander4498
      @jacobalexander4498 4 года назад +163

      Years of academy training, wasted!

    • @alexh1321
      @alexh1321 4 года назад +148

      All that time he wasn’t uploading he was just training

    • @Buphido
      @Buphido 4 года назад +71

      Plot twist: the actual ai is code bullet, created to produce ai offspring and making a little money through it on the side.

    • @MrWendiloohoo
      @MrWendiloohoo 4 года назад +12

      plot twist: it was actually u playing the whole time

    • @oii_oii
      @oii_oii 4 года назад

      not years just 4 months of playing snake

  • @shink303
    @shink303 9 месяцев назад +6

    i like how a completed snake board becomes a maze.

  • @Jaylan.M
    @Jaylan.M 2 года назад +23

    I hope this is made into a wallpaper. It’s quite satisfying

  • @thedrawingkidanimatedkid686
    @thedrawingkidanimatedkid686 3 года назад +7731

    Ai: misses by one pixel
    Ai: this little maneuver is gonna cost us 51 years

    • @blessed6336
      @blessed6336 2 года назад +98

      This made me laugh so loud 😂

    • @thingytheretxrd
      @thingytheretxrd 2 года назад +39

      @@blessed6336 r/youngpeopleyoutube

    • @officialburgerkingfootlett5241
      @officialburgerkingfootlett5241 2 года назад +31

      @@blessed6336 LSL instead of LOL

    • @Hall.
      @Hall. 2 года назад +51

      @@thingytheretxrd ???

    • @I_Eat_Lemons
      @I_Eat_Lemons 2 года назад +89

      @@thingytheretxrd You don't even know how to use r/youngpeopleyoutube correctly.

  • @deevee5327
    @deevee5327 4 года назад +1524

    "This solution is just riddled with issues"
    *Still plays snake better than me.*

    • @adaptablerubenvideos3097
      @adaptablerubenvideos3097 4 года назад +16

      Idea: make a minecraft AI that is atleast capable of beating the game
      Mailed comment 2

    • @urinetrouble0543
      @urinetrouble0543 4 года назад

      DeeVee hey do you know what the storm light archive is?

    • @elemaire86
      @elemaire86 4 года назад +2

      He's not actually playing it. He's just figuring out the best algorithm and letting a computer do the rest.

    • @deevee5327
      @deevee5327 4 года назад +1

      @@urinetrouble0543 If I know what Stormlight Archive is? Sir, I *live and breathe* by Sanderson's books.

    • @urinetrouble0543
      @urinetrouble0543 4 года назад

      Eric Lemaire, Jr. they never said he was playing it

  • @milliesotheraccount
    @milliesotheraccount 2 года назад +10

    I can’t be the only one to give the snake a voice when it went into “survival mode”. Like every time it did, I would just hear it screaming “SHIT FUCK GOTTA LIVE GOTTA LIVE OH MY FUCKING GOD GOGOGOGOGOGOGOG” or something.

  • @anshriyal6495
    @anshriyal6495 2 месяца назад +1

    easy way to fix the ending: when Hamiltonian step value of tail - head becomes too small, i.e. snake has grown wayyy too long, then stop implementing shortcuts. It will help with:
    A) Winning
    B) Winning efficiently; the item gets spawned on the blocks which are empty, when the snake is long and skips small steps on the cycle, then it creates small pockets which increases the number of Hamiltonian cycles the snake takes.
    Awesome video, love the content!

  • @Madame_Talos
    @Madame_Talos 3 года назад +2972

    If the robot uprising starts with Evan,
    *_It probably won’t last long_*

    • @yahiaaymankamaly3518
      @yahiaaymankamaly3518 3 года назад +204

      Hey ! Take this more seriously , if they have 5000 attemps they may be even able to leave the room they started in

    • @tylernelson310
      @tylernelson310 3 года назад +9

      @Anime_Edits i cant tell if thats real or not

    • @tylernelson310
      @tylernelson310 3 года назад +4

      @Anime_Edits ohhhh that one

    • @nathaniel1207
      @nathaniel1207 3 года назад +32

      this implies 1 of 2 things. either he'll win quickly. or he'll fail quickly

    • @rodoggx9046
      @rodoggx9046 3 года назад +8

      No no it will be with Machine learning. So much shorter

  • @alexi4829
    @alexi4829 4 года назад +1922

    Code Bullet in a nutshell:
    Angry man cries his way through life whilst complaining about the things he loves
    so basically every programmer ever

  • @dumbo21
    @dumbo21 2 года назад +17

    Damn after a while the patterns it made got so hypnotizing

  • @HiddenRealm
    @HiddenRealm 2 года назад +2

    It was so good though that whole run was amazing! The literal issue was the simple ineffeciency that it couldn't perfectly optomized based on it's tail, because it doesn't check literally every step where to reroute, or is capable of planning ahead.
    If it could plan ahead how many steps it takes to reach the point the tail would be at by that many steps, it could include that as the possible location for it to travel through, and end up optimizing it's movements, potentially perfectly following it's tail to buy time. Instead it's very visible that it does periodically check, but still tries to avoid it's phantom tail.

  • @alicemoffat
    @alicemoffat 4 года назад +12824

    I swear, Evan is going to end up building the Terminator.

    • @mattes4929
      @mattes4929 4 года назад +416

      Didn't he already do that? His Clicking-AIs are able to open command prompt and to hire virtual gunmen. Just some more features or bugs and glitches and boom: Terminator

    • @donteatwater3607
      @donteatwater3607 4 года назад +34

      Lol

    • @elgurkus6885
      @elgurkus6885 4 года назад +99

      *accidently

    • @Elipus22
      @Elipus22 4 года назад +59

      He'll be able to once he cracks enigma

    • @bundog5367
      @bundog5367 4 года назад +38

      He is going to be a terminator

  • @salmon7007
    @salmon7007 3 года назад +5185

    This would be an awesome like monitor background just a constant repetiting game of snake for your screen saver

    • @failtronic2646
      @failtronic2646 3 года назад +280

      found a background on Wallpaper Engine that literally randomizes a maze and solves it.

    • @rustydawg2443
      @rustydawg2443 3 года назад +44

      Someone needs to make this happen

    • @slxpperyy9796
      @slxpperyy9796 3 года назад +40

      @@failtronic2646 what is it called

    • @failtronic2646
      @failtronic2646 3 года назад +111

      @@slxpperyy9796 steamcommunity.com/sharedfiles/filedetails/?id=1550989740
      The whole thing is customizable. You can change the color of the maze maker and solver, the wall color, the background color, and you can change the speed of the maze maker and the solver. Real cool stuff.

    • @evrodrill
      @evrodrill 3 года назад +3

      Ooooooooooooooooo Fiat hi FFFFAAAAAKKKKEEEE

  • @bowenjudd1028
    @bowenjudd1028 2 года назад +9

    3:07 I just realized that CB scared the driver so much, they gripped and tore part of the steering wheel off.

  • @purestsalt8870
    @purestsalt8870 2 года назад +3

    i love how at the end, it seems as though the leftover spaces made by the movement of the snakes tail is the snake

  • @themoldysausage
    @themoldysausage 2 года назад +4255

    "I'm back guys!"
    The best part of Code Bullet is him pretending to be a consistently uploading youtuber

    • @jovan0454
      @jovan0454 2 года назад +180

      It's very consistent, at least one upload a year!

    • @assaultmodemeliodas5283
      @assaultmodemeliodas5283 2 года назад +19

      @@jovan0454 That is true

    • @RobertMcBride-is-cool
      @RobertMcBride-is-cool 2 года назад +44

      And calling when he uploads a “schedule”.

    • @rangaplays2025
      @rangaplays2025 2 года назад +11

      it could be an aussie thing cus both of us just cant ever be bothered to upload
      and i just started like 4 months ago or something

    • @MathShorts
      @MathShorts 2 года назад +12

      @@jovan0454 it's been 11 months since the last upload, is he gonna be able to one upload a year?

  • @alexandraantimie9576
    @alexandraantimie9576 3 года назад +817

    My anxiety reaches a whole new level when the snake circles the apple and leaves the smallest opening

  • @adnamafett7862
    @adnamafett7862 Год назад +3

    While I love watching these videos awake and aware, they also make a good sleep aide for the second+ watch. It’s a “teacher is talking about something I find interesting but have a rough time understanding and also I did not sleep last night so I guess it’s now nap time” vibe.
    So thank you so much

    • @adnamafett7862
      @adnamafett7862 Год назад

      Instead of taking melatonin for my insomnia, I up your view count

  • @yhcgamer523
    @yhcgamer523 7 месяцев назад +3

    For some reason the designs the snakes body makes are so smooth and satisfying

  • @Ryan-iz2nm
    @Ryan-iz2nm 4 года назад +2258

    2019: trying to beat snake with an a.i.
    2020: trying to build an a.i. to hack Nasa

  • @Bakken102
    @Bakken102 4 года назад +503

    Snake: *turns red*
    Snake's AI: current objective: *SURVIVE*

    • @jjmj4971
      @jjmj4971 4 года назад +1

      Current objective*

    • @Bakken102
      @Bakken102 4 года назад +1

      @@jjmj4971 Thanks

    • @Sparrowash97
      @Sparrowash97 4 года назад

      Translated into Code Bullet speech: Fuck! Fuck Fuck Fuckadie Fuuuuuck!!!

  • @DrPsychotic
    @DrPsychotic 10 месяцев назад +1

    this was surprisingly cool, I also liked watching the first one it was so suspenseful and i really thought it was gunna work

  • @jackat4
    @jackat4 8 месяцев назад +2

    For people who didn't hear Code Bullet over the sounds of Adrian getting murdered:
    "Ok, back to the drawing board. The whole Q Learning thing didn't go super well so what we're gonna wanna do is get rid of all Q Learning and then some fancy sh*t and just break this problem down into it's bare basics"

  • @imallsoupedup
    @imallsoupedup 4 года назад +1148

    1950: I bet they’ll have flying cars in the future!
    2019: DIVEDE BY
    M A T H N ‘ T (3:55)

    • @Zergliskful
      @Zergliskful 4 года назад +19

      Fun fact, flying cars exist, but no one is allowed to use them because there aren't any laws for them

    • @Xusemeh
      @Xusemeh 4 года назад +11

      @@Zergliskful it is not a fun fact if u cant fly them cars

    • @masternobody1896
      @masternobody1896 4 года назад +8

      1950: cold war
      2050: robot ai war....or may be not war.... girl robot sucking my popo

    • @shirleyling7923
      @shirleyling7923 4 года назад +2

      The future could be 1951

    • @imallsoupedup
      @imallsoupedup 4 года назад +1

      Jeunesse Global uhhhhhhhhhhhhhhh take my thumb

  • @geimskip17
    @geimskip17 4 года назад +900

    Evan: "im back"
    Me: "dont do that, dont give me hope"

    • @jennacalcote2958
      @jennacalcote2958 4 года назад +1

      cocaine cola GUESS WHO’S BACK. BACK AGAIN. SHADY’S BACK. TELL A FRIEND. Also, great name dude👌

    • @tannerxavier9746
      @tannerxavier9746 4 года назад

      Bet he’s sorry he couldn’t give it to you sooner

    • @thelegendarykidofmystery1226
      @thelegendarykidofmystery1226 4 года назад +1

      *You regain hope but a person you love falls into a pit*

  • @eggstatus5824
    @eggstatus5824 Год назад +12

    If I were to fix the pathfinding one I would try to make sure the AI always knows where the tail has been. That way it can follow each place the tail has previously been in survival mode. That way it will never get trapped by going into places that are technically 80% of the remaining map, but are traps. Think about it, if you follow the exact places the tail has been, then you will never get trapped because those paths are constantly being cleared

  • @justaderrickrosestan
    @justaderrickrosestan 4 года назад +2685

    “He didn’t die, he just kind of gave up”
    Buddy that’s most of us now a days

    • @Iorvethfox
      @Iorvethfox 4 года назад

      @Griffin Dale shut up

    • @tong6644
      @tong6644 4 года назад +12

      Darth Occlus wut

    • @IsaacClodfelter
      @IsaacClodfelter 4 года назад

      Waaaaay too real.

    • @ebozic620
      @ebozic620 4 года назад +1

      i was watching your comment when he literally said that xD

    • @kellencross2760
      @kellencross2760 4 года назад +5

      @@Iorvethfox why are you being salty about his comment he was being nice

  • @bigtimeaorta
    @bigtimeaorta 4 года назад +1179

    I like it when the snake just stops moving and gives up
    "Eventually, Kars stopped thinking..."

    • @aname843
      @aname843 4 года назад +3

      @RYAN JIANG *NICEEEEEEE*

    • @harrypoon2438
      @harrypoon2438 4 года назад

      Still waiting for him to post something

    • @txrafafy
      @txrafafy 4 года назад +1

      That’s at 5:38

    • @erenaygun9696
      @erenaygun9696 4 года назад +4

      #unexpectedjojo

    • @KR_Kosmik
      @KR_Kosmik 4 года назад +1

      OH FUK
      IS TAT A JOJO REFERENCE

  • @MonkeySimius
    @MonkeySimius 2 года назад +5

    I really liked your snake that tried to circle the food before killing it. Like some boa constrictor. Only time I've seen a strategy like that.

  • @guky667
    @guky667 2 года назад

    Also you should be able to hugely optimize the hamiltonian loop; the food only spawns in empty places, so you can systematically have the snake occupy space in a way it forces food to spawn elsewhere, so if you - for example - choose to split the screen in 4 quadrants, you could start by having the snake loop in 1 quadrant and leave its tail there so only the remaining 3 are free to move (and have food spawn in them) so it doesn't have to loop the entire cycle, and as it gets longer occupy more quadrants until everything left is 1 quadrant

  • @leddy7315
    @leddy7315 4 года назад +21932

    It’s not an ai, he’s just really good at snake

    • @fluffiestboi175
      @fluffiestboi175 4 года назад +480

      Plot Twist

    • @leondyson-rix8233
      @leondyson-rix8233 4 года назад +119

      Lmao

    • @smiley94
      @smiley94 4 года назад +694

      That’s why he took so long... coudn’t do it by A.I. So he became the best snake player ever.

    • @mortemsteam
      @mortemsteam 4 года назад +24

      @RedPanda250 wooosh

    • @nubbular
      @nubbular 4 года назад +46

      Why do people always say this about this guy?

  • @termisher5676
    @termisher5676 Год назад

    Best strat is to move all over plave and not take frut into consideration after reaching certan lenght.
    Like you must go trough every single square from keft to right leaving single line free on left or right and when you come back from top you repeat lines from keft to right.

  • @noxsnow8960
    @noxsnow8960 8 месяцев назад

    That has got to be the most satisfying video of snake I've ever seen

  • @Mathrilord
    @Mathrilord 4 года назад +1036

    Three rules to win at snake
    1: always have a direct path to your tail
    2: never create enclosed space
    3: never create dead end

    • @kaidenrogers
      @kaidenrogers 4 года назад +74

      4. Don't lose. This can also be 1.

    • @CaelVK
      @CaelVK 4 года назад +18

      Just be good at the game 4head

    • @courtneywaybright8184
      @courtneywaybright8184 4 года назад +4

      dont travel along the edge unless needed to get the next food

    • @babytricep437
      @babytricep437 4 года назад

      Mathrilord easier said then done

    • @ilost1492
      @ilost1492 4 года назад +1

      Wait, the flaw with the first rule for the AI will just continue making its circles because of the fact that ai will follow its programming

  • @Jackie777
    @Jackie777 2 года назад +1154

    13:00 was SUCH a "fuck the apple, I NEED TO LIVE" moment

    • @anandsuralkar2947
      @anandsuralkar2947 2 года назад +13

      hahahahahaha

    • @indigo4710
      @indigo4710 2 года назад +6

      Suzaku be like

    • @sagesy9774
      @sagesy9774 2 года назад +2

      haha naice

    • @annastripinis4568
      @annastripinis4568 2 года назад +34

      Or as I like to say “OH SHIT OH FUCK ON NO GONNA DIE I WAS SO YOUNG”

    • @stealthlock6634
      @stealthlock6634 2 года назад +9

      I thought you said “f the people, I need to live” and it was so powerful ngl

  • @crechi_themelodromatic
    @crechi_themelodromatic Год назад +3

    This man is the result of all the rage, frustration, and stress it takes to learn to code.

  • @german_engineering1449
    @german_engineering1449 Год назад

    The extremely large game towards the end of the game is unironically extremely beautiful and fascinating to watch. I actually went back and slowed down the playback speed so I could follow the movement (admittedly only slightly) better

  • @ojuswi
    @ojuswi 4 года назад +881

    "Let's make it 10 times faster"
    "Alright 50 times FASTER"
    "100 times FAYESTER"
    "1000 times FAYASTAH"

    • @matthewh8812
      @matthewh8812 4 года назад +12

      Let's make code change his upload schedule like that

    • @Koppu1doragon
      @Koppu1doragon 4 года назад +6

      Me watching at 2 times speed
      "2000 times FAYASTAH"

    • @michaeltp6730
      @michaeltp6730 4 года назад +4

      me watching from Spain
      "1000 times FIESTA"

  • @BrodieEaton
    @BrodieEaton 4 года назад +418

    Code Bullet: It’s perfect!
    The snake: *I’m ‘boutta end this man’s whole career*

  • @edendenton7274
    @edendenton7274 2 года назад

    Watching the snake go around was super satisfying, love it

  • @Andrew_Shepherd870
    @Andrew_Shepherd870 2 года назад +1

    I would genuinely use a recording of this as a screen saver because it looks so cool

  • @nicholasruff7376
    @nicholasruff7376 4 года назад +1617

    Title: “Perfect Snake A.I”
    Me, having seen his last 12 snake A.I videos: **Doubt**

  • @michael_angelo_myers
    @michael_angelo_myers 3 года назад +2071

    This would be the coolest screen saver.

    • @christowers7307
      @christowers7307 3 года назад +43

      Oh man, that's an excellent idea

    • @Lappers
      @Lappers 3 года назад +49

      Code bullet going crazy or the snake A.I

    • @maskedsalesman2020
      @maskedsalesman2020 3 года назад +23

      @Your Pal Ryder Both would be fine.

    • @victinistealth5756
      @victinistealth5756 3 года назад +4

      Look at the names of the top 4 people not including me

    • @NOAH-um7go
      @NOAH-um7go 3 года назад +3

      @@victinistealth5756 I don't get it.

  • @Mecharnie_Dobbs
    @Mecharnie_Dobbs 2 года назад

    4:59 It should find the shortest path from the head of the snake to its own tail. By the time it gets there, the tail has moved. While the head is following the tail, it cannot die.
    It should find the shortest path to its own tail, that also includes the fruit if possible.
    But, it increases in length when it eats the fruit, so its tail will not always crawl forward out of its reach.

  • @filippobilzoni5682
    @filippobilzoni5682 2 года назад +23

    I would love to have an animated wall in my room with this AI going all the time

    • @Brigeb20
      @Brigeb20 Год назад +1

      And when you turn it off the snake resets it's size and position

  • @Bamthis
    @Bamthis 4 года назад +836

    You know a snake player is good, when it’s snake looks like an Aztec temple

  • @benh8312
    @benh8312 3 года назад +2059

    "2020"
    "New year, new me"
    "I'm going to be a free man"
    That aged well...

    • @A-400
      @A-400 3 года назад +28

      /´¯/)
      /¯ /
      / /
      /´¯/' '/´¯¯`·¸
      /'/ / / /¨¯\
      ('( ')
      \ /
      \ _.·´
      \ (
      \ \
      if you are wandering i copyed and pasted this and remade this XD

    • @fal4thought
      @fal4thought 3 года назад +14

      @@A-400 Okay? And?

    • @ScareBarley
      @ScareBarley 3 года назад +9

      @@A-400 who asked

    • @dougdimmadomeownerofthedim9701
      @dougdimmadomeownerofthedim9701 3 года назад +24

      Nikola chill it's just a comment. And no, It's wondering, not wandering, as in "my brain is wondering how Nikola Anthony somehow has less brain cells than a hard boiled egg" vs "Nikola Anthony is wandering through the entirety of Reddit trying to find someone more virgin than him, but alas to no avail"

    • @niceperson4086
      @niceperson4086 3 года назад +4

      Guys, chill, this was a month ago

  • @ashleydejong3402
    @ashleydejong3402 6 месяцев назад

    1:40 This is a masterpiece of combat, the effects, the visuals itself are just beautiful

  • @Broth_Hunter
    @Broth_Hunter 2 года назад

    Having this for a screen saver would be amazing

  • @IonicFalcon
    @IonicFalcon 4 года назад +1864

    And like that, he’s gone again....

  • @Danidev
    @Danidev 4 года назад +5167

    yaboi returned form the grave!

  • @Badboy-vn7eb
    @Badboy-vn7eb 2 года назад +2

    I would be interesting to see him go back to this and make a change where the head of the snake had to be a certain distance away from the tail while following it. I think that would actually be a much easier way of playing it, since that would only let the snake follow the spaces that the tail leaves open while also eating the apple. Now, he may have tried that, and I can't remember since I am writing this at the end of the video. Just an idea.

  • @dumbo21
    @dumbo21 2 года назад +7

    11:44 is this the intro to an 80’s “hacker” film

  • @mellow6268
    @mellow6268 3 года назад +1893

    Funny how at the end it looks like a black snake moving along a green grid

  • @Ha1cyon00
    @Ha1cyon00 4 года назад +540

    "I'm sure you can tell when it goes to 'Oh shit, Survival Mode"
    Well yes when the snake goes all blood red like it's hunting for lives

    • @thanosattorneyatlaw4062
      @thanosattorneyatlaw4062 4 года назад +9

      Judging from the part where the broken snake literally beat up the army, yeah it probably IS hunting people

  • @timothyshoup5044
    @timothyshoup5044 Год назад

    There is something almost hypnotic about watching that snake do its thing. I enjoyed it.

  • @fantasypvp
    @fantasypvp 7 месяцев назад

    my best snake pathfinding algorithm:
    get x and y distance to target location
    if x > y then add x to list, then add y to list (or -x / -y depending on direction etc) so the moves are listed in how optimal they are
    then just make a list of moves that wont immediately make you lose and get the first optimal move in the possible moves list
    lol i was too busy rewriting the entire rendering engine to make a proper ai for my game but there's like 10 enemy snakes that are hyper aggro XD

  • @MATISTHERAT
    @MATISTHERAT 4 года назад +625

    Lol imagine him trying to keep a straight face making the sounds for the military scene.

    • @user-hm1kq6lj4l
      @user-hm1kq6lj4l 4 года назад

      MATISTHERAT it’s really not that hard to do that especially since he doesn’t have the maturity of a 12 year old

    • @olgierdvoneverec4135
      @olgierdvoneverec4135 4 года назад

      why would he need to keep a straight face tho?

    • @darthfikus5206
      @darthfikus5206 4 года назад

      TBH that was a rather accurate depiction of military - they kill a bunch of people and things only get worse.

    • @luv-uf3qz
      @luv-uf3qz 4 года назад

      @Spit Dragon well not for me, if you told me to do that voice ,i would take a few weeks

    • @Travminer123
      @Travminer123 4 года назад

      B it’s meant to be funny. It’s the point and it fucking was

  • @Xturnia
    @Xturnia 4 года назад +977

    He sounds like he is smiling as he's talking.😆

  • @user-fm3xy7td5f
    @user-fm3xy7td5f 3 месяца назад

    Honestly with how much you upload the into is accurate

  • @griffenrobrahn4604
    @griffenrobrahn4604 Год назад +118

    i love the part where he said "it's snakeing time" and then snaked all over everyone.

    • @grimace_is_sus
      @grimace_is_sus 10 месяцев назад

      O_O

    • @lailoutherand
      @lailoutherand 9 месяцев назад

      😶😶😶😶😐😐😶😐😶😐😶😐😶😐💩

  • @_The_Dumbass_
    @_The_Dumbass_ 4 года назад +583

    When the snake starts writing Latin and your sleep paralysis demon gets upgraded to a paralyzing demon

    • @jeffjeff2514
      @jeffjeff2514 4 года назад +9

      @Kamarious Antonio Temple
      Shut the fuck up, and stop your god damn lies

    • @adog8379
      @adog8379 4 года назад

      Kamarious Antonio Temple this is the reason I watch videos 4 or 5 hours ago

  • @witchfinda
    @witchfinda 4 года назад +1652

    Nobody:
    The snake when it turns red: *NEW OBJECTIVE- SURVIVE*

    • @Dy1an.k
      @Dy1an.k 4 года назад +23

      Halo reach, best halo

    • @theworldsdankestparanormal9805
      @theworldsdankestparanormal9805 4 года назад

      Cake 4life what

    • @Dy1an.k
      @Dy1an.k 4 года назад +11

      @@theworldsdankestparanormal9805 new objective-survive is a halo reach reference

    • @EonsEternity
      @EonsEternity 4 года назад

      @@Dy1an.k i mean.....

    • @Dy1an.k
      @Dy1an.k 4 года назад +5

      @@EonsEternity what, it was defanitly a halo reference
      Zoomer

  • @PattyGotTheFatty
    @PattyGotTheFatty 2 года назад +1

    I love the wave effect you can see when he increases the speed of the hamiltonian snake

  • @isidoord6106
    @isidoord6106 2 года назад

    10:00 it’s honestly both so satisfying and so frustrating to watch the snake trying his best to not touch the apple.

  • @dibulater640
    @dibulater640 4 года назад +1447

    2019 : Perfect Snake A.I.
    2029 : Perfect World Domination by A.I.

    • @yeetdabeans3883
      @yeetdabeans3883 4 года назад +9

      2059:pefect *dies from poisond oxygen *

    • @ve7ant
      @ve7ant 4 года назад +1

      Just throw an apple

    • @SRC267
      @SRC267 4 года назад +5

      August 29th 2029, keep that date in your diary.

    • @suzyroseblossom
      @suzyroseblossom 4 года назад +1

      Yeah pretty much

    • @Makar_The_Delver
      @Makar_The_Delver 4 года назад +2

      *SkyNet has entered the chat*

  • @THEBOSS47MLG
    @THEBOSS47MLG 3 года назад +735

    Making a perfect “Snake” AI in “Python”....

  • @Shinyreaper816
    @Shinyreaper816 8 месяцев назад +2

    Whilf observing the snake in its natural habitat, scientists recorded some strange behavior, the snake seemed to go from 7 to 12, they where quite confused due to the fact that they didnt listen to codebullets commentary, and instead paued attention in class

  • @phyro4122
    @phyro4122 2 года назад +2

    If he does end up building the terminator, you know he’s gonna steal it from someone else 😂 (love you Evan)

  • @TDLwave
    @TDLwave 3 года назад +6091

    Plot twist: he was the one playing and he is secretly the best snek player ever.

    • @DR3ADNOUGHT
      @DR3ADNOUGHT 3 года назад +96

      @spider man snek

    • @filipek5230
      @filipek5230 3 года назад +57

      @CreeperFun12 snek

    • @monstergurke88
      @monstergurke88 3 года назад +35

      @CreeperFun12 snek

    • @idropgp8052
      @idropgp8052 2 года назад +10

      No, it's in the title, ai, NOT human
      If you can't figure out the difference between a computer program or ai player you should get some help

    • @thedarkmage413
      @thedarkmage413 2 года назад +138

      @@idropgp8052 r/woooooosh

  • @perry4808
    @perry4808 4 года назад +1029

    2019: building AI to beat a game !
    2025: recreating skynet!

    • @mowermen1762
      @mowermen1762 4 года назад +2

      Quantum _ this is the first comment

    • @Thisismaintv
      @Thisismaintv 4 года назад +3

      Skynet already exists, I work there.

    • @ducaarimoore5290
      @ducaarimoore5290 4 года назад +6

      @@Thisismaintv "recreating" like re-create -_-

    • @axiomaticc
      @axiomaticc 4 года назад +1

      LMAO

    • @BlazeRKGK
      @BlazeRKGK 4 года назад +3

      @@Thisismaintv you OBVIOUSLY work there with that much iq

  • @theevilduckling7272
    @theevilduckling7272 11 месяцев назад +6

    The problem with the second ai might have been that even though the snake's head could reach more than 80% of the empty spaces, when the snake is really long (and so there are very few empty spaces) *the snake could still get trapped in that 80%*. The solution to that might be to add a conditional for when the snake becomes really long, it starts following the Hamiltonian cycle that he used in the last ai.

  • @YoursTrulyNoober
    @YoursTrulyNoober 9 месяцев назад +1

    for some reason this feels very satisfying

  • @2awesomegriefers
    @2awesomegriefers 4 года назад +732

    He didn't realize the snake was still alive. It's head is right next to the tail

    • @ironcode
      @ironcode 4 года назад +32

      2awesomegriefers OMG you're right! EVERYBODY NEEDS TO UPVOTE THIS COMMENT! It actually would have finished 😂

    • @MGSLurmey
      @MGSLurmey 4 года назад +53

      He should have made the head look different to the body segments. Eyes or something. That would allow you to visually see that it's still going.

    • @cryofreeze_
      @cryofreeze_ 4 года назад +1

      Witch timecode ? :o

    • @ironcode
      @ironcode 4 года назад +3

      Nicolas Gaillard 20:51

    • @cryofreeze_
      @cryofreeze_ 4 года назад +4

      @@ironcode Erf. I looked at that time, but didn't see it. I'll try again at 0,25 speed.

  • @thekrackenx
    @thekrackenx 4 года назад +689

    Code bullet: take the longest path to the apple.
    AI: *starts recreating the actual game to then get the apple*

    • @PandaXStorm
      @PandaXStorm 4 года назад +31

      the AI is recreating the big bang, the evolution of Life, the history of humanity and then gets the apple

    • @placidqualm
      @placidqualm 4 года назад +11

      Don't forget paying off it's college debt

    • @DuskAlimar
      @DuskAlimar 4 года назад +8

      CB: get. Dot.
      A.I: Live?
      CB: no. Get dot.
      A.i: I'd rather live, fleshbag

    • @samuelmarzo722
      @samuelmarzo722 4 года назад

      @@PandaXStorm adam and eve lol

  • @teufel-gm9zz
    @teufel-gm9zz 6 месяцев назад +6

    2:10 i am a subscriber now

  • @tylan5081
    @tylan5081 4 года назад +582

    Respect to cb for making this but I spent almost half an hour watching a green line on a screen

    • @HangdogNat
      @HangdogNat 4 года назад +16

      Corn Roof i mean, sometimes it turns red

    • @totifaddye6587
      @totifaddye6587 4 года назад +1

      Sneks

    • @Totyamuri
      @Totyamuri 4 года назад +5

      There's a dot, too

    • @VectormanRxQueen
      @VectormanRxQueen 4 года назад

      Corn Roof lol

    • @userou-ig1ze
      @userou-ig1ze 4 года назад +1

      how about a binary search before you watch. Start in the middle man!

  • @pgtv14
    @pgtv14 3 года назад +868

    19:05 "This algorithm is cold and calculating"
    Ah yes, the floor here is made out of floor.

    • @wariothief
      @wariothief 3 года назад +11

      Ah yes should be hmm

    • @sakuhoa
      @sakuhoa 3 года назад +11

      @@wariothief well, oh yes but actually hmm

    • @wariothief
      @wariothief 3 года назад +2

      捌拾柒Idiot lol

    • @marcusaureliusregulus2833
      @marcusaureliusregulus2833 3 года назад +1

      Usually floor is made out of wood or concrete 🙄

    • @sakuhoa
      @sakuhoa 3 года назад +5

      @@marcusaureliusregulus2833 you must be fun at parties

  • @renakunisaki
    @renakunisaki 10 месяцев назад +2

    I actually would like to use both of the latter algorithms. It might be interesting as some type of texture generator.