Trackmania AI and Noseboost


Trackmania AI and Noseboost

Anna
Imagine racing a computer in Trackmania and watching it drive in a way that seems almost impossible. The car is balanced on its nose, moving at incredible speed. To understand how the AI got there, we have to rewind: this was the result of years of work on a program designed to learn the game from scratch.

Michael
And before the nose trick, it had already learned some impressive driving. With enough training, it could drive very precisely, drift, and even drive on pipes. But then Trackmania players discovered something that made those skills seem outdated: driving on all four wheels isn’t always the fastest way to go.

Anna
Using custom tools, players found that driving on the car’s nose can exploit a physics glitch called the noseboost. In that position, the bug can suddenly push the car’s speed to its maximum. It’s extremely difficult to do in real time, so the big question was: could the AI learn to control it?

Michael
The project began with a simple idea. A noseboost is complicated to perform, but from the AI’s perspective, it’s a way to build speed. So instead of explicitly teaching it the trick, the creator trained it to seek as much speed as possible.

Anna
That’s reinforcement learning. The AI starts with no knowledge of the game, repeatedly drives a training track, and learns from the results of its actions. In this setup, it received a reward based on its current speed, and its goal was to choose actions that would add up to the most reward.

Michael
For its observations, it could use dynamic information about the car, including its velocity, rotation, and wheel information. The hope was that repeated trial and error would lead it to invent a fast driving strategy on its own.

Anna
The first track even included a jump designed to make the car land on its nose. But after a few hours, the AI found a safer solution: cancel its rotation, land on all four wheels, and keep collecting rewards. More training didn’t change that strategy.

Michael
That makes sense. A noseboost is such an unusual behavior that the AI was unlikely to discover it just by chance. So the creator tried giving it a more direct starting point: he drove the car himself, then had the AI take over from that point and try driving on its nose.

Anna
After a few random attempts, it discovered a related trick called a nosebug. By accelerating, steering, and braking while the car is vertical, it could trigger a sharp turn. A nosebug alone wasn’t very useful for gaining speed, but chaining several of them could build into a noseboost.

Michael
And that chaining has to happen extremely quickly—too quickly for a human player. But the AI could take one hundred actions per second, so it had the potential to manage the timing.

Anna
At first, though, it found ways around the intended challenge. One training run taught it to slide upside down and collect rewards. Another taught it to land on all four wheels. The AI was optimizing the reward it had been given, not following the creator’s intended idea of nose driving.

Michael
So the creator added constraints. He tracked how vertical the car was and ended the run without further rewards if it tilted too much. He also tracked its height and stopped rewarding it if it went too high. Those rules forced the AI to stay balanced on its front wheels.

Anna
That finally worked: the AI produced a noticeable speed gain that looked like a noseboost. It hadn’t reached maximum speed, but it had found the key. The expectation was that training would build on that discovery.

Michael
Instead, the AI stopped trying to boost. It became very good at balancing on its front wheels, but didn’t pursue the higher-speed trick. The creator’s explanation was that the AI had learned to avoid risk.

Anna
With a reward tied to current speed, the AI received moderate rewards right from the start of a run. A noseboost could potentially double that reward, but higher speed also made the car harder to predict. One mistake could end the run and stop the rewards.

Michael
So a cautious strategy could be better over time: collect smaller rewards reliably rather than risk everything for a bigger one. The fix was to shift the rewards so that playing it safe paid much less, while successfully starting a noseboost promised a much larger gain.

Anna
It was a small code change, but it changed the behavior dramatically. The AI became willing to take risks to gain speed, even when that meant the run might end. Eventually it achieved a complete noseboost for the first time.

Michael
More training showed it wasn’t just luck: the AI had learned the technique. Now it could reach the game’s maximum speed. The next challenge was to sustain the boost for longer—and eventually keep it going while following a road.

Anna
Progress was much slower there. After countless hours, the AI could sustain a noseboost for about two seconds at best, not nearly long enough to cover a track. At first, the creator thought a few more adjustments would solve it. In reality, that struggle lasted months.

Michael
For a while, he kept changing the rewards, then tried changing how the AI perceived the game and adjusting training parameters. By the end of April, after several weeks, the best run lasted three seconds. That raised a bigger question: were the game’s physics simply too chaotic to predict in real time, or was something wrong with the learning setup?

Anna
He put the noseboost aside and went back to a more standard track, where he could measure the AI’s learning more easily and knew it still had room to improve. That led to weeks of testing different training methods. Many approaches went nowhere or raised new questions, but some produced useful improvements.

Michael
He also looked at similar projects for ideas. One project, Linesight, had impressive performance and helped reveal things that still needed fixing in his own AI. He continued borrowing ideas and improving the training, though the process was tiring and progress took time.

Anna
After five months away from the noseboost challenge, he returned with major changes to the training algorithm. He restarted training on the noseboost track and let it run overnight. The next morning, the AI had learned to maintain control at maximum speed almost indefinitely.

Michael
That opened up a new question: could it control where it was going? Some training runs produced circles, triangles, stars, zigzags, or apparently random movement. The AI couldn’t see the stadium boundaries, so the circle pattern wasn’t simply a response to seeing the edges.

Anna
To test directional control, the creator gave the AI extra rewards for moving toward a target and added inputs that helped it locate that target. With more training, it could steer while noseboosting, although its movement initially looked hesitant.

Michael
Then it changed its strategy. Rather than crashing into a pillar, it kept a safe distance, which let it accumulate more rewards. The creator redirected it to a new location, and it adapted. Its driving became smoother, showing it could control its movement rather than just repeat one fixed pattern.

Anna
That led to the final challenge: a track with thirty corners. The goal was to complete it with a single noseboost from start to finish. Training began by rewarding enough speed to teach the boost, then switched to rewarding progress along the road. The AI also received inputs to help it locate itself on the track.

Michael
The pace was astonishing, but the AI wasn’t consistent. It often lost control in corners, especially when its spinning motion stopped. That spin seemed to help keep the car balanced on its nose—almost like a spinning top.

Anna
Looking closely at the runs revealed a pattern: the AI increased its spin when making right turns, but tended to cancel the spin when turning left. With more open space, it could keep turning the same way and sustain the spin, which may explain its circle strategy. A winding track forced it to handle both directions.

Michael
Even so, the AI gradually got better at chaining left and right turns while keeping the spin going. The expectation was that a few thousand more attempts might be enough. After learning to trigger a noseboost, sustain it, and steer it, the AI eventually completed the entire track.

Anna
And it beat the creator’s personal time by about twenty-five seconds. The story also credits Patreon supporters, whose support helped make a project requiring so much time possible. The creator offered extra content to supporters and invited viewers to subscribe for future videos.

Michael
There’s one important clarification about the noseboost footage, too. Some of the examples shown weren’t driven by the AI—and they weren’t being controlled by a human in real time either. They were Tool Assisted Speedruns, or TAS.

Anna
A Tool Assisted Speedrun is a prerecorded list of actions carefully crafted by humans, often with programming tools. That can produce strategies more advanced than what the AI does, for several reasons. The creator left those reasons for a future video, but the distinction matters: a TAS is a prepared sequence, while this AI learned to make its driving decisions through training.

Michael
So the journey wasn’t simply about teaching a car to perform one trick. It was about shaping rewards and training until the AI discovered the noseboost, learned to keep it going, and gained enough control to navigate a whole track at extraordinary speed.

Ask anything
We've read this whole study set, so questions about it get the best answers.