XaiJu
Yosh

Yosh

patreon


Yosh posts

How I visualize what the AI does

In the videos, I often show hundreds of AI runs overlaid on top of each other. These ingame clips look nice and make the AI’s behaviour easy to visualize…

but they also take a while to produce. And since I’m often training the AI several times a week, with tens of thousands of runs in every session, those polished visuals aren’t very practical.

Instead, during training I regularly save some trajectories into simple files, containing things like the car’s position and ro...

View Post

Training the AI on yet another track

I just trained the AI on A06, the 6th track in the campain. But this time, the results were a bit more disappointing!

One key trick on A06 is to use the ramps from the side to reduce airtime and save a few hundredths. It’s even possible to do a full 360° flip on the second ramp: that’s what Link does in the current World Record.

However, the AI wasn’t very creative here. It barely exploited the sides of the ramps at all, except on the third one. My guess is that early in...

View Post

Sneak peek of an upcoming video

Finally, it’s time to leave A01 behind and move on to the next chapter! As I said at the end of my last video, I’ve been training the AI on the next campaign tracks, to see if it could also beat humans there.

This small video shows the result of training the AI on A05, the 5th track in the campain. This track has a shortcut near the end, where you can jump over the road's fence and climb it back later to reach the finish line. To ensure the AI would take the cut, I...

View Post

AI Learns to Speed-Drift by Itself (Bonus 5/5)


Here’s a visualization of the AI progressively improving its speed-drift technique on A01. I originally planned to include this footage in the A01 video, but later decided to cut it to avoid making the video too long.

During training, the AI gradually learned to keep its drift angle close to the optimal value (red arrow) with increasing precision. We can also see how it progressively adjusted the timing and position where it initiates the drift. By the end, it was starting the dri...

View Post

About Action Space and Continuous Actions in Reinforcement Learning (Bonus 4/5)

In my previous post, I explained why I capped my AI to 20 actions per second in the A01 video. But action frequency wasn’t the only restriction: I also limited the AI to a fixed set of steering values. This might seem strange, since Trackmania allows for an almost continuous steering range, and many top players use a gamepad joystick to take advantage of that. So again, why this restriction? Here are some further explanations below.

When training my AI with Reinforcement Learning (RL)...

View Post

About Action Frequency in Reinforcement Learning (Bonus 3/5)

In the A01 video, I explained that my AI can take 20 actions per second, using only a limited set of steering values. This is quite restrictive, since Trackmania allows up to 100 actions per second, and an almost continuous steering range. So yes, in theory, it's quite obvious the AI could reach higher performance without these limits...

So why impose them? Here is a more detailed explaination below! And to start, let’s first look at the topic of action frequency. View Post

More visualisations of AI training (Bonus 2/5)

Can you guess how many cars there are ?

View Post

Some statistical principles behind the segmented run (Bonus 1/5)

This is the first of five bonus posts related to the A01 video! This clip is an extra section I originally cut from the main video to keep it shorter. It's a bit out-of-context so I'll give some extra explanations below.

In the A01 video, I made the AI drive a "segmented run". The principle is simple as showed in the video: the AI tries the first segment of the map many times, I take the best attempt, the end point of that attempt becomes the starting point for the next segment, and I r...

View Post

New video & welcome to newcomers!

More than a year ago, I trained my AI for the first time on a special track: A01-Race. It’s the very first level of Trackmania Nations Forever’s official campaign, and arguably the most iconic and competitive map in Trackmania. But as I kept experimenting, this project grew into something much bigger than simply training an AI...

WOW, I’m so glad this video is finally done! It took so much work. At first I thought it would be a quick 15–20 minute video, but it ended up much long...

View Post

Teaser #3 - Last one before release

In my upcoming video, we’ll take a deep dive into Trackmania Nations Forever’s very first, and arguably most iconic track: A01-Race.
As you might have seen in my previous posts, the video will explore a range of computer science techniques to push this game to its limits, including TAS approaches.
But first, I’ll start by training the AI and seeing how far it can climb on the human leaderboard.. How high do you think it will get?

I hope you like the leaderboard animation, i...

View Post

Teaser #2 - The AI is back

The first teaser was a bit different from my usual content. But this time, we’re back to some good old AI training!

View Post

Teaser #1 - Next video is 99% ready!

Almost there! Here’s a first out-of-context sample from the video to help pass the time.
The video is nearly done, but I won’t have much time to work on it over the next few days, so it should be ready in about two weeks.
In the meantime, I’ve got a few more teasers ready to keep you waiting. Even though the AI isn’t visible in this clip, you might be seeing more of it very soon :)

View Post

What Helped Me Learn AI: A list of Online Resources

When I first started training a computer program to drive in Trackmania 5 years ago, I didn’t know much about AI. So over the years, I’ve had to continually teach myself about the field. A few months ago, I shared a post with some book recommendations that I found particularly helpful for learning about Machine Learning and Reinforcement Learning.

But in my experience, books aren’t everything: their content can sometimes be too broad or theoretical. With a specific project in mind...

View Post

Halfway there

What do you think the AI is trying to do here? (Yes, it's still Trackmania!)


Just a quick update on how things are going: I'm about halfway through editing the next video! The second half gets into slightly more complex stuff than the first, so I’m currently struggling a bit to make everything easy to understand. But overall, I’m happy with how it’s going :)

View Post

Animation (behind the scenes)

Lately, I’ve been creating a bunch of animations with Manim, a Python library that’s great for math visuals. It was originally developed for the math Youtube channel "3Blue1Brown". It’s convenient since I code in Python anyway, but I’ve been wondering if there are better tools out there for visualizing this kind of data. If you have any recommendations for similar tools, I’d love to hear them :)

View Post

Book recommendations

I often get asked how I learned the AI stuff I'm showing in my videos, so I thought a post about that might interest some people here :)

In short, I started coding with the Python programming language during my studies. I then took some courses on Machine-Learning (ML) and decided to explore the topic further on my own. That's when I first started making videos about training an AI in Trackmania. Over time, I became particularly interested in a subfield of ML called Reinforcement Learn...

View Post

About the next video

Remember the teaser at the end of the noseboost video ?
As I mentioned then, my next AI video will dive into the world of Tool-Assisted-Speedruns (TAS). In particular, I'd like to explore what makes TAS and AI different, why TAS vastly outperforms AI in Trackmania, and how these two techniques could potentially be combined.

The idea for this video led me to create a TAS myself on the track A01-Race. (For the record, this run was even awarded best TAS of the year by the Trac...

View Post

Bonus video #5 - Full noseboost runs with states & actions

Last bonus video on the noseboost before finally moving on to new AI projects ;) There's a reason I didn't include the full run on the last track in the main video: at this speed and with the car spinning, I think the visuals are a bit hard to watch. That’s also why I slowed down most of the footage in the main video.

Looking ahead, I already have several ideas for new content to share here. My goal is to post something every 1–2 weeks. Let me know what kind of content you’d like...

View Post

Bonus video #4 - Memorisation vs Learning

Here's another extra section I cut from the main video to keep it shorter. Once again, it gives more details on how the training works.

The trick I'm describing here (a slight perturbation of the initial conditions to ensure the AI doesn't overfit) is not new. I talked a lot about that in the pipe video, and explained how a very small perturbation is enough to induce completely differents runs, due to the chaotic nature of the game-AI interaction.

But here it was harder to avoid...

View Post

Bonus video #3 - PPO vs DQN

In the noseboost video, I mentioned reworking the AI’s training algorithm to push its limits. Here’s a more detailed explanation of what happened!

Reinforcement Learning is a vast field, and researchers have developed many different algorithms over the years. Some of the most commonly used ones include Deep Q-Learning (DQN), Soft Actor-Critic (SAC), and Proximal Policy Optimization (PPO). Although these algorithms share a common goal, each has its own strengths and weaknesses. Compa...

View Post

Bonus video #2 - Unshown noseboost run

Another bonus from the noseboost video! This was the first map where I tested whether the AI could control its direction during a noseboost. The AI simply had to pass two ring checkpoints before to reach the finish.

I experimented with different inputs and rewards schemes to make it work. At first, I didn't give enough reward for entering a checkpoint (compared to the risk of hitting it and ending the run); that's when I first observed the AI making infinite circles around its ta...

View Post

Bonus video #1 - The Kangaroo strategy

This is the first of five bonus videos related to the Noseboost AI! This clip is an extra section I originally cut from the main video to keep it shorter.

In the main video, I explained that I trained the AI with two constraints: (1) don’t tilt too much, and (2) don’t go too high. However, I initially tried training it with only the first constraint—and, as you’ll see in this bonus video, that didn’t go well... Which is why I later added the second constraint

Thanks fo...

View Post

New video & welcome to newcomers!

In March 2024, I started trying to train an AI to learn the hardest technique in Trackmania: the “noseboost”. And almost a year later, I’m happy to say I’ve reached the end of this journey—the video is finally here!!

I’m sorry it took so long; this video really took a lot of work. And I’m very grateful to all of you who’ve supported this project on Patreon during this time: Thank you so much! And welcome to any newcomers who might be reading this after watching my latest...

View Post

[Video] Teaser #3

Can't wait to release the full video, so here is another teaser!! This time with a better view of the AI in action

View Post

[Video] Teaser #2

Next teaser for the upcoming video! Can you guess what the AI is training for here ?

The video should be ready next week, just a few more days!

View Post

[Video] Teaser #1 for the next video!

The upcoming video is almost ready, just over 20 minutes long. Any idea what it's about? :)

View Post

More progress

Hi, it's been a while!

I've been continuing the development of my AI and I'm pretty happy with the results :) I'm currently working on a new video. There is still a lot to do, but I'm aiming to release it around December-January.

Sorry for the long wait, It's been a while since the last video and I've been pretty inactive on this page for the past month. I'll try to post a few teasers in the upcoming weeks until the video release!

Thanks again for your support
Yosh

View Post

[Video] some news

Hey, I've spent a lot of time improving the AI training setup over the last few months. Here's a quick look at the progress so far :) There are still several problems to fix. I hope to continue making progress in the coming weeks, I'll keep you updated :)
Yosh

View Post

NEW VIDEO

That's it, finally, new video tonight!!
As you saw in the previous few teasers, I trained an AI to drive on pipes. I put the AI on three different tracks with one common goal: to beat the human world record. I encountered several unexpected results with these pipes, hence the length of the video.
Thanks for you support on Patreon, I hope you enjoy the video, and please let me know what you think of it :)

View Post

[Video] Teaser #6

A quick view of the AI driving on another track.
Can't wait to post the video when it's done, I'm very happy with how it looks so far

View Post