Next step: minimize time to finish. If you use both time and distance and fitness, I wonder what combination of them would make a greater car evolve faster
It would be interesting to co-evolve the track using a fitness function that selects for tracks that are better at challenging cars. The fitness function for the track could reward tracks that create more complex 'interesting' car movements (flips, backtracks, variations in speed, etc).
Yes, I thought would be very interesting to generate levels for a game using evolution as oppose to hand crafted designs. It would be very tricky to setup though, but very interesting idea.
The terrain needs to remain constant. The AI is learning yes but it is only learning for a specific track. Theres an example of why the track cant change and its from a MarIO video by SethBling. Idk how to spell his name but anyways he makes an AI that can beat a mario level but the AI despite learning enough to beat the first level cannot and will never beat the second level because the AI didnt learn it specifically.
I'd like to see them co-evolving, responding to each other in a coevolutionary configuration. Cooperative coevolution might tend to lead to boring tracks unless the fitness functions were carefully tuned to select for 'interesting' behaviors. The track does not need to remain constant, in general. Most of the examples I've seen of evolving vehicles use randomly generated tracks. A specific implementation might be limited to exactly one terrain, but that is a feature of that specific implementation. My own dabbling in this is on the evolution of computer programs that navigate a maze (a very simple simulated stack machine CPU with port-based IO connected to sensors and actuators on a simulated vehicle in the maze, running assembly language programs that evolve). It does not co-evolve the maze, it just randomly generates them, new for every member of the population. That's an interesting idea though, now that I'm thinking about it. I wonder if I can come up with a way to generate the mazes using an evolvable script. I'll have to think about ways to encode a maze-generating routine in a way that can be evolved. wiki.ece.cmu.edu/ddl/index.php/Coevolutionary_algorithms
Very cool! I wonder if you could add to the car algorithm a "passenger" object, and trigger a game over when the passenger "dies." How would the successful evolution look different, if it had to also take into account the "safety" of the "passenger"?
@Jack Kalish: You could also add "energy" usage (a component left out from these simulations too often), and also weight as "fitness", since if it can carry more, more effectively, then it's a good machine.
woww this is great but it just shows how a machine can only ever be a tool -- what a human can solve with intution and design mindset will take a machine a ton of computing to arrive at by force. But that may not really be a problem with the evolution of computing resources. I don't know, I'm just a chemical engineer but this is real cool! :)
Hey there! Amazing video. I was wondering about a few things: Would it be possible to make the terrain randomly generated? Using some sort of noise, the terrain could be different for each genome. That way the cars will be able to drive in different circumstances. Also, is it theoretically possible to base the fitness on distance traveled in a certain time? Instead of only stopping when the car gets stuck, wait 20 seconds for each car and then go on to the next one. Would this work? Would they "learn" that speed is important as well? Thanks a lot for your time and this video :)
winnie33 Hi. about this randomizing of the terrain, I dont really think this would work. The entire experiment is set to evolve the car to do this particular test (track). Any generation might be proven useless on newly randomly generated track because it was evolving to beat previous one. However due to nature of this experiment latest generations shouldnt have a problem to beat any randomized withing some limits track, but this is not what Genetic Algorithms are for. As for the second question It could work but than again from theoretical stand point the experiment is to evolve the car to beat the track. The track has variety of different obstacles, a successful car should be able to beat. Capping test run to 20 second would result in the cars never get to some parts of the track, hence it would (probably) never evolved to beat the track and be able to pass any obstacle from it.
Thanks a lot for the quick and in-detail answer! About the random terrain, why aren't genetic algorithms fit for the job? Are there any other neural networks (if that's how it's called) that could do this? Anyway, your videos are really nice and informative. I wish you all the best with your channel and look forward to seeing more of these videos :)
winnie33 Hi. first to be clear I am not any kind of expert of this matter just a hobbyist so I suggest you read some scientific literature about this topics. With that said, I dont use neural networks here my phenotype just performs a single action driving and fitness evaluates how it did. I am affraid if you want a arbitrary phenotype perform well in any random environment you better call SkyNet. But seriously a neutal net is what you need (I even did one experiment with it and uploaded video). But than agaim neural net is to solve a more complex problem with multiple inputs and outputs (i.e. driving car learns to complete the track). Again any neural net applicatios are very vulnerable to changing environment. There was one example in which net learned to pass level after 2x generation but next level had different kinds of obstacles so the nnet was useless and it needed to learn from start. Finally it all depends what exactly do you mean by random track. In this example as i sad phenotype is simple. Assuming your would have a more complex one with controlles speed breaking and balancing maybe. Than any new random piece of track you generate might constitute new type of obstacle your net is not ready for (but it all depends on how you define it). Than it will need some generations to learn it but it would forget the once you already had because its not testing against them anymore. Again this is just guessing, but I've seen few dozens of nnet examples and in none of them the problem to solve is changing during the experiment.
How about using something like distance squared or cubed divided by time for the fitness, so that it takes into account now fast it travels, but also favourably weights further distances with larger scores?
to be honestly it seems randomly generated, it makes its changes so drastically. it had a mostly working formula in 10 then went back about 8 generations and re-cycled through without realizing the wheels being close to the ends makes it more stable
This is amazing especially after seeing a carykh video where it too hundreds of generations to make "walking" creatures that kind of shuffled along the ground
This will probably bring back smalltalk and visual based languages back into the limelight. They should try that same model on different tracks see the results
You should make it so that after like 50 generations you press a button to make it give a higher score to heavier cars or something like that just to see how they react. I'm sure after a while it would just make a really big car that flops one inch and gets a really high score but it would be fun to test.
turn this into a game where you can build a kart, place wheels and make it heavier. there should be a guy on the car and if he falls off, it should be game over. polish up the textures, remove the statistics menu, and get it reviewed so it can be published to the app store or the google play store
"After 300,000 crashes resulting in over a million deaths, our cars have finally learned how to drive on roads with an accident rate of less than 10%" *Audience cheers*
Hello, I am a beginner in genetic algorithm and recently created one of my first genetic algorithm. Sadly I encountered some problems: Each generations, the agents are supposed to get better and better, also to have a chance to get dumber because of the mutation function, to battle this, I implemented etilism (I believe that's the correct term) which selects the best agent from the previous generation and transfer it into the next generation so as to prevent from the algorithm getting 'dumber' agents than the previous agents. However, the fitness function increases a bit at the start and slowly decrease? For the output of the agents I implemented threshold, if the output is greater than the threshold, the boolean output will mark that as 'true' otherwise 'false'. For the mutation function I also mutated the threshold to be a random number between 0 - 1,
It's really hard to say whats the issue in your case, but decreasing fitness sounds like something is off. Usually one spends a lot of time tuning hyperparameters for the model to work. Try different inputs scaling. fitness calculation, mutation algo etc.
I've always wanted to make one of these neural network/genetic algorithm programs, but I'm still unsure of how to get the actual code written. Are there any video tutorials that can help get me started?
В итоге из сложной машинки должно остаться одно колесо, так как ему легче катиться без лишних деталей. То есть отбор ведёт к упрощению. Так же и бенгальскиз тигрон естественный отбор по своему определению должен упрощать и превращать в одноклеточных простейших самых идеальных по выживанию и размножению
Tomek S Hi! I've been trying to learn how to do similar experiments for a while, but I've been failing to find the right tools to work with if you could give me any tips or guidance I'd be grateful.
The biggest question is: would all AIs create similar or the same cars, or same final car, for this exact same track, or would there be variance and what would such valence depend on?
Can you Give it data for the distance traveled in the last 5 and 10 seconds(more is better). As well as give it the ability to change its speed at any time. Also, penalize it for flipping the car at any point. Then also give it cargo that it has to carry on the wood/body of the car. Once it is able to do all of that vary well, increase the weight and or size of the cargo. Though, can the AI even 'see' the track? Is it just "going forward" without the ability to sense the environment?
@Tomek I know how to use genetic algorithm but I don't know how to use it existing game e.g. how can I simulate clicks in existing 2D game simular to this?
@@sm4llbit keyboard button press to be exact. I don't have source of the game I have only runable version so I have to trigger key press from my program.
Did you use an existing framework, or did you build your own genetic algorithm? Also, is the car built and controlled by a NN, or is it directly based on the genetics?
Hey, im really intrigued by machine learing/AI. I think I already get the concept of machine learing, but dont understand the niddy griddy part of how you actually implement it. could you advise me some good starting point for getting into it? As a CS student i will have the posibility to get into it later down the line, but i really want to start doing some small projects in the near future.
Could this be evidence that the form of a car would be seen on intelligent alien planets by extraterrestrials? I always wonder how intelligent aliens would progress relative to us. Cool stuff.
The most simple way is when you're mixing the genes while one of the designs finishes the track, but you need mixing based on each track part and each car must have a same lifespan. Genes mutate differently based on surrounding environment for a given time Maybe I (and he) made a mistake saying genetic while we should talk about which evolutionary algorithm and which method you are using in the video ...
It's 4am and I'm watching genetic algorithms......
me too.
Aaron Hinojosa 2.27 right now
They are actually quite interesting
Next step: minimize time to finish. If you use both time and distance and fitness, I wonder what combination of them would make a greater car evolve faster
Me is a 8 of am
>Adds boxes so the cars can't flip.
>Best AI proceeds to get rid of the boxes.
The essence of evolution :)
It's like a pro version of Hill Climb Racing
It would be interesting to co-evolve the track using a fitness function that selects for tracks that are better at challenging cars. The fitness function for the track could reward tracks that create more complex 'interesting' car movements (flips, backtracks, variations in speed, etc).
Yes, I thought would be very interesting to generate levels for a game using evolution as oppose to hand crafted designs. It would be very tricky to setup though, but very interesting idea.
The terrain needs to remain constant. The AI is learning yes but it is only learning for a specific track. Theres an example of why the track cant change and its from a MarIO video by SethBling. Idk how to spell his name but anyways he makes an AI that can beat a mario level but the AI despite learning enough to beat the first level cannot and will never beat the second level because the AI didnt learn it specifically.
I mean I assume. I have yet to see an AI that can adapt to new tracks, levels, terrains after successfully completing one.
I think he meant, that the car is constant and the track structure is a genotype that evolves.
I'd like to see them co-evolving, responding to each other in a coevolutionary configuration. Cooperative coevolution might tend to lead to boring tracks unless the fitness functions were carefully tuned to select for 'interesting' behaviors.
The track does not need to remain constant, in general. Most of the examples I've seen of evolving vehicles use randomly generated tracks. A specific implementation might be limited to exactly one terrain, but that is a feature of that specific implementation.
My own dabbling in this is on the evolution of computer programs that navigate a maze (a very simple simulated stack machine CPU with port-based IO connected to sensors and actuators on a simulated vehicle in the maze, running assembly language programs that evolve). It does not co-evolve the maze, it just randomly generates them, new for every member of the population. That's an interesting idea though, now that I'm thinking about it. I wonder if I can come up with a way to generate the mazes using an evolvable script. I'll have to think about ways to encode a maze-generating routine in a way that can be evolved.
wiki.ece.cmu.edu/ddl/index.php/Coevolutionary_algorithms
Human music - I like it
Vinz Gilligan Only those with 900+ IQ will get this joke.
JD PG I only have 899 IQ, what did he mean?
*Minimum simulation power
@@14031993 he mean that morty was just a simulation
lmao
Очень ждал, что генетический алгоритм в конце концов сгенерирует жигули.
Ахах, убил
And thats how they created the bots in Hill Climb Racing :D
Very cool! I wonder if you could add to the car algorithm a "passenger" object, and trigger a game over when the passenger "dies." How would the successful evolution look different, if it had to also take into account the "safety" of the "passenger"?
What would constitute a passenger death? A flip? Because none of the cars completed this track without at least 1 flip.
add a given size square component, and if that ever touches the ground, it's practically dead.
@Jack Kalish: You could also add "energy" usage (a component left out from these simulations too often), and also weight as "fitness", since if it can carry more, more effectively, then it's a good machine.
Basically you want to have an AI that plays the hill climb racing game.
One thing to note getting a convergence is very tricky.
The music helps me appreciate it even more. Awesome.
one wheel is the best 😌
Right. I was surprised that didn't appear.
Maybe he set a minimum parts limitation.
Of course, there will be some constraints
Or maybe just that a wooden block is required.
李锦州 so
I like watching these because they demonstrate evolution pretty well
That. Was. Intense.
The music kept me watching like it was some kind of NASA milestone :P
This guy and Carykh would have interesting conversations.
Thank u, this video cleared my confusions regarding genetic algorithm
woww this is great but it just shows how a machine can only ever be a tool -- what a human can solve with intution and design mindset will take a machine a ton of computing to arrive at by force. But that may not really be a problem with the evolution of computing resources.
I don't know, I'm just a chemical engineer but this is real cool! :)
Hey there! Amazing video. I was wondering about a few things:
Would it be possible to make the terrain randomly generated? Using some sort of noise, the terrain could be different for each genome. That way the cars will be able to drive in different circumstances.
Also, is it theoretically possible to base the fitness on distance traveled in a certain time? Instead of only stopping when the car gets stuck, wait 20 seconds for each car and then go on to the next one. Would this work? Would they "learn" that speed is important as well?
Thanks a lot for your time and this video :)
winnie33 Hi. about this randomizing of the terrain, I dont really think this would work. The entire experiment is set to evolve the car to do this particular test (track). Any generation might be proven useless on newly randomly generated track because it was evolving to beat previous one. However due to nature of this experiment latest generations shouldnt have a problem to beat any randomized withing some limits track, but this is not what Genetic Algorithms are for. As for the second question It could work but than again from theoretical stand point the experiment is to evolve the car to beat the track. The track has variety of different obstacles, a successful car should be able to beat. Capping test run to 20 second would result in the cars never get to some parts of the track, hence it would (probably) never evolved to beat the track and be able to pass any obstacle from it.
Thanks a lot for the quick and in-detail answer!
About the random terrain, why aren't genetic algorithms fit for the job? Are there any other neural networks (if that's how it's called) that could do this?
Anyway, your videos are really nice and informative. I wish you all the best with your channel and look forward to seeing more of these videos :)
winnie33 Hi. first to be clear I am not any kind of expert of this matter just a hobbyist so I suggest you read some scientific literature about this topics. With that said, I dont use neural networks here my phenotype just performs a single action driving and fitness evaluates how it did. I am affraid if you want a arbitrary phenotype perform well in any random environment you better call SkyNet. But seriously a neutal net is what you need (I even did one experiment with it and uploaded video). But than agaim neural net is to solve a more complex problem with multiple inputs and outputs (i.e. driving car learns to complete the track). Again any neural net applicatios are very vulnerable to changing environment. There was one example in which net learned to pass level after 2x generation but next level had different kinds of obstacles so the nnet was useless and it needed to learn from start. Finally it all depends what exactly do you mean by random track. In this example as i sad phenotype is simple. Assuming your would have a more complex one with controlles speed breaking and balancing maybe. Than any new random piece of track you generate might constitute new type of obstacle your net is not ready for (but it all depends on how you define it). Than it will need some generations to learn it but it would forget the once you already had because its not testing against them anymore. Again this is just guessing, but I've seen few dozens of nnet examples and in none of them the problem to solve is changing during the experiment.
?
How about using something like distance squared or cubed divided by time for the fitness, so that it takes into account now fast it travels, but also favourably weights further distances with larger scores?
Great work!!
Such kind of work is what pushes science forward...
Kudos to you guys!!!
to be honestly it seems randomly generated, it makes its changes so drastically. it had a mostly working formula in 10 then went back about 8 generations and re-cycled through without realizing the wheels being close to the ends makes it more stable
cooldued11 well the initial population is indeed randomly (within bounds) generated.
A nice proof of Occam's Razor
the music in this video is extremely calming haha
Like the way generation 21 has a "stabilizer tail/front"
Like it uses it to defect most of the flips by my calculations.
Anyway great video.
This is amazing especially after seeing a carykh video where it too hundreds of generations to make "walking" creatures that kind of shuffled along the ground
Sometimes I really feel the urge to help those little cars.
"You go, little fellow, theeeeere you go!"
This will probably bring back smalltalk and visual based languages back into the limelight. They should try that same model on different tracks see the results
Why do I find this so adorable?
its so relaxing to watch machines slowly becoming more and more intelligent than the human race
You should make it so that after like 50 generations you press a button to make it give a higher score to heavier cars or something like that just to see how they react. I'm sure after a while it would just make a really big car that flops one inch and gets a really high score but it would be fun to test.
This is awesome! I've been wanting to get into genetic algorithms and machine learning code.
crazy to think what can be accomplished with brute force, but insight is nice to have
turn this into a game where you can build a kart, place wheels and make it heavier. there should be a guy on the car and if he falls off, it should be game over. polish up the textures, remove the statistics menu, and get it reviewed so it can be published to the app store or the google play store
Imagine tesla using the same code for self driving cars xD
so the car changes appearance every time it gets stuck?
"After 300,000 crashes resulting in over a million deaths, our cars have finally learned how to drive on roads with an accident rate of less than 10%"
*Audience cheers*
Do you think they don't ? Self taught artificial neural networks are everywhere
Where did the information about the shape of the wheel, the nature of going forward, and the frame of the wheel come from?
That AI be like, "Are you SURE one wheel in back and one in the middle won't work?"
This was cool. Did your algorithm eventually learn not to use non-drive wheels?
So, you basically get a BatBike at the pinnacle of evolution!? DC got surprises!
Did the program generate a unicycle with a center of mass inside the wheel?
Now I feel the urge to play Elastomania
And that son, is how cars are made.
The final design is the first design a toddler would create.
Nice job!
*leave it running while you get lunch*
*comes back and computer steals your car*
i used to have an app on android that did a similar thing can't remember the name but it helped me sleep
Amazing ! Never saw this type of algorithms, iam very curious about this area now !
you're in for a ride, there's quite some videos about this on youtube. try looking for genetic walking algorithms
A youtuber named carykh makes some 'evolution simulator' videos you might like. A really cool type of simulation.
Reminds me of that toy car I had when I was a kid that you could drive into walls and it flip upside down and keep driving.
well, love the music:)
Do you have the unity files in public domain to explore..?
What language you use for developing AI algorithms/models?
Flatron303 it's c# in unity
Hi, would it bother you if I might use some 10 sec samples for a simple lecture of what could be achieved with AI ?
Not at all, go ahead ♥️
Feel free to use any of my ml videos
What are the inputs of such an algorithm?
00:47 Probably a proto version of a future muscle car
There is no Creator who created this car, as it is improving and evolutionized itself.
So satisfying
In the entire video I was like: "he's begining to believe"
Hello, I am a beginner in genetic algorithm and recently created one of my first genetic algorithm. Sadly I encountered some problems: Each generations, the agents are supposed to get better and better, also to have a chance to get dumber because of the mutation function, to battle this, I implemented etilism (I believe that's the correct term) which selects the best agent from the previous generation and transfer it into the next generation so as to prevent from the algorithm getting 'dumber' agents than the previous agents.
However, the fitness function increases a bit at the start and slowly decrease?
For the output of the agents I implemented threshold, if the output is greater than the threshold, the boolean output will mark that as 'true' otherwise 'false'. For the mutation function I also mutated the threshold to be a random number between 0 - 1,
It's really hard to say whats the issue in your case, but decreasing fitness sounds like something is off. Usually one spends a lot of time tuning hyperparameters for the model to work. Try different inputs scaling. fitness calculation, mutation algo etc.
That last one looked like a set of glasses.
I study and apply this algorithms 10 years ago at university.
I can't be the only one that got excited at 3:23 .
Wow yaar maza aa g
aya
I was really rooting for the car
where's the soure code? what library you used?
I've always wanted to make one of these neural network/genetic algorithm programs, but I'm still unsure of how to get the actual code written. Are there any video tutorials that can help get me started?
WillTheGameDesigner try deeplearning.tv
Would you please share what is the outputs in this algorithm?
В итоге из сложной машинки должно остаться одно колесо, так как ему легче катиться без лишних деталей. То есть отбор ведёт к упрощению. Так же и бенгальскиз тигрон естественный отбор по своему определению должен упрощать и превращать в одноклеточных простейших самых идеальных по выживанию и размножению
Sounds like my alarm went off
That is fucking awesome.
Hell Gen 37 drives better than at least half of the people on the street
Tomek S Hi! I've been trying to learn how to do similar experiments for a while, but I've been failing to find the right tools to work with if you could give me any tips or guidance I'd be grateful.
The biggest question is: would all AIs create similar or the same cars, or same final car, for this exact same track, or would there be variance and what would such valence depend on?
the outer shell
I'm supposed to be getting ready to shower and I'm here watching this with no idea what's going on
Can you Give it data for the distance traveled in the last 5 and 10 seconds(more is better). As well as give it the ability to change its speed at any time. Also, penalize it for flipping the car at any point. Then also give it cargo that it has to carry on the wood/body of the car. Once it is able to do all of that vary well, increase the weight and or size of the cargo.
Though, can the AI even 'see' the track? Is it just "going forward" without the ability to sense the environment?
@Tomek I know how to use genetic algorithm but I don't know how to use it existing game e.g. how can I simulate clicks in existing 2D game simular to this?
Clicks?
@@sm4llbit keyboard button press to be exact. I don't have source of the game I have only runable version so I have to trigger key press from my program.
Very cool, is there a way to look at unity project ?
Did you constrain the number of wheels to two?
I noticed you programmed a sort of "shocks and suspension" system, was that capable of changing as well?
Jones Crimson that's correct
Could this be seen as a proof that for this specific example there are no viable cars that are not able to be turned over?
Very cool.
Is the code Open Source available somewhere?
Hi, I have a question. What did you use to make the fitness graph?
Unity UI
@Tomek S Is it possible to find your code somewhere in public?
I'd be very curious to know how the phenotype is encoded into a genotype in this example... Does anyone know?
Self-learning Incredibots. That's what I got from this. heh
"Your scientists were so wrapped up with whether or not they could, they never stopped to ask if they should."
- Ian Malcom
and now - experiment 2, turn on eurobeat and look what will happen.
Up next, genetic algorithms - evolution of Happy Wheels
Computer algorithms will help us develop better devices and machines
How do you do it. I want to try
Did you use an existing framework, or did you build your own genetic algorithm? Also, is the car built and controlled by a NN, or is it directly based on the genetics?
Didn't use any frameworks, wrote the code myself. There is no neural network in this example.
so this is how the movie cars was made
This was quite interesting and entertaining. Do you share any of the code anywhere so others can build upon it?
Hey, im really intrigued by machine learing/AI. I think I already get the concept of machine learing, but dont understand the niddy griddy part of how you actually implement it. could you advise me some good starting point for getting into it? As a CS student i will have the posibility to get into it later down the line, but i really want to start doing some small projects in the near future.
The coding train channel covers quite a lot of this, its very well explained too. Good starting point.
RUclipsr carykh has done some 'evolution simulator' videos and his code is open source. It's great fun messing with variables and seeing the effects.
What was the music you used in the video?
Just read the description
Well.... That's embarrassing..... Thanks
Could this be evidence that the form of a car would be seen on intelligent alien planets by extraterrestrials? I always wonder how intelligent aliens would progress relative to us. Cool stuff.
What is the genome program you use, pls?
Not exactly sure what you mean, can you elaborate?
Tomek S ok, i want to know who do you create that ai and the interface .
He asks about which genetic algorithm you used in the simulation
I didn't know there is more than one :)
The most simple way is when you're mixing the genes while one of the designs finishes the track, but you need mixing based on each track part and each car must have a same lifespan. Genes mutate differently based on surrounding environment for a given time
Maybe I (and he) made a mistake saying genetic while we should talk about which evolutionary algorithm and which method you are using in the video ...
The song sounds like an annoying iPhone alarm ringtone
I managed to listen to a whole minute of that repetitive music before I had to turn the sound off. Do I win a prize?
Dan Blackburn yeah man unfortunately yt doesn't let you change music after you reach some amount of views
No biggie. Least I left a comment and a like.
If u'll imagine that wheels are eyes that looks fun and creepy :D
How did you do this?? I wanted to make a genetic algorithm using unity, but never found it
video maker never found what?
how did you make this? could you make a video about that?
Can I run this on my pc and watch it in real time?
Simple is the hardest!
Wie bin ich hier gelandet ?!