Machine learning has long been a topic of interest for humanity, but only in recent years have we had broad access to great computing power to enable to the average person to dive in. [Yosh] recently decided to put an AI to work learning how to race in Trackmania.
After early experiments with supervised learning, [Yosh] decided to implement a genetic algorithm to produce an AI to drive in the game. The AI takes distance from the track walls as an input, and has steering and accelerator values as an output. Starting with 100 AIs in generation 1, [Yosh] iterated by choosing the AIs that covered the longest distance in 13 seconds. Once the AIs started to get the hang of the first few corners, he changed the training to instead prioritize the lowest time taken to traverse each of the checkpoints along the track.
The AI improved over time, and over 100 generations, got down to a 23.48s time on the test track, versus 19.63s for [Trabadia], a talented human. We’d love to see how much better the AI could do with more training. [Yosh] is trying more experiments, like providing extra feedback in the AI fitness function to keep it from hitting the walls. It’s not the first time we’ve seen a genetic algorithm used to train a racing AI, either. Video after the break.
But is it learning to drive or did it just learn that one particular track?
Why not watch the video?
the article, nor the video answers the question, is the model able to generalize to other tracks ?
Around 8:30 in the video shows this best. It is learning the first half of the track and uses what it learned to drive in the new section of track that it has not seen before. So yes it is learning to drive, it is just going to do worse with unfamiliar track just like an organic neural network.
Or if you dont want to bother watching the video, maybe read the article?
As the kids say: “smh”
the video itself, nor the article answer to the question, is this model able to generalize to other tracks ? so yeah, meh.
No shit it can, if you put this ai in any track with time it will learn. No human can just learn to do a track instantly even with prof backround.
the article, nor the video answers the question, is the model able to generalize to other tracks ?
Wonderful, now add a multiplayer component.
I think the result would have been better if he had used the car speedometer as part of the fitness function. Keeping the value as high as possible for as long as possible could have provided valuable information. Also, only being able run the track in realtime is a serious problem. A simulation of the game (even if an absolute bare minimum) would have enabled him to run millions of generations in an equal amount of time.
for me it also looks that the ai has not enough data, fastest actor is keeping in the middle of the track even in the corners, because it does not know how the track looks like in front. Ffor me it looks that it can’t distinguish between left and right turn and should get more data from the front – maybe few deg left and right from the middle beam.
100 generations is really short for such an impressive result.
The simulated drivers don’t anticipate the best positioning of the car as well as the real driver. Seems like a better formula for track position and speed would help. Also, once a human runs the track the upcoming curves are known. Perhaps adding a track layout to the AI vehicles would be more fair. Good Job
I don’t see much obvious anticipation at all, in the zoom out, they look like a bucket of marbles dumped down a swervy marble run. Like you’ve taught them the basics of fluid dynamics rather than how to drive.
Looks so similar to fluid/particle simulations indeed (also the couple of cars going against the stream, like escaping gas bubbles)
In other words, just like all too many real world drivers.
this going to put a lot of trackmania players out of work.
after watching the video it seems like the AI cant handle long straights correctly cause it doesn’t get data about them. it’ll go full out and hit the curb in the next corner.
It will not.
Trackmania is actually even more complex than actual racing, e.g. F1. Yes, it does lack traffic, but it’s got verticality. There are heaps of tracks out there in Trackmania which have jumps and clips incorporated in them. And some tracks are so complex that you have to know the exact layout down to the pixel, position your car in turn x one certain way to make a jump in n turns, apply brakes midair to land on a specific spot to be able to take another turn perfectly.
No way in hell is an “AI” – which in this case isn’t more than a fluid simulation as others said – going to be able to accomplish this.
It absolutely will, given time. I fancy a computer to accurately hit stuff “to the pixel” over a human any day of the week
But not with that level and amount of prediction.
seems like it would have done better by just checking two points in front of it for color.
always accelerate and if left or right point is white turn opposite direction until it is no longer white.
This is not AI, this is Machine Learning. No, they are not the same. Yes, understanding the difference between them and clearly communicating is important. Something very similar to this was done way back in 2015 with MarI/O.
The term “AI” is widely used in gaming. I might not use that term at an academic conference, but in the public vernacular, everyone knows what we’re talking about.
Just wait until he changes the cars to “solid”. It would be worse than the LIE at rush hour.
How is this even possible to get the values of the speed variable? Does he have a local trackmania or how can he access them?