Training an unbeatable AI in Trackmania
Yosh1 HN recommender · recommended in 1 month, 2024–2025
explainer · intro · evergreen · 2024–2025 on HN
Yosh trains a reinforcement learning agent to drive Trackmania until he can no longer beat it. The video explains how the training works and the design choices involved.
Recommended as an approachable explanation of how reinforcement learning works in practice, and cited for the constraints needed to stop exploits.
Up next
3 mo on HNClassic Game Postmortem: Alone in the Dark
GDC Festival of Gaming
3 HN recommender · 2019–2023
16 mo on HNThe spelled-out intro to neural networks and backpropagation: building micrograd
Andrej Karpathy
17 HN recommender · 2022–2025
14 mo on HNBut what is a neural network? | Deep learning chapter 1
3Blue1Brown
16 HN recommender · 2017–2025
10 mo on HNAlphaGo - The Movie | Full award-winning documentary
Google DeepMind
10 HN recommender · 2020–2025
10 mo on HNTransformers, the tech behind LLMs | Deep Learning Chapter 5
3Blue1Brown
13 HN recommender · 2024–2026
10 mo on HNUSENIX Security '18-Q: Why Do Keynote Speakers Keep Suggesting That Improving Security Is Possible?
USENIX
10 HN recommender · 2018–2026
11 mo on HNLecture 1 | Machine Learning (Stanford)
Stanford
11 HN recommender · 2008–2020
10 mo on HNMarI/O - Machine Learning for Video Games
SethBling
10 HN recommender · 2015–2026
8 mo on HNDeep Dive into LLMs like ChatGPT
Andrej Karpathy
10 HN recommender · 2025–2026
10 mo on HNComputer program that learns to play classic NES games
suckerpinch
9 HN recommender · 2015–2025
9 mo on HNRL Course by David Silver - Lecture 1: Introduction to Reinforcement Learning
Google DeepMind
9 HN recommender · 2017–2026
8 mo on HNLet's build GPT: from scratch, in code, spelled out.
Andrej Karpathy
14 HN recommender · 2023–2025
4 comments from Hacker News
For those who only read the comments, be sure to check out the videos by Yosh. They're amazing, and do a great job explaining how reinforcement learning works in practice: ▶ this video link
There’s a few very cool examples where someone recently used RL to solve trackmania, and ends up having to add all sorts of constraints/penalties to prevent extremely strange exploits/glitches that are discovered IIRC… been a while since I watched. ▶ this video link
Depends what you consider fun, and how far you take it. Some people enjoy programming more than repetitive clicking in a GUI. For a clicker game, writing a bot lets you iterate on strategies easier - is it faster to get to level 2 if I buy the upgrade for A or B first? For Trackmania, it lets you get a world record and a YouTube video with 14M views. ▶ this video
>The entire point of this is to not encode the board state! I am not sure about this. From the article "The 50M parameter model played at 1300 ELO with 99.8% of its moves being legal within one day of training." I thought that the experiment was how well the model will perform, given that it's reward function is to predict text, rather than checkmate. Leela, Alpha0 their reward function is to win the game, checkmate or capture pieces. Also it goes without saying that Leela, Alpha0 cannot make illegal moves. The experiment does not need to include the whole board position if that's a problem, if that's an important point of interest. It could encode more information about squares covered by each side for example. See for example this training experiment for Trackmania [1]. There are techniques that the ML algorithm will *never* figure out by itself if this information is not encoded in it's training data. The point still stands. PGN notation certainly is not a good format if the goal (or one of the goals) of the experiment is to be a good chess player. [1] ▶ this video