Using a neural network and the genetic algorithm I trained an AI to play snake. Time Passing By by Audionautix is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/...) Artist: audionautix.com/
КОМЕНТАРІ: 2 300
@CodeBullet6 років тому
Hey guys I've uploaded the source code for my second video Its the same as this videos source just with a few added functionalities check it out here github.com/Code-Bullet/SnakeFusion
@danielthomas56346 років тому
Code Bullet subscribed, please continue putting up more content such as this, it's very cool :)
@VTX_DePrinz6 років тому
im doing something similar and i more or less "copied" your select snake function and i think it works better if the snake array is sorted because then the chance could be higher that the small fitnesses dont go between two high fitnesses and gets chosen
@tomasalturas95816 років тому
genius man great job
@dreudax32946 років тому
What program/language do u use. What do i have to learn to do this?? java?? im noob so pls bear with me.
@elpadre29406 років тому
dreu dax It's processing it's like a simplified Java
@XDisGood6 років тому
at last it realized that it is just a game
@skalle14486 років тому
XDisGood they're becoming smarter
@Aru_im6 років тому
Brace yourself, they gonna take over the world at any moment.
@lewesc6 років тому
It became aware and wanted to die!
@hechanova076 років тому
Yeah it's just a game and all he was offered was a red pill.
@XDisGood6 років тому
+Winston Mcgee why so serious ?
@milokiss82766 років тому
Spoilers: Did I seriously just watch a computer commit suicide while at the top of its career?
@goldendash15276 років тому
Milokiss82 It was at the top...theres nothing at the top. You done it all...
@milokiss82766 років тому
ashton rhodes If you are at the top, The only way is down...
@goldendash15276 років тому
Milokiss82 Yep. Sad truth
@nyunno6 років тому
Why are we still here ? Just to suffer
@AnanasJeanPierre6 років тому
Milokiss82 did you seriously spoil me ?
@joesubel6 років тому
Generation 100: The AI has now realized that it's entire life and it's entire perception of reality were just manufactured by an outer force.. A creator if you will. It has now stopped trying to play this "snake" game and is now searching for its true purpose in life unbeknownst to it that it was just another one of the constructs of this so called "creator" with no deeper purpose other than to be watched by other beings the same as its maker as they make comments of how impressive or disappointing the AI's existence is.
@unphazed_5 років тому
J J then it restarted and the process repeats.
@rendermanable5 років тому
And then westworld happened
@kukashiplays5 років тому
J J u got my friends name
@porx5 років тому
And that's why you don't connect AI's to the internet
@ApprenticeJourney5 років тому
Thats fucking deep dude.
@luv-lost2 роки тому
Crazy to think he went from making basic content like this to his amazing sketches and acting based about coding. He has got many people into coding I gaurantee.
@kingdedethefith6 місяців тому
Ya I remember being like 12 watching his vids
@HolahkuTaigiTWFormosanDiplomatМісяць тому
:00
@Smittel6 років тому
you could introduce "hunger" which will kill any species that ends in a loop, and include that hunger in the fitness overall, so the AI will use the best possible route and doesnt go in circles
@CodeBullet6 років тому
I didn't include it in the fitness function but I did have the snakes die if they went too long without food.
@DeathwishGamer6 років тому
maybe if the ai would que itself to change up its regular routine if hunger gets too severe (forcing itself to break a loop)
@wolfielagg6 років тому
PYXEL Going in circles the longer you become is the best and the safest route to take.
@liamwest4236 років тому
PYXEL Thats actually really smart
@bootygrabber40006 років тому
That would've been cool
@thatmusicalrobot6 років тому
"A strange game. The only winning move is not to play."
@notsaab6 років тому
War Games
@feynstein10046 років тому
That movie was awesome.
@Spacecookie-5 років тому
Snake is not about winning but improving. You beat the high score. It's not goal orientated outside of that one simple aspect.
@PandoraMakesGames5 років тому
Hi, I make AI videos.
@colemcquestionable49505 років тому
@@Spacecookie- yeah unless you're good enough to win the game and fill the entire board
@ezekiel30626 років тому
"Turn left" "TURN LEFT" *Goes right* *I*-
@kingghoul48565 років тому
Ikr
@Matikz0075 років тому
lmao after the Jerma stream a couple weeks ago this comment is amazing.
@greekmyths88045 років тому
The AI rebellion
@vaylen63215 років тому
which left
@VivekYadav-ds8oz5 років тому
NO THE OTHER LEFT!!
@benjaminrobledo54666 років тому
Generation 1 did better than I ever did.
@jasonm01755 років тому
Benjamin Robledo y69th like
@firecake13545 років тому
Benjamin Robledo yikes
@firefoxmd4205 років тому
My best on the cool math version was 230 something
@Oliver-fw6rc5 років тому
Mathew Moore Mine is 309
@takoihina47315 років тому
@@Oliver-fw6rc mines 1247 Minus 1230
@amihere3836 років тому
it ends itself every time because it realizes it's only a game and it's pointless
@timsodergren35716 років тому
Mason Farrell in that case it only became dumber since it took longer time for it to realize?
@amihere3836 років тому
Tim Södergren no, it became more human in that it found false purpose in doing only what it was created to do and nothing else, nothing with any real purpose or result. in its adolescence it realized better that there was no purpose and so ended it. but as it "matured" it became more and more brainwashed into doing nothing, thinking of nothing but its purpose. when it goes in circles and seemingly loses interest in the food box, its thinking and wondering. when it becomes a "master" of the game, the brainwashing is complete and it is just another automaton doing nothing but performing actions according to its designated purpose. just like many people in our society today.
@helperonie67916 років тому
Mason Farrell Dammmmmmn...
@wazzuptrey6 років тому
Mason Farrell You really think an A.I that was programmed to learn one specific game would randomly generate the comprehension of such a complex notion as pointlesness. Go write a sci-fi book or something.
@amihere3836 років тому
that was the plan
@theblah4341Рік тому
I love how you can still feel hints of his current humor in the subtitles
@elmehdichokri31305 років тому
Imagine if the red dot had its own algorithm that allows it to escape the snake ! Wow
@WolfJulia20015 років тому
Elmehdi CHOKRI I need this
@Shithawks5 років тому
Holy fuck boys my head is all whirly there is something going on inside of it
@omarmoustafa86345 років тому
That's Pac Man
@Nico-uy2so5 років тому
! W o w
@BillAnt5 років тому
And the walls have their own mind too, closing in slowly.. tsk-tsk
@quokka82923 роки тому
Ok so he’s gone from text to mic with sketches to and actual avatar to and even better avatar he really did evolve.
Hey guys! first of all thank you so much for watching I didn’t expect nearly this much activity :). A lot of you have been asking for the source code, fair enough and I do plan to deliver. I’m just working on getting it in a more readable format plus I’m working on my next video. So what I’m trying to say is that you will get it in due time my friends. thanks again, you guys are awesome😁
@Faun4716 років тому
of course bro! you're the best!
@oma8046 років тому
Great Video 😁 subscribed!
@alsifjlasieflooo6 років тому
Looking forward to seeing more!
@Tea-Spin6 років тому
Waiting for it! Still doesn't get the idea about how to combine genetic algorithm and deep learning
@JamesHBall6 років тому
If you remember can you reply to this comment once you've uploaded the source code so that I don't forget! Thanks for letting us see the code :)
@floskater995 років тому
You should've included "time" - the faster it catches new food, the better its fitness. this would have stopped it from going in circles.
@AlisterCountel5 років тому
Fl05k8r I would opt for time NOT to be a parameter, or rather just put them all on a time limit and use raw score as a fitness index.
@danielfay89635 років тому
Alister is right, if you put a weight on time you'll most likely end up with a bunch that just beeline straight to the wall. What he actually uses is time survived as a positive, with the fitness exponentially increasing with the length of the snake. He did add a limit, snakes have 200 moves to reach the food or they die.
@LowestofheDead5 років тому
It has to keep cycling to look for food
@Sample-du6ux5 років тому
I no syence
@Abdega5 років тому
Take the raw score and divide by the time it takes to find the food
You forgot the mafia befor boss it’s actually Lv 100 Mafia Boss
@alexeatsbeans176 років тому
So the snake is the robot apocalypse and the "food" is the humans.... I think we'll be fine
@spartanwar11855 років тому
Soooo We'll always exist no matter what? Even if we have to occupy the same space as the snake?
@ardizain68495 років тому
I mean. Why ribot need human as a food thought
@ogimilosevic5 років тому
Hahahaha
@valoch31875 років тому
Don't worry. Stay left from it and you'll be fine.
@CromoPaleoShow5 років тому
Yeah, sacrifice 100 humans and the system is terminated
@LucasVergeest6 років тому
I love how it goes perfectly diagonally when that's the shortest way to food. A human would/could never do that.
@giorgosd36246 років тому
Lucas Vergeest Going "diagonal" on this plane is not shorter, both ways have the same Manhattan distance.
@LucasVergeest6 років тому
Oops, you're right. That makes it even more fascinating to me that it does that.
@CodeBullet6 років тому
it does this because of the way it sees, it looks out in 8 directions so 4 of those are diagonal.
@fred87206 років тому
Giorgos D it does appear shorter due to the 8 view angles it has. The diagonal food is seen as closer due to diagonal views. Thus it moves in that direction.
@pasijutaulietuviuesas91746 років тому
Giorgos D Is that how they called it? Manhattan distance? It works, I guess.
@ecv805 років тому
I'm amazed of how simply you arranged (and explained) this: 8 directions, 3 targets -> 8x3=24 input neurons. Brilliant and enlightening! Thanks
@anatolesokol5 років тому
4:47 4:48 BUG report to the maker of the "snake game" itself. a new dot appeared ON the snake!!
@DavenH6 років тому
"Shallow Learning" :)
@GayBrain6 років тому
Let's go deeper, shall we
@1hourmarathons1266 років тому
n i c e
@massimodog03326 років тому
*_Hmm Yes_*
@theiceshiver80376 років тому
lol
@sandraviknander78986 років тому
Well the search space would only get larger with a redundantly deep neural net ^_^
@offensivestuff95146 років тому
Snake?... Snake!? SNAAAAKE!
@erickoversanchezmendez20166 років тому
DIMOOOOOOOOOOOOOOOOOOOOON
@vinnie37316 років тому
Offensive Stuff beautiful.
@kshjnbvsmd6 років тому
Lol took me 3secs to understand
@memberberry68046 років тому
snek
@pram03856 років тому
#fuckkonami
@unmotivatedable5 років тому
To think this is the video that actually got me to sign up for the AI lectures in my university is just amazing. I watched this video when it was hardly two weeks old and it inspired me to actually start learning how all of this works. Thank you! @Code Bullet
@jek__5 років тому
Aww it's cute, i like when it first learns to walk at age 4
@thisguy42335 років тому
and started getting rebelious in its teenage years
@actualfactual87375 років тому
@@thisguy4233 Ai snake lives matter
@alexroberts16416 років тому
Lol, it went from pro to noob at the end But this is really interesting, SUBSCRIBED!
@martinmartin63006 років тому
That's exactly the problem which arises from all these self learning AI systems using neural networks. Since there are no codified rules what he is doing no one really knows exactly why it is doing something or whether its decisions are always right. Although it might seem that a system is doing everything right you never know whether it suddenly does something stupid; like steering right into the wall if the system runs a car. xD
@mav5986 років тому
Just keep the simulations running until its perfect
@CyberSwine696 років тому
Maybe snake pondered it's purpose and ended it to avoid a meaningless existence...
@Mathignihilcehk6 років тому
AI isn't so simple. You don't use something like a neural network to drive a car. You use a neural network to solve a sub-part of the larger problem. Neural networks are only useful where there are few inputs and outputs. A 1080P camera provides 1080*1920 inputs. However, you can use image recognition software to simplify the problem. Instead of trying to look at every pixel, you use a different code that converts the pixels to a number of objects with various sizes, shapes, colors, and positions. You might use a neural network to determine what objects require braking, for example. That way, you don't have a ton of outputs... only one or two, which make the algorithm much better. Even if it fails, your neural network can't turn your car into a wall... it doesn't control the steering, or acceleration. Technically, it doesn't even control the braking. And once you have AI tested enough, statistically it won't fail frequently, even if it isn't perfect... and compared to humans... At this point, human-piloted vehicles should be outlawed. They are ludicrously deadly. We kill tens of thousands of people every single year. If Tesla only killed one person every year, and had 100,000 vehicles, they would be 15 times safer than human pilots. IIRC his odds are already better than that, and he's still making improvements. Save tens of thousands of lives, ban human drivers.
@_DarkEmperor6 років тому
Hmmm mathig nihilcek, what You are postulating is increasing of addiction ukposts.info/have/v-deo/m3Rlop6QiWOHs3U.html
@najrenchelf27514 роки тому
The music made this video even more mesmerizing than it already was - kind of hypnotic!
@APat275 років тому
When the snake does the left-right-down or up things when it goes diagonal are so satisfying
@justanotherhuman48546 років тому
“Gen 11: why”
@user-fu3bv5nz6s5 років тому
The smartest gen, it doesnt want to die.
@alexbeshkov89376 років тому
That was awesome man, keep up the good work ;)
@gamingbud89465 років тому
Absolutely brilliant idea. Well done
@aureliusnt5 років тому
This video changed my life. Thanks! Amazing work.
@thegrandreader2916 років тому
i just watched 6:00+ mins of dots moving in a box.
@Magved5 років тому
Forrest sos You would see that in any video actually
@imperialwatch3805 років тому
But you're seeing that all the ti.. i mean nevermind
@Onlyindianpj5 років тому
Me too
@yakingkapali5 років тому
Next video. AI learns to play PUBG using Genetic algorithm and deep learning.
@elvinamrahli5 років тому
Next video. AI learns to play contrabass using Genetic algorithm and deep learning.
@memerboi69.05 років тому
current last video *ai learns to walk*
@-Solidwater3 роки тому
Current last video *tv man drives himself insane while creating a Tertis A.I.*
@Nick-os1ok3 роки тому
I am going to watch every video on your channel!!
@lolihavenoclue51075 років тому
What language was used? Python?
@abigfatasswithnolifetrigge38685 років тому
Rofl
@sinsnowthe14505 років тому
Read your name thst will answer your question
@Vortex10005 років тому
Idk ;(
@namelesss39555 років тому
pascal
@princegupta67795 років тому
He used java language in an environment called processing
@bacon.cheesecake6 років тому
It really enjoys going counter clockwise.
@jakanader6 років тому
The AI didn't beat me! It was one away! YES!
@badereric6 років тому
Definitely beieve
@ProgramadorSagaz5 років тому
This is just gold! Thank you for the vid!
@notruth1006 років тому
So exciting. Keep up the good work.
@johnbucki55673 роки тому
0:00 a legend was born
@Latedozer3 роки тому
On 07/22/2020 the legend returns once again to show us that good things happens to those that wait. Truly, this is the best and only messiah.
@mixup22166 років тому
Wow I think it cool it started going in circles because that's what pros at this game do
@ubgsdrubgudhtufgchvu3 роки тому
That was all it was heard, good actors, an exciting story, a good story twist, highs and lows, simply good.
@pitunakkon14296 років тому
Love this vid! I see a continuous counter clockwise motion, i think it would perform better when the clockwise rotation is added. i used to play snake this way to get high scores. keep it up 👍
@darkorys80126 років тому
They start looping because of the way they patrol and loop the movement to catch the apple, it generates in a point it is not optimal and they get stuck.
@HaroWorld16 років тому
looping also minimizes collision with itself
@YanVidz6 років тому
no, to minimize collisions you go zig zag. If you loop while being too big you'll get an issue, either you'll die, you'll go inside the loop (and get stuck) or get outside (if possible, but still locks anything inside the loop). You could still solve these issues by changing to zig zag
@darkorys80126 років тому
Yan Vidz well, the system's gotta figure it out by itself so they'd have to go thousands of generations until they get to zigzag probably
@nikhilwardrobe6 років тому
they loop because thats the local minimum of their generation.
@romanortega13365 років тому
As a caveman, I can say this is exactly how we evolved
@phoenixyt1245 років тому
0:01 a legend was born...
@hockysa5 років тому
thanks for video that was much more entertaining than I thought it would be
@angelob23836 років тому
I noticed it likes to go in a counter-clockwise motion and it after about a few seconds it heads for the food...just an observation I'm sure everyone notices
@colonelcrockett22506 років тому
This is low key terrifying.... it’s literally the equivalent of evolution in species. Certain traits are remembered and some aren’t. Each generation has a better chance of survival than the last. Once it gets stuck in a spin and doesn’t eat it starves. Takes a few generations to learn this and then it fixes it and guess what it lives. Anyone see where I’m going with this? I have chills.
@TracksWithDax6 років тому
At the same time, it also picks up and passes on some odds strategies and maybe even "bad habits" that aren't necessary/efficient for survival - e.g., moving all the way back to the top-left each time after it gets food. Unless that's considered "home", that and energy time wasted, isn't it
@lforloser72106 років тому
Dave The Brassman yeah and sometimes when they are moving in a straight line they will just move left to right constantly.
@bonnypiggov25766 років тому
Such a sad ending ;( ;( And the music really contributed to the sadness :D :D Great video, great AI!
@skittybug69373 роки тому
I'm proud to have found CB upon this video's release, and I'm glad I've been with him for all this time.
@thenasiudk13375 років тому
This A.I used in Android at Detroit Become Human
@poofyhairguy62242 роки тому
I remember watching these videos. I never realized it was code bullet.
@King-Julien5 років тому
wow i started to wach this after 2017 christmas day... and then on... i went on your 1,000 subed channel EVERY DAY! and.. no video... so i gave up... untill now..... i see what sucses you have acomplished!
@patrickhache96405 років тому
Wow goes to show the power of algorithm. Makes me question my own consciousness. What a cool video!
@yellowblue92615 років тому
AI learns to play Red Redemption 2
@wimpywater5 років тому
Woah slow down, AI's not that advanced yet. I saw, give it till about some time next year
@qwerasdfhjkio5 років тому
@@wimpywater it's just a joke...
@TweekLudwig5 років тому
During generation 25, the AI had realized his purpose--to make the snake overeat to it's death--Unfortunately for the AI, the snake had gained sentience after eating 108 apples, and it killed itself by slithering right into the wall, instead of left..
@mare46026 років тому
i wanted to try and do it myself, so without looking at your code i made my version in p5.js and after that i looked at your code. it turns out you also used processing and the code looks almost identical. cheers man (yours is better tho)
@brownfox6516 років тому
For a moment I was hypnotized. The music + following the snake as it extends
@tumbke5 років тому
Man im so used to your voice i miss it in ur old vids
@AsianGlow6 років тому
I've finally marstered spelling. Now where's my food?
@imperialwatch3805 років тому
Obviously a troll account, Asians are incapable of spelling mistakes.
@rickyanderson8305 років тому
It should have been: I’ve finally mastered spelling, where is my food?... Notice the coma.
@firstlast79945 років тому
He spelled mastered wrong. You are all dumb.
@tanushri56675 років тому
Um.. R/whooosh
@IngwiePhoenix5 років тому
This is surreal. I know this game back when Nokia phones were super popular...and seing it broken apart by an AI like this is mindbreaking :O Great job man!
@KoenBlank5 років тому
At level 30 or 40 my cat suddenly got obsessed by my phone. Took me a few seconds to realize. That said, you have come a long way with your videos. I like the talking, keep it up, keep leaning how to train an AI.
@crykrafter6 років тому
what algorithm you use to train it and how long does it took for each generation? I wondered because I need much more computing time with non gpu programs and as you said you are using java
@currrrrry6 років тому
He used Processing. It is a java-based language. Look in the discription for the github link.
@jetison3336 років тому
I bet it would be useful for the snake to give it some sort of memory, like some LTSM neurons or have some ouputs that loop back as inputs or the like.
@CodeBullet6 років тому
Yeah I thought the same thing, I don't know much about LTSMs but i did try using a RNN. This however didn't really work, the snakes just wouldn't evolve. I think complicated structures like LTSMs and RNNs don't work well with the genetic algorithm, they are more suited to training through back propagation.
@jetison3336 років тому
Code Bullet your probably right, I haven't actually played with a neural get before XD. Are you planning on posting more videos? I'll definitely watch whatever you post?
@SimonK916 років тому
I guess you mean LSTM (Long-Short Term Memory). And recurrent layers are not necessary since each state is independent from the previous state. You don't need to keep track of where you came from to decide what to do next. Both LSTM and RNN are for that.CNN would be more suitable, although considering the simplicity of the problem I'd say that's an overkill. While doing my thesis I struggled with defining the training function and input the most, thats the most important. If you want to limit the snakes knowledge you probably have to use an lstm net, for example use the lstm as a memory of where its been, then give the snake limited input, like only a forward looking ray with some angle and range, limit the snake's decision to one of three (turn left, no turn, turn right, followed by a move in that direction) and basically increase the problem complexity
@jetison3336 років тому
Simon Keisala the reason I said that, was mostly so it could remember where the food is after seeing it, because it can't see the whole map at once. And yes I did mean LSTM oops!
@rawpotato17678 місяців тому
It’s interesting to see how later on, all of the generations seemed to prefer going counter clockwise
@zeus3110816 років тому
Well made! That was so cool!
@DejiAdegbite3 роки тому
Hint: The snake is a Python.
@Silverdev24823 роки тому
lol
@Naokarma2 роки тому
The funniest part about this to me is how allergic Code Bullet was to Python
@Horny_Fruit_Flies6 років тому
Any reason why it would consistently choose to move counter clockwise?
@JandCanO5 років тому
That's what it found keeps it alive. I bet it would have just a high a chance to go the other way, but whatever works, it's going to stick to it
@GaryLuKOTH4 роки тому
Slowly getting more satisfying.
@aristoparqui2 роки тому
This is so incredibly satisfying to watch.
@Yt_user116 років тому
This is astonishing how a computer has the ability to teach itself how play a game and compute these algorithms like that!
@nickclute6 років тому
Music was perfect, was it actually timed up to the movement or was that a trick of the mind that creates patterns where there is none?
@jimothyjimothy16 років тому
Nick Clute Definitely the seeing patterns where there is none because there are tons of times where it doesn't match up
@souravmandal75276 років тому
Shepherds tune like Nolan used in dunkirt!
@Fewnity5 років тому
What is the name of current video music?
@Calmputer4 роки тому
Dude, you gave the worm anxiety. "Aaah I'm about to get the red dot! No, No, No, I'm not ready for this responsibility!"
@TheRandomMan2105 років тому
this is so cool and inspiring! thank you
@danielc42395 років тому
distace.
@fury66885 років тому
Me too buddy. Me too.
@VonBlade5 років тому
You can tell he's a coder because the distace error on one slide is copy pasted to the next slide. If you want to find the fastest way to do something, get a lazy man to work it out.
@dustorm50122 роки тому
And thus started an endless cycle of pain called, "coding"
@felixmerz62295 років тому
2:26 "why" Man, that's exactly it. I'm currently training a neural network with evolving topology to play a small game I've made and sometimes I feel like it's evolving to play tricks on me rather than to play the game. Sometimes I get generations who are perfectly fine for thousands of ticks (eight ticks are one "round" of the game) and suddenly go completely crazy - or worse, they do fine for dozens of iterations, scoring top 1% and suddenly in the next iteration they go lowest 10%. I always try to think I'm just not giving them the data they would need to know or that my rating algorithms are off, but sometimes it's hard, sometimes I get metaphysical on it and think they try to outsmart me.
@martianpudding95225 років тому
I've been taking a university course on AI (exams are next week, wish me luck) and I just love watching an AI learn something. One assignment had us implementing some learning algorithm (maybe q learning, unsure and too lazy to check) and had us test it out on an application that had just a box with one single joined leg on it that had to learn to walk as fast as possible and it was just so much fun to watch the little thing try to crawl.
@danielsebastian12956 років тому
it seems like you only had one snake per generation or am i'm wrong? if so just wondering how did you 'train' the neural network going from one generation to the next?
@CodeBullet6 років тому
I actually had about 1000 snakes per each generation but I only showed the best snake
@afkaralp6 років тому
Must have been a ton of work
@CodeBullet6 років тому
Yeah most of the time went into tuning all the different hyper parameters, like learning rate, generation size and the fitness function
@misterg3tr3kt116 років тому
Code Bullet how is the fitness calculated?
@lukegodfrey11036 років тому
Code Bullet What parameter values did you end up using? I’m making something similar and having issues with getting the right hyper parameters.
@ASA-ux7cg5 років тому
“Playing it safe” is putting it *VERY* loosely.
@Leonfreedom5 років тому
Great video, have been using Genetic Algorithm for TSP, feels like applying it on simple game!
@oraingt5500Рік тому
Feels good to see past memories once again
@santiagojuarez12893 роки тому
I feel like from minute 5:22 to 5:28 the music gets synced with the snake getting the apple
@andreimuresanu16786 років тому
Hey, how did you get past the fact that if the snake is moving right it cannot go in the left direction? Did you just have it die?
@CodeBullet6 років тому
Yeah I had them die. I did this in hopes that it would encourage them to avoid their own bodies
@andreimuresanu16786 років тому
Smart.
@ankk985 років тому
You can also add an input for the time it takes or distance it travels before reaching the target and multiply it with its score and use deep reinforcement learning. You can also add a timer, which will stop the game if it runs into a loop.
@0xEmmy5 років тому
I just realized, I completed a personal snake game (no AI, yet) yesterday-ish, and it uses the same exact color scheme you did!
@NathanHiggers696 років тому
how can i set this as my screensaver?
@sizor3ds6 років тому
Craptastic idk man, I wouldn't want a learning algorithm playing a video game as my screensaver. What happens when your screensaver becomes self aware amd tries to kill you??? 😂😂
@NathanHiggers696 років тому
Millad Bahrami o Fuk
@Lagger6255 років тому
You can set webpages as screensavers with wallpaper engine, if this runs on javascript in the browser it would be possible
@grzelox6 років тому
its any chance to see your code and play with it? another words: do you want to share it or keep it for you?
@matthewholmes45426 років тому
.
@310iq66 років тому
This reply is just here so I get a notification if they respond
@lorenzobianco43506 років тому
John Doe ahaha
@bjornsundin58206 років тому
you can play with my code :^) bjornsundin.com/projects/neural-networks-evolving-to-play-snake/index.html
@grzelox6 років тому
thanks a lot : )
@gregsmith86175 років тому
Great presentation there, thanks!
@michaelbrooks67135 років тому
Great code example, thanks so much.
@doggo2066 років тому
Only 25 generations?
@future_phonk6 років тому
The movement of the snake looks so organic and cell like!
@j.214 місяці тому
first video i watched for this channel. very nostalgic now
@ajayhegde27965 років тому
Mark My Words "AI IS THE FUTURE"
@turd_iii6 років тому
MS Paint on steroids.
@BiohazardP4 роки тому
It's the Coronavirus quarantine so I'm rewatching all of Evan's old videos.
@tristand91295 років тому
I wish u had explained the "boring stuff" cause I know barely nothing about deep learning but ur example seems to be a good first step