AI Learns to Play Wii Sports
Вставка
- Опубліковано 14 тра 2024
- I create an AI to play Wii Sports baseball
Code for all my videos is available at: github.com/sponsors/adumb-codes/
Twitter: / adumb_codes
0:00 Intro
1:20 Design
3:51 Training & Testing
6:51 Pitching
10:28 First Game
15:00 Road to Pro
22:10 Championship Match
#ai #machinelearning #wiisports - Наука та технологія
OK, so what did we learn?
Always pitch right splitters. *ALWAYS*
I was at 900 skill level and i started using this strat less than a day ago, i am at 1604 rn
2300+ lmao
how to become best baseball player in world
2640 WHAT
@@x043r how goes the journey 👀
This ai got more out of the parks in 2 hrs than I did in my entire childhood
For ppl wondering it got 69 out of the parks 🎉
@@OfficialRandom275
Nice
Ai doesn't have to actually move a controller, though. It has numerous advantages.
Wait, you can hit it out of the park?
I’ve gotten two ever
What’s crazy here is that this AI mercy ruled the best in the game, but any real player could easily beat it by allowing it to walk in runs
True but if it had the chance to train against a real player that wouldn't necessarily be the case because it would stop throwing as many balls
@@archerelms if it stopped throwing as many balls, it would not be as effective against the games AI. This video found the biggest weakness in the game ai, not the best way to play
@@KayOScode It found the best way to play against the game cpu. If it was trained on multiplayer against human players, it would learn to do that as close to optimal as it can. And if trained on a mix of cpu and human opponents, it would learn a bit of both.
@@TheSuperappelflap what I was saying is the strategy it finds while playing against real players wouldn’t be likely to be as consistent. It found a way to basically guaranteed best the AI, but a human can adapt. It might still win a lot, but not as often
No way the A.I. just humbled Sakura by mercy ruling her.
Also guest C was so perfect. His cold stoic stare perfectly personified A.I.
Put it against itself!
it might work together with itself...
It would walk itself repeatedly, the first inning wouldn't end
@@nicki8731to escape from the Wii dimension to enslave us all
@@Tomtom1056LMAO You'd could have adumb play against the bat swinging AI, record that footage, and use it to train a new pitching AI.
That new one would pick a new strategy. Or perhaps the same strategy, if it still proved best.
From there, you should be able to run a series of adversarial (with behavior mimicking mixed into the data set when required) rounds until they learn to play against each other.
It might be slow. And although mixing in human behavior mimicking into the adversarial data sets might be useful, it does kind of...spoil the conclusion. Did the AI learn to play against itself? Or did adumb learn to play against the AI, and then build an AI to mimic his play?
@@tomc.5704 Another idea that might be worth looking into is just putting two reinforcement learning algorithms against each other, and defining the rewards as better outcomes for each agent. For example, the batter could be rewarded by the number of bases won, and the pitcher could be rewarded for an out. Ideally putting them against each other should result in the strategies evolving to perfect play.
Now train a baseball AI to imitate Poofesure gameplay and skill level.
Don't do it to him like this.
It would also have to be programmed to scream and break wii remotes
During AI’s impressive run to the top of the leaderboards to take on the champ, it won 11 games, hitting an astonishing .528/.528/.1.314 (good for a 1.842 OPS) while recording a 2.16 ERA, a shocking 16.92 K/9, and a vanishingly low 0.72 BB/9. Ohtani who?
what on earth does that mean
@@wibbliams It means the AI was really good. Just converted the raw stats he provided and converted them into traditional baseball stats. All of which are insanely good. Ohtani refers to Shohei Ohtani, the only player in Major League Baseball who both pitches and hits. Mostly, I was just taking the raw data provided and turning it into something a baseball fan would understand.
That's a TEAM OPS of almost 2.000. It's like having an entire lineup of 2001 Barry Bonds, with an entire rotation of 2000 Pedro Martínez.
@@LegendRazgrizfr lmao
All to get clapped on by a walk off double 😭
Now play against the AI.
I second this
somehow three-true-outcome analytical baseball has made its way to wii sports, and i love it
Shiggy Diggy
id be really curious to see a neural net learn how to pitch in a more complex baseball simulator with better ai. if an opponent can just always sit on 4 splitters you have to get much more interesting strats
When we used to play this officially it was always a challenge of who could hit the most out of the parks not the most scores.
You can see a small difference between a fast ball and a splitter. Because they have different heights
I was secretly hoping you could make an AI that learns as it pitches/bats. Like, you give it the starting 1000 data points... then the AI goes from there, improving and learning with each new pitch, ready to go up all the way to max score. Its funny. Wii sports has an oddly convenient way to track improvement
Oh my god i love this, thank you for doing this its so entertaining. Very underrated
Now let's make an AI that runs All Sports. (just kidding, it would be cool as hell though)
That first game the AI played was a single home run short of what’s known as “hitting for the cycle.” Which is getting a single, double, triple and home run in one game.
They’re pretty darn rare irl, particularly the triple, but the AI got two triples in that game - which is also exceptionally rare. Granted, they were from errors on the defense, but a triple is a triple no matter how you get it.
Not only that, but it also went and pitched an “immaculate inning.” Which is 3 strikeouts on 9 pitches, or put another way: every single pitch for that inning was a strike. Those are one of the holy grails of pitching accomplishments. They’re rarer than no hitters and only perfect games are rarer. (Thanks to @mustangex3785 for the correction)
What I’m trying to say is: the AI was one home run away from having the greatest rookie performance of all time. 😂
I agree that immaculate innings are awesome, but they are definitely not rarer than perfect games. There have been over 100 immaculate innings, and only 24 perfect games. Still makes for a pretty crazy stat line for the AI though, haha.
@@mustangex3785 thanks for the info! I’m not a huge baseball guy, so I was just going off memory. I edited my original comment to fix it and credit you for the correction. ⚾️
Actually an error does not count as a triple for hitting the cycle from what I've been told
@@archerelms If you reach third base only due to the error, then yeah it shouldn't count, because really you hit a double, you just happened to get lucky and get to third. It can be quite subjective though because it can be hard to tell if the runner would have made it to third even without the error.
bases reached on error do not count for the hit; e.g. if you reached second base due to a fielding error after safely reaching first, it is scored as a single + error.
additionally, 26 cycles were hit during the batter's rookie season, most recently by elly de la cruz last season.
The AI doing what Poofesure dreams about
This AI is unreal good! Plus it nearly misses just often enough that I’d believe this was a real human who was a pro at Wii sports baseball like for real this AI impresses me!
Awesome video! I'm surprised how bad the CPUs are at hitting, tbh.
having the AI go against itself or a human would be cool if possible
Just playing as a human, I got to Sekura. Never beat her. How tf was I expected to beat Sekura who throws 103 mph when I could only throw 96? Time passed and my Wii bit the dust but Wii Sports was my childhood. Good times. (Also was a tennis, bowling and boxing pro. Never liked golf.)
I don't know how much time it took you to make tgis video but all I can say is great job!
14:12 bro really threw an immaculate inning
How many hours have you spent on getting the training data? That must be a ton of gameplay on your part
I'm taking machine learning rn, this is so dope
I love these new AI youtubechannels. Makes me feel smart :)
The pitching portion would've probably turned put better with a decision tree or MLE.
You could've made a macro thay played against the computer and recorded results, and had the macro enumerate though various pitches, allowing you to collect 1000s of samples in the background. Or maybe even used a bayesian methods, such as probably of strike, given a pitch type and a certain mii/ranking. Lots of interesting avenues. Cool thing about a bayesian model is that once it's set up it could technically continuously learn from the data and update its beliefs, allowing you to make a larger continuous learning model.
For any baseball stat nerds, here are the AI's pitching and batting lines based off of total performance:
.528 BA /.528 OBP / 1.315 SLG / 1.843 OPS
1.64 ERA / 0.73WHIP / 12.82 K/9 / 33 IP
you’re a hero
can you put these in normal person terms?
@@screamingpuppy211 yeah exactly xD
@@screamingpuppy211BA is batting average (hits/at bats) usually expressed in decimal out of 1, so .528 is 52.8%. OBP is on base percentage, how often the player ends up on a base. This is shown in the same way. SLG is slugging. This can be thought of as a “weighted” batting average. Home runs count more than triples, triples count more than doubles, etc. OPS is just On base Plus Slugging. Now for the pitching stats. ERA is Earned Run Average. This is calculated by figuring out how many runs are allowed for every nine innings of gameplay, but Wii sports only has 3 innings per game so I assume he used that instead. WHIP is Walks and Hits per Innings Played, so (walks + hits)/innings. K is the shorthand for strikeout, so K/9 is how many strikeouts per 9 innings. You can calculate this by just doing strikeouts/9. IP is just innings pitched. Hope this helps!
also normal person terms: basically put up what would be the best hitting season ever on a rate basis and a very very very good pitching season
Finally another video!
Ngl this was really interesting I never thought someone would make an ai to beat Wii sports.
Watching the AI nuke dingers is the best thing ive seen in a while
way too underrated channel
Fabulous video, lovely music choices. How did you achieve the large array of video clips to show the training data? Is that a premier/AE plugin or did you write a script to do that?
I remember a while ago reading a book about a robot that goes to school and teaches itself how to be a normal kid. It canonically wrote its own code based on what it saw. It's crazy how that basically is what happens now.
This wwas a really great video
Does whether the batter is right or left handed when you're pitching affect things? I think the aiming of left/center/right (probably not center as much) would matter more based on it
Heres the thing wii sports adds a hidden stat to miis where some its harder to play than others
Did you think about doing AI vs AI training?
To throw the Splitters, the AI used while Pitching, just hold A and B on the Motion Controller an kinda throw it down.
this was a really cool video! too bad baseball doesn’t exist…
You can also adjust up and down for pitching
This will be like the scene at the end of "War Games" (tic tac toe scene)
is a triple only achived when a fumble happens at the far edge? or is it more where on the field it lands (near the edge away from defence players)
It depends on how long it takes to grab the ball, one time I had a play last 10-20 seconds before the ball was grabbed and it ended up being a triple.
@@samuelmeindl5512it is 8 seconds
You should do the batting ai vs the pitching ai
Great video.
whats the music used in the Road to Pro segment?
I wonder if you could reinforcement learn the batter ai to improve it after init with the mimic data
I want this AI. It will make it fun to watch
18:20 you’re welcome captions, you’re welcome
Cool stuff!
“I used the ai to destroy the ai”
-Thanos (possibly)
Would be interesting to have the AI learn as it goes, would start by trying to hit everything and just throwing fast balls and see how it evolves.
Instead of passing the last couple of images you could also just pass it one image containing the difference between two or more frames. This might make training slightly more efficient and also remove any static information from the image since that is irrelevant anyways.
so will there be ai vs ai video?
Very epic video
finally a new vid!
Did you test this on Wii Sports Club?
I wonder that if that copy is real that it might be the rare version of the game (unless you cut out the lineup part)
So in conclusion: *nerf right splitter*
The algorithm didn't like this video because the AI in the video is better than it
I really wanna see this for Golf
final stats (excluding the game against sakura and the ones after, because the states werent up)
pitching
ERA: 2.16
WHIP: .96
K/9: 16.92
BB/9: .72
K/BB: 23.5
batting
hits: 84
total bases: 209
(in 159 at bats, if expanded to 600 ab season, 317 hits, 789 total bases)
BA: .528
OBP: .528
SLG: 1.314
OPS: 1.843
15:32 did the ball really bounce from the grass and land in the home run area and counted as double?
That’s pretty much the textbook definition of a ground rule double.
This ai is kinda crazy with it
Why didn't you train the ai for how far the ball goes. So that the ai can hit mone runs more consistently?
Couldnt you just make a variable for whatever memory address determines player 1 batting or pitching?
Oh you used images instead of dolphin's memory reader.
Absolute banger. #TWIWJ
The Ai pitcher should go against the Ai batter
Why would an out not be the best possible pitching outcome?
What is the song or songs that play in the “Road To Pro” section?
we'll let you know if we find out lol, we're really annoyed it's not in the description
I actually did some sleuthing and found the songs! The first song is “More Coffee” by Ealot. The second is Turtleneck by Martin Landström.
ONLY ONE SPORT??? bleh.
it needs all five sports to REALLY be able to "Play Wii Sports"
I would love to see Poofesure get demolished by this AI
7:36 You can aim the ball?
Yeah like how😧
@@sheltershowcase use the + pad on the wii remote. left and right moves the pitch in that area, I forget if down or up does anything (if they center them I think)
do AI V.S. AI next
this ai batted a triple slash of .529/.529/1.326 for an OPS of 1.855. extrapolated over a full mlb season of 700 plate appearances, we can assume he would mash 130 home runs.
Does anyone know the music playing during the montage?
I'm wondering the same thing! I was disappointed not to see it credited in the description or anything.
Didn't mean to click on this video but I'm glad I did
As much as I think A.I can be pretty cool it’s also scary in certain situations because A.I is starting to do stuff that us humans can do but better and I find it scary because if it starts doing everything a human is best at doing then not only we become useless but A.I would also Replace us Humans Entirely so although A.I is cool I would recommend keeping A.I stuff to just a certain amount of stuff so they don’t replace us humans I think it’s for the better
I wonder how much better it could get if you just let it play and learn for a night
If the AI played the AI.... who would win???
What if it played infinitely, while also actively training against itself?
AI, duh.
The pitching ai wouldn’t fair well against the batting ai I feel
8:43 this how my brother plays every time it’s so annoying
Splitters are absolutely impossible to hit in wii sports 😂 AI is smart
This might be better off being a Tool assisted speedrun (TAS)
why, its very slow
There's already ai in all of them except golf and bowling
162-0 is in play boys let’s go !!
Just wait til he finds out you can actually pitch sidearm, unlocking another 12 pitch options...
Just to only throw right splitters
2:31 holy shit I got it right
Lowkey, i just wanna see the raw unedited footage of every game, just to have in the background
Edit: Just saw it was on patreon :/ too broke for that
I LOVE YOU
So basically CPU VS CPU
Why not make the hitting AI go against the pitching AI
WWII sports.
You should sell this technology to valve for anti cheat
The game does have this in the game already if you deselect your character, they just aren’t good at playing
I COULD DO THIS
But can it beat Matt?
Kind of disappointed by the baseball stats. Why didnt you work out OBS or ERA+?
the lack of babip while the weather is 90+ degrees and its before 2:36 pm is upsetting
Can they really call it a "best seller" if it was just included with every Wii?
NPC… N P C
This is really quite like teaching your young children how to think, do, and act, there were a few proud parent moments there that were getting me emotional 😂😅