Тёмный

Neural network racing cars around a track 

Nebol's Coding
Подписаться 5 тыс.
Просмотров 3,7 млн
50% 1

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.com/game-art-giv...
Track background created by Keely for Quickrally and modified a bit:
/ screenshot_saturday_26...
Background music by Trevor Lentz:
opengameart.org/users/trevor-...
Coding by Johan Eliasson in 2019.

Опубликовано:

 

3 янв 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 2,5 тыс.   
@harimichaelson5238
@harimichaelson5238 5 лет назад
Shoutout to that one car in first gen who went as far as it could in the other direction. You shall be remebered, rebel
@addityasinghal897
@addityasinghal897 5 лет назад
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
@Jonas_Aa
@Jonas_Aa 5 лет назад
Yeah he was smart enough to see that it would be a trafficjam going the same way as the others.
@ragnivus6020
@ragnivus6020 5 лет назад
you are right!
@akshaydarekar1991
@akshaydarekar1991 5 лет назад
Or it's an anti-vaxxer
@StuSiney
@StuSiney 5 лет назад
That one was probably my car
@Andy.o52
@Andy.o52 3 года назад
That one car that went backwords: "My goals are beyond your understanding"
@justus8675
@justus8675 3 года назад
That car has watched "Ready Player One"!
@altoclef4249
@altoclef4249 3 года назад
@@justus8675 lol
@AndreyTkachenko
@AndreyTkachenko 3 года назад
that car had a goal to cross finish line - and it did that first :)
@sanyanders
@sanyanders 3 года назад
It's speedrunner
@CRAZYMONYmc
@CRAZYMONYmc 3 года назад
3:02 "looks like gen 4 will finish a full lap!" selected car: *rams into wall*
@circumplex9552
@circumplex9552 3 года назад
*unselects car immediately* you have disappointed me, child
@Sifer2
@Sifer2 3 года назад
He choked.
@SpaceMissile
@SpaceMissile 3 года назад
blew a tire on the last turn.
@auces7084
@auces7084 3 года назад
That was pog’nt
@BrendenConway
@BrendenConway 3 года назад
@@Sifer2 He was paid off
@thejesuschrist
@thejesuschrist 5 лет назад
this blows my holy mind
@prettynoice8852
@prettynoice8852 3 года назад
Jesus
@joeljose182
@joeljose182 3 года назад
Machines will find you jesus
@orange8175
@orange8175 3 года назад
ITS JESUS CHRIST
@TheJosep70
@TheJosep70 3 года назад
Don´t fuck with the Jesus!
@joeljose182
@joeljose182 3 года назад
@@e2U i see
@CraftyFoxe
@CraftyFoxe 5 лет назад
ah the machines are learning!
@mg1462
@mg1462 3 года назад
Now imagine o e million learning one thousand generations per second
@caseyjr296
@caseyjr296 3 года назад
I tought you was fake for a second
@wlacsilbalazs
@wlacsilbalazs 3 года назад
Yes. We arefz011jk011101001Fhkw/,,.dsd0 *ERROR* sdal+!'"glb.ú - system failure. Reboot... ... ... Yes. I agree with you my fellow human.
@RD-nz5gj
@RD-nz5gj 3 года назад
Lowkey kinda thought u were fake
@djbabbotstown
@djbabbotstown 3 года назад
With the help of a Conscious selector. Interesting.
@AkiyamaKatsuko
@AkiyamaKatsuko 5 лет назад
At least they drive better than most players in a Forza lobby.
@coteleacarlo7574
@coteleacarlo7574 5 лет назад
You have provoken a gang war
@user-pu1ny7pq7o
@user-pu1ny7pq7o 5 лет назад
Probably rlly bad
@Max200012
@Max200012 5 лет назад
first thing that came to my mind
@DragonMasters525
@DragonMasters525 5 лет назад
big facts
@nikki-lx3yf
@nikki-lx3yf 5 лет назад
wonder if you could train them to follow a proper racing line also
@nexus1g
@nexus1g 3 года назад
"Except for that top guy that figured out how to turn left..." Achievement Unlocked: Pro NASCAR Driver.
@francois487
@francois487 3 года назад
NASCAR announcer: "He's making a left turn!"
@theglockdub
@theglockdub 3 года назад
Was laughing as fuck
@curiosamente
@curiosamente 3 года назад
Could you put the winner brain in a new, different track?
@criter96
@criter96 3 года назад
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.
@TheVerandure
@TheVerandure 3 года назад
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.
@criter96
@criter96 3 года назад
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.
@WahGwaaan420
@WahGwaaan420 3 года назад
against some blue, yellow, green and purple cars? :3
@MichaelCrenshaw_TheXaldar
@MichaelCrenshaw_TheXaldar 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.
@suvidani
@suvidani 5 лет назад
The track should have been re-generated for each generation to avoid overfitting. How the fittest cars perform on other tracks?
@patrickthepure
@patrickthepure 5 лет назад
Thanks to your comment, I just learned what overfitting actually is :)
@utkarshkharayat9533
@utkarshkharayat9533 5 лет назад
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
@justimagine2403
@justimagine2403 5 лет назад
Yes, it knows THIS track. It would be curious to see it on another. And ML means Machine Learning.
@pallingtontheshrike6374
@pallingtontheshrike6374 5 лет назад
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.
@Submersed24
@Submersed24 5 лет назад
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
@Lellistair
@Lellistair 3 года назад
Me: Alright, what's on the algorithm menu today? RU-vid: Car breeding Me: Cool
@bagochips1208
@bagochips1208 3 года назад
@@googlexd7294 Sir this is a wendy's drive thru thats a lot of new stuff I learned today btw
@sontapaa11jokulainen94
@sontapaa11jokulainen94 3 года назад
@@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)
@sontapaa11jokulainen94
@sontapaa11jokulainen94 3 года назад
@@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 .
@nicklawton4166
@nicklawton4166 3 года назад
​@@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
@daylenhendricks7702
@daylenhendricks7702 3 года назад
I cannot express how much i am laughing at this and i have no clue why lmfao
@Just_A_Guy_Here.
@Just_A_Guy_Here. 3 года назад
Gen 200: The cars have have managed to enter the Industrial age.
@OceanCrasher
@OceanCrasher 3 года назад
Gen 1000: The cars have now created their own simulation of neural network cars.
@RasmodeusQ
@RasmodeusQ 3 года назад
Gen 12^100: ❄︎︎♒︎︎♏︎︎⍓︎︎🕯︎︎❖︎︎♏︎︎ ●︎︎♏︎︎♋︎︎❒︎︎■︎︎♏︎︎♎︎︎ ⧫︎♒︎♋︎⧫︎ ⬥︎♒︎♓︎♍︎♒︎ ⬧︎♒︎□︎◆︎●︎♎︎ ■︎♏︎❖︎♏︎❒︎ ♒︎♋︎❖︎♏︎ ♌︎♏︎♏︎■︎ ●︎♏︎♋︎❒︎■︎♏︎♎︎📬︎ Tis encrypted my boy, I wish thee luck if you desire the knowledge; with a forgiving hint of Lingo~
@TheLegendary-ns3bi
@TheLegendary-ns3bi 3 года назад
@@RasmodeusQ"They've learned that which * should never have been learned." but in Wingdings font *'should' was mistyped
@the_kombinator
@the_kombinator 3 года назад
Still using carburettors, but managing to add forced induction ;)
@elionalejandroparedesborna2266
@elionalejandroparedesborna2266 3 года назад
The cars managed to create a racing line
@LoliLoveJuice
@LoliLoveJuice 3 года назад
moral of the story is: theres still gonna be alot of dumb people every generation even if their family head is a genius/successful
@IamR3D88
@IamR3D88 3 года назад
yea, but here they are only breeding the smart ones, real life is almost opposite.
@kaiserhhaie841
@kaiserhhaie841 3 года назад
@@IamR3D88 the dumb people fuck like rabbits yeah. Have you seen the movie idiocracy? its really a fun movie about this idea
@estantaya
@estantaya 3 года назад
@@kaiserhhaie841 the plebs are a need
@RessG
@RessG 3 года назад
The dumb is there to be taken advantage of.
@SecuR0M
@SecuR0M 3 года назад
@@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.
@Mintor94
@Mintor94 5 лет назад
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.
@kevinosullivan6525
@kevinosullivan6525 5 лет назад
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
@lyricallizard7817
@lyricallizard7817 5 лет назад
Yes, always validate the network on new, unseen data
@MotesTV
@MotesTV 5 лет назад
@@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.
@zamfent
@zamfent 5 лет назад
@@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.).
@MotesTV
@MotesTV 5 лет назад
@@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.
@WillMiddlewick
@WillMiddlewick 5 лет назад
Look at the bottom right. You can press K for a thanos snap!
@Onixstar
@Onixstar 5 лет назад
@@bubbles7608 It says 'Kill half' though Edit: This comment responds to a now deleted comment from 'Bubbles' who claimed pressing k would kill everything.
@Half-V
@Half-V 5 лет назад
@@bubbles7608 (K)ill Half
@Riskomul
@Riskomul 5 лет назад
@@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
@markorezic3131
@markorezic3131 5 лет назад
@@Riskomul wat
@UncleMerlin
@UncleMerlin 5 лет назад
@@Riskomul r/woooosh
@iamherenow7958
@iamherenow7958 3 года назад
Imagine using this to find perfect lines for actual races
@lasstunsspielen8279
@lasstunsspielen8279 3 года назад
That would end up like the car chase in Blues Brothers
@philrod1
@philrod1 3 года назад
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 :(
@iamherenow7958
@iamherenow7958 3 года назад
@@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
@sunboy4224
@sunboy4224 3 года назад
@@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.
@philrod1
@philrod1 3 года назад
@@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.
@derk-306
@derk-306 3 года назад
"FOLLOW MY PATH MY CHILD" -the parents
@dgx-shorts
@dgx-shorts 3 года назад
And child be like nahh! True also in real life.
@LiTAQ
@LiTAQ 3 года назад
I just want to appreciate that this video came out in 2019 but looks like it's from 2009.
@zarrowthehorse
@zarrowthehorse 3 года назад
so?
@LiTAQ
@LiTAQ 3 года назад
@@zarrowthehorse it’s a good aesthetic
@PollederBoss
@PollederBoss 3 года назад
it looks better than GTA from 1999
@nut1324
@nut1324 5 лет назад
RU-vid recommendation is the randomest thing in the world but why on earth i click in..
@Pwnzistor
@Pwnzistor 5 лет назад
Because neural networks are fucking awesome, that's why.
@ChillingSpartan
@ChillingSpartan 5 лет назад
Because Google's neural net for recommendation calculated a high probability that you will click in.
@skop6321
@skop6321 5 лет назад
am I influencing the neural networks or are the neural networks influencing me ? . . . .
@Mister.Weatherbee
@Mister.Weatherbee 5 лет назад
You clicking on this reinforces the algorithm making the right choice :D
@AgeofJP
@AgeofJP 5 лет назад
@@skop6321 yes
@michaelbabb1087
@michaelbabb1087 3 года назад
"Victory cannot be achieved without sacrifice." - our boi Viktor Resnov straight outta Vorkuta.
@lasstunsspielen8279
@lasstunsspielen8279 3 года назад
Victory cannot be achieved if your opponent is Chuck Norris
@justinian-the-great
@justinian-the-great 3 года назад
@@lasstunsspielen8279 Well, Bruce Lee doesn't agree.
@daaaah_whoosh
@daaaah_whoosh 3 года назад
Huh, after only four generations they drive better than the AI in Halo.
@CranyUnknown
@CranyUnknown 3 года назад
and better than the one's in this vid ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-oHg5SJYRHA0.html (i don't own the video btw)
@gonzalofn95
@gonzalofn95 3 года назад
@@CranyUnknown reeee
@Rabijeel
@Rabijeel 3 года назад
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....
@SteffenHansen1973
@SteffenHansen1973 3 года назад
Better than a lot of people IRL....
@ImplyDoods
@ImplyDoods 3 года назад
@@Rabijeel halo doesnt use this kind of stuff lol its not AI its pre programmed by people
@stmaur0
@stmaur0 5 лет назад
After that training, how do they perform on a different circuit?
@lucasbruel
@lucasbruel 5 лет назад
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.
@evil001987
@evil001987 5 лет назад
@@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.
@1080pixel
@1080pixel 5 лет назад
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.
@tkdlvk27
@tkdlvk27 5 лет назад
I don't think so. It is like genetic algorithm to overfit only this circuit not a general driving
@msq7041
@msq7041 5 лет назад
@@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
@danburycollins
@danburycollins 3 года назад
the real test would surely be deploying the evolved cars on a different race track
@raketman101
@raketman101 3 года назад
not very impressive idd
@radioactive.redwood
@radioactive.redwood 3 года назад
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.
@danburycollins
@danburycollins 3 года назад
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.
@rocksfire4390
@rocksfire4390 3 года назад
@@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.
@TexMex421
@TexMex421 3 года назад
@@rocksfire4390 The AI has to know some things. Collisions are bad, laps are good for example.
@ImNotCheez
@ImNotCheez 3 года назад
97% : I have to go faster!! 2% : I just wanna go back 1% : Paused.
@alice20001
@alice20001 3 года назад
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!
@BlackFox0
@BlackFox0 3 года назад
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.
@dcode1
@dcode1 2 года назад
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.
@flirose
@flirose 5 лет назад
It was killing me how he was clicking on them too early
@fortheloveofnoise
@fortheloveofnoise 5 лет назад
Patience is a virtue. Thatbis whybhe makes for a bad god.
@thelevhart7980
@thelevhart7980 5 лет назад
Because all the cars will mingle together after some time and itd be difficult to find that car from 300+ cars
@Jayheid98
@Jayheid98 5 лет назад
@@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.
@brekezek
@brekezek 5 лет назад
I did not get why having a selection algorithm was difficult. A simple time/distance would have been interesting to assess
@LeFreshmeat
@LeFreshmeat 3 года назад
For those wondering, the music used is Hero Immortal, by Trevor Lentz.
@Spivonious
@Spivonious 3 года назад
Fantastic visualization of neural nets. Awesome job!
@bavrarnasriksforbundsledam7557
That's an accurate way of teaching how our neural system is working to connect experiences with learning.
@iyrnray
@iyrnray 3 года назад
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
@zuzukyd
@zuzukyd Год назад
well some of them were thrown into "existence" facin in the wrong direction lol
@Saddutchman
@Saddutchman 3 года назад
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.
@_IvanMichael
@_IvanMichael 5 лет назад
*Wow, I'm really amazed! Great work bro!*
@user-un9bu4ut8l
@user-un9bu4ut8l 5 лет назад
Great work! You can also determine breakpoints and select cars automatically, not manual.
@velzaresp8623
@velzaresp8623 5 лет назад
0:37 MY heart. Because you know to much fastfood.
@hear5am
@hear5am 3 года назад
This is the best way to simply explain AI that I can use for anyone. Great stuff!!
@LittleMikeStarCraft
@LittleMikeStarCraft 3 года назад
These videos always blow me away how quickly they learn with such little information.
@ender8850
@ender8850 5 лет назад
"Kazunori Yamaguchi programing the AI for Gran Turismo 4 - circa 2003, colorized"
@malax632
@malax632 5 лет назад
honestly great video. But the music in the background was so perfect. Really nice choice props to you
@TrevorLentz
@TrevorLentz 5 лет назад
Glad you enjoyed the song. You can find my latest album "D-Pad Destruction" on Spotify. open.spotify.com/album/33NZN8PiYeEkW0w8V26rLP
@malax632
@malax632 3 года назад
@@TrevorLentz Oi cheers man, you make great music
@Kram1032
@Kram1032 3 года назад
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
@83vbond
@83vbond 3 года назад
He's using his own brain's neural network to evaluate the fit of the machine net :)
@prathameshsundaram7509
@prathameshsundaram7509 3 года назад
Great video man! Loved the presentation & visualization!
@alanwatts8239
@alanwatts8239 3 года назад
Skip 100 gens and you've got yourself a tiny Senna.
@marn200
@marn200 3 года назад
My brother has a tiny senna from Lego
@albertomanchester2862
@albertomanchester2862 4 года назад
After that training, how do they perform on a different circuit? 1 week later Skynet: ALL YOUR BASE ARE BELONG TO US !
@raketman101
@raketman101 3 года назад
Not even Close
@tjejojyj
@tjejojyj 3 года назад
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.
@jakobthekid
@jakobthekid 3 года назад
Thanks for explaining whats going on in the process. Really cool stuff
@user-xn5ky9uj3j
@user-xn5ky9uj3j 5 лет назад
Shouldn't it be called Genetic algorithm rather than Neural Network?
@matthewhall2318
@matthewhall2318 4 года назад
It's both. Using a genetic learning algorithm to train a neural network driving model
@seeker4430
@seeker4430 3 года назад
Where is the code for this? Has he shared it?
@jacksonzheng3103
@jacksonzheng3103 3 года назад
gigante: breeding cars me: struggles to get a cnn cat and dog image classifier to work
@simplyclarified6948
@simplyclarified6948 3 года назад
Evolution of life on earth through selection works exactly that way. Fantastic demo!
@fireinabottle5502
@fireinabottle5502 3 года назад
those lines were near perfect by the end, stunning
@janbal2972
@janbal2972 3 года назад
Everybody gansta until the machines start learning
@Runawaysage9
@Runawaysage9 5 лет назад
Thanos: You should've gone for the head *Presses K on the keyboard Thor: Noooo
@ManuMitraan
@ManuMitraan 5 лет назад
I was about to type this.. Lmao 😂 😂 😂
@beepboopgpt1439
@beepboopgpt1439 4 года назад
You're like a god, creating your own universe of cars.
@stevewaclo167
@stevewaclo167 5 лет назад
Well done John! Next challenge will be hitting apexes, late braking and situational awareness to minimize lap times!
@ezradelsman6743
@ezradelsman6743 3 года назад
I wanna see this for DiRT Ralley. That would be so cool.
@ballaking1000
@ballaking1000 3 года назад
What’s with the e?
@rickstapylton9948
@rickstapylton9948 3 года назад
Dude could you imagine the crazy throws AI would do
@mateusz4r
@mateusz4r 5 лет назад
Now implement Reynold's boids on top of that so that the individual cars could see each other :)
@Las505
@Las505 3 года назад
wow ! this totally inspires my confidence in self-driveing cars... specially those guys in the begining
@CranyUnknown
@CranyUnknown 3 года назад
For a small youtber, this is really cool! keep the good work up!
@babarius1522
@babarius1522 5 лет назад
RU-vid recommendations at its best
@EmoryM
@EmoryM 5 лет назад
Getting around the track after 3 mutations seems crazy to me.
@goodby39
@goodby39 5 лет назад
EmoryM it’s because he was manually deciding which cars get to move on each generation... kinda cheating
@vulpine3431
@vulpine3431 5 лет назад
@@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.
@NotLegato
@NotLegato 5 лет назад
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.
@evil001987
@evil001987 5 лет назад
@@NotLegato Yeah, if he just measured distance travelled and choosed the best one, it would have same result. Still three generations is very fast.
@logiconabstractions6596
@logiconabstractions6596 5 лет назад
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.
@inibapakbudi
@inibapakbudi 5 лет назад
Hey, Great job. Thanks for sharing this video. I learnt alot.
@Jongong_01
@Jongong_01 5 лет назад
Wait! Why am I here? I’m suppose to watch meme videos.. but this is too interesting so imma stay
@karius85
@karius85 5 лет назад
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.
@karius85
@karius85 5 лет назад
@@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.
@MuffinMan0521
@MuffinMan0521 5 лет назад
@@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.
@HermanWillems
@HermanWillems 5 лет назад
I learn while i live. Can we create Cars that don't die but learn ON THE FLY?
@karius85
@karius85 5 лет назад
@@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.
@noellelavenza494
@noellelavenza494 5 лет назад
This feels more like a roundabout way of doing inverse reinforcement learning by hand, actually.
@Oxmond
@Oxmond 4 года назад
Beautiful example! Well done! 👍🤓❤️
@whodey770
@whodey770 3 года назад
I love how there's always a few that end up somehow going backwards
@GudJobb
@GudJobb 5 лет назад
1969: There will be flying cars in the future 2019:
@caringtonmathalephahlamohl7487
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:
@tylerc5311
@tylerc5311 5 лет назад
*1 week later* Skynet: ALL YOUR BASE ARE BELONG TO US !
@chillappreciator885
@chillappreciator885 5 лет назад
Not funny
@noietzpk5169
@noietzpk5169 5 лет назад
@@chillappreciator885 You are on the way to destruction, you have no chance to survive make your time
@JaguarBST
@JaguarBST 5 лет назад
I hope gen 2 Skynet will have better grammar 🤣
@icekurimu1688
@icekurimu1688 5 лет назад
Noietz PK 🤣that is funny
@petermaxx3669
@petermaxx3669 5 лет назад
*1 week ago* Naked man: I need your clothes, your boots and your motorcycle
@JagofTroy
@JagofTroy 3 года назад
Amazing. This video was incredible
@WattWireNet
@WattWireNet 5 лет назад
From looking at the animated thumbnail, I first thought this was related to and recommended due to my recent research on getting a vasectomy!
@Blacksoul444
@Blacksoul444 3 года назад
underrated comment!
@salihkaragoz2322
@salihkaragoz2322 5 лет назад
Great Work. A question, How did you implement that? which framework that you used. Pytorch etc, And also GUI - framework connection, data preparation
@ezanchi5422
@ezanchi5422 5 лет назад
Would like to know.
@princeofexcess
@princeofexcess 5 лет назад
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.
@marekpiirikivi9877
@marekpiirikivi9877 5 лет назад
@@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.
@GaryMcKinnonUFO
@GaryMcKinnonUFO 5 лет назад
@@princeofexcess It has similarities to a genetic algorithm.
@yaroslavpanych2067
@yaroslavpanych2067 5 лет назад
@@GaryMcKinnonUFO IT IS genetic algorithm. By definition.
@abyssgazer9050
@abyssgazer9050 5 лет назад
What happens if you put that last generation into new setting ?
@chrisd6736
@chrisd6736 5 лет назад
F1 races of the future are gonna be really fun.
@shengwubin4130
@shengwubin4130 5 лет назад
Really great demo!
@hemanthkumarar
@hemanthkumarar 3 года назад
Those dislikes are from humans..
@jhwhthemerciful
@jhwhthemerciful 3 года назад
Underated comment
@derjansan9564
@derjansan9564 5 лет назад
Would be interesting to see you manually trying to compete against the best car from your genetic algorithm.
@IKTeam
@IKTeam 5 лет назад
Hm,would that even be possible?
@Henrix1998
@Henrix1998 5 лет назад
It would be easy win, the AI doesn't know about racing lines
@alexnuckolls8114
@alexnuckolls8114 5 лет назад
Henrix98 Thats assuming the human has the reaction time and skill to gain any time with racing lines.
@Derpy-qg9hn
@Derpy-qg9hn 5 лет назад
@@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.
@mj6463
@mj6463 5 лет назад
I clicked this thinking it was a code bullet vid but your video was good man nice job
@jdearr1
@jdearr1 5 лет назад
The fastest car out of the gate was frequently left by the wayside it appeared on first viewing. Awesome video
@andrewglinski4722
@andrewglinski4722 5 лет назад
Looks like a bunch of BMW drivers.
@LubomirPotocki
@LubomirPotocki 3 года назад
@CF - 12ZZ 571370 Mayfield SS (2452) Indeed they are not using blinkers and overtake on the right.
@miguellopes6669
@miguellopes6669 3 года назад
Audi...
@pugnate666
@pugnate666 3 года назад
some things are just international, i guess ^^
@randyfleet9968
@randyfleet9968 3 года назад
Jealous!
@miguellopes6669
@miguellopes6669 3 года назад
@@randyfleet9968 Have a Tesla and a Mercedes, can´t be jeaulous of crap
@DanielNehemiahJ
@DanielNehemiahJ 3 года назад
This shows that most of the tasks we humans do, like playing games can all be represented in complex mathematical equations!!
@Zekromus
@Zekromus 3 года назад
I would say that this is not a very good representation for everyday tasks - how about the task of creating this? :)
@PickyPaige
@PickyPaige 3 года назад
So we are living in a simulation.
@twistiv
@twistiv 5 лет назад
I like how on the third generation they started doing better than you expected and you had to unselect a few of them
@Aikisbest
@Aikisbest 3 года назад
This is absolutely brilliant!
@kyangja6555
@kyangja6555 3 года назад
only one thing is chocking me, the video was released in 2019 and the format is 4/3 ... WTF ?
@estantaya
@estantaya 3 года назад
jaja
@blackwersus
@blackwersus 3 года назад
@J E that escalated quickly
@godlydestroyer8658
@godlydestroyer8658 3 года назад
It's one of the best ratios
@Dubswitcher
@Dubswitcher 5 лет назад
Am I the only one who was taken back to biology class from the shape of the track
@asdfasdfasdf383
@asdfasdfasdf383 3 года назад
You are an inspiration. One day, I will code this.
@Noel_Medina
@Noel_Medina 5 лет назад
Cool af, mad props! I have no idea what's goin on but I respect it😎
@SwopCovers
@SwopCovers 5 лет назад
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!
@shadiester
@shadiester 5 лет назад
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.
@pg5353
@pg5353 5 лет назад
@@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.
@thisnicklldo
@thisnicklldo 5 лет назад
@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.
@MadBunnyRabbit
@MadBunnyRabbit 5 лет назад
@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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-r428O_CMcpI.html
@eliancordoba1199
@eliancordoba1199 5 лет назад
@Andy agree with you, in order to see if it really learns he should test a trained "AI" in a new track.
@Eryan724
@Eryan724 5 лет назад
"AI is gonna kill us!!!!" AI : drives virtual car against wall 10000 times
@AlexanderMoen
@AlexanderMoen 5 лет назад
Because you're not able to drive a car into a wall 10,000x to learn is precisely why AI could take over
@theoyancey
@theoyancey 5 лет назад
but its that 10,001 time that you should worry about
@AlexanderMoen
@AlexanderMoen 5 лет назад
@@theoyancey agreed. And don't even get me started on the importance of 10,002 ;)
@BlueRaja
@BlueRaja 5 лет назад
To determine their fitness, first figure out the curve for the center of the track, which can be done by expanding the boundaries until they touch. Then determine the closest point to the center of the track when they stopped. You'll also eventually need to count laps and lap-time
@bwc1976
@bwc1976 3 года назад
This is too awesome! Would be cool if collisions between cars were also added.
@MiottoGuilherme
@MiottoGuilherme 5 лет назад
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!
@thestopper5165
@thestopper5165 5 лет назад
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.
@yaroslavpanych2067
@yaroslavpanych2067 5 лет назад
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.
@EmoryM
@EmoryM 5 лет назад
The car is getting around the track in generation 4, that's 3 mutations - I really doubt it could overfit.
@ab8jeh
@ab8jeh 5 лет назад
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.
@zealiskander
@zealiskander 5 лет назад
@@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.
5 лет назад
That's cool. Now make another AI for some tower defense fun!
@ti2218
@ti2218 3 года назад
I love how you can literally play god here and essentially choose the course of evolution. Amazing.
@gaintrain99
@gaintrain99 3 года назад
How did I get here, I just watched this for the whole length and didn't even second guess how I came to this
@rohithrnair1855
@rohithrnair1855 5 лет назад
Github link?
@imilan8
@imilan8 5 лет назад
I want it as well
@username4441
@username4441 5 лет назад
This. but I am guessing pajeet thinks his mangled mess of code he pieced from others repos is some kind of magnum opus of his own that he shall not share!
@ghanthor
@ghanthor 3 года назад
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....)
@ThorDyrden
@ThorDyrden 3 года назад
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...
@OrbGoblin
@OrbGoblin 3 года назад
The music is incredible.
@TPfaffle
@TPfaffle 3 года назад
They're even developing racing lines. Nice work.
@eLsain
@eLsain 5 лет назад
what happenned if you add collision?
@_Opal_Miner_
@_Opal_Miner_ 5 лет назад
No collusion!!!
@vladimirfilipovic5845
@vladimirfilipovic5845 3 года назад
Cool video! Could you post the source code for the project?
@TrevorLentz
@TrevorLentz 5 лет назад
Glad you had use for that song. :)
@Mortagus
@Mortagus 3 года назад
super cool demonstration ^^. This video makes me think about Bullet Code channel ^^
Далее
Training an unbeatable AI in Trackmania
20:41
Просмотров 13 млн
Я читаю переписки сына
00:18
Просмотров 651 тыс.
НАШЛА У СЕСТРЫ СЕКРЕТИК
00:36
Просмотров 412 тыс.
AI Learns To Dominate A Virtual Market
12:13
Просмотров 255 тыс.
A.I.  teaches itself to drive in Trackmania
15:04
Просмотров 4,8 млн
How I created an evolving neural network ecosystem
10:09
I Made an AI with just Redstone!
17:23
Просмотров 800 тыс.
Neural Network Learns to Play Snake
7:14
Просмотров 4,5 млн
AI Learns to Outrun Police Officers
11:44
Просмотров 644 тыс.
Transformer Neural Networks Derived from Scratch
18:08
Просмотров 131 тыс.
AI Invents New Bowling Techniques
11:33
Просмотров 3,3 млн
Я читаю переписки сына
00:18
Просмотров 651 тыс.