Training an AI until it beats me in Trackmania - Summary

Summary

The speaker discusses their three-year journey to create an artificial intelligence (AI) that can beat them in the racing game TrackMania. The AI uses an artificial neural network and reinforcement learning to learn and improve over time. However, it encounters difficulties, such as getting stuck in sub-optimal strategies and making mistakes. The speaker overcomes these challenges through trial and error, making small adjustments to their code and training the AI for hours on their laptop.

In the end, the AI proves to be faster and more consistent than the speaker, even on complex tracks where it must anticipate turns and changes in road layout. Despite the AI's success, the speaker notes that it's not perfect and could still improve, especially on shorter tracks where precision is key. The speaker concludes by acknowledging that the AI has surpassed their skills, but still believes that better players could potentially beat it and invites others to challenge the AI in the game.

Facts

1. The text discusses the use of artificial intelligence (AI) to control cars in a racing game called Trackmania. The AI is designed to improve over time through trial and error, with the goal of finding the best lines to drift perfectly .
2. The AI uses an artificial neural network, a mathematical tool that models how the brain works. Every tenth of a second, the neural network receives a few numbers describing what's happening in the game and outputs new numbers specifying the action to perform .
3. The AI is trained using a method called reinforcement learning. The AI starts with zero prior knowledge and its decisions are rewarded depending on how good they are. The AI uses this data to progressively tweak the neural network, aiming to reinforce actions that lead to more reward .
4. The AI is controlled by slightly different versions of the neural network, representing successive states of the AI as it learns in each new attempt .
5. The AI's performance in the game improves over time due to the trial and error loop of making decisions based on its current knowledge, using fresh knowledge to update its decision process .
6. The AI was trained over a period of three years, and the creator found it challenging to get the AI working properly .
7. After many small adjustments in the code, the AI finally stopped hitting the walls and started getting closer to the creator's time in the game .
8. The AI's performance on a simpler track improved significantly over time, with it becoming very consistent and even beating the creator's personal best on a map where it had never trained before .
9. The AI struggled on unseen tracks, making more mistakes and sometimes getting completely confused, especially when approaching a long straight line .
10. The AI's performance was significantly improved by training it to drift, a trick that is hard to discover on your own and requires a lot of driving experience .
11. The AI was able to master the new drift technique and used it wisely, only when it saved time, resulting in a significant improvement in its performance .
12. After a final test, the AI outpaced the creator, confirming that it could not beat the AI anymore .