AI Learns to play Snake!

Поделиться
HTML-код
  • Опубликовано: 11 дек 2024

Комментарии • 267

  • @chaoseclipse0121
    @chaoseclipse0121 3 года назад +137

    If you listen closely, you can hear Code Bullet wailing and having an aneurism off in the distance.

    • @chaoseclipse0121
      @chaoseclipse0121 3 года назад

      @Dario Roman How and in what way does your shilling have ANY relevance to either this video or my comment on the suffering of a specific programmer? I'll give you a hint: it has none.
      Also a trick: Piracy is not only wrong, it's unlawful. You shouldn't be shilling that shit site, or any others like it for that matter.

    • @chaoseclipse0121
      @chaoseclipse0121 3 года назад

      @Kaiser Felipe Another account, another report. Keep them coming, I enjoy shitting in your cheerios when you think it's a good idea to try to advertise in my comments, especially with a piracy site. Quit being a basement dweller and and actually buy shit. You might find you might help the economy a little.

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

      @@chaoseclipse0121 hahahah its cute that you think your two reports will actually bring his chanel down , the kid is not only learning and applying knowlege but also make the effort to teach others . While u practice how to make multiple gmail accounts to report ppl he is probably learning more ai stuff. I would suggest u learn how to code fand create a neural network to detect plagarism . Probs ask @
      Chrispresso to teach u how to make one , cause the extend of knowledge is very limited

    • @chaoseclipse0121
      @chaoseclipse0121 3 года назад

      @@iam_devansh Riiiiiight, all this coming from someone who can't be bothered to spend an extra minute or two to use proper grammar and spelling, on top of praising a moron who uses a bot to advertise a PIRACY website and then having the gall to tell me to learn something from criminal scumbags while lacking the willpower to type properly on the internet. I wouldn't be surprised in the lightest if you're the same person who owns the other two accounts, then turning around and giving yourself praise while thinking you're telling people off who challenge or insult you, because there's nothing praiseworthy of your typing skills and your praise of criminals.
      You should sit down and seriously consider your life choices. I again reiterate that piracy is not only wrong, it's unlawful. It will come back to bite you in the ass one of these days, and no VPN will protect you when you come under investigation as VPN's are required by law to turn over data and logs when it comes to criminal investigations. The fact you're logged into an account and making posts leaves your IP linked to your account removes whatever "safety" you think you have.

    • @moonblaze2713
      @moonblaze2713 3 года назад +7

      @@iam_devansh I cant see who the OP is talking to. Seems his posts got deleted. Maybe he did that himself, or maybe you're wrong and his account got deleted.
      Just thought youd like to know.

  • @marufranco5281
    @marufranco5281 5 лет назад +277

    This is the first Snake AI simulation that actually finishes the game

    • @luigisgl2639
      @luigisgl2639 4 года назад +14

      It is because it is the first one to use multiple hidden layers.

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

      Probably because the person who made spent a lot longer actually training it rather than just a a couple hours or a day

    • @johnyang799
      @johnyang799 3 года назад

      There's no time or step constraints.

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

      @@luigisgl2639 the problem is though, it's not very fast. It just goes in a pre-defined pattern which is safe, but terribly inefficient

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

      @@williamluong7743 yes. Couldn't a dumb algo be written that goes top to one row from the bottom, up and down moving right by one colum each time then taking the bottom row back to the left most colum and starting again? That would always win wouldn't it? It would also always win on the same squarebottom left one row up.

  • @burakverid646
    @burakverid646 3 года назад +29

    I especially appreaciate the part where you explained the input nodes. Most of the videos are missing that part.

  • @AndrewMakesPuns
    @AndrewMakesPuns 3 года назад +21

    I have never felt so outsmarted by a snake in my life,
    Also maybe give the snakes a reward for being quicker to each apple to encourage a speedier strategy for larger grids

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

      It needs to be scaled to the current length though, since more efficient pathing is OK when short, but longer snakes actually need to zigzag to "store" that length so it won't unalive itself

  • @GreerViau
    @GreerViau Месяц назад

    Awesome job! The technique of starting it in a small environment to learn that strategy, then bringing it to full scale was really smart! Also a really good loss function. Great vid, keep it up!

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

    this is THE most underrated video and channel on RUclips.

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

      Glad you enjoy it :) I'm working on more as well, and if you have ideas for AI's or games you want to see, I'm open to suggestions.

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

      Sure! How about a Deep Learning algorithm to play Tetris?

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

      @@idr7789 I will definitely look into this to see what I can come up with!

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

      there are even more

  • @smilingx4-189
    @smilingx4-189 4 года назад +1

    You are the first one one that i seen making a Snake AI that is not failing or using tricks to finish the game bravo

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

    It would be really interesting to take the genetic makeup that succeeded in winning the game and training it with a fitness function that prioritizes speed/effeciency and then try again on the large grids.
    Awesome vid.

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

    Back in the 80s there was a multiplayer version of Snake for the Commodore 64 which was a type-in game in RUN Magazine, although the setup was that each snake would have a rule set for which direction to move given the surrounding 8 cells, and the point of the game was to program your snake with a rule set that made it outlast all the other snakes. Being the kind of nerdy kid I was I decided to see what happened if I randomly combined the rule sets of the two best-performing snakes, basically coming up with genetic algorithms on my own, and it got pretty good... then I let it also use the human player’s rule sets, and it got scary good.
    So anyway I appreciate this video.

  • @xordux7
    @xordux7 5 лет назад +4

    I just now read your blog and implementation...great work man!

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

    nice job man! it was harder than I thought making the representation. Really clever solution getting the direction account so that the snake knows that when the head goes to where the tail is currently it will not crash into itself :)

    • @Chrispresso
      @Chrispresso  3 года назад

      Thanks :) Glad you appreciated it!

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

    This video was (or more will be, dont have the time today) so helpfull improving my NEAT. I only had a Highscore of about 4-5 in Generation 3300
    I thank you really much

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

    i Love these AI Channels they're always so Fun to watch

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

    AI is so cool, it's amazing how many applications it has and how easily accessible it is for people.

    • @Chrispresso
      @Chrispresso  3 года назад

      Yep! I'm hoping to continue to show how and where it can be used. I know AI is a hot term these days, but I think understanding it and showing it in games makes it a lot more relatable for people.

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

    Wow, man. You and your brilliant snake did well. make ai on more complex games!

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

      Glad you enjoyed :) Definitely working on some, just need to find some more time. I'm also open to suggestions if you have any games in mind!

    • @krishna1.097
      @krishna1.097 4 года назад +1

      😏

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

    Me : nothing scares me, but those blue red lines, those scares me

  • @wm7894
    @wm7894 3 года назад +10

    I just love these AI videos!! But may i request something? I notice a lot of people usually remake the games, and then trains an AI to it. And here it appeared as if you gave the snake eyes, but when humans play, they look at the whole map. So then, could you try sometime to make an learning AI to an original game, that reads the screen as a human but hopefully doesn't run too slow because of the image it has to process?
    Either way im definitelly looking forward to more videos in the future!

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

      Yep! This is actually my plan. I know I'm currently slow at making videos but hopefully I pick up the speed this year. I've got a lot planned, so fingers crossed. I just wanted to start the AI intro slow by first showing how to use a neural network + genetic algorithm on something like a game I made replicating snake. Then I made it more advanced by doing the same thing with car evolution and then having it play a game that I didn't change (super mario bros). Recently I made it learn grid world by just using pixels from the screen. So next up is combining some of these techniques ;) My plan was to add AI ideas slowly so that people can always just watch the "AI Learns" series in order to see how to add different components, or to skip around and find an AI solution they might like.

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

      @@Chrispresso could you please try and give TIME a high weight in the fitness of a snake. It will be nice to see what new strategies they come up with to win the game quickly.

    • @eduardogoncalves1733
      @eduardogoncalves1733 3 года назад

      it would be slither.io then

  • @investidorsortudo4028
    @investidorsortudo4028 5 лет назад +5

    And...It is fantastic! congrats!

  • @anon58973
    @anon58973 3 года назад

    This stuff is so amazing. It learned - and then taught me - that the best algorithm is to stack itself in neat columns with patience to find the apple. Actually by the end it has learned to just scan vertically until it happens to find the apple and then is biased to return to an average scanning position at the top left of the domain.
    It would be interesting to introduce a decaying apple that requires finding before disappearing because the snake needs to "eat". I'd guess that the most interesting behaviors could be developed by specifying the snake find the apple in X moves to stay alive + grow and if >X moves grows but loses energy and needs to find the next apple sooner or else die.
    Nevertheless, incredible.

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

      The problem with something like that is that at a certain point the lowest possible time to get to an apple would be greater than the rate at which the apples decay so it would get stuck around a certain score

    • @anon58973
      @anon58973 3 года назад

      @@ultraeon there could some intermediate window where can be true, depending on the setup. Interesting observation.
      At high lengths, the AI has more opportunity to "snake" which increases time required to get the apple, on average. There's a maximum length snake that is playable assuming perfect reaction time. I wonder how fast time-stressed vs. lazy populations would converge to the maximally efficient solution at the boundary of playability. If you notice, some of the mid-gens in this video get lazy and make less efficient and more numerous moves (shorter length requiring sooner changes in direction) until converging on the ultimate snake which is necessarily the most efficient use of 2D (3 point max. direction choices) moves (linear paralleling with minimized lengths of direction changes).

  • @xhargh
    @xhargh 5 лет назад +107

    Nice! I wonder how they would behave if there were two or more snakes competing for the same apples.

    • @Chrispresso
      @Chrispresso  5 лет назад +43

      It would definitely make it so the more aggressive snake would get some of the early apples. I'm not sure how it would change the population once the snakes got to a larger size. I might have to test it out!

    • @xhargh
      @xhargh 5 лет назад +10

      Chrispresso I would guess that some snakes will try to kill its opponent(s) to be able to get more apples.

    • @Takumi-San
      @Takumi-San 5 лет назад +10

      @@xhargh well, trying to kill its opponent means that generation has failed. Similarly, the 'victim' generation would learn that dying by attack is a bad idea. I reckon the game would tend toward a scenario whereby both snakes survive for a maximum time by unintentionally collaborating to maximise each one's own chance of getting an apple.

    • @xhargh
      @xhargh 5 лет назад +3

      @@Takumi-San might be so, it could also depend on whether it is one kind of snake or different kinds of snakes competing.

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

      I think the snakes would learn to cooperate

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

    Amazing, the AI discovered that the brute force approach is in fact the best approach. That kind of generalization is pretty crazy.

    • @Chrispresso
      @Chrispresso  3 года назад

      I agree! I think it's pretty amazing that an AI was able to learn to "play it safe" to win

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

    the best ai learning video I have watched so far, nice job!
    darn those 2 dislikes :V

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

    You are the best, Gratz Chrispresso

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

    It was beautiful to watch! Well done

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

    Absolutely incredible. Amazing video, my congratulations!

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

    Dude, this is just straight up awesome. I need to do more of this stuff on my channel. I don't get exactly how the binary sensing works though.

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

      Glad you like it! Binary sensing is just a simple yes or no (1 or 0) fed into the network. Either it sees a particular object or it doesn't.

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

      ​@@Chrispresso Thanks for answering my question. So, the binary sensing that you set up doesn't give any distance information? If so, its scary impressive that you were able to get that to work with the binary sensing.

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

      @@scottbigbrain3944 That's correct. I trained with both types to see what would happen and that's what is shown in the graphs. I was impressed that something as simple as binary sensing was able to solve it.

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

    Love this video OMG best A.I. snake explanation

  • @Adalast
    @Adalast 5 лет назад +17

    I'm actually kinda curious how the later generations would handle non-rectangular arenas or obstacles.

    • @Chrispresso
      @Chrispresso  5 лет назад +10

      I would have to adjust the code a little bit, but it could handle small obstacles if I did. The main issue is if I add something quite large and keep the code as is, the snake will see an obstacle and treat it as a wall. So it would never know the difference between obstacles and walls. For something more sophisticated I could use deep Q-Learning to allow it to learn obstacle avoidance!

    • @Adalast
      @Adalast 5 лет назад +2

      @@Chrispresso that would be so awesome.

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

    What in the..... Your AI figured out the best way to beat snake (aka Hamiltonian cycle) in just a few hundred generations. That's miraculous lol

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

    best snake ai, no cap

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

    But what about efficiency?
    The snake AI : we don't do that here!!

    • @ukcroupier
      @ukcroupier 3 года назад

      Yeah, not only was it totally inefficient but I could code a routine to do it this way in about 20 seconds.

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

    Amazing!! I am speechless!!

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

    Thanks for your video! That's so good, congratulations

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

    Thank you! Great explaination!

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

    Awesome video!
    Thank you for your insights 😊

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

    It's incredible how the names of all the components have changed till the 90ies yet they do exactly the same as they did back then....example: one-hot-encoded -> winner-takes-all (WTA)

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

    Great work!

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

    Anyone who reads this, don't just watch a video and forget about it, give the creator some support for once

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

    what a great work. well done

  • @gliderguld
    @gliderguld 5 лет назад +2

    Great demo. Would it be possible to do "brain surgeory" on one of last snakes in order to see how changeing vision changes output and maybe make an interpretation of nodes in the hidden layers?

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

    This is very impressive. Improvements that I would like would be that the neural network can 'explain' or 'formulate' somehow how to play snake. Ofcourse not in a conscious way and not in a normal human language. Just that it would give us the basic concepts of its success. I believe we could achieve this by letting us be inspired again by the human brain. Those connections are not meaningless calculations. Every connection has a small meaning and together they form a bigger meaning. We already know the meaning of the inputs of our artificial neural networks, and we know the meaning of the outputs. Let search for the meaning of what's in between them.

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

      This is definitely possible and usually involves a heatmap to see what is "hot" and "cold" for the AI. That concept can help a lot when working with other types of networks too such as CNN's.

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

    Great job man!

  • @ducnguyenminh6736
    @ducnguyenminh6736 3 года назад

    I can say this snake has smart moves

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

    It basically set a hamiltonian cycle for itself

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

      Yep! I was pretty impressed it figured it out.

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

    That was the pattern I used back in 1999 to play snake till maxed out (managed that 3 times)

  • @drahsid2
    @drahsid2 3 года назад

    The first thing I see here is that the snake ended up following a hamilton cycle. It could be faster, too. Very interesting

  • @SrikanthReddy-nx4px
    @SrikanthReddy-nx4px 4 года назад +1

    Its awesome man

  • @geometrydash2109
    @geometrydash2109 3 года назад

    Underrated

  • @jeeptransport-tutorials7761
    @jeeptransport-tutorials7761 Год назад

    8:30 Looks like its starting to play Snake as if it was a printer lol. Especially 3D one :P

  • @kevin_heslip
    @kevin_heslip 3 года назад

    I like how the goal of this game is to create an ouroboros

  • @biboKralle
    @biboKralle 3 года назад

    The computer is playing with itself.... give it some privacy! oO

  • @simonstrandgaard5503
    @simonstrandgaard5503 5 лет назад

    Nice video. Thanks for sharing your code. I'm working on my own snake game.

    • @Chrispresso
      @Chrispresso  5 лет назад

      Of course! Glad you liked it. Any project I post will always contain source, just FYI :)

  • @elheffe80
    @elheffe80 5 лет назад

    Unexpected awesome sauce!

  • @andzejkopytko6694
    @andzejkopytko6694 3 года назад

    What a great video!! :O :')

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

    Thank you. The great one. Some questions: (1) Is there any reasoning behind the NN architecture (number of layers, number of neurons in the layer) choice? (2) What if we change all directions from absolute (U,D,LR) to relative to current head direction; wouldn't it help? (3) Why do you need crossovers; you anyway do mutation, what's the difference either to mutate the best or mix of two best?

  • @tedro7870
    @tedro7870 5 лет назад

    Nice work!

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

    Awesome! I think you should put a metric to decrease unnecessary movements, it will increase snake's efficiency.

  • @ikoLinh
    @ikoLinh Месяц назад +1

    Una pregunta, la fruta se genera en una posición aleatoria(sin ser la actual, cabeza o cuerpo ) o se genera en una posición alcanzable?

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

    Wonderful! Hope I can do things like these but using SNN

  • @JD-rv7wn
    @JD-rv7wn 5 лет назад +7

    Distracted by great music ;__;

  • @BatBeardGames
    @BatBeardGames 3 года назад

    Sick it actually won!

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

    2:30 these powers like 2.1, 1.2 and 1.3 seems to be overengineering

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

    That's the pattern I use for playing snake as well, but since there are no walls in the snake I play, you can zigzag one point and instead of 3 movements narrow it down to 2 movements and just go through the ceiling and come out the floor.
    This Ai should had a time limit/reward to force it into risking it for the reward or playing it safe, OR playing risky early on and safe later when space got cramped.

  • @lumi2030
    @lumi2030 3 года назад

    This was amazing.

  • @pnsakanjankumar
    @pnsakanjankumar 5 лет назад +1

    Great video

  • @7ekaya
    @7ekaya 4 года назад +1

    The PERFECT ONE I was looking for...😃😃😃😲😲😲😲😲

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

    Constantine 1453😂😂😂

  • @BRLN1
    @BRLN1 3 года назад

    Interesting, the latest iteration on the huge grid appears somewhat close to an optimal strategy.

  • @warlockpaladin2261
    @warlockpaladin2261 3 года назад

    Snake evolves into Ouroboros.

  • @appc23
    @appc23 5 лет назад

    It would probably be harder to apply that strategy to odd grid sizes maybe

  • @jessiejanson1528
    @jessiejanson1528 3 года назад

    i wonder if its possible for it to learn that once the snake takes up half of the map, it should stay as close to its body as possible(otherwise it spends a increasing amount of time navigating) maybe something like "the closer it is to its body, the more likely it is to stay close to itself" which would work like "as the map fills up with its body, the weight of an input increases, once the map is 50% filled, the input is at 50% and then becomes active, triggering a change in the model. This would take forever to train normally, but if you start the snake in a map that is 49% full it wouldnt take long before the new part triggers so it could be tested and mutated quickly. it would also need to be able to keep functioning or it would die before it got to that 50%.

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

    I wonder what is the "thinking" part in a NN?

  • @PaxiKaksi
    @PaxiKaksi 5 лет назад +1

    It was simply amazing

  • @WarriorX16
    @WarriorX16 5 лет назад +1

    This is so cool!

  • @Arunkumar-ri2zw
    @Arunkumar-ri2zw 4 года назад

    Great awesome.. Could train AI to play slide puzzle with 3x3, 4x4,.. I love to see that evolution on playing... 😍😍😍

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

    How can I display the changes in each generation in the neural network like this

  • @borat6363
    @borat6363 5 лет назад +1

    Could you next run a simulation using the best-performing snake to prune the number of neurons needed? Would love to see what the minimum number of neurons is to accomplish this game, since simple driving games only need 1 hidden layer of 3 (!) neurons.

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

      Simple driving games might not even need any hidden node, since they basically use linear PIDs
      This is much more complex, especially at longer length, and without making directions relative to head

  • @firsfnamelastname8490
    @firsfnamelastname8490 3 года назад

    Why would’ve give the whole grid in the input layer instead of only 8 directions? What different result could we have then?

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

    wow Congrats !

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

    I wish the snakes were able to further develop themselves to be more efficient on using time

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

    The end was like watching a thrilling movie?

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

    Impressive!

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

    Fascinating! Didn't that bigger board bear the same issue Code-Bullet ran into?

  • @rafaelterra1687
    @rafaelterra1687 5 лет назад +1

    Amazing!

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

    Hi, great job!
    I have a question: how did you come up to this fitness function?

  • @michaelpcoffee
    @michaelpcoffee 3 года назад

    So; it figured out hamiltonian on its own.

  • @investidorsortudo4028
    @investidorsortudo4028 5 лет назад +1

    could you explain fastly how did you creat de fitness function?

    • @Chrispresso
      @Chrispresso  5 лет назад +1

      I wanted to reward early exploration (grabbing an apple or two), reward snakes for each additional apple they get and penalize snakes that take a long time to get apples. From there I tried to express my wants mathematically and came up with what you saw. Hope that helps!

  • @skullcat324
    @skullcat324 3 года назад

    I found a typo at 1:53

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

    Is there any python libary I could use for these custom weights and biases?

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

    Nice one

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

    how do I get the last generation population from the code

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

      Under the update method for snake_app. Sorry, it's a little messy. I can go through and clean it up and make some of the code easier to run like with my newer projects. But under there, look at the comment for next generation and you can do something like `save_snake('path/to/population/folder', 'snake_name (i.e. best_snake_gen0)', snake, self.settings)` and that will save off the best individual from the population each generation.

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

    how do you crossover neural networks without totally breaking their logic ?

    • @Chrispresso
      @Chrispresso  3 года назад

      Slowly. Because of the reproduction strategy I chose you are guaranteed that the best individuals survive. This allows you to do some exploring safely while still having a good baseline.

  • @astro22
    @astro22 5 лет назад +1

    amazing!

  • @damarcones
    @damarcones 5 лет назад

    Nice job!!!!

  • @noodlenoms1569
    @noodlenoms1569 5 лет назад

    how did you make the sensor beams for vision?

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

    Amazing! I'm curious if the best snake can always finish the game? Is there an apple sequence fails it?

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

    How do you do the neural network effect?

  • @krisshonero1097
    @krisshonero1097 3 года назад

    can you explain how do you get that fitness function?(2:40) I try to understand the "main idea" vs the function but i dont get it. that power raise over the apples ..... men u kill me xD

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

      I just created something I thought would be a good idea for fitness. By raising it to the power of apples, it puts a lot more emphasis on apples. It might start off by getting 2 apples accidentally and it will be rewarded pretty well compared to snakes that don't get any. But then in order to get a 3rd it might have to learn to turn. Since the fitness for it is exponential, learning to turn and getting that third apple will show a lot more fitness, and ultimately help the snakes start to evolve to better AI. In terms of why the specific values.... I just tried a few different values I thought would be good and testing with them.

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

    Would have been a greater video with speech!

  • @1.8millionvolts87
    @1.8millionvolts87 4 года назад +1

    Subbed