Hey guys its your friendly neighborhood code bullet here 1. sorry about the text size for those who are viewing it on a phone, that's my bad. I totally forgot that phones where a thing 2. I used processing to code this, which uses a simplified version of java. Its free and you can get it here: processing.org/download/ 3. I don't have a third thing but I feel like you need at least 3 things to talk about if you're going to list them like this
@Stella_Valentine6 жыл бұрын
please help prntscr.com/jhyh27
@UpcycleElectronics6 жыл бұрын
4. Will do an even more dumbed down version for people that see Java and think Starbucks? 5. While improving the audio mixing greatly since the last video, it has been brought to my attention that viewers have a volume setting ability, and while anyone can turn down the audio, no one can turn up the audio beyond the max setup added to the upload. :) Thanks for the upload -Jake
@lucaszhu55096 жыл бұрын
Press save
@aadithyavarma6 жыл бұрын
Thank you reading the comments. Waiting for more videos
@lucaszhu55096 жыл бұрын
Aadithya Varma did it work?
@bleeve94256 жыл бұрын
I love how the upper left tab is called “best tutorial ever”
@masternobody18964 жыл бұрын
yeah man best i did not feel boring
@jontedeakin19866 жыл бұрын
code bullet is my spirit animal
@attenbro86944 жыл бұрын
cock
@manindrademel57794 жыл бұрын
@@attenbro8694 no u
@mitchss4 жыл бұрын
@@manindrademel5779 no u
@multiarray23202 жыл бұрын
no u
@TofuRabbit6 жыл бұрын
Dude, this is so sick. Witnessing the dots in the last scenario go from randomly exploding all over the places to actually _learning_ how to navigate the maze and reach the goal was so fascinating.
@RohaanSaleem6 жыл бұрын
Because this is the first video where I've seen a complete tutorial, you literally blew my mind. I know what I'm going to be spending my summer learning about!
@ronikremer83486 жыл бұрын
Same man, I'm absolutely positive that this is what I'm going to be learning this summer:D
@PandoraMakesGames6 жыл бұрын
I've got some AI demos on my channel, is there any you would like to get explained in detail?
@jorenvangoethem3436 жыл бұрын
Daporan start with the easy ones so people can try to recreate it and after that you can start increasing difficulty, this keeps people interested bcs they can actually make it instead of just being blown away by how you made your most advanced AI
@PandoraMakesGames6 жыл бұрын
That sounds reasonable, but the ones I have on my channel right now are all way above beginner level. I might have to start on simpler things.
@klkev65116 жыл бұрын
how's the learning guys? made some cool machine learning script?
@soulreaper551234 жыл бұрын
"A small step towards the goal, means a larger step in that dots fitness score" sounds a lot like "one small step for man, and one great leap for mankind" and that's great 9:40
@jennahoekstra026 жыл бұрын
I think the reason the group in the final test is getting stuck on the obstacles so much is because being further through the course does not mean being closer to the goal. Therefore, there are very few dots that influence the fitness positively. I think.
@VictorLune6 жыл бұрын
Wiebe Hoekstra I think this too.
@bananaboy4896 жыл бұрын
I'd agree but to code a counter like that to correctly count being past specific obstacles would take more than the tutorial i believe (Have to create a zone that would give the dots some additional score if they reach a certain point, so the dots that reached the furthest zone, and being closest to the goal would be the parent dot). A simple 'Closest = best' would mean that eventually the random paths would get around just take longer.
@nelala_5 жыл бұрын
@@bananaboy489 he did that in his newest video, kinda cool to see you predict it
@Dron0085 жыл бұрын
@@nelala_ Could you give a link please? Cannot find it.
@arthurjakobsson70755 жыл бұрын
@Daniel Greenwood it is possible to change it rather simply. It is not the most elegant way to do it, but it functions. You can create an onObstacle boolean that turns on if the dot is attached to the obstacle. Then in the fitness function you can value the position of the dot lower if it is on the obstacle. The current fitness function is 1.0/(distance^2), and what I found was useful was that if it was attached the fitness would be 1.0/ (0.5*distance^3). Again, this is not the best way to do it, but in practice in his code it seemed to work.
@matt_vince6 жыл бұрын
This channel is awesome. I am a first year ICT student myself and this has shown me some actual fun applications of AI. So much better than lectures...
@n8guy4 жыл бұрын
Great tutorial - really helpful. I found it interesting that once you added obstacles, the fitness function didn't have to be updated to account for the positions of those obstacles. Enough random mutation, and the goal ends up getting met anyway. At the cost of many, many dead, mutated babies.
@TotoRo-mi9xb Жыл бұрын
The fact that I m a french guy in medicine studies and still understand an english video about AI made years ago makes you the best teacher in this world 😂
@KejaniGamer237 ай бұрын
I know this is an older video, so I don't expect a response with any speed, but if anyone out there knows how to properly implement a "Goal" and "Obstacles" class to the program without null pointer exceptions, I would appreciate the help. Thanks folks! And, btw, thank you CB for the tutorial! Yours is one of the simplest, most enjoyable to follow I've found on the GA.
@anyere39145 жыл бұрын
Thank you! I'd personally very appreciate more stuff like this. I understand tutorials will always have less views than videos showing just the result, but as a IT student I am very grateful for every interesting studying source and this is great. Feels great to actually learn something while having a good time :D
@D_Quinn6 жыл бұрын
There we go, I see you read the music complaint. Nice. Also, nice vid, love it!
@huntdog7776 жыл бұрын
Holy crap, i love this video. I understand almost nothing about the programming part of this. but now i need to go back through your videos and see if i can grasp what you are doing from the beginning.
@johnpaullopez8526 жыл бұрын
I’m a college student that has a thesis about AI this helps me A LOT how I wish we can get a deeper discussion of what is happening
@brandonservis97916 жыл бұрын
It took me 5 minutes and 30 seconds to realize that coding tab said "best tutorial ever"! IM LITERALLY CRYING RIGHT NOW! (well, not really, but you get the point)
@DarkxPunk6 жыл бұрын
Ive read about and watched stuff about genetic learning with AI, but seeing it coded out shows how simple it really is.
@JonJamesGordon6 жыл бұрын
I love the sped-up typing combined with a real-time voice overdub. Please keep that up. Similar code videos are painful to watch when typed out in real-time, which force me to choose between sitting through every laborious key-press OR listening to a mile-per-minute commentary when I speed up the whole video.
@moofymoo6 жыл бұрын
if (generation > 10) { // add monuments to dots that died in process as obstacles! ... }
@dool8896 жыл бұрын
I've been interested in AI for a long time. Mostly got to use state machines and such. Machine learning has always been an interest. Seems fairly simple and fun the way you put it. Great job.
@lumi76102 ай бұрын
AMAZING, halfway watching the video and i already got more than what other video thought me about
@wipoulou6 жыл бұрын
Hey, I coded along the whole thing and I absolutely loved it. There is just one thing, when you select the "bestDot", you start for for loop at i=1 (in natural selection), which means that regardless of the performance of dots[0], he won't have a say in the evolution :( So basically I just swapped him with the best dot, so he doesn't get to get represented twice (once unchanged and once mutated) over dots[0]. I really love your channel, I was actually disappointed you just started because I wanted to binge watch more content but damn I love your voice, the theme and the humor! Definitely keep it up!
@CivilF116 жыл бұрын
The purpose of the best dot was to remain unchanged. The the first slot in new list will always be the best dot from the previous generation. But the best dot still can be used as a parent, as during the gimmeBaby() function, that's where the parent is selected, which most certainly includes the best dot. Starting the for loop at i=1 prevents the best dot from being overwritten by a candidate with more then likely less potential.
@wipoulou6 жыл бұрын
I understood that, but you place the "best dot" in the first spot, overwriting* the dot that was in its place. It's really a tiny detail considering the sample size of the generation, but it's just something I was thinking while coding along.
@CivilF116 жыл бұрын
Well it's a new generation, before it's populated, so it doesn't overwrite any existing dots. But if what you're saying that the sample size is only 999 and not a true 1000, then I see what you mean. You can always increase the sample size by 1 anyways, but yeah considering sample size it doesn't really matter. It's far better for the best dot to be there than for it to not.
@philrod16 жыл бұрын
My lord! I think this is the first useful and interesting application of a GA I've seen. I may need to steal it for an AI practical. Cheers!
@toshb13846 жыл бұрын
This is freaking amazing. There's something I love about these videos that Daniel shiffman doesn't have. But both of you are AWESOME
@ChaijiArchive6 жыл бұрын
Man, this is definitely something I've wanted to know how to do for ages, and you explain it so its easy to understand. :D
@aidanfilby88246 жыл бұрын
Planning to go to university to study computer science. These videos are great. I'm actually surprised how well I could follow this.
@mementomori55806 жыл бұрын
Tip for future code examples: Zoom in the code. You have like 50% white space on the right side. So you can simply zoom in. That way more space horizontally is used and we can better see and read the code. Other than that, good work for your first tutorial :)
@zebuloncourville59976 жыл бұрын
I started watching your videos recently, and you've got a pretty sick channel. I have been wanting to learn to code for a long ass time, but I didn't have the motivation to get into it until I started watching your stuff. I'll be supporting you on Patreon. Keep on truckin'
@sanketmathur30726 жыл бұрын
Please keep posting such videos I want to learn AI in the future and it would be really great if I know what I am gonna counter.
@dandanthedandan75586 жыл бұрын
Sanket Mathur Better start learning now since the future need good programmers
@PandoraMakesGames6 жыл бұрын
I've got some AI demos on my channel, is there any you would like to get explained in detail?
@sanketmathur30726 жыл бұрын
DANDAN THE DANDAN I understand, that's why I am searching for such tutorials...I cannot balance some kind of course on it right now with my studies (12th grade) but will surely do after I finish it. Thank you for your consideration.
@sanketmathur30726 жыл бұрын
Daporan I will surely check them out, thank you.
@PandoraMakesGames6 жыл бұрын
What did you think about it?
@Aycion6 жыл бұрын
Hey I love your videos, this one got me started down the hole that is AI lol. I do think it's important to note that what you use as your genetic algorithm is actually the Local Beam Search algorithm. It's very close to GA (LBS is the base algorithm), but the one-parent reproduction makes it LBS; a genetic algorithm requires two parents while LBS uses just one. Also to anyone with questions about the name: yeah it's called search, but the application of search algorithms goes well beyond a literal search. Anyway thanks again, you inspired me to get serious and start taking AI and ML classes to prep for a career and I'm infinitely grateful!
@JakovLSSJ46 жыл бұрын
This is one of the best programming videos ive seen in my life
@Tinkerer_Red4 жыл бұрын
thank you for explaining how genetic algorithms adapt behavior, most everything i see online says you copy the brain then just mutate but finding a mean value for each neuron then mutating makes way more sense, and can produce far less chaos at the start.
@elefant2135 жыл бұрын
I love how it feels so absolutely logical, hearing this, but before it didn't make any sense in my head. Thank you!
@antoinegiordano21256 жыл бұрын
Your tutorials are awesome and really interesting ! I think lot of people will get better understand deep learning with your videos. Thanks
@byroboy6 жыл бұрын
Hey, thanks for posting this video. I'm trying to re-skill into a more programming area and the series is really helping me to understand how machine learning works. It's been a few years since my RMIT Programming 2 course but I was able to follow along.
@paulcosma28236 жыл бұрын
even tho you rushed it a bit, you explained it pretty good. can't wait for the next one!
@the.starman6 жыл бұрын
BestTutorialEver, hm? XD
@tingao13046 жыл бұрын
Thanks so much!! Finally managed to do it! I never wrote a single line of code before, much less understand it! So straight forward and clear, thanks!
@aflyingchapati43956 жыл бұрын
Hey guys I tried out switching the mutation system to one that just changes the angle by a max of 90 degrees in either direction. We can see he said something about it but never applied it. Here, I replaced: float randomAngle = random(2*PI); directions[i] = PVector.fromAngle(randomAngle); with: directions[i].rotate(random((-2/PI),(2/PI))); In the following tests, the best dot did NOT auto-qualify and there were NO obstacles. I did this with the same fitness function as in the video. I recorded the fitness score for each gen, chose the best gen after 10 gens and averaged it out with the results from two other test. Without further ado, here are the results - Random angle replacer - 72.63024, 38.354485, 48.867863 - 53.284196 Random angle changer - 50.801018, 101.7492, 174.02943 - 108.85988267
@pattyt78936 жыл бұрын
WOW! Great tutorial! Reminds me of some programming projects i worked on at Uni. Want to get back into programming and want to learn how AIs are actually made so this is a great channel to follw for me 😁 keep up the awesome work!
@skadogg226 жыл бұрын
It's so satisfying to see the dots learning! Thank you!
@raymondbenjamins58846 жыл бұрын
That's actually a lot easier then I thought it'd be (well in these kind of small programs that is). Thanks for this! I'm definitly going to be playing around with this a bit.
@iliarad44166 жыл бұрын
Your videos are inspiring The amount of effort going inside these is amazing And it never gets boring to watch your videos because of the humor I just wanted to thank you . I really hope that you keep going
@saltA-saurus6 жыл бұрын
I'm not even going to pretend to understand. I just want to hear that amazing voice.
@knightrider6975 жыл бұрын
This is definitely the most entertaining tutorial I've ever seen.
@6nodder66 жыл бұрын
Idk what you’re talking about but it’s clear you’re pretty smart so good job!
@selareid6 жыл бұрын
Thanks for this tutorial dude, it has really helped me wrap my head around the gene mutation part.
@jackdavidson87086 жыл бұрын
This was great, thank you so much! This is a great introduction to coding genetic algorithms and I know I learned a lot. This is a great starting point to build on on our own to create something new. Again, thank you
@emadyehya64476 жыл бұрын
I was holding off on subscribing as, while I like the content, it was more fun than informative esp because the source code was almost never included. This made me change my mind. Cheers, mate!
@danielboyer42466 жыл бұрын
source code is provided on almost any project he does. github.com/Code-Bullet
@emadyehya64476 жыл бұрын
I've only watched a few of his vids and in most of those his source code is not linked to in the description. My bad for not being more proactive! That being said I did watch a few more and I did find his source code for most linked, so I might be wrong.
@ZSORGAMING6 жыл бұрын
Really good tutorial, subscribed when i saw some of you ai learns videos and I'm really glad to see you doing proper coding tutorials, they are very scarce and most just talk about high level abstractions, or are tutorials in how to use machine learning libraries
@sk1789_6 жыл бұрын
Please do more of these for more complicated games! This was awesome thanks!
@VijayGupta-ny5lz6 жыл бұрын
Thanks Code Bullet. This is an interesting program. I made a variation in this, in which on click of button the Goal point changes and next generation has to go for that new goal and you find very interesting patterns, gives comparison to how our wired mind and memories from past work. Tow small changes you need to do, first is on click of mouse, change the Goal coordinates, second reset the minstep variable in Polulation.SetBestBot in else block of reached goal statement.
@arronalt6 жыл бұрын
Thanks for the tutorial CB, it's actually pretty hard to find one that actually is useful and explain
@daltonmcghghy92156 жыл бұрын
I envy your typing speed and lack of errors, i still have a way to come to get anywhere near that speed and skill
@PhilipStubbs6 жыл бұрын
I think I understood what you said. Going to play with the code now. Looking forward to learning about neural nets. Thank you.
@jackmoroney37856 жыл бұрын
in 14 minutes i will update to say that this video was fucking amazing| Edit: Fucking good job mate
@melongoggles83856 жыл бұрын
I have been looking for something like this for so long. a couple months ago one of your videos just popped up on my recommended about snake ai I have been following your videos ever since Xd. im a programmer myself too (not that good) and i really wanted to look into neural networks so thanks a bunch dude! keep ik up :)
@JazzyP1416 жыл бұрын
Awesome video, I've been programming for years but have never tried anything AI. It's a lot simpler than I imagined, though I guess this was a simple example. Thanks for the video, I'm going to give this a try myself!
@robertludwikowski20385 жыл бұрын
Best Video to start with machine learning. Im glad i found You Code Bullet. I Appreciate Your work :D
@claytonharting98996 жыл бұрын
Hey Code Bullet! Thank you so much for this tutorial, it really helped me learn both Processing and genetic algorithms, both things I've really been wanting to learn. This is the best tutorial I've found for genetic algorithms. I'd love to see that fourth video you mentioned, the one about combining neural networks with genetic algorithms. There's already a lot of content on how a vanilla neural network works (which isn't to say yours wouldn't be good), but I haven't found any on evolving neural networks, which sounds and looks sooooooo cool. Thanks again, and awesome video!
@minxrod6 жыл бұрын
Watching the dots successfully navigate is so satisfying but watching them 'splat' against the wall is funnier. :P
@joshc-w63206 жыл бұрын
This is excellent man, I actually understand a lot more about genetic algorithms and their awesome.
@EKbnc6 жыл бұрын
That is actually one of the best tutorials ive seen
@daslii6 жыл бұрын
Amazing !! I learned a lot !! please keep this level of explanation (explaining the code structure but not the actual code) Thank you
@spencer18806 жыл бұрын
Really awesome video, And something I don't know you realized you did was create a few different exercises for your viewers who might play around with the source you released by recommending best practices like implementing a class for obstacles and what have you.
@BekeroParyin6 жыл бұрын
I wonder if some greater being watched a tutorial like this before they created all life in our universe
@201iq86 жыл бұрын
maybe thats wy im so dumb
@DutchRatedGamers6 жыл бұрын
Uhm, paradox. That greater being cannot watch this because it didn't create the universe which means this video didn't exists.
@thehiddenninja34285 жыл бұрын
@@DutchRatedGamers "watched a tutorial _like_ this" A video of a similar topic
@greatgamegal81936 жыл бұрын
Thank you so bloody much for this m8, I watched it, then followed along while watching it again (Except I made classes for the obstacles and goal) this was a very helpful video! Edit: I noticed a flaw in the algorithm sort of, it will always create copies of the best from the previous generation because it starts looking for a parent at slot 0 and in slot 0 is the best from the previous generation which will pass the check, this destroys genetic diversity which makes it so the dots can more easily get stuck in a rut.
@ObjectivistApe8 ай бұрын
I followed along at home but what I really want is a tutorial for Unity AI, and samrter AI (Neural network as opposed to just repeating exactly the same steps with a small mutation but taking a set of inputs to adapt intelligently).
@SpaghettiEnterprises6 жыл бұрын
This was awesome! I loved to see you actually implement the concepts
@scragar5 жыл бұрын
I love how once you added obstacles you started seeing local maximums, routes that got a higher score(because they dove right into the barrier) than ones which made it further if you consider the required path(going around the obstacles was more moves and involved moving further way temporarily to pass the barrier). You should do something to explain how you deal with that when you get stuck with it happening and preventing the AI from ever getting better at the challenge over all(like if you wound up with bad luck and the most successful for a few generations just dove right into the barrier, the mutations required to move around it would then always have horrible scores and thus be selected against even though they're the only way for the AI to ever reach the goal and achieve higher overall scores). I know some out of the box solutions solve this by forcing completely untrained random entries into each generation and ensuring the best of those untrained entries has at least one child in the next generation(so if they do something that stumbles across something that'll beat a local maxima it has a good chance of surviving), but that doesn't sound like a great solution.
@simeon23966 жыл бұрын
This tutorial was amazing!!! Nicely explained! And pleeeease make sure to post a tutorial about NEAT in the future
@jetpack75366 жыл бұрын
Nice video, it was surprisingly easy to understand even if i dont know anything about programming languages exept a little bit of C
@danielboyer42466 жыл бұрын
This is awesome, I can't wait for a NEAT example. I am currently using your Template on Github to try and teach myself.
@blakmajika80976 жыл бұрын
Can we get a video where you have two snakes on the same run? They'll fight over the food but if they run into each other, they die. Like tron?
@PandoraMakesGames6 жыл бұрын
Haha, not sure how it's possible, but I just made a video on that. They don't fight for food though (yet).
@CavemanNo.126 жыл бұрын
@DanixTheGreatSchool are you factoring in "asexuality?" 1 parent instead of 2?
@alexladwig73316 жыл бұрын
Great! I learnt *alot* (I literally know nothing about coding, I have no idea why I'm here)
@Vermillionns6 жыл бұрын
From far your best video! I hope to see more like this one in the future!
@Smaxzii5 жыл бұрын
I always thought AI was some crazy sciencefiction shit, but this makes it seem quite straightforward or at least understandable.
@kaushilkundalia21975 жыл бұрын
One of the most lit videos on GAs
@FirstLast-gk6lg5 жыл бұрын
Your videos are interesting, but honestly I am trying to learn how to code and your videos mainly serve as inspiration for me to keep going even though coding feels like rubbing salt in my eyes lol i love this machine learning AI stuff and desperately want to be involved in it's development. Gotta just grind out this self study education
@ghostrunners255 жыл бұрын
This was really helpful:) , I’ve been wanting to learn this for a long time. i followed along with your video and was able to make this in java. This was really useful, i love your videos
@fxncy49375 жыл бұрын
Code Bullet: Speaks Greek And Roman Also Code Bullet: Simple Stuff Me: IN CONFUSION
@Andy-lr1gx6 жыл бұрын
This is the coolest tutorial I ever seen in youtube 😂
@JackSanRio6 жыл бұрын
Cool guy with badass tutorial what else a KZbin video need
@notphoenixx1084 жыл бұрын
First was so basic and this is actually like a really good tutorial
@joelbaumann74156 жыл бұрын
Thanks for The Tutorial it was realy helpful and i learned alot building it after your example. good work i would like to see more coded tutorial in the future
@spacewad87456 жыл бұрын
please increase the font size mate, I can hardly see anything.
@pierregabory87726 жыл бұрын
Watching coding tutorials on a phone? :D
@diegoaugusto15616 жыл бұрын
It's just wrong to wacth coding tutorials on a phone :3
@Danacus6 жыл бұрын
Diego Castro Why?
@notkamara6 жыл бұрын
Because then, you're most likely not coding along but hey, whatever suits you.
@kimaji6 жыл бұрын
bigger screen xq
@bensolomons42996 жыл бұрын
This is really cool! Would love more similar tutorials to give more examples!
@sined7046 жыл бұрын
I appreciate your videos from snake to dinausore. Thanks a lot for that tutorial :) Waiting for the neat tutorial ;) Love & gratitude.
@lionel44504 жыл бұрын
Wow that's the best AI tutorial I've ever seen...
@MichaelF696 жыл бұрын
Heres one that might be challenging. Teach an AI how to drive in a car simulator. Teach it to stay in the lines and stop at red lights, etc. Also speed limits. Would be fun to see! :D
@freselikxd96376 жыл бұрын
Thanks for making this type of videos i've started learning C++ because your vids inspired me sorry for bad english :p
@nickl21076 жыл бұрын
for anyone following along with him, in 2:50 he cuts out the bit where he changes test.move() in the first tab of the code, to move.update(). otherwise the dot doesn't die.
@Bot-wt7mm Жыл бұрын
Thanks
@Bot-wt7mm Жыл бұрын
And it is test.update()
@LorddirtGaming6 жыл бұрын
Amazing tutorial. Finished watching, now I’m going to make it.
@RobinWasAlreadyTaken6 жыл бұрын
God Bless you. You just gave me everything that I needed to know to get better at Programming in just 15 minutes. You are a beautifull gift for the World. ^^
@masonengland3062 жыл бұрын
I wish there were more coded tutorials like this, I would really like a much slower and in depth version of this so that I can not only learn machine learning but also start to apply it. a lot of tutorials are mostly on data science and use libraries or frameworks so I don't really pick up on any of the fundamentals of the actual coded part. like I know the theory around it, I just don't know where to start coding my own AI for games
@antonioamaral4007 ай бұрын
It's a pity you have never finished this series... I was loving it and I really wish I could code NEAT or PPO in other "non-Python" languages. Oh well, a mystery it shall remain 😢
@maustrian856 жыл бұрын
Love your videos, just got into AI stuff and really like your explanation! Gotta try programming something like this myself...
@paraglide016 жыл бұрын
Thanks for sharing. Been playing around with processing some time and got stuck with mij "ants looking for food" program but this tutorial is great.
@rattan39226 жыл бұрын
Congratulations on 100k subscribers.
@_dekinci6 жыл бұрын
Firstly, this tutorial is great Secondly I really wanna see something like this about NEAT Thirdly, using distance to the point as a fitness function is not cool when you add obstacles. It can be seen in the last example with two barriers, that dots are moving towards the point (on the barrier) instead of going away from it to finally reach it