Hey NMeade, I’m a huge fan of your channel! Would love to work with you if ever you’re looking for a new video idea, including trying some other tracks
This is an alternative TAS. Btw, tas if i got it right, are like game replays but you can edit the input of it to make a perfect run. Unluckily i got no idea how csn this be actually made
@zanelightblueskya normal tas is played with save states and every small part is played ideally until it's perfect. Many have more reloads of save states than frames. Also the game is slowed down a lot, mostly down to a single frame for perfect input.
@@aitango honestly it would be a cool idea if theres some CPU levels that are just a well trained ai,this would be very helpful in some games like smash bros since the cpu 9 is just broken (and broken as weird and not insanily good because it have some weird outputs)
It’s so cool to see how far the AI project has come. It’s even starting to use preliminary quickhops! But one thing that would save an enormous amount of time is timing the chain wheelies. I noticed that the wheelie input is just being spammed every other frame on straights and that seems to result in half chains every time. Timing the chain 181 frames after the first wheelie would improve this considerably on LC, and it would also help to not fill up the input file on longer tracks later down the line.
He mentions at 7:49 that it only inputs every 2 frame, so it is possibly not wheelieing for multiple frames per chain. (in fact missing 3 frames every time if I understand correctly)
As a data scientist dealing with NLP mainly, it would be amazing to see the code behind this. Is there any chance we get to see some code snippets? Congratulations for the great job!
Personally I would have opted to get the ai to take tighter lines by making the checkpoint reward proportionally to how close it gets to the wall. I'm not sure how feasible or useful that would actually be but I'd love to hear your thoughts.
You have to be careful introducing extra rewards, as it can lead to suboptimal behavior. The AI might slow down a lot to get as close to the wall as possible
This is extremely impressive wow, there is very little left to optimize at this point. The only immediate things I could think of would be a delayed drift (that way you don't have to hop to align for the back straight) and then obviously chain wheelies
Is there any way you could train ai by letting it analyze other people’s inputs? For example you could let it watch the top 100 times on a course over and over and let it train that way.
Doesn't make any sense to train an AI on the same dataset "over and over again". Also it's a completely different model and the dataset is too small. What you are asking is so infeasible that the first time this was done with good results was like 6 months ago by OpenAI. I mean they tried before, but it wasn't that good
was looking forward to seeing it develop this far. it's good enough to beat me on LC now... would be cool to see the AI eventually learn how to play online!
This is all really cool, any chance you could help a brother out and show me resources to learn how to do this myself? Or perhaps a video tutorial on a smaller scale?
This is quite impressive, huge advancements were done. I suppose you could create agents for each track so the AI would depend on them whenever it plays, this would he useful when playing against other players / cpus?
He has tested things like unseen tracks before, but they've never been very good at them. He did however find that the AI could adapt to new tracks very quickly via further training if it had prior training on a few others.
Amazing video your RL models are really great to see in action. Do u by any chance ever share your repos or have a vid walking through the basics of your code? I’m trying to learn RL more and would be great to learn through exploring it in a context/game I love
I currently haven't made the repo public, however will do once I reach 100k subs. I'm currently trying to publish the algorithm I used for this video, and if it gets published I'll for sure do a video on it
I think if you a learn your AI to break we can officially see the best MKW performances on TTs and possibilities. Depending of which AI we used but I think the AI should "lear" without limits
The method I’m using doesn’t actually allow continuous actions, however is far more sample efficient than those methods. I’m not sure how big an improvement adding more angles would actually give it, after like 7 you’d probably get diminishing returns
This is amazing. Do you know where i can learn how to program an ai like you did? Is there a youtube tutorial that sets this up? So far i seem to find out of date tutorials or none that tun while the agent is shown playing as the ai trains. Any help would be really appreciated.
Really glad you like it! There aren’t any tutorials yet for setting up Mario kart, but lots of reinforcement learning courses. I particularly like deep lizards courses on UA-cam, and the book reinforcement learning by Sutton and Barto. Learning to use the python library gymnasium will give you an idea on how to set this up
I believe it should be mathematically possible to calculate the minimum time between checkpoints. Then you can reward it more the closer it reaches this ideal
you could pretrain on ghost data. would be interesting to know more about how you were able to actually get the data, whether there were tricks to make it run faster, etc
We’ve seen multiple wii games on this channel (don’t get me wrong, wii games were goated), but I wonder if you could make an AI for other consoles (Ex: Gamecube, N64, 3ds). Personally, I’d love to see a Mario Kart Double Dash video someday.
What would happen if you made an AI to calculate the expected remaining time to complete the lap, based on the current state, so the main AI knows what to optimize? (I forget what this is called). Or is that what you do already?
This sounds like a form of proximal policy optimisation (PPO). Have a second AI that estimates the time it will take the driver to complete the race if it performs a certain input at the current time, and then learns how good its guess was based on the actual time it takes, so it then adjusts the best input the driver should have taken, and the driver constantly adjusts to be more likely to use the move that the second AI predicts is best. Is this what you meant? He is using a form of PPO, but I believe he's using it on the reward function, rather than on "time to complete the race", as that often results in an extremely difficult learning process for the AI. This is why reward functions are used in cases like this.
All reinforcement learning algorithms learn some type of reward, however this can be based on time remaining. The algorithm I’m using is an advanced version of Rainbow DQN. This is a value-based RL method, unlike PPO which is called a policy gradient method.
Now I'm curious what this ai could get with shooting star. I hold the outside drift bike bkt of 1:12.108, which I think is pretty dang good for the combo.
Hey any way to get some information on what tools you used . I certainly have the skills to do so I have a degree in theoretial AI design but never touched AI gaming. Even better would be perhabs soms source code? I know thats quite a lot to ask for but any help would be appreciated. Im a retired software developer (23 yrs old lmao) and think creating an AI of my favourite mario kart would just be amazing
is it possible to make an ai that can play any track its given, even if its never seen it before? so that instead of getting really good at one track its getting good at the game as a whole and applies that skill to any new track?
i think this wont be very probable/plausible, connecting an ai up to say an emulated controller for online play will be much harder and slower than giving direct inputs locally, so unless theres a different way most ai's would play horribly on wiimmfi due to local lag, also the non-local lag in general will also screw it up, also also the ai would probably need to learn how to aim/time items, which will be very difficult to do, so yeah, very unlikely
How is this AI? Isnt it just a list of inputs, pretty much? Like, if it started a meter to the right from its usual start point, it would fail miserably, no?
No! The AI is given the most recent frame, and chooses an action from only that. At the beginning of training, I actually give the AI multiple starting points.
We need to take the ai and the game and subtract the rendering so it can play many many many instances a second Run the game such that it does like 10-15 races a second and let it run for a year😊
There’s a cool project doing something similar called kinoko which is looking to reverse engineer the physics engine. My ai uses images as input though, so sadly I still need to render the image
Very interesting video. I'd suggest to cut down on the subtitles though and only use it if you want to emphazise what youre saying. You have a very soft spoken and clear voice. Constantly having text on screen is stressful and in your case just unnecessary.. :)
I feel like if you did this to where it could actually learn to do each track optimally, I think it would be a cool way to calculate the theoretical fastest time on each track
This video was AWESOME, so cool to see the entire process for approaching this. Would be really cool to see this for other tracks!
Hey NMeade, I’m a huge fan of your channel! Would love to work with you if ever you’re looking for a new video idea, including trying some other tracks
@@aitango maybe on Maple Treeway , it's is her favorite track ( if i remember correctly ) or Mario Raceway i don't remember
I’m good for either of those if he wants to :)
NMeade versus the ai on his big bad castle
@@aitango ngl i would love to see maby some fanmade tracks
This is who I thought TAS was as a kid
In a way this is a TAS.
It's very different from other TASes but still.
Same 😭🙏
Same lol
This is an alternative TAS.
Btw, tas if i got it right, are like game replays but you can edit the input of it to make a perfect run. Unluckily i got no idea how csn this be actually made
@zanelightblueskya normal tas is played with save states and every small part is played ideally until it's perfect. Many have more reloads of save states than frames. Also the game is slowed down a lot, mostly down to a single frame for perfect input.
WERE GETTING REPLACED WITH THIS ONE 🔥
No one will stop people playing Mario Kart AI haha
@@aitango honestly it would be a cool idea if theres some CPU levels that are just a well trained ai,this would be very helpful in some games like smash bros since the cpu 9 is just broken (and broken as weird and not insanily good because it have some weird outputs)
@@aitangoare you gonna make a rocket league ai😢
@@Random_Guy-rm4tvon it
* Wii are
really enjoyed editing this one!
Really glad you enjoyed it, amazing job with the editing, couldn’t be more happy
whats the song at 0:37 i think ive heard it before
@@Kat21 The swimming mini game on Wii Party 👍
So you're the one that added the unnecessary, attention-span subtitles...
bro plays osu what a true gamer
It’s so cool to see how far the AI project has come. It’s even starting to use preliminary quickhops! But one thing that would save an enormous amount of time is timing the chain wheelies. I noticed that the wheelie input is just being spammed every other frame on straights and that seems to result in half chains every time. Timing the chain 181 frames after the first wheelie would improve this considerably on LC, and it would also help to not fill up the input file on longer tracks later down the line.
He mentions at 7:49 that it only inputs every 2 frame, so it is possibly not wheelieing for multiple frames per chain. (in fact missing 3 frames every time if I understand correctly)
@@craftyawesome6830Why not every frame then
@@clouds-rb9xt Probably performance. 30hz inputs instead of 60 means half the amount of times you need to compute the inputs the AI chooses.
@@craftyawesome6830 Need a super pc tbh
@@clouds-rb9xtHe already has a beast pc. Neural networks are expensive
Been waiting for an installment like this into this little series since the beginning. Commenting to let you know I would LOVE to see more
I’m pretty confident this won’t be my last time trial attempt :)
I’m pretty confident this won’t be my last time trial attempt :)
Your way of getting the AI to do shortcuts is really smart, it never clicked with me that it wouldn't just do that on its own
Yeah that's pretty much expectation vs reality in AI... if it can take an easier route, it almost always will
As a data scientist dealing with NLP mainly, it would be amazing to see the code behind this. Is there any chance we get to see some code snippets? Congratulations for the great job!
The AI on the last lap drove towards the finish line with an uneven angle. It would have reached its destination faster if it went straight ahead.
0:34 I LOVE DROPPING NEWBORNS ‼️‼️🔥🔥🗣🗣
Personally I would have opted to get the ai to take tighter lines by making the checkpoint reward proportionally to how close it gets to the wall. I'm not sure how feasible or useful that would actually be but I'd love to hear your thoughts.
You have to be careful introducing extra rewards, as it can lead to suboptimal behavior. The AI might slow down a lot to get as close to the wall as possible
@@FuzzyJeffTheory is right.
Really enjoyed editing this one!
I've been so excited waiting for this! Fantastic execution and thank you for explaining your methodology!
You're very welcome, really glad you enjoyed it! I'm far from finished with time trials too
@@aitango Epic! I'm so glad, looking forward to it! Amazing work as always
Can you make an AI that can play EVERY Mario Kart? Or… You can't do that?
This is extremely impressive wow, there is very little left to optimize at this point.
The only immediate things I could think of would be a delayed drift (that way you don't have to hop to align for the back straight) and then obviously chain wheelies
Technically kind of I guess
@@aitango I'm just nitpicking at this point, the vid is insanely well made and easy to follow, please make more! :D
haha the ai actually learned how to do TAS hops. that is so cool.
Yeah it was really cool that it actually figured that out by itself
What I wanna know is how you got such a long video into UA-cam shorts😂☠️ @@aitango
still , now it seem possible to go beat the wr
Feels so close… one day
9:09 word mixing.
These videos are so enjoyable to watch.
Thank you c:
Glad you like them!
Amazing, what is possible these days! Keep up the great and innovative work man.
Is there any way you could train ai by letting it analyze other people’s inputs? For example you could let it watch the top 100 times on a course over and over and let it train that way.
Doesn't make any sense to train an AI on the same dataset "over and over again".
Also it's a completely different model and the dataset is too small. What you are asking is so infeasible that the first time this was done with good results was like 6 months ago by OpenAI.
I mean they tried before, but it wasn't that good
@@lorenzosotroppofigo1641imitation learning using the wr ghost seems feasible to me?
@@llaw176 Yeah but if you are using only one ghost it's overfitting tho, not learning
100 aren't enough either
was looking forward to seeing it develop this far. it's good enough to beat me on LC now... would be cool to see the AI eventually learn how to play online!
another banger! good job
Appreciate it!
I'm looking forward to watching the AI mogi and clan wars after they get TTs conquered. Incredible work!
AI vs Human clan wars would be so much fun, even way harder than time trials
That slick subscribe insert made me laugh and got me to, GG.~
Did it work? :)
@@aitango That's what I meant by "Got me" I'm in. UwO
Based video. Grumble Volcano no ultra sounds like a challenge.
This is all really cool, any chance you could help a brother out and show me resources to learn how to do this myself? Or perhaps a video tutorial on a smaller scale?
This is quite impressive, huge advancements were done. I suppose you could create agents for each track so the AI would depend on them whenever it plays, this would he useful when playing against other players / cpus?
good luck for beating this (if even possible)
your videos are much work, thx for that tho!
Glad you like them!
great vid. the ultimate would be an agent that can play unseen tracks lol. how much compute would that take?
Glad you liked it. Would probably take ages, especially if I individually design the rewards for each track.
He has tested things like unseen tracks before, but they've never been very good at them.
He did however find that the AI could adapt to new tracks very quickly via further training if it had prior training on a few others.
Amazing video your RL models are really great to see in action. Do u by any chance ever share your repos or have a vid walking through the basics of your code? I’m trying to learn RL more and would be great to learn through exploring it in a context/game I love
I currently haven't made the repo public, however will do once I reach 100k subs. I'm currently trying to publish the algorithm I used for this video, and if it gets published I'll for sure do a video on it
I think if you a learn your AI to break we can officially see the best MKW performances on TTs and possibilities.
Depending of which AI we used but I think the AI should "lear" without limits
Do you think it will be possible to teach an AI a tech track like CM or bowsers castle?
Definitely possible, the main problem would be my knowledge setting it up!
i love this. have you tried using continuous actions for the steering instead of 5 discrete ones? it may not be necessary but i'm curious
The method I’m using doesn’t actually allow continuous actions, however is far more sample efficient than those methods. I’m not sure how big an improvement adding more angles would actually give it, after like 7 you’d probably get diminishing returns
pls continue and make the ai get a crazy time! it's s entertaining pls make a part 2 with the same ai for the ai to get a crazy time!
This is amazing. Do you know where i can learn how to program an ai like you did? Is there a youtube tutorial that sets this up? So far i seem to find out of date tutorials or none that tun while the agent is shown playing as the ai trains. Any help would be really appreciated.
Really glad you like it! There aren’t any tutorials yet for setting up Mario kart, but lots of reinforcement learning courses. I particularly like deep lizards courses on UA-cam, and the book reinforcement learning by Sutton and Barto. Learning to use the python library gymnasium will give you an idea on how to set this up
@@aitango thanks. I'll look into those.
I have no idea how any of this works but could you get the AI to watch how the WR plays the track to copy and improve on it?
Keep this stuff going🙏
Will do for sure!
hey when can you test the ai in mario kart 7?
When I can get an emulator to work for MK7, although sadly it doesn't look too likely
@@aitangoi mean there’s citra. it may have been taken down awhile back, but it’s still downloadable.
why has this thumbnail changed twice
I’m surprised it didn’t master chain wheelies? Or is that a side effect of it not being able to input every frame?
That part was my fault, due to the way the wheelie action was programmed. Will certainly be fixed in the next video!
I believe it should be mathematically possible to calculate the minimum time between checkpoints. Then you can reward it more the closer it reaches this ideal
Solid video mate.
Much appreciated!
What if all the checkpoints were the one checking your lap progress, would the ai find some new lap skipping method on some maps ?
This is not AI, youre making this ghost with human intelligence
you could pretrain on ghost data. would be interesting to know more about how you were able to actually get the data, whether there were tricks to make it run faster, etc
I would have liked to see if it could have found that shortcut on its own without the out of bounds area, but overall good job!
We’ve seen multiple wii games on this channel (don’t get me wrong, wii games were goated), but I wonder if you could make an AI for other consoles (Ex: Gamecube, N64, 3ds). Personally, I’d love to see a Mario Kart Double Dash video someday.
What would happen if you made an AI to calculate the expected remaining time to complete the lap, based on the current state, so the main AI knows what to optimize? (I forget what this is called). Or is that what you do already?
This sounds like a form of proximal policy optimisation (PPO).
Have a second AI that estimates the time it will take the driver to complete the race if it performs a certain input at the current time, and then learns how good its guess was based on the actual time it takes, so it then adjusts the best input the driver should have taken, and the driver constantly adjusts to be more likely to use the move that the second AI predicts is best.
Is this what you meant?
He is using a form of PPO, but I believe he's using it on the reward function, rather than on "time to complete the race", as that often results in an extremely difficult learning process for the AI. This is why reward functions are used in cases like this.
All reinforcement learning algorithms learn some type of reward, however this can be based on time remaining. The algorithm I’m using is an advanced version of Rainbow DQN. This is a value-based RL method, unlike PPO which is called a policy gradient method.
do you have the ghost for this still?
I would like to race it because it beats me by .1 and that end time is about my short term goal on the track
If I remember I might post it on my discord server sometime soon
What program did you used for work with ai? And what type language did you use?
How did the AI learn how to quick-hop?
It taught itself through trial and error, I just gave it the controller.
Never heard more vocal fry in a commentary before
W masq moment
Really interesting video. I have a quick question though how do you play multiple ghosts at the same time in tas tools?
There’s a program on dolphin called sp-mkwii.
Make It play ai minecraft
What are the specs on the PC that you are training your AI on?
Check out my video evolution of my Mario kart ai. In that one I go over how it all works, including the hardware I run it on
Now I'm curious what this ai could get with shooting star. I hold the outside drift bike bkt of 1:12.108, which I think is pretty dang good for the combo.
goddamn how did it learn to do TAS hops
Honestly no idea how it figured out how to do the optimised shortcut, really blew me away
how did u do that mii?
awesome video as always!
Really grateful for the support!
The vocal fry is crazy :D
Can you make the A.I time trial DK Summit next?
I’m not sure which track to do yet! Trying to get the AI to do the double cut would be fun haha
Hey any way to get some information on what tools you used . I certainly have the skills to do so I have a degree in theoretial AI design but never touched AI gaming.
Even better would be perhabs soms source code? I know thats quite a lot to ask for but any help would be appreciated. Im a retired software developer (23 yrs old lmao) and think creating an AI of my favourite mario kart would just be amazing
is it possible to make an ai that can play any track its given, even if its never seen it before? so that instead of getting really good at one track its getting good at the game as a whole and applies that skill to any new track?
Is it faster to hop to cancel a wheelie or just cancel the wheelie via the "tilt Wii-remote back down" input?
They're equal but hops are more reliable and you only really stop a wheelie when you want to take a turn and start drifting anyway
I never seen such a great video!
Wow, thanks for the support!
such a good video, keep it up
Thanks, will do!
good video! now have the ai learn how to superhop lol
Thanks!! That would take quite a bit of training haha, although still possible I think
I'm curious to see what this was coded in.
EDIT FROM 11/10/2024 - 3:54 PM CST:
Looks like Python from the code snippets.
this is so cool i want to see more
I’ll be sure to keep it coming!
Can you make an ai to play taiko no tatsujin?
LETS GOOOOOOOOOOOOOOO IVE BEEN WAITING FOR THIS
Good to hear you were excited!
What did you use to be able to get the values from dolphin ram into python?
I’m using a fork of dolphin which allows me to interact with the emulator in python. Check out my video evolution of my Mario Kart AI to see more
Find this so cool people like you exist
Thanks haha
What's the name of the song from 8:05?
Python moment 🤩
I hope wiimmfi won't have AI
i think this wont be very probable/plausible, connecting an ai up to say an emulated controller for online play will be much harder and slower than giving direct inputs locally, so unless theres a different way most ai's would play horribly on wiimmfi due to local lag, also the non-local lag in general will also screw it up, also also the ai would probably need to learn how to aim/time items, which will be very difficult to do, so yeah, very unlikely
How is this AI? Isnt it just a list of inputs, pretty much? Like, if it started a meter to the right from its usual start point, it would fail miserably, no?
No! The AI is given the most recent frame, and chooses an action from only that. At the beginning of training, I actually give the AI multiple starting points.
@aitango oh really? Then i misunderstood!
thats what TAS is
@timyio5381 i know
@@pagjimaagjinen9733 ok
Are you going to put in more rewards and penaltys or is this it?
Since posting I have a few more ideas to improve things, but that’s for next video haha
so there is a chance, pog
can it play bowser's castle?
It can play any track in theory, I just need to help designing the reward function!
Open source? It would help everyone! Great bot, by the way!
I said I’d make it open source at 100k subs, however when I made that promise I thought it would happen sooner haha
@@aitango Do you mind just saying what libraries you use, please?
A sense of proudness lol
It’s quite weird but it’s definitely there
More tracks please 🥺🙏
Yay a new post!
:)
This is so awesome! I wonder if one day it could be used to discover new glitches and optimal setups for shortcuts?
Potentially, although getting it to try that many random ideas would take an extremely long time
that is insane.
Yeah pretty crazy, I hope one day I’ll get the world record
Great! Now teach it ultra shortcuts :D
Let’s see your ai do n64 sherbet land glitch lol
Awesome video
Video starts at 8:10
ChatGPT Kart Wii
666? I’m scared.
make an ai that can superhop or do ultras
TAS is 1:02:446. If it can't beat that using TAS tools, then not much point to it.
We need to take the ai and the game and subtract the rendering so it can play many many many instances a second
Run the game such that it does like 10-15 races a second and let it run for a year😊
There’s a cool project doing something similar called kinoko which is looking to reverse engineer the physics engine. My ai uses images as input though, so sadly I still need to render the image
Very interesting video.
I'd suggest to cut down on the subtitles though and only use it if you want to emphazise what youre saying. You have a very soft spoken and clear voice. Constantly having text on screen is stressful and in your case just unnecessary.. :)
Glad you liked it! Yeah might try using them slightly less and see how the videos do
Thanks!
No problem!
I feel like if you did this to where it could actually learn to do each track optimally, I think it would be a cool way to calculate the theoretical fastest time on each track