Pean logoPean

AI just Broke Trackmania's Greatest World Record

AI just Broke Trackmania's Greatest World Record

Video Summary

Overview

An AI was trained using reinforcement learning to drive the iconic first track, A01, in the racing game Trackmania. Starting from random actions, it learned advanced techniques like speed-drifting and eventually matched, then surpassed, the long-standing human world record. The project's goal evolved to challenge a meticulously crafted Tool-Assisted Speedrun (TAS), leading to the discovery of a new, game-changing strategy involving a previously unknown road imperfection. Through a combination of AI-driven optimization and manual TAS creation, a new performance limit was established for the track, showcasing a blend of machine precision and human creativity.

Timeline Summary

🐝 Initial Testing and Beehive Simulation

  • An AI was trained to drive in an iconic location, starting with no experience and picking actions at random.
  • A reward system was implemented to motivate the AI, encouraging it to progress faster along the track.
  • The AI learned through reinforcement learning, gradually developing its own driving strategy through trial and error over many attempts.
  • After a few hundred attempts, the AI made significant progress and was able to see more of the track using numerical data about the car's state.

πŸš— Learning and Breakthroughs

  • After 3,000 attempts, the AI reached a decent level, roughly matching the game developers' target time.
  • Its first major breakthrough was in the downhill section, where it learned to release the accelerator before a jump to land earlier and regain speed sooner.
  • The AI then refined this by jumping more diagonally, preserving more speedβ€”a strategy commonly used by human players.
  • It made a second major discovery by using the brake to initiate a speed-drift, an advanced technique that provides an acceleration bug, allowing it to beat its human trainer for the first time.

πŸ† Challenging Human Limits

  • With the speed-drift technique, the AI reached the pace of the world's top 100 players, coming within two-tenths of a second of the prestigious human world record.
  • After the equivalent of 400 hours of training, it was only five-hundredths of a second off the record, driving lines nearly identical to the record holder, Eddie.
  • A key difference was that the AI ignored a second, highly complex speed-drift in a later corner that Eddie utilized.
  • The AI eventually matched Eddie's record time repeatedly but consistently lost the advantage at the finish line because it wasn't performing the second drift.

πŸ› οΈ Tool Assistance and New Goals

  • The project's true goal was revealed: to beat a Tool-Assisted Speedrun (TAS), a theoretically perfect run crafted frame-by-frame by a community, which stood at 23.66 seconds.
  • Analysis showed the AI was losing speed in its drifts compared to the TAS, partly due to a technical limitation allowing it to update actions only 20 times per second.
  • To help, a program was written to let the AI automatically follow the optimal drift angle with extreme precision whenever it chose.
  • With this "auto-drift" tool, the AI achieved a time of 23.72 seconds, getting closer to the TAS but struggling with the consistency needed for a flawless single run.

πŸ” Discovery and Ultimate Victory

  • Inspired by TAS methods, the creator shifted to a segmented approach, having the AI perfect each section of the track individually before chaining them together.
  • While searching for a mythical "blue-bug" strategy, a brute-force process accidentally discovered a small, previously unknown hole in the track caused by misaligned road pieces.
  • By exploiting this bump to get an earlier jump in the downhill section, a new TAS was manually created that carried more speed than the community TAS.
  • The AI was called back to drive the final segment from this advantageous position, completing the run and setting a new record, which was later refined even further by the TAS community.

Key Points

  • πŸ€– AI-Driven Learning: The AI started with no knowledge and used reinforcement learning with a reward system to develop driving strategies through trial and error, eventually mastering advanced techniques like speed-drifting.
  • ⚑ Rediscovering Advanced Techniques: The AI independently discovered key player techniques, including the optimal downhill jump and the speed-driftβ€”a bug-triggered acceleration methodβ€”to reach world-class performance levels.
  • 🎯 Surpassing Human Records: After extensive training, the AI matched and then beat the long-standing human world record on A01, finishing four-hundredths of a second faster, demonstrating superior precision.
  • 🧩 The TAS Challenge: The ultimate goal shifted to beating a Tool-Assisted Speedrun, a frame-perfect theoretical limit created by the community, highlighting the gap between human play and the game's absolute limits.
  • πŸ”§ Human-AI Collaboration: To overcome its technical limitations, the AI was given an "auto-drift" tool for perfect drift angles, and later, a segmented running approach was used to chain together perfect sections.
  • πŸ•³οΈ Accidental Discovery: The search for a new strategy led to the accidental discovery of a tiny hole in the track, a developer oversight that became the key to building a faster TAS than the community's version.
  • 🏁 Evolving Limits: The new record set by combining the discovered trick with AI-driven finishing was quickly improved upon by the TAS community, proving that performance limits in Trackmania are always evolving.

Frequently Asked Questions (FAQs)

  1. What was the AI's initial training process?
    It used reinforcement learning, receiving rewards for faster progress and learning through trial and error over thousands of attempts.
  2. What is a speed-drift?
    It's an advanced technique where drifting at a specific angle triggers a bug that makes the car accelerate faster.
  3. Why couldn't the AI beat the TAS on its own?
    It faced technical limitations, updating actions only 20 times per second, and struggled with the extreme consistency needed to execute a flawless single run.
  4. What was the "blue-bug" myth?
    It was a theorized strategy to exploit a bug at a blue border to get an earlier jump in the downhill section, but it was never successfully achieved.
  5. What was actually discovered instead of the blue-bug?
    A brute-force search accidentally found a small hole or bump in the track caused by misaligned road pieces, which allowed for an earlier jump.
  6. What is the AI's next challenge?
    The AI is now training on the rest of the Trackmania campaign to compete with humans on more complex maps requiring diverse skills and strategies.

Conclusion

This project demonstrated the powerful synergy between artificial intelligence and human ingenuity in pushing the boundaries of a video game. The AI excelled at precision and mastering known techniques through relentless practice, ultimately surpassing human world records. However, achieving the absolute theoretical limit required human creativity, community knowledge, and the serendipitous discovery of a hidden game flaw. The new record set on A01 is not an endpoint but a milestone, as both the TAS community and the AI continue to explore and redefine what is possible.Action Suggestion: To follow the AI's progress on more complex tracks and see behind-the-scenes technical details, consider subscribing to the creator's YouTube channel and checking out their Patreon.

More YouTube tools

Understand this video in different ways

AI summary shown. Use these tools for subtitles, transcripts, chapters, or structure.