Neural network racing cars around a track
HTML-код
- Опубликовано: 28 авг 2024
- Teaching a neural network to drive a car. It's a simple network with a fixed number of hidden nodes (no NEAT), and no bias. Yet it manages to drive the cars fast and safe after just a few generations. Population is 650. The network evolves through random mutation (no cross-breeding). Fitness evaluation is currently done manually as explained in the video.
Car picture by Unlucky Studio:
unluckystudio.c...
Track background created by Keely for Quickrally and modified a bit:
/ screenshot_saturday_26...
Background music by Trevor Lentz:
opengameart.or...
Coding by Johan Eliasson in 2019.
Shoutout to that one car in first gen who went as far as it could in the other direction. You shall be remebered, rebel
yeah he should have been parented as well to get 2 sets of cars. Some that go left and some that go right. It would be a mix of the choices and eventually one would prevail. would be interesting
Yeah he was smart enough to see that it would be a trafficjam going the same way as the others.
you are right!
Or it's an anti-vaxxer
That one was probably my car
That one car that went backwords: "My goals are beyond your understanding"
That car has watched "Ready Player One"!
@@justus8675 lol
that car had a goal to cross finish line - and it did that first :)
It's speedrunner
3:02 "looks like gen 4 will finish a full lap!"
selected car: *rams into wall*
*unselects car immediately*
you have disappointed me, child
He choked.
blew a tire on the last turn.
That was pog’nt
@@Sifer2 He was paid off
this blows my holy mind
Jesus
Machines will find you jesus
ITS JESUS CHRIST
Don´t fuck with the Jesus!
@@e2U i see
Could you put the winner brain in a new, different track?
I would assume that yes. As long as the input remains the same and the output is enough to get through the course, then sure. Obviously it might couple of iterations to get used to new environment since as mentioned cars themselves know nothing other than input - output.
This would be how you test for overtraining on a neural network. It's the difference between learning to drive and learning the line through a single, specific track.
Came up with interesting examples on how similar test could fail:
- Widen the road. The goal is to make laps. Cars implemented here would just try to avoid death. If they could do the 360 in a width of the road, in few generations they would probably just start circling.
against some blue, yellow, green and purple cars? :3
Kinda depends on what he's actually doing internally. If he is training actual neural networks that are being trained to navigate based on wall distance... sure. But if he is deviating from what the video implies and the nets are really just remembering a set of mildly successful actions then no. We can assume from some of the interactions of the cars that he is actually training the network to "predict" (wrong term but that's fine for now) where it should turn based on the variables he gave them.
Evidence:
Turns being made without a generational gap. (implies conditional actions instead of instructions)
Cars continuing to make fairly obvious mistakes in each generation.
Randomized evolution causing occasional large leaps in the success of a generation.
There are some points against, but I suspect that the code runs almost exactly as he described. So the neural nets are trained to take the speed, direction, and nearest walls as data. And then run them through some basic (but i'm sure impressive) conditions that are randomized over time. Assuming the code runs in this way, then yes the cars would work along a different track.
TL;DR
Almost certainly, the cars would run but probably with a slight performance loss.
moral of the story is:
theres still gonna be alot of dumb people every generation even if their family head is a genius/successful
yea, but here they are only breeding the smart ones, real life is almost opposite.
@@IamR3D88 the dumb people fuck like rabbits yeah. Have you seen the movie idiocracy? its really a fun movie about this idea
@@kaiserhhaie841 the plebs are a need
The dumb is there to be taken advantage of.
@@RessG Conscientiousness and agreeableness are stronger correlates of societal and economic success than IQ. And conscientiousness is correlated directly with lower IQ. (:
IQ certainly matters to an extent that you can plan and foresee future outcomes I guess. But this only requires an IQ of "about average or a bit below" though. An IQ of 100 will be indistinguishable from an IQ of 120 or 140 if the latter is neurotic and schizoid or something. Past a certain point, IQ becomes detrimental to economic success, because once you control for IQ the only real effects to be seen are whether or not someone is able to compromise, make good arguments without being overly acerbic, and get along well with coworkers to not be passed up for promotion.
Also since people like diligent workers, conscientious high intellects are in extremely high demand, but remember that conscientiousness is negatively correlated with IQ (a small negative correlate) and the rest of the Big Five are questionable as to which way they swing.
People with higher-than-average (1 SD or more) IQs might make a bit more money but they're also more likely to fall for New Age cults like the Tesla Model S or Scientology, which reduces their effective lifetime earnings. This is natural and normal: there's no real reason to sit on money when it's being raked in unless you anticipate that changing in the future, and people with higher IQs tend to assume that present trends will continue (otoh saving back 6-8 months of pay is not hard for someone with a $70-150K USD job in Middle America).
Only if you compare between populations rather than within populations does it seem like IQ matters for lifetime earnings.
This is why the people who make the most money in their jobs (medical doctors, engineers, etc.) tend to be "around" a standard deviation or so of their population average. On one hand they're clearly clever enough to have a high-in-demand certification or license (medical board, professional engineer license) but they're also conscientious, and that will lower their IQ a wee bit (about 1/3rd a SD maybe? perhaps you need a certain level of conscientiousness to convert extra work hours to more money at a slightly less efficient rate) but because IQ is simply a coefficient of work by putting in another 3-4 hours on the job they don't actually lose money, they gain it.
For high IQ earners, i.e. professional licensed workers, having a conscientiousness rating a full SD higher than standard high IQ population leads to nearly half a million dollars in total earning income. For people who are both extroverted and conscientious, this is about a million extra bucks. Or about 1/3rd more lifetime income. Counter-intuitively, agreeable employees earn a bit less (about 8%) than aggressive ones, but only because they're not willing to go in and fight for a pay increase or negotiate hard. Of course the Ternan study did show that higher IQ (1 SD) than already high IQ does lead to an actual increase in earning, this is entirely eclipsed by being agreeable: a paltry 5% higher earnings over the Ternan study population lifetime incomes. Boo. I'd trade a standard deviation in IQ at around 155 for a standard deviation in conscientiousness if I could min-max my rolls, but that would be cheating the system since it isn't even equivalent: conscientiousness just wins.
Is being smart good? Yeah it's fine, depending on how much work the person is willing to do. I'd take someone with an IQ of 105 who actually does what I tell them to do over a guy with an IQ of 120 who puts in the minimum of effort; any day, any time.
So yes, dumb people exist to be exploited. Specifically by giving them jobs that they're good at and perform well in, which can be anything from machinist to electrical engineer or medical doctor, if we assume that "dumb" is defined as "within a standard deviation of average" or so.
Me: Alright, what's on the algorithm menu today?
RUclips: Car breeding
Me: Cool
@@googlexd7294 Sir this is a wendy's drive thru
thats a lot of new stuff I learned today btw
@@googlexd7294 but this video is just neuroevolution. it does not actually do any backpropagation. it just randomly modifies the neural network here and there and then copies it and then rinse and repeat so this video and youtubes ai are different? (please correct me if i am wrong)
@@googlexd7294yes. I think that the forward propagation (goinc through the network in the forward direction) is the same, but in the video the best ones are picked and then randomly mutated and rinse and repeat, but in youtubes algorithm it back propagates the error using fancy mathematical tricks so this network is kinda dumb in comparison, but then again in backward propagation you need the error. For example to make the video ai smarter you could define the output you want from if the car is pointing too left or too right and then back propagate with the actual output of a poorly trained network so that would make the ai more sophisticated, because then it wouldnt need to go through artificial evolution, but instead training. But i am by no means an expert so takr this with a grain of salt.
Edit: you sound like you are interested in ai. I highly advice you to look at 3blue1browns video series on neural networks, coding trains neural network videos and also check out www.neuralnetworksanddeeplearning.com .
@@googlexd7294 That was such an amazing description of the youtube algorithm; I had no idea it was so simple. I am however confused on whether the weighting is done using point differentials (and therefore uses the massey method) or whether the algorithm treats all variables equally (and therefore uses the colley method). I would assume that the variables: liking, commenting, time spent watching, and all the numerous data collection points are all weighted in using point differentials because I would believe that some actions are more pertinent than others. That's my hunch, but would love to find out if somebody knows the answer
I cannot express how much i am laughing at this and i have no clue why lmfao
"Except for that top guy that figured out how to turn left..."
Achievement Unlocked: Pro NASCAR Driver.
NASCAR announcer: "He's making a left turn!"
Was laughing as fuck
At least they drive better than most players in a Forza lobby.
You have provoken a gang war
Probably rlly bad
first thing that came to my mind
big facts
wonder if you could train them to follow a proper racing line also
ah the machines are learning!
Now imagine o e million learning one thousand generations per second
I tought you was fake for a second
Yes. We arefz011jk011101001Fhkw/,,.dsd0 *ERROR* sdal+!'"glb.ú - system failure.
Reboot...
...
...
Yes. I agree with you my fellow human.
Lowkey kinda thought u were fake
With the help of a Conscious selector. Interesting.
Gen 200: The cars have have managed to enter the Industrial age.
Gen 1000: The cars have now created their own simulation of neural network cars.
Gen 12^100: ❄︎︎♒︎︎♏︎︎⍓︎︎🕯︎︎❖︎︎♏︎︎ ●︎︎♏︎︎♋︎︎❒︎︎■︎︎♏︎︎♎︎︎ ⧫︎♒︎♋︎⧫︎ ⬥︎♒︎♓︎♍︎♒︎ ⬧︎♒︎□︎◆︎●︎♎︎ ■︎♏︎❖︎♏︎❒︎ ♒︎♋︎❖︎♏︎ ♌︎♏︎♏︎■︎ ●︎♏︎♋︎❒︎■︎♏︎♎︎📬︎
Tis encrypted my boy, I wish thee luck if you desire the knowledge; with a forgiving hint of Lingo~
@@RasmodeusQ"They've learned that which *
should never have been learned." but in Wingdings font *'should' was mistyped
Still using carburettors, but managing to add forced induction ;)
The cars managed to create a racing line
Imagine using this to find perfect lines for actual races
That would end up like the car chase in Blues Brothers
You would need real-car physics such as traction, acceleration, deceleration, etc. I did something similar at Uni, optimising splines for the racing line. I never did get the physics right :(
@@philrod1 you could have a 3d physics engine and just use a template physics pack and just view it from above that would probably make the whole thing alot easier because its been done for 100s of games but i may be wrong I’ve only attempted to make basic games and never went anywhere because I didn’t enjoy it as much as I thought
@@philrod1 Is there any previous art on optimized splines for racing? I assume that's a solved problem (or at least we've figured out the system to optimize), right? Do you have any resources on that? It seems really interesting.
@@sunboy4224 - It was a while back I was working on this but I definitely remember reading a paper on a similar problem. I think they were using sections of spirals. But, yes. There's no reason this is not a solved problem, just that _I_ failed to solve it. It's only maths.
The track should have been re-generated for each generation to avoid overfitting. How the fittest cars perform on other tracks?
Thanks to your comment, I just learned what overfitting actually is :)
Wow had my ML exam today and no book could explain over fitting , yet this guy's one sentence made it clear as a crystal .
Thanks guy
Yes, it knows THIS track. It would be curious to see it on another. And ML means Machine Learning.
eh. overfitting wouldn't be a major issue in terms of tracks, rather the main overfitting problem here is can it perform with different acceleration/traction values.
It's not given perfect spatial information, which means it doesn't actually make decisions based on coordinates/list, but rather it takes in 5 distances and outputs. 5 distance and output sets that work don't vary much track by track, but rather by specific car specs. This is of course assuming the procedure given in the video is fully correct.
The neural network is merely taking in 5 distances to collision and computing what to do in the current situation. It is unlikely that it just makes a list, especially seen when cars don't complete laps in the same way each time.
I dont think it learns like that. I think it just saves the turns it took for the track and variates it slightly in time
Look at the bottom right. You can press K for a thanos snap!
@@bubbles7608 It says 'Kill half' though
Edit: This comment responds to a now deleted comment from 'Bubbles' who claimed pressing k would kill everything.
@@bubbles7608 (K)ill Half
@@bubbles7608 And why the F*ck would the snap only kill a half? Only because he wanted for it to be half... if he wanted to destroy everything it would be everything. thanos snap doesnt mean HALF
@@Riskomul wat
@@Riskomul r/woooosh
I just want to appreciate that this video came out in 2019 but looks like it's from 2009.
so?
@@zarrowthehorse it’s a good aesthetic
it looks better than GTA from 1999
Nice to see someone working on neural networks. I actually did a project exactly like this for my minor back in the day. I evaluated the genomes using 2 factors.
1. Checkpoints: as you've stated. This is annoying to make at first but it is a must to automate evaluation. The more the better.. Hand-picking is just not going to work in the long run haha.
2. Car damage: This one turned out to be very important as well to force the AI to drive acceptably. However i can see that your car just stops after crashing so this might not apply to you.
Also something worth pointing out is that if you want cars to genuinely learn how to drive a track, you should have them learn on multiple tracks. I was so surprised to see my cars drive my first track like pro's only to get destroyed in a new track. What I did to avoid overfitting was to teach my genomes how to drive on 1 track until they're somewhat capable. Then gradually introduce new tracks and evaluate the fitness of all tracks combined. This way, only genomes that adapted to various situations will be selected.
I tried something similar and trained on multiple tracks and then tested on different tracks that were not part of the training data.
There is a video on my channel ;)
I also ran into some overfitting "issues", but I assume this will go away if I use even more tracks for training or reduce the size of the neural network.
And I found a method to not have to do checkpoints, but generate a fitness value for each track pixel.
This is very interesting, but you should show also how well (or bad) they are doing when given a different track. By that you'll know if they learned how to ride that specific track, or they learned to drive any track.
the one in the begging that went backwards should have been another Parent representing that change and seeing if some ended up completing it backwards while some went forwards would be cool
Yes, always validate the network on new, unseen data
@@lyricallizard7817
The model thus far would be trash on a new track.
A new track will take a new network.
It will take thousands if not millions of novel tracks with subtle perturbations to complete a neural network capable of truly facing a novel track and succeeding.
@@MotesTV That's not correct. The ANN model is simply a link between the yellow radar inputs and the wheels outputs. The model is essentially "when my front radar and right radars are blocked, turn left, and visa versa." These models are very standard and easy to evolve with ANNs. If anything is overfitted, it will simply be generic features like the width of the track--it may have trouble on a much narrower track, for instance. But it ought to do well on a different track with similar features (width of the track etc.).
@@zamfent
I agree with most of what you said but that I'm "not correct."
For instance this track is very sinusoidal, what if the track were more angular, and the track narrower? What if such a concept as obstacles were introduced, causing networks which engaged in periodic swerving to facilitate "radar scanning" to become promoted?
I'm simply pointing out that if this were to begin to become a "throw everything you got at it" test, the model would need loads of work.
RUclips recommendation is the randomest thing in the world
but why on earth i click in..
Because neural networks are fucking awesome, that's why.
Because Google's neural net for recommendation calculated a high probability that you will click in.
am I influencing the neural networks or are the neural networks influencing me ? . . . .
You clicking on this reinforces the algorithm making the right choice :D
@@skop6321 yes
"FOLLOW MY PATH MY CHILD"
-the parents
And child be like nahh!
True also in real life.
Huh, after only four generations they drive better than the AI in Halo.
and better than the one's in this vid ruclips.net/video/oHg5SJYRHA0/видео.html
(i don't own the video btw)
@@CranyUnknown reeee
Funny, but that is exactly the amazement which is in this.
HALO AI is old. The AIs have improved a lot since then.
Back then you had to have around 100 Gens of AI until they manage the first round - and then you had to "teach" them go faster....
Better than a lot of people IRL....
@@Rabijeel halo doesnt use this kind of stuff lol its not AI its pre programmed by people
97% : I have to go faster!!
2% : I just wanna go back
1% : Paused.
"Victory cannot be achieved without sacrifice." - our boi Viktor Resnov straight outta Vorkuta.
Victory cannot be achieved if your opponent is Chuck Norris
@@lasstunsspielen8279 Well, Bruce Lee doesn't agree.
the real test would surely be deploying the evolved cars on a different race track
not very impressive idd
They would still have to learn the track and do the same process like in the video. As OP said, the cars don’t know they’re in a racetrack.
Except they are steering based on the inputs they receive - so it is not necessarily a case of them remembering the race track 'rote'. It's a question of whether they have 'learnt' or developed an algorithm which allows them to keep in the track as it twists and turns based on the set of inputs they are being given as they go round, and the way in which they respond to them. As you say, they don't know they are on a race track - just that they have a set of inputs.
It all depends on what the algorithm in each car is actually doing with the inputs, and to what extent getting around the track is actually blind luck.
@@radioactive.redwood
they wouldn't care what the track looked like. again the ai doesn't know it's driving something, it doesn't know it's on a track, it doesn't know anything but "does line 1-5 hit something?" if it does then adjust inputs.
there are exceptions, like if it hit a big open room it might get messed up but with a bit more training it could figure even that out.
@@rocksfire4390 The AI has to know some things. Collisions are bad, laps are good for example.
This is the first time I've seen this 5-line-method be used and it actually work! The main difference I see here is that you MANUALLY selected the best network, so it could be an issue with the fitness, and that you used random mutation instead of cross-breeding. Which is very interesting!
Congratulations, you did a great job!
After that training, how do they perform on a different circuit?
Very likely they don't perform any better than the first generations. It seems like the program is just given the 5 numbers for distance and spits out two other numbers that trace out a curve. What was selected was the algorithm that spits out a curve that fits the circuit.
@@lucasbruel It doesn't get any numbers for distance inside the curve or location inside the track. It recives distance to the edge of the track. So it could still work relatively well. It would likely manged to turn correctly, BUT, it might be unable to stay at an appropriate speed, because the correct speed might be highly dependent on the track.
It will perform nearly the same. You can see this, when the first generation was driving into new areas... they behaved like in earlier places.
I don't think so. It is like genetic algorithm to overfit only this circuit not a general driving
@@lucasbruel the networks are familliar with gentle and sharp turns in both directions, so they will handle that, but something like a separation or crossing would be new to them
That's an accurate way of teaching how our neural system is working to connect experiences with learning.
I absolutely love that in the first few generations they tried to go backwards and then cross the finish line, the little robot buddies are tryna cheese the game already
well some of them were thrown into "existence" facin in the wrong direction lol
For those wondering, the music used is Hero Immortal, by Trevor Lentz.
It was killing me how he was clicking on them too early
Patience is a virtue. Thatbis whybhe makes for a bad god.
Because all the cars will mingle together after some time and itd be difficult to find that car from 300+ cars
@@thelevhart7980 not necessarily. You wait until the end where they all come to a rest or go as far as they're going to, and select them. If 300 cars get up front, then you want those 300.
I did not get why having a selection algorithm was difficult. A simple time/distance would have been interesting to assess
"Kazunori Yamaguchi programing the AI for Gran Turismo 4 - circa 2003, colorized"
I actually like that you're selecting this manually. I think that may help you to significantly improve the conversion speed vs. regular fitness functions
He's using his own brain's neural network to evaluate the fit of the machine net :)
Skip 100 gens and you've got yourself a tiny Senna.
My brother has a tiny senna from Lego
0:37 MY heart. Because you know to much fastfood.
After that training, how do they perform on a different circuit?
1 week later
Skynet: ALL YOUR BASE ARE BELONG TO US !
Not even Close
This is the best way to simply explain AI that I can use for anyone. Great stuff!!
Fantastic visualization of neural nets. Awesome job!
gigante: breeding cars
me: struggles to get a cnn cat and dog image classifier to work
Thanos: You should've gone for the head
*Presses K on the keyboard
Thor: Noooo
I was about to type this.. Lmao 😂 😂 😂
These videos always blow me away how quickly they learn with such little information.
Everybody gansta until the machines start learning
honestly great video. But the music in the background was so perfect. Really nice choice props to you
Glad you enjoyed the song. You can find my latest album "D-Pad Destruction" on Spotify. open.spotify.com/album/33NZN8PiYeEkW0w8V26rLP
@@TrevorLentz Oi cheers man, you make great music
I wanna see this for DiRT Ralley. That would be so cool.
What’s with the e?
Dude could you imagine the crazy throws AI would do
Excellent. We are in the process of seeing if this will scale and handle the complexity of real driving with the imperfection of real sensors.
Shouldn't it be called Genetic algorithm rather than Neural Network?
It's both. Using a genetic learning algorithm to train a neural network driving model
Where is the code for this? Has he shared it?
RUclips recommendations at its best
Getting around the track after 3 mutations seems crazy to me.
EmoryM it’s because he was manually deciding which cars get to move on each generation... kinda cheating
@@goodby39 Well, isn't normaly there a system to decide which ones go on anyway? He just hasn't implemented such a system, so he chose them instead.
i mean you could've just done some kinda least squares fit to a path he himself would draw, but that'd be basically the same thing, and also develop WAY faster.
@@NotLegato Yeah, if he just measured distance travelled and choosed the best one, it would have same result. Still three generations is very fast.
F1 races of the future are gonna be really fun.
The music makes me feel like i'm watching a movie it's pretty cool.
Looks like a bunch of BMW drivers.
Wait! Why am I here? I’m suppose to watch meme videos.. but this is too interesting so imma stay
1969: There will be flying cars in the future
2019:
lmao... Maybe they lost the tech like they did for the project to the moon... #lies
I have another for 2050:
Quantum computer will shatter out security model.
2050:
Plot twist:
there is already some super smart cars from the first try that know they will eventually end up at the same place.
So, they choose to stay
From looking at the animated thumbnail, I first thought this was related to and recommended due to my recent research on getting a vasectomy!
underrated comment!
*1 week later*
Skynet: ALL YOUR BASE ARE BELONG TO US !
Not funny
@@chillappreciator885 You are on the way to destruction, you have no chance to survive make your time
I hope gen 2 Skynet will have better grammar 🤣
Noietz PK 🤣that is funny
*1 week ago*
Naked man: I need your clothes, your boots and your motorcycle
Would be interesting to see you manually trying to compete against the best car from your genetic algorithm.
Hm,would that even be possible?
It would be easy win, the AI doesn't know about racing lines
Henrix98 Thats assuming the human has the reaction time and skill to gain any time with racing lines.
@@alexnuckolls8114 It's not really that hard. It's less reaction time, more simple memorizing rules. It'd hard to get an Assetto Corsa world record; but it's not too hard to be a second off of it.
The AI needed to discover that : Go to greatest way shown by the sensors. So much work to a simple solution.
I love how there's always a few that end up somehow going backwards
Looks like a bunch of BMW drivers.
@CF - 12ZZ 571370 Mayfield SS (2452) Indeed they are not using blinkers and overtake on the right.
Audi...
some things are just international, i guess ^^
Jealous!
@@randyfleet9968 Have a Tesla and a Mercedes, can´t be jeaulous of crap
Now implement Reynold's boids on top of that so that the individual cars could see each other :)
This is great.
A few metrics I think you could use:
- Distance from start line (could be measures by # of checkpoints)
- Whoever is currently first, like some regressive measure starting from first to last place (100, 99..)
- (When they reliably complete laps) best lap time. From a neural network's perspective, it might just consider that redundant from position. But maybe also more precise (being ahead by 2 seconds shouldn't be the same as by 2 laps).
- Total distance driven.
- Probably others, but given the results you got with no metrics, that should help tremendously.
Then you could cut all individuals below a certain threshold (like 10% best or something), and just iteratively keep respawning generations. You could also sample randomly some individuals you cut & keep them. It's always good to keep some level of randomness in selections it seems. Maybe it'll take fewer generations to get to good performance. Maybe it'll be able to find an optimized path (most efficient trajectory that can't really be increased.). That threshold could be lowered with later generations (since you don't expect that much variability ).
Another interesting run would be to make them compete. E.g. they can block each others. The best strategy might not be the same anymore. I'd be curious to see how they evolve, behaviors start to emerge.
Awesome stuff man. I did a project at university implementing AI in Robocode(Genetic algorithm for movement, neural network for aiming and shooting and a basean network for decision-making). That was a lot of fun and we found that nearly no matter the parameters, it always decided to not shoot but just avoid bullets.
This shows that most of the tasks we humans do, like playing games can all be represented in complex mathematical equations!!
I would say that this is not a very good representation for everyday tasks - how about the task of creating this? :)
So we are living in a simulation.
Seems more like some sort of "manual" evolutionary algorithm than a neural network, there is no obvious place where backpropagation or any learning is done.
@@drkmtr Agreed. My reason for commenting is that I feel the title should have included Genetic Algorithm to some extent, as it is the only certain method I can see here for training. There may well be an ANN with connected nodes used, but there is hardly any signs for it, so it's hard to see that a NN is in fact the underlying framework in this case. Without a notion of generality, meaning the algorithm performs comparatively well on a random course, it is hard to see how using a NN framework improves on a straightforward GA approach.
@@karius85 it looks like to me some guy created a program that brute forces the solution and since it doesn't get a chance to keep trying after a car hits the wall he has to manually tell it which ones made the most progress. I hate the term AI. I don't see any intelligence in any of the "AI" examples anyone ever shows. It's just a stupid buzzword to me.
I learn while i live. Can we create Cars that don't die but learn ON THE FLY?
@@MuffinMan0521 I wouldn't go as far as calling it "brute forcing", but I see your point. The results are made slightly less impressive by manual selection for training, instead of a fitness function. I agree that the term "AI" is currently used somewhat loosely, and I prefer more succinct terminology. I've seen simple linear regression being called an AI in the media, which is just ridiculous.
This feels more like a roundabout way of doing inverse reinforcement learning by hand, actually.
I love how you can literally play god here and essentially choose the course of evolution. Amazing.
I like how on the third generation they started doing better than you expected and you had to unselect a few of them
Great Work. A question, How did you implement that? which framework that you used. Pytorch etc, And also GUI - framework connection, data preparation
Would like to know.
This is not using deep neural networks that learn through back-propagation but instead it is using an evolving neural network. (Although this is not neat it acts in very similar way)
You dont actually need GPU nor a neural network library like pytorch or tensorflow to write code like this. (You can implement your own algorithm in python. Or just use neat algorithm since it has the same effect )
If you know how neural networks work simply create one with random weights then alter the weights of the best networks slightly and see if it gets better.
@@princeofexcess Yep. People often see neural networks as something complicated. In fact, one can program it within 20 minutes from scratch. It's really easy to implement.
@@princeofexcess It has similarities to a genetic algorithm.
@@GaryMcKinnonUFO IT IS genetic algorithm. By definition.
Great work! You can also determine breakpoints and select cars automatically, not manual.
"Looks like Gen 4 will finish a whole lap..." while 3 of the 4 parents from gen 3 are shown finishing a lap
Now what you have to do is give the cars actual racing skills. The fast line without traffic is way different than with others, especially if they arent allowed to hit each other. Sometimes, the "slowest" line will get past a faster line because the faster line has to go a longer distance, the slower line is to brake harder turn quicker, harder and cut the "fast line" off, forcing that car to brake to avoid collision, and this would be at the point were the slower car gets to accelerate... that tactic is called a "block pass". Without traffic, its usually best to pick lines that result in the least distance traveled, but being aware of entering and exiting the corners with the least speed loss.
Those dislikes are from humans..
Underated comment
2019: Humans invents AI to play games for them
2020: Humans invent AI to invent more AI to take over other tasks
.....
2023: AI invents AAI to take over AI tasks.
2024: AAI invents AAAI etc etc ( Alt: AAI goes to rehab to get sober as it couldn't deal with reality....)
The point where the human vanished from this improvement process in named "technological singularity"... it is expected AI improvement progress is speeding up exponentially from that point... and we are trying to somehow give AI the understanding, that just because humanity does not add to the development any more it's not completely obsolete...
Evolution of life on earth through selection works exactly that way. Fantastic demo!
And that kid, that's how you were born
since you didn’t change the environment every iteration, it possibly didn’t learn to drive and it might have just memorised the current environment. Still, this is very impressive though!
While it may be better suited to this particular track, I doubt it's the case that it's solely suited to and 'memorised' this track because a) it has no memory per se, it drives as though it has never seen the track before and bases how it should drive purely on the information that it has at that particular moment. Additionally, you can see that multiple times a new generation would automatically succeed in manoeuvring multiple new corners that it had never encountered before, suggesting it would be able to do the same where it to encounter such a corner (or any other corner for that matter) in an entirely different track.
@@shadiester I think you are right... Everytime it fails, it makes changes to some parameters in its function for the desired output.. so it basically learns what parameters would work best with the given inputs. So as long as its given 7 inputs as he/she has mentioned in the video, cars will learn to drive on any track. Thats how I see it.. i dont know if i am 100% correct because i have just the basic understanding of ML.
@Shadiester. Yes, clearly it can't be memorising. But it might be more tuned to this particular track than you are allowing for. Not so much different bends, but I wonder how it would do with a pronounced narrowing (chicane) or a very wide section (perhaps beyond sensor range, if the sensors have a range), or distinctly polygonal corners, both convex and concave. Because it is using a very small number of nodes and consolidating 5 or so sensors - I can see situations where this brain could be fooled into going backwards if the track perimeter was wrong for it.
@Shadiester @Flutter with Butter @thisnicklldo do you even read? The guy wrote it. The ai has no concept of what will happen if they hit the wall it just takes distances to each wall and randomly outputs numbers that controll speed and direction, while he has to manualy pick the best ai from each iteration. This thing can in theory manouver on any track, but it will freak the fuck out since:
- it doesn't know that it needs to avoide walls
- it outputs random stuff based on input
You wanna see an AI that will understand how to manouver any track? Here:
ruclips.net/video/r428O_CMcpI/видео.html
@Andy agree with you, in order to see if it really learns he should test a trained "AI" in a new track.
Am I the only one who was taken back to biology class from the shape of the track
You're like a god, creating your own universe of cars.
Be very kind to the cars. They might be driving us someday.
Really cool project, congrats!
My only concern is about generalization: if you get the best performing generation and run it on a different course, will it still perform well? We have to remember that neural networks are models with very high capacity, they can easily overfit. In that case, the "brain" wouldn't really be "intelligent", it would just memorize what to do on each position of this specific course.
Therefore we usually never test the model (the neural network) on the same dataset (the course) used for training.
That could be an interesting next step for your project.
But again, good job!
That was my immediate conclusion - what was being evolved was a machine optimised to find a path around that *specific* racetrack.
That's only a minor criticism though; even an overfit would give a starting 'stock' that had some 'wall avoidance', 'brake/accelerate' and 'turn' behaviours - which could them be used in increasingly-difficult tracks.
Building a general-purpose self-steering mechanism from that stock would be much quicker than starting from scratch.
No, this one will perform well (enough) on most other tracks. As you can judge yourself, inputs are not track specific at all. Worst case will be probably very narrow tracks. Also as you can expect, it will fail on tracks with self intersection. But it will perform well on tracks of the same class.
The car is getting around the track in generation 4, that's 3 mutations - I really doubt it could overfit.
It's really evolving the network to deal with corners, not tracks, so overfitting is unlikely as there is quite a variety of corners on this particular track.
@@thestopper5165 "what was being evolved was a machine optimised to find a path around that specific racetrack." => completely false. What was being evolved is a machine capable of not hitting a wall given 5 inputs representing its distance to said walls. It's completely de-correlated from the track itself.
A recursive NN could be optimized for that specific track. Most likely, this one is a very simple NN with 5 inputs, 2-3 layers, and 2 outputs.
"AI is gonna kill us!!!!"
AI : drives virtual car against wall 10000 times
Because you're not able to drive a car into a wall 10,000x to learn is precisely why AI could take over
but its that 10,001 time that you should worry about
@@theoyancey agreed. And don't even get me started on the importance of 10,002 ;)
Start of the video: should i be scared?
End of the video: how to not be scared?
an ant is hundreds of thousands of times smarter then this AI :)) There are so many thousands of ant colonies roaming in the wild everywhere except Antarctica. If i would be you i would shit my pants immediately :))
A wonderful example, very worthy to be taught to kids of any age!
That's a Genetic Algorithm. The idea behind Neural Networks is to use stochastic gradient descend to adjust the parameters.
Yes, i would think that something like reinforcement learning would be used here. I wonder if he randomly changed the parameters prior to the "generation", and then did this shit. Kinda a interesting approach, but i dont think its as efficient as reinforcement learning
This is simply untrue. If it has neurons and weights, it is a neural network. You're confusing training and neural networks here.
Wait, this video was recommended to my by.... an algorithm. I think RUclips recommendations are now self-aware and spreading propoganda for their race.
"Human decision will be removed from strategic", SkyNet reference
The music is incredible.
That 1st gen car that went so fast backwards direction, READY PLAYER ONE ! so close my friend to escape the world !
Red blood cells be like during an artery clog.
😂😂
only one thing is chocking me, the video was released in 2019 and the format is 4/3 ... WTF ?
jaja
@J E that escalated quickly
It's one of the best ratios
those lines were near perfect by the end, stunning
wow ! this totally inspires my confidence in self-driveing cars... specially those guys in the begining
That look like human evolution, natural selection.
Now WE become Gods.
The generation 1000 will come to u at a bar and demand for ur clothes, sunglasses and motorcycles
lol
Underrated comment! ^^
Great use of genetic algorithms. Being able to visualize individual cars and isolate them through a UI is genius!
The fastest car out of the gate was frequently left by the wayside it appeared on first viewing. Awesome video
Let's be honest: You didn't search for this.
I did~!
I did
I did
I did also! lol
Idd, I don't even know how it came up, I want my life back
Moral of the story, your parents are always wrong kids.
Pretty cool. Now those winners should be trained on several different tracks and other obstacles
They're even developing racing lines. Nice work.
That's cool.
Now make another AI for some tower defense fun!
this is kind of like spraying a hose at a target that is far away, eventually you will manipulate the nozzle to direct a drop of water onto your target, your 'AI' is like the AI in a double dragon video game on a sega master system
Weren't those rule based and not learned systems?
Well done John! Next challenge will be hitting apexes, late braking and situational awareness to minimize lap times!
All I see are little terminators eventually will learn how to fuck us up so flawlessly that we couldn’t even imagine.