🖥️ FINISHING MY FIRST MACHINE LEARNING GAME! (3/4)
ฝัง
- เผยแพร่เมื่อ 8 ก.พ. 2025
- Enjoyed the Run Forrest Project? Check out this Run Forrest Poster! It is the perfect memorabilia to remember the great times! shop.youvebeen...
This is it! We finally put Forrest to the test to see if he can become the any course running master, can his Neural Network brain do it???
PATREON: / jabrils
I am sorry about the audio error, read pinned comment for full story, here is an alternate version: • Video
If you haven't yet watched part 2 here's the link: • WRITING MY FIRST MACHI...
Please follow me on social networks:
twitter: sefdstuff.com/t...
instagram: sefdstuff.com/i...
reddit: / sefdstuff
REMEMBER TO ALWAYS FEED YOUR CURIOSITY
#AI #MachineLearning #gamedev #Forrest #ForrestAI
9:10 Did the audio desync in the editing phase, since it is the same audioclip from the beginning of the video? :s Then it cuts to music mid-word at 11:48
20 days after upload someone claimed this video for music, TH-cam asked me if I wanted to let them remove it, I said yes so that I can keep the video monetized, but after they edited it, that is what it did. Now I am stuck without being able to revert back to the original with no TH-cam contacts to get help from. I've added an alternate upload here's the link: th-cam.com/video/Y80vJxly2Gs/w-d-xo.html. I'm sorry.
- Jabril
Ah, gotcha! It's ok, I was just confused and thought I was having a massive deja vu :D Great video nonetheless!
This has been my fear on my own videos as well. It's pretty strange how they chose to edit it, but good job making a fix. It might pay to hide this version and then make sure the other one is in the playlist or is linked to from episode 2/4. Oh the headaches youTube creates.
I'm loving the content. Please keep making these.
same thought
Please add these slices to the Threelly SmartView Chrome extension. chrome.google.com/webstore/detail/threelly-smartview-for-yo/dfohlnjmjiipcppekkbhbabjbnikkibo/
Jabril your content is extremely high quality. You make computer science interesting to a guy like me, who doesn't know anything about it
hey! that's an honor. thanks for sharing that Jimmy.
- Jabril
@@IbrahimSharara1 LOL
you should make another ai to automatically build harder courses any time forest completes them.
I read somewhere in bible that this is how the end of the world begins
@@AceofSpadesss lmao yeah sure. I'd love to see that verse
@@dankmemes7658 the lord sayeth
I created man in my image with a biological neural networks
But he ate of the tree of knowlegde
Now hes gonna fuck it all up by programing ....... Me
@@dankmemes7658 lol spat out my coffee reading your reply :)
damn I was going to comment that xD
Far and away the best , most in-depth (and understandable to a layman enthusiast) insight into an ML programmer's thought process that I've seen on TH-cam. Thanks!
I absolutely loved this series. Thanks for making it buddy. I'm glad I'm not the only one who finds this topic fascinating.
Cheers for making this - it was a good watch! I've played with machine learning and haven't had the chance to delve into deep learning yet but this series helped visualise it better :) Keep up the good work!
Watching Forrest trying to run the different courses has been surprisingly mesmerizing. I'm gonna miss the little guy
😢😢😢 i promise im chopping onions.
- Jabril
I'm writing this out before watching the post-mortem, so forgive me if I'm saying things you already went over...
I think there are a couple reasons the results weren't as good as they could have been. First, it seems like the turn radius isn't sharp enough to turn around. So when Forrest runs up to a confusing intersection he hasn't seen before, there is no way to guess whether it goes left or right. He just has to pick one, and if it's a dead-end, that simulation loses because he won't be able to turn around. However, that simulation didn't lose because it's genetically unfit -- it only lost because it was genetically predisposed to guess left at the confusing intersection. This means the automatic assumption by the computer is that he was genetically unfit for any race in general, but really he was just guessing that the intersection turned left. In fact, that could have been the best Gump yet, but lost because he rolled the dice wrong.
Second, piggybacking off that first point, the A.I. may just be training by memorizing the track. Who knows if it's actually learning how to navigate new areas? All it knows is the specific track. Every time you train it on a new track, it is going to fail in the beginning and then have to readjust to the new track as it memorizes the new one and forgets the old.
Ideally, I think, the best way to train it would be to 1) Give it a sharp turn radius, and 2) Randomly generate a new track for every generation. That way, it has to rely on its ability to adapt 100% and not at all on its ability to remember tracks. Of course, then it would be hard to reward it properly for advancing in the track so 3) You'd have to give it an incentive for getting closer to the end goal... maybe draw an A* path to the end and make the distance inverse to the score.
Your Chanel got randonly suggested to me by youtube, and I was glad it was. Very entertaining to watch, and you did a vey good job at explaining the concepts behind the algorithms. A Well-deserve subscription!
Really cool short series here. What's quite awesome is thinking about about additional methods/ways that could have been implemented to complete and make it even more efficient.
For example, adding normals analysis onto the raycasts that determines the scores on the 5 directions. Getting the normals returns the directions from which the 3D faces (walls) are facing. That's, after all, the principle behind how we're able to follow a track ourselves : We see the distances and directions from restriction we're facing.
Even someone who's blind uses the same principle by using his ears to analyse the direction of hard surfaces and the echos. (sounds doesn't return the same if it bounce at 90 degrees off a surface or less.)
I think the random slice works best because it is not limited by the past results, and potentially adds new arguments that could totally work! I loved this video, you have gotten me excited about machine learning! I'm going to talk to my academic adviser about switching my major!
Wow, that race really had me on the edge of my seat!
Your level of mental energy is out of this world!! I have no words, I'm a fan now!!
Dude i am NOT able to do anything with programming, somehow i came across your channel, saw this series, and must say i really really like your way of doing this. Informative and funny. keep it up!
I greatly underestimated how entertaining this series would be, awesome! subscribed and know to check all your other content.
Just saw this series of videos on Machine learning. Very interesting and i'm enjoying them quite a bit. Just wanted to note that I think the Random % learning selection is actually the best way to mimic life.
At first I thought your videos were silly. I am a fan now. Subbed 100%. I hope you grow because you're super entertaining. Good luck!
Found this video (and your channel) from a tweet of another programming youtuber and I absolutely love it keep up the awesome work man!
sooooo good, I love how you set up these videos as entertaining and easy to follow along. heck honestly im not even doing this, but now i kinda want to. Im still going to watch the whole series today and i've subscribed. Thank you for peaking my interest again, this coming from a college student going for a Computer Science Degree.
lol it's actually strange to see him at the end of the video actually talking haha ... good job man, nice videos
Hey Jabrils,
Thank you for this great content. This is my fav channel now on :)
Just realized I couldn't see the comment option because window was too small XD. These vidz are so dope. Clarity, content, reasoning, animation, editing, acting, music choice, dragonball reference, and overall entertainment value are 100. Thanks.
I love your videos. First off, you get to the facts in a really fun an interesting way. Your have such a great character (no pun intended, Forrest), and overall your a really cool guy. I give you my subscribe.
This is genius work. Pure knowledge. You should be writing a paper on this for a game-dev conference!!!
Man I absolutely love this channel to bits!
BY FAR THE BEST IVE FOUND FOR GETTING INTO IT THE BEST
Definitely my new favorite channel. You're hilarious.
I believe that even if I were not already interested on the subject, I would be after watching you dude. Loved it!
When it comes to crossover, if crossover is performed on the whole population it will effectively make them all "the same species". Every time two networks with different strategies are mated, it is almost certainly going to result in failure (nonviable offspring), so the resulting "species" all work the same so their pieces are interchangeable with slight variation. That is highly consistent with what you are seeing. I see a lot more success in simulations I've ran when I allow speciation to happen if I am using crossover or if I allow species to have "crossover points" that allow them to crossover at some points if it matches with the one being mated with. However, in your case it seems that since there is just one solution to this problem that only one species was required anyways, so it made more sense to just make the whole population quickly be that.
I love this, thank you for sharing your knowledge and making such awsome content. This really motivates me to learn about machine learning.
Hey Jabril! Awesome videos man. Keep up the good work!
Way to call the election.
Dude honestly, if you don't continue to make educational videos, it will be a crime. You are amazing. Thank you
one likely reason for natures adaptation of the slice crossover is that nucleic acids aren't single input values, they come in triplets called codones that correspond with amino acids for protein building. Because of the length of polypeptides, switching a single nucleic acid could have monumental consequences, like accidentally making tons of stop codones which says to stop the polypeptide construction after tens of amino acids for proteins that would normally be hundreds or thousands long
also, an easy way to prevent loss of training progress is to make a clone of the best of each generation in the next generation, that way, if some special quality that made it particularly effective would otherwise be bred out in the next generation, it's preserved
I am super enjoying this. Awesome stuff! (I did a BSc in artificial intelligence 25 years ago - I wish I had cool tools like these to play with!)
lol the end segment is always so funny looking after watching you talk with your mouth closed all video
Just came across your channel. Have to say that you have an interesting style of editing. Keep up the great work!
I immediately thought of a GAN. Another network builds harder and harder courses for Forrest to try. That would be a super cool project.
Lately I wonder if my life is like that. Reality is presenting me more complex problems to solve.
Thank you universe for keeping me challenged !!!
Dude this series is amazing, would love to see some more stuff like this. also liked for ff7 music
WTF 1500?! Your channel is highly underrated. You get all of my views. Thank you for vids, I love 'em
Soooo could this be applied to my lawn mower so it'll cut my grass for me?!
yes it can. infact, if you get started on this i am sure millions of dollars are waiting for you haha. delete this post quick!
- Jabril
Sure, just remember to keep the door closed so it won't mow the ground floor of your house as well.
skolex but then it might go and mow everyone else's lawn too (for free). we can't have that
Ehh just put a tip jar on it...
hahaha I'm slightly concerned for the world that it took someone three weeks to think of the dog!
this man has the hand of god, I'm now blessed with machine learning.
Your style is so unique! I love it
you really inspire people to learn machine learning
6:44 dat explanation of random crossover function, lolol.
dont know if you mentioned it but an age old strategy to visit a labyrinth ( which i used in Wolfenstein ) is to go forth, keeping the right ( or left ) hand on the wall
"Take a second to let that register...." 😂😂😂 I’m weak
The link to part 2 in the description actually links to part 1. Also it would be nice if the description had the link to the next video. Or make video end cards, because TH-cam doesn't always recommend the next video and people are not always watching the playlist. That increases views and watch time and retention.
Dude, first time watching your youtube. Hilarious brother. Thank you 😂
really cool stuff thanks for sharing with us
Love your stuff bruv!
I love the progress that you made with this project. I have a few helpful suggestions that may work to help you. First, I think you would need to train Forest to run both ways. Second, you will have to store the information of what forest learnt (in a database of some type) from previous course that he ran so he can apply the knowledge that he learnt for his new course that he's about to run. Hope you see my logic.
See how you get around the whole decision making for random or precise functions is using your random function as a optimization side loader that runs a real-time micro SIM of the scenario going on using its top performing data and communicating it back to the precise function that operates the main character or scenario. And what you'll see in the graph is an exponential rise in performance basically you're giving me AI the ability to self-simulate and communicate the best data to the motor control function
This guys is a Damn Genius!
I love his way of speaking😍
Nature easily marries with your data suggesting processes with randomized values are the most efficient methods of learning. Consider that genetic mutation is practically random - it's not that a species will intelligently adapt to environmental factors, but rather those which develop advantageous traits due to random genetic mutations are more likely to survive and thus pass on the new characteristics. Conceptually it's near identical to your randomized processes recieving priority values, favoring efficient processes and passing the data to the next function.
It is interesting all the same that these processes would be so much more efficient when compared to processes that had intelligent guidance.
just found your channel, this is top quality content keep it up!
Cool video. Like your style. Really good content !!!!
Awesome series!
5:00 keep in mind also, nature has not necessarily produced the best possible system for evolving. It has created a system that has survived for a long time and (subjectively speaking) done pretty well for itself, but it is probably not the best method possible.
When you do crossover, you should have a random chance of mutating the output, as this does happen in nature, maybe with that it could beat the random splicing approach :)
That ff7 music though
had to do it :)
- Jabril
@@Jabrils that made me cry a bit
I am jealous of your brain. Well done!
This is the first time i hear about these stuff but i think if u put a timer on forest ghosts(i call them that) and reward the one who runs the course in less amount of time it can be trained better! i luv the way u make these Videos keep up to good work :) Peace
Also whos to say that slicing this away is used in nature? It doesn't actually matter which weights / biases are selected, because the weights and biases can be arranged any way you really want to.
Really enjoyed this series :)
6:53 I removed my upvote just to give it again.
Interesting. The random approach tests more possibilities because it sometimes just doesn't follow a particular form of logic...well besides the logic that dictates the generation of said randomness. That makes me wonder if different seeding methods for random number generation would have an impact.
Great video!
Just one comment about the graphs. Top fitness charts should have no dips, at no point in time we should lose fitness. In order to prevent this we usually use elitism which basically means that we carry on to the next generation an untouched copy of the most fit solution of the current generation. After that you can follow the same selection, corssover and mutation methods.
And finally I'd like to ask: What library do you use for machine learning + Unity?
Cheers and keep up the awesome content!
Geri I think he made it from scratch. The whole thing maths and all
His mutation method was flawed too, which is particularly evidenced in the "top two" methods. Instead of randomly mutating genes of existing thought processes he introduced 2 entirely random thought processes each day to counteract the potential staleness (ie local minimum problem) of the first 50. The problem with using this with "top two" method is there's virtually no chance the randomly generated processes will make it to the top two slots and thus no new genes will make it into the next generation via crossover. That results in the local minimum problems he's seeing. The random % methods counteract this by still giving a tiny chance the totally random processes will make it into the next generation despite their terrible fitness scores.
You are a programming savant!
Anyway, I wanted to say, this is why nature has parental units for the more complicated creatures. Imagine if you parented Forrest through the maze. Taught him how to traverse a maze. He would pick it up MUCH faster, and he might even be able to then teach/parent others. You wouldn't have to depend on all this "genetic algorithm," random-direction, brute-force ridiculousness. Nature relies on coaching. Why don't our AIs? Just a thought. ;-)
(Of course, this idea is seriously challenged by the fact that AI now beats us at Go and chess. Uh oh.)
In college i tried to design a little guy named Fredo, and his only task was to run around a town, pick up a block and carry it to the bloc bank in the middle, but during training for him, he got caught up in a loop that made him run in a circle 1 unit away from the block bank
edge of my seat! very entertaining.
First of all, very nice series, you got yourself one more sub! Some questions: I might have missed it, but did you apply any mutation to your genetic algo? If not, that might be why a riskier one is better, as in nature mutation is the way to get out of local minima.
Why only use one layer in your neural net? It would be interesting to compare performance of a few Forests with different number of layers.
Maybe the model is a bit harsh. Forest can only run left or right. If he also knew how to stop, but was rewarded for running a course fast, then I think he would do better. As it stands I think he can enter a dead end which he can't see the end of and thus have no chance to turn back, regardless how smart he is.
Once again, had a lot of fun watching the series, hope to see more game related ML!
"Nature just needed more time" Nature isn't going to get the blood vessels out of the way of my actual light receptors in my eyeballs!
I love this, I never thought of making a neural network AI for my game and now I am excited. You make it easy and fun to learn this hard topic and I appreciate it, sub for life. I look forward to more of your videos like this or programming in general. I may have missed it but what language are you using, C++, Python, C#. I dont watch the video completely before I comment just to give you a heads up so if this question is answered I will edit this comment. I am so excited, its crazy I never thought I would be this way about Neural Networks, I know you must think I am crazy but it was like BOOOM!!! my mind expanded and I saw so many things to do with this. Keep up the great work. I look forward again to more.
6:55 that is some risky stuff my friend, and I like that way of thinking
Hey, question. What would happen if you put logical bounds on the output of the neural network. Like if you're about to be too close to a wall to avoid a collision, override the output and turn to avoid the collision, then give control back to the ANN when you're out of harms way? A hybrid approach. Use the neural network for navigation, but have an emergency hard-logic fallback for imminent collisions?
Let me know what you think. Overall, great series. I subbed. Well worth watching, will recommend to friends.
I believe you said the random/probability method worked out the best with training. Did you try this method multiple times and was it typically the best? If so have you considered seeding a random generator to keep the data consistent and tested it against other seeded random generators to see how they compared. Very cool series and channel.
🎵This score though, you are awesome bro
I couldn’t complete that course that many times with out touching the walls damn, Go Forrest!!! Lol
I'd love to see Forrest run on a course that has some dead ends, and also some that have shortcuts 😊
Love your videos, found them today! Amazing editing work, i have been doing some movie and sfx work in school, but this is just amazing to watch! A bit inconsistent about politics though, and maybe a little over simplified. That last point might bring in more viewers, though.
What software do you use to animate your videos? p.s. this is a sick video series!
You explain it so much better damn !
I have a suggestion: voice synthesis. Like from the movie Her. You type in text and the Ai reads what you type. Basically, to improve the english of Forrest. Inputs can be length of time spent on different letters, number of syllables in each word, when to rise and lower tone, and minor tweaks based on if sentence is a question or statement.
u wanna take a look to mendel peas study... if u want to select an interesting property cross breeding 2 sets of peas you need to breed only the peas that actually have the desired property... so, in theory, u need to keep the values more similar from one set to another.
example :
0.3 0.8 0.1 0.3 0.5
0.4 0.8 0.4 0.9 0.5
rnd 0.8 rnd rnd 0.5
I really liked that part at the end where we got to see you move your mouth! I know its weird but it just feels so much better to see your mouth move than not..... :P great videos btw
Love this series. (and love the nod's to FF7) :) you are awesome.
Love these videos, man. Your explanations and sense of humor make this kind of information fun and easily digestible. What aren't fun and easily digestible are Whoppers. Dude. Whoppers are trash.
Keep it up!
FYI. I came to your channel through mark rober's!!
And I am glad:)
I'd like to try a tournament method. Take say 256 runs and mix genetics randomly from the top 16 for each generation with a small probability of mutation for each node. I'd like to try out a few more ray casts and see how that effects learning speed.
Could you change the probability method halfway through? If you start with the random one and get a long high then a big drop, could you take the series of high ranked numbers and use the slice on them?
Isn't a touch of randomness in the gene pool how the crossover method actually works in real life? I'm talking about DNA damaging/altering factors from outside of the reproductive process. Things like: cosmic ionizing radiation, and certain kinds of bacteria and viruses that can write changes into another organism's DNA, which sometimes get passed on to descendants. In fact, a much higher intensity version of this mechanism has been used to “genetically engineer” new strains of cultivated life, like plant crops.
I think that adding in some randomness to the crossover method is a good route to take, if you want to avoid stagnation. Although, I could have sworn you said in an earlier video that you were actually going to do this. Maybe you just left it to be implied in all future references to using the crossover method; depending on the viewers to remember the previous videos in the series. (Pretty reasonable to expect the viewers to remember stuff, I think, by the way.)
I don't like whoppers, but love this ml experiment. Thanks Jabrils!
It also might be worth noting that nature uses the Slice method as merges two strands of DNA together gene by gene, where most genes are hundreds/thousands of alleles long.
can't stop WATCHING!!!
This series is so awesome. Do you think I'd be able to implement a similar environment for my end of the year project to build a robot that can get through any cardboard maze?
stay very close to my channel over the next few weeks. I think I will be releasing just the product to help you achieve this :)
- Jabril
I am loving this forest machine learning series. By the way what resources did you use to learn ML. Have you completed any Andrew Ngs coursera courses?
Also have you considered making a healthy eating or fitness app? Taking a step towards combatting obesity with AI\ML sounds like a good project. I wonder if there is some data base of foods and their calories. If so than the app could be trained so when you take a picture it approximates calorie of food.
This is amazing!
We could get a best of both worlds in the crossover by using the random crossover function but then also including a clone of the best previous answer in the next generation. Essentially cheating evolution by preventing any loss in progress.