After three years, a Trackmania player’s quest to build an “unbeatable” racing AI finally appears to be at an end.
If you’re not familiar with Trackmania, it’s a pretty wild take on racing games, focused largely on time trials through user-created tracks filled with absurd corners, corkscrews, and other hyper-unrealistic obstacles. I know it primarily for weird custom servers with chill vibes and pirated music playlists, but it’s got a robust driving model that makes it a popular competitive pastime, too.
The fact that it’s all about time trials and custom tracks also means that Trackmania is a terrific testbed for AI training – at a minimum, it inspired a player who goes by Yosh to start building an AI that could beat his times. He’s been running a YouTube channel documenting the AI training process for some time, and three years later he’s finally done it. (Thanks, PC Gamer.)
To start, Yosh built a simple track made of simple curves, a bit like a gently sloped waveform. Through numerous iterations, the AI pretty quickly learned how to complete the track with a decent time, but it was still well behind Yosh’s own times. “So, like my AI,” Yosh explains, “I entered a trial and error loop of guessing what to fix, re-running the training, and waiting to see if it got better. Usually it didn’t. This was a painful process.”
Eventually, that trial and error process paid off – the AI beat Yosh’s time, and kept getting better, shaving more and more fractions of a second off the record. But that was just a simple track, so Yosh built a new training ground in the form of a massive maze without any boundaries. Here, the AI took about 35 hours of training in order to beat Yosh’s time – which isn’t bad when you consider that it’s competing against a human with 17 years of experience.
But there was something missing at this point: the AI hadn’t yet been trained to use the brakes. In the spirit of fairness, Yosh hadn’t been using brakes either, but after the AI’s successes he decided to try something unfair. He set a better time about nine seconds faster by drifting around corners with the brakes – and the AI almost instantly managed to beat that time too, even though it was still suffering from the no-brake handicap.
Yosh did eventually manage to train the AI in the mystic art of braking and drifting, and at this point it’s effectively unstoppable – particularly on a track in the style of a massive maze, where the consistency of a machine is best able to push past the small mistakes a human might make on such a long track, but the AI’s been able to beat his times on much shorter versions, too.
For me, the interesting part isn’t so much that an AI can beat a human’s times – like yeah, I expect a computer to be good at playing a computer game – but rather the insight into how machine learning works and the amount of work it takes to train an AI algorithm for a given purpose. Recently we had another excellent example of this kind of thing with the Pokemon Red AI that took 7,000 hours to beat the first gym.
AI-generated content remains controversial – with good reason – but machine learning technology is likely to be with us for a long time to come. These sorts of projects serve as a very interesting way of learning how that tech actually works.
Enjoy your own times in the best racing games before the AI inevitably comes for them.