Linesight
Linesight
  • 9
  • 747 992
I Trained an AI for 2 Years on Trackmania. It's Breaking Records.
I trained an AI that plays Trackmania with reinforcement learning. It's getting good enough to challenge Official World Records. This is the story of how my AI reached such an incredible level.
Link to raw run playlist: czcams.com/play/PLZ-JKrjYnD1GBlp-WS3Mr8bKmqsqSSO-U.html
Link to replay pack: drive.google.com/file/d/19p10V3g4RfFUoUUdVWNN2RXwJmcXfHC2/view?usp=drive_link
Link to input files: drive.google.com/file/d/12Jfp6nDNhAb7vQIeUIao_VU0W8652s_r/view?usp=drive_link
Project Github: github.com/Linesight-RL/linesight
Game: Trackmania Nations Forever
Buymeacoffee: buymeacoffee.com/linesight
00:00 Intro
00:43 map5 (v1 and v2)
03:58 A01
05:10 map5 (v3)
07:27 Official Campaign intro
08:42 A02
11:11 D06
14:22 Official Campaign
15:59 vs TAS
17:14 Minitrial
22:04 Method
23:14 Zero-shot
24:03 Next steps
25:38 Finale - Hockolicious
27:04 Credits & Times
#AI #reinforcement #learning #trackmania #world #record #official #campaign #tmnf
Music Tracks:
Luge - Geographer
Instant Crush - Corbyn Kites
Subway Dreams - Dan Henig
Hall of the Mountain King - Kevin McLeod
I got a stick - Kevin McLeod
Envision
Arp Bounce - Geographer
Up the steps - Geographer
Shitsubo Shita - Josh Lis
Just Breathing - NEFFEX
Tinker Time - Nathan Moore
Contact us:
First join the TMInterface Discord discord.gg/PvWYGkGKqd, then head over to the #programming-talk channel discord.com/channels/847108820479770686/885481860539498508
This project would not have been possible without the awesome TMInterface tool, provided by @Donadigo.
zhlédnutí: 359 890

Video

Trackmania AI Learns To Drift and Beat Pros ? | Hockolicious
zhlédnutí 346KPřed 10 měsíci
We trained an AI to play Trackmania on Hockolicious, one of the game's most prestigious tracks. The AI set a strong time, beating the 2012 World Record previously set by CarlJr. Link to map: tmnf.exchange/trackshow/414041 Link to replay: drive.google.com/file/d/1b0p2QSXAea1v7lVCGuWkNr-5xQ6PdqHo/view?usp=drive_link Game: Trackmania Nations Forever Project Github: github.com/Linesight-RL/linesigh...
Superhuman Trackmania AI Demo | map5
zhlédnutí 28KPřed 10 měsíci
Linesight project. We used reinforcement learning to train an AI that plays Trackmania. On its training track, the AI is faster than the current human world record. We put this video out as a challenge: can a human still overcome our AI? Game: Trackmania Nations Forever (TMNF) Map: tmnf.exchange/trackshow/10460245 Replay (.gbx file): drive.google.com/file/d/1jfOyhRQCvOC5XSEhhajE2OvmJcCHKDjR Wir...
AI Plays Trackmania - Bloopers
zhlédnutí 3KPřed rokem
In this video, and AI is trained with reinforcement learning to accumulate speed and finish a map as fast as possible. The AI learned a behavior where it turns around right before the finish line. This is not a one-off mistake, the AI repeatedly did similar things in back-to-back runs. Can you guess why ?
AI Plays Trackmania - Map5 2:04:91
zhlédnutí 9KPřed rokem
The AI is trained via reinforcement learning. Game: Trackmania Nations Forever (TMNF) Map: tmnf.exchange/trackshow/10460245 Replay (.gbx file): drive.google.com/file/d/1hp1Mz0ooR2YBNpqNjvvxjFrBOGXs8DYD/view?usp=sharing
AI Plays Trackmania - Training Progression Side by Side
zhlédnutí 3,1KPřed rokem
In this video, an AI is trained via reinforcement learning. In order from the top left corner, top right corner, bottom left corner and bottom right corner the AI has received progressively less training time. The video compares the lines taken by the various AIs in different parts of the map. Game: Trackmania Nations Forever (TMNF) Map: tmnf.exchange/trackshow/10460245
AI Plays Trackmania - Map5 2:07:00
zhlédnutí 1,1KPřed rokem
The AI is trained via reinforcement learning. Game: Trackmania Nations Forever (TMNF) Map: tmnf.exchange/trackshow/10460245
AI plays Trackmania - Map5 2:09:12
zhlédnutí 976Před rokem
The AI is trained via reinforcement learning. Game: Trackmania Nations Forever (TMNF) Map: tmnf.exchange/trackshow/10460245
(Teaser 01) AI learns to play Trackmania with reinforcement learning
zhlédnutí 1,7KPřed rokem
This video is a recording of an AI currently training to finish a custom map as fast as possible with reinforcement learning. This run was played on Trackmania Nations Forever, with TMInterface to link the game and our AI. The run was played on a custom map. The .Gbx map file is available for download here : tmnf.exchange/trackshow/10460245 The AI took 2mn12s25 to complete the map during that t...

Komentáře

  • @NwoRun
    @NwoRun Před 17 hodinami

    While I am rooting for you, I secretly hope humans still come out ahead. Their determination and skill truly show how some people are on a different level from the rest

  • @davids2207
    @davids2207 Před 17 hodinami

    Did not expect to see the best ever visualisation of local vs. global optimum and gradient descent 3:20

  • @maxxrelax88
    @maxxrelax88 Před 17 hodinami

    This is super cool! Thanks for sharing.

  • @jeremyleemartens801

    Imo its not a traxkmania "playing" AI, until it (simulates) inputs eith a keyboard/gamepad and reads the screen and got no emgine access. You make it out like there is a gradiant between TAS and normal runs, but there is not. Its either one or the other

  • @Playingwithproxies

    Imagine we actual made a fly brain play this game and give it rewards/punishments for good or bad moves 😂😂😂😂

  • @user-zo1kn8ob7h
    @user-zo1kn8ob7h Před dnem

    14:20 did not win on strat.

  • @user-zo1kn8ob7h
    @user-zo1kn8ob7h Před dnem

    8:10 this took half a year to make??

  • @user-zo1kn8ob7h
    @user-zo1kn8ob7h Před dnem

    6:05 with triple hardware can we get that to 60 fps

  • @user-zo1kn8ob7h
    @user-zo1kn8ob7h Před dnem

    5:30 Please take this AI and put it into another game, something equally simple, though good. I'm not going to defend that. I'm not saying anything. Put it in another game and I want to see it learn another game and then put it into another game and then bring it back to the first game, you know?

    • @user-zo1kn8ob7h
      @user-zo1kn8ob7h Před dnem

      And then put that same AI into a simple first-person shooter game. Start it out with doing parkour. Oh, take it from racing, put it into parkour, a simple 2D game or a 3D game, and then put it into first-person shooters, and then terminator real life.

    • @user-zo1kn8ob7h
      @user-zo1kn8ob7h Před dnem

      But the network would take an entirely way too large input network, right? That's the issue, is input network. Can a neural network modify its input network between two iterations? How are we supposed to think of this? How am I not looking at this correctly? How do we make it do multiple things?

  • @user-zo1kn8ob7h
    @user-zo1kn8ob7h Před dnem

    3:30 Beautiful display, thank you. I'm wondering why, then, we do not induce reward for a bored, uh, jovial, experimentation and expediting into the unknown. Why not try something new, dear AI? Here's a cookie.

  • @doctoronishispsychosislab1474

    please stop making skynet

  • @montgomeryfitzpatrick473

    Isnt this just a TAS?

  • @xcoder1122
    @xcoder1122 Před 2 dny

    This video shows one of the biggest drawbacks of training AI this way: The AI does not understand the game in general, it only understands a single level. You see, a human driver who has played only one level in his life, and has become really good at that level, can play pretty much any other level from the very first moment. He may not be good at that level at first, but he will be able to play it at a competitive level once he knows the track because he understands the game itself, the controls and the mechanics. The AI, on the other hand, has to relearn all of that for each new level, it cannot use the knowledge it gained from playing one level and transfer it to another. And that's one of the things that still separates AI from true intelligence. The ability to apply knowledge gained in one situation to master a completely different situation is a key element of intelligence. Even higher class animals can do this (and by higher class I mean birds and mammals, not just smart animals like apes or dolphins). This is also where understanding the past and the future comes into play (transferring knowledge from past events to possible future events and thus making predictions about the future and reacting to those predictions before anything has happened). AI is not currently capable of understanding anything in a larger context. It can only analyze the situation directly in front of it, understand simple if-then logic, and predict the next step to take. Even ChatGPT works this way: It only predicts the next word based on a given context and what word it has printed so far; it has no real understanding of what it is doing at that moment.

  • @Duke00x
    @Duke00x Před 2 dny

    You should go back and show it some of the short cuts and tell it the reason for why it improves times and then let it add checking for similar stuff with a low weight (like ever thousandth run it will purposely try something new for five or six runs if it diesnt find an improvementit wont try that specificthing in that spot again and the thousand runs start over again. Of course this only happens after it has completedthe race like a hundredtimes successfully). That way it mostly doesn't check but every so often it will give it a try and if it finds an improvement quickly then it will keep trying and if not it will stop trying. Tgat way it can look for shortcuts but won't obsess over finding them.

    • @Duke00x
      @Duke00x Před 2 dny

      Once you have shown the shortcuts and explained the reasons for the improvements and the logic behind shortcuts you short code it to experiment with similar ones in similar situations. Again low weight we don't need it obsessing. But even if it isn't likely to find original shortcuts it may in the future find already discovered ones automatically one tracks once it has run them a few times.

  • @mauldothelastcrafter8194

    "Stay with me..." No.

  • @kevinhardy8997
    @kevinhardy8997 Před 2 dny

    Ya but records are for humans.

  • @FloydMaxwell
    @FloydMaxwell Před 2 dny

    Let's see your AI tackle Deep Dip 2

  • @abandonedcrack
    @abandonedcrack Před 2 dny

    give me the code, I'm 100% gonna try it on some random roblox players.

  • @anatolitsenov369
    @anatolitsenov369 Před 2 dny

    If you so smart, why dont you create game and make the AI buy them you muppets!

  • @SP-ny1fk
    @SP-ny1fk Před 2 dny

    Could you make the AI learn from player ghosts? It could learn to determine which players to trust and which not to - and discover shortcuts.

  • @SP-ny1fk
    @SP-ny1fk Před 2 dny

    Does the agent understand it's place within the track? Ie is it keeping record of which lap it is on, and where it is on that lap?

  • @SP-ny1fk
    @SP-ny1fk Před 2 dny

    Shouldn't the agent already know how to turn, from the get-go, no matter which track it is on?

  • @Blento0404otnelB
    @Blento0404otnelB Před 2 dny

    You did not trained AI. AI does not exist, stop using words you do not understand. People will start to think YOU do not have "I".

    • @blai8
      @blai8 Před dnem

      Not the pin of shame lmao

    • @NinjaOfLU
      @NinjaOfLU Před dnem

      The pin of shame always gives me a chuckle. You love to see it!

    • @AnymMusic
      @AnymMusic Před dnem

      realistically we're talking semantics

    • @CaptainXJ
      @CaptainXJ Před dnem

      I mean they are right, AI doesn't exist.

    • @freakydeaky1435
      @freakydeaky1435 Před dnem

      @@AnymMusic please, its 2024, say sepersontics

  • @DJZofPCB
    @DJZofPCB Před 2 dny

    awesome!!!!! Thank you to all the human players who thought outside the box. and congratulations on your great training model. now lets solve the energy crisis and food in the world...lol one day maybe

  • @holographicman
    @holographicman Před 2 dny

    Writing a paper on this I hope?

  • @inthefade
    @inthefade Před 3 dny

    Before seeing the end of the video, can you make the gamma function a variable that evolves with each iteration, so the AI can try out long term strategies as well as short term?

  • @inthefade
    @inthefade Před 3 dny

    "Evolution is smarter than you." Genetic algorithms and neural networks are so cool. Leveraging evolution this way is so evil.

  • @zebraforceone
    @zebraforceone Před 3 dny

    Try feeding it the z buffer rather than the light

  • @CaesarsSalad
    @CaesarsSalad Před 3 dny

    Some nice visualization in this video!

  • @niklasmeier7030
    @niklasmeier7030 Před 4 dny

    make it drive oach

  • @DayInDaLife
    @DayInDaLife Před 4 dny

    The real test is to tell the AI, once it has beaten the human score.. to beat its own score. Then see if it can work out some crazy stuff. Like can it beat its own best score by .06?

  • @tim..indeed
    @tim..indeed Před 4 dny

    A pathfinding algorithm between the different checkpoints might go hard.

  • @ronaldli5
    @ronaldli5 Před 5 dny

    You're an incredibly talented programmer, content creator and video editor. God damn.

  • @hotel_arcadia
    @hotel_arcadia Před 5 dny

    Is anybody scared this could ruin TMX leaderboards?

    • @linesight-rl
      @linesight-rl Před 4 dny

      There is something called the "Competition patch". It marks runs as "driven by a human" and is required to submit a replay to the TMX leaderboards. Linesight can **not** run with the competition patch, those replays can not be submitted :)

  • @jonhobbs5113
    @jonhobbs5113 Před 6 dny

    So now what are you going to do next? Beat your AI's time?

  • @kennythemeat
    @kennythemeat Před 6 dny

    human assisted speedruns

  • @YaBaDji
    @YaBaDji Před 6 dny

    Nations?

  • @feandil666
    @feandil666 Před 6 dny

    a few years down and it's gonna be 1000-1

  • @rockyvillano777
    @rockyvillano777 Před 7 dny

    In AI, nothing works better than getting unimaginable amounts of data into an architecture that can absorb at all.

  • @okannie-ym6yx
    @okannie-ym6yx Před 7 dny

    list of all techniques used in a game

  • @julyanjohns1237
    @julyanjohns1237 Před 7 dny

    most interesting video. thank you! really enjoyed that

  • @pahom2
    @pahom2 Před 7 dny

    What is the problem with A01 map?

  • @funkie1221
    @funkie1221 Před 9 dny

    I see a paper in HCI and gaming coming soon :D

    • @linesight-rl
      @linesight-rl Před 9 dny

      What's HCI?

    • @funkie1221
      @funkie1221 Před 8 dny

      @@linesight-rl Human Computer Interaction. It's everything from Software Design to Usability to AI models simulating human input (Like this one)

  • @ryanmcmanus7273
    @ryanmcmanus7273 Před 9 dny

    One thing I've always thought about these trackmania ais is that they play based off of instinct and with no theoretical basing. With purely game based training it should be near impossible for an ai to get a deep understanding of the mechanics of the game, and therefore it will always lack some level of generalized skill only obtainable from said understanding. One reason why i think this is that humans are like this as well, if we spend a ton of time improving one thing we get reqlly good at it even if we have no true understanding just intuition and muscle memory, but as soon as we gain that hidden knowledge we can incorporate into our intuition and reason with it to make more informed decisions. With that i suggest that one possible way to improve a trackmania ai's ability to generalize its skills is to give it access to techniques and knowledge that we've refined over the years.

    • @ryanmcmanus7273
      @ryanmcmanus7273 Před 9 dny

      Some useful information could be optimal sliding angles, sliding windows, or the whole graph for different materials and velocities. Like the tools mades by Sergeant Bigbird

  • @GTO2800
    @GTO2800 Před 10 dny

    In my thesis I worked with a paper called PIFU, it's used for 3d reconstruction. Basically you take images, run them through a conv. network and then sample the features at a XYZ coordinate. Do you think it's possible to give each block an ID and sample a 3D grid with 3d convolutions for the current position? That could give the AI a complete overview of the map in 3D space.

  • @Fusionjura44
    @Fusionjura44 Před 11 dny

    Shortcuts? naaah, i will take regular path :DDD

  • @Crowfist
    @Crowfist Před 11 dny

    Wirtual really said "I make 4k a month being the best at this Ill give you a c note if you can beat a machine thats better than me"

  • @74Gee
    @74Gee Před 12 dny

    That's yet another amazing step forwards from the previous - are there no limits? Really looking forward to your code too!

    • @linesight-rl
      @linesight-rl Před 12 dny

      It's out 🙂github.com/Linesight-RL/linesight

  • @Eddo_sensei
    @Eddo_sensei Před 13 dny

    I heard there is a method that GPT trains another AI. I don't know if it's possible to do in this case but it would be fun to see an AI train AI from scratch

  • @maxentityita
    @maxentityita Před 15 dny

    26:42 the time is 53 64 i saw though it