AI Learns to Play Wii Sports

2024 ж. 21 Мам.
185 129 Рет қаралды

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*

    @Picoz245@Picoz2454 ай бұрын
    • I was at 900 skill level and i started using this strat less than a day ago, i am at 1604 rn

      @milk10011@milk10011Ай бұрын
    • 2300+ lmao

      @milk10011@milk10011Ай бұрын
    • how to become best baseball player in world

      @ski3r3n@ski3r3nАй бұрын
    • 2640 WHAT

      @milk10011@milk10011Ай бұрын
    • ​@@milk10011 how goes the journey 👀

      @lunareynolds1862@lunareynolds1862Ай бұрын
  • This ai got more out of the parks in 2 hrs than I did in my entire childhood

    @yeetland1@yeetland111 ай бұрын
    • For ppl wondering it got 69 out of the parks 🎉

      @OfficialRandom275@OfficialRandom275Ай бұрын
    • ​@@OfficialRandom275 Nice

      @DustinJames-mk1gl@DustinJames-mk1glАй бұрын
    • Ai doesn't have to actually move a controller, though. It has numerous advantages.

      @heckinggi6034@heckinggi6034Ай бұрын
    • Wait, you can hit it out of the park?

      @wl5420@wl542023 күн бұрын
    • I’ve gotten two ever

      @Butterscotch_96@Butterscotch_9616 күн бұрын
  • 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.

    @jorgecastillo2391@jorgecastillo2391Ай бұрын
  • Put it against itself!

    @RecioDj@RecioDj11 ай бұрын
    • it might work together with itself...

      @nicki8731@nicki8731Ай бұрын
    • It would walk itself repeatedly, the first inning wouldn't end

      @Tomtom1056LMAO@Tomtom1056LMAOАй бұрын
    • @@nicki8731to escape from the Wii dimension to enslave us all

      @SkinniJ@SkinniJАй бұрын
    • @@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@tomc.5704Ай бұрын
    • @@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.

      @Tomtom1056LMAO@Tomtom1056LMAOАй бұрын
  • 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

    @therecyclingbandit8458@therecyclingbandit8458Ай бұрын
    • 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@archerelmsАй бұрын
    • @@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@KayOScodeАй бұрын
    • @@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@TheSuperappelflapАй бұрын
    • @@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

      @KayOScode@KayOScodeАй бұрын
  • Now train a baseball AI to imitate Poofesure gameplay and skill level.

    @Chicky_Lumps@Chicky_Lumps21 күн бұрын
    • Don't do it to him like this.

      @zdelrod829@zdelrod82916 күн бұрын
    • It would also have to be programmed to scream and break wii remotes

      @thespaceinvader@thespaceinvader12 күн бұрын
  • 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?

    @HydetheRapper@HydetheRapperАй бұрын
    • what on earth does that mean

      @wibbliams@wibbliamsАй бұрын
    • @@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.

      @HydetheRapper@HydetheRapperАй бұрын
    • 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.

      @LegendRazgriz@LegendRazgriz29 күн бұрын
    • @@LegendRazgrizfr lmao

      @fourdubs4@fourdubs429 күн бұрын
    • All to get clapped on by a walk off double 😭

      @Lancer2004@Lancer200423 күн бұрын
  • Now play against the AI.

    @ZacharyRodriguezVlogs@ZacharyRodriguezVlogsАй бұрын
    • I second this

      @TheColinShowGaming@TheColinShowGaming8 күн бұрын
    • I third this

      @PG3DWinner35@PG3DWinner357 сағат бұрын
  • somehow three-true-outcome analytical baseball has made its way to wii sports, and i love it

    @dawg6556@dawg6556Ай бұрын
    • Shiggy Diggy

      @_Beamish@_BeamishАй бұрын
  • 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

    @appointmenteer@appointmenteerАй бұрын
  • 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.

    @OG_Account@OG_Account28 күн бұрын
  • You can see a small difference between a fast ball and a splitter. Because they have different heights

    @CLH-Nord@CLH-NordАй бұрын
  • 14:12 bro really threw an immaculate inning

    @ljmac@ljmac14 күн бұрын
  • 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

    @Skyliner_369@Skyliner_369Ай бұрын
  • 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!

    @mattmcglashanstand-upcomed7011@mattmcglashanstand-upcomed7011Ай бұрын
  • 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. 😂

    @Poisonjam7@Poisonjam7Ай бұрын
    • 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@mustangex3785Ай бұрын
    • @@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. ⚾️

      @Poisonjam7@Poisonjam7Ай бұрын
    • Actually an error does not count as a triple for hitting the cycle from what I've been told

      @archerelms@archerelmsАй бұрын
    • @@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.

      @mapl3bac0n68@mapl3bac0n68Ай бұрын
    • 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.

      @fiercedeitylink2019@fiercedeitylink201914 күн бұрын
  • Now let's make an AI that runs All Sports. (just kidding, it would be cool as hell though)

    @HiImArcski@HiImArcski11 ай бұрын
  • The AI doing what Poofesure dreams about

    @maxrodriguez889@maxrodriguez889Ай бұрын
  • Oh my god i love this, thank you for doing this its so entertaining. Very underrated

    @crizpycheese8287@crizpycheese828711 ай бұрын
  • Awesome video! I'm surprised how bad the CPUs are at hitting, tbh.

    @muenstercheese@muenstercheese11 ай бұрын
  • 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.)

    @jaredhardaway7842@jaredhardaway7842Ай бұрын
  • having the AI go against itself or a human would be cool if possible

    @a_shrxydud@a_shrxydudАй бұрын
  • I don't know how much time it took you to make tgis video but all I can say is great job!

    @matthewalexander862@matthewalexander86211 ай бұрын
  • I'm taking machine learning rn, this is so dope

    @nathanielausten1577@nathanielausten1577Ай бұрын
  • Finally another video!

    @ragingmajesty@ragingmajesty11 ай бұрын
  • 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

    @user-tf5ew2pk8d@user-tf5ew2pk8dАй бұрын
    • you’re a hero

      @albaniayeet@albaniayeetАй бұрын
    • can you put these in normal person terms?

      @screamingpuppy211@screamingpuppy211Ай бұрын
    • @@screamingpuppy211 yeah exactly xD

      @nicki8731@nicki8731Ай бұрын
    • ⁠​⁠​⁠​⁠@@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!

      @WadeLofton@WadeLoftonАй бұрын
    • 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

      @albaniayeet@albaniayeetАй бұрын
  • 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?

    @kellen_mcsmellin@kellen_mcsmellinАй бұрын
  • I love these new AI youtubechannels. Makes me feel smart :)

    @FancyFreestyler@FancyFreestyler11 ай бұрын
  • 18:20 you’re welcome captions, you’re welcome

    @hiimlogaloots@hiimlogaloots7 күн бұрын
  • How many hours have you spent on getting the training data? That must be a ton of gameplay on your part

    @SimulationWithDaniel@SimulationWithDaniel8 ай бұрын
  • 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.

    @codislife3095@codislife309516 күн бұрын
  • Ngl this was really interesting I never thought someone would make an ai to beat Wii sports.

    @Ramenoodlez1234@Ramenoodlez123416 күн бұрын
  • BTW, for the pitching outcomes values, you could use something called an RE24 matrix (which gives you the expected runs in each of the 24 base-out states) to measure the change in run expectancy. To get the value of strikes and balls, you could use RE288 (which is RE24 but also includes all the states of balls and strikes)

    @jsonr@jsonrКүн бұрын
  • Watching the AI nuke dingers is the best thing ive seen in a while

    @St.Nerman@St.NermanАй бұрын
  • This wwas a really great video

    @pl46u3@pl46u311 ай бұрын
  • 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

    @zperk13@zperk13Ай бұрын
  • Great video.

    @why_i_game@why_i_game11 ай бұрын
  • Cool stuff!

    @BrVendan@BrVendan19 күн бұрын
  • way too underrated channel

    @randienz1196@randienz1196Ай бұрын
  • You can also adjust up and down for pitching

    @x2XStrikerX0x@x2XStrikerX0xАй бұрын
  • What music did you use for the Road to Pro montage, and for the scene at 22:53?

    @Willllow@Willllow5 күн бұрын
  • 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)

    @ComfyCherry@ComfyCherry10 ай бұрын
    • 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.

      @samuelmeindl5512@samuelmeindl55128 ай бұрын
    • @@samuelmeindl5512it is 8 seconds

      @milk10011@milk10011Ай бұрын
  • Very epic video

    @sircrashtonii9718@sircrashtonii971811 ай бұрын
  • this was a really cool video! too bad baseball doesn’t exist…

    @MJCFilms@MJCFilmsАй бұрын
  • Is there a playlist for the music playing during the timelapse of the games?

    @xaviercurrie9229@xaviercurrie922912 сағат бұрын
  • 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.

    @TheProfix@TheProfixАй бұрын
  • Heres the thing wii sports adds a hidden stat to miis where some its harder to play than others

    @danielmallory4687@danielmallory4687Ай бұрын
  • You should do the batting ai vs the pitching ai

    @squirtle747@squirtle747Ай бұрын
  • Did you think about doing AI vs AI training?

    @Henrix1998@Henrix1998Ай бұрын
  • To throw the Splitters, the AI used while Pitching, just hold A and B on the Motion Controller an kinda throw it down.

    @YJ_Scorpio@YJ_ScorpioАй бұрын
  • I want this AI. It will make it fun to watch

    @DevinsWorld1999@DevinsWorld199910 күн бұрын
  • finally a new vid!

    @bardiumtrove@bardiumtrove11 ай бұрын
  • whats the music used in the Road to Pro segment?

    @RedStinger_0@RedStinger_012 күн бұрын
  • I wonder if you could reinforcement learn the batter ai to improve it after init with the mimic data

    @bobmike2373@bobmike237319 күн бұрын
  • 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.

    @MiguelDurazo@MiguelDurazoАй бұрын
  • 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.

    @ryzu1407@ryzu1407Ай бұрын
  • “I used the ai to destroy the ai” -Thanos (possibly)

    @Mydrivehome104@Mydrivehome104Ай бұрын
  • I really wanna see this for Golf

    @derenjoy3r@derenjoy3rАй бұрын
  • This will be like the scene at the end of "War Games" (tic tac toe scene)

    @vincentkingsdale8334@vincentkingsdale8334Ай бұрын
  • So in conclusion: *nerf right splitter*

    @ultimate_pleb@ultimate_pleb24 күн бұрын
  • This ai is kinda crazy with it

    @edgyeric4385@edgyeric438523 күн бұрын
  • so will there be ai vs ai video?

    @anotheruser133@anotheruser133Ай бұрын
  • ok imagine going up agenst someone who has won 15 games in a row and never has tasted defeat ever.

    @kazii_the_avali@kazii_the_avaliКүн бұрын
  • The algorithm didn't like this video because the AI in the video is better than it

    @C-Llama@C-LlamaАй бұрын
    • Wow it had like 18k views when I made this comment

      @C-Llama@C-Llama3 күн бұрын
  • The Ai pitcher should go against the Ai batter

    @f1r3b1rd8@f1r3b1rd87 күн бұрын
  • 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

    @smoceany9478@smoceany947827 күн бұрын
  • Did you test this on Wii Sports Club?

    @Dootium@Dootium3 ай бұрын
  • Absolute banger. #TWIWJ

    @TroyRubert@TroyRubert11 ай бұрын
  • What is the song or songs that play in the “Road To Pro” section?

    @IndulgentWastrel@IndulgentWastrelАй бұрын
    • we'll let you know if we find out lol, we're really annoyed it's not in the description

      @SunroseStudios@SunroseStudiosАй бұрын
    • 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.

      @IndulgentWastrel@IndulgentWastrelАй бұрын
  • 15:32 did the ball really bounce from the grass and land in the home run area and counted as double?

    @VOLTRONDEFENDER4440@VOLTRONDEFENDER444020 күн бұрын
    • That’s pretty much the textbook definition of a ground rule double.

      @stormysyndrome7043@stormysyndrome704319 күн бұрын
  • The ai allowed 69 runs lol

    @williamforjenth9368@williamforjenth93686 күн бұрын
  • 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)

    @trooper309@trooper30916 күн бұрын
  • I wonder how much better it could get if you just let it play and learn for a night

    @steph_7775@steph_777523 күн бұрын
  • I would love to see Poofesure get demolished by this AI

    @twothotyshawtys1787@twothotyshawtys1787Ай бұрын
  • Couldnt you just make a variable for whatever memory address determines player 1 batting or pitching?

    @miniyodadude6604@miniyodadude660427 күн бұрын
    • Oh you used images instead of dolphin's memory reader.

      @miniyodadude6604@miniyodadude660427 күн бұрын
  • Why would an out not be the best possible pitching outcome?

    @willharris9413@willharris9413Ай бұрын
  • do AI V.S. AI next

    @MCNubblings@MCNubblingsАй бұрын
  • Didn't mean to click on this video but I'm glad I did

    @hugejazz2737@hugejazz273727 күн бұрын
  • Why didn't you train the ai for how far the ball goes. So that the ai can hit mone runs more consistently?

    @gijsvanderlinden9385@gijsvanderlinden938529 күн бұрын
  • Does anyone know the music playing during the montage?

    @KMB1577@KMB157728 күн бұрын
    • I'm wondering the same thing! I was disappointed not to see it credited in the description or anything.

      @Woedenaz@Woedenaz23 күн бұрын
  • 7:36 You can aim the ball?

    @samuelmeindl5512@samuelmeindl55128 ай бұрын
    • Yeah like how😧

      @sheltershowcase@sheltershowcaseАй бұрын
    • @@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)

      @i_am_gant7142@i_am_gant714219 күн бұрын
  • If the AI played the AI.... who would win???

    @nelliamattson7452@nelliamattson745211 ай бұрын
    • What if it played infinitely, while also actively training against itself?

      @CapnBlud@CapnBludАй бұрын
    • AI, duh.

      @labotamist8199@labotamist8199Ай бұрын
    • The pitching ai wouldn’t fair well against the batting ai I feel

      @lullings@lullingsАй бұрын
  • 162-0 is in play boys let’s go !!

    @chrisss8196@chrisss8196Ай бұрын
  • I LOVE YOU

    @Engineergaming44@Engineergaming44Ай бұрын
  • 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.

    @fiercedeitylink2019@fiercedeitylink201914 күн бұрын
  • 2:31 holy shit I got it right

    @end_slayer@end_slayerАй бұрын
  • ONLY ONE SPORT??? bleh. it needs all five sports to REALLY be able to "Play Wii Sports"

    @shilohmagic7173@shilohmagic71736 күн бұрын
  • This might be better off being a Tool assisted speedrun (TAS)

    @talkingjester9273@talkingjester9273Ай бұрын
    • why, its very slow

      @smoceany9478@smoceany947827 күн бұрын
  • 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

    @powerzebra6464@powerzebra646425 күн бұрын
  • 8:43 this how my brother plays every time it’s so annoying

    @RandomStuffIol@RandomStuffIolАй бұрын
  • WWII sports.

    @CapnBlud@CapnBludАй бұрын
  • There's already ai in all of them except golf and bowling

    @LightPink@LightPinkАй бұрын
  • Splitters are absolutely impossible to hit in wii sports 😂 AI is smart

    @leftysheppey@leftysheppeyАй бұрын
  • Pog

    @08C6PaceCar@08C6PaceCar20 күн бұрын
  • NPC… N P C

    @tenlugggaming2341@tenlugggaming234121 күн бұрын
  • Kind of disappointed by the baseball stats. Why didnt you work out OBS or ERA+?

    @leftysheppey@leftysheppeyАй бұрын
    • the lack of babip while the weather is 90+ degrees and its before 2:36 pm is upsetting

      @andyluce7871@andyluce7871Ай бұрын
  • Can they really call it a "best seller" if it was just included with every Wii?

    @eduardoig17@eduardoig17Ай бұрын
  • So basically CPU VS CPU

    @larsgitaar1@larsgitaar1Ай бұрын
  • Why not make the hitting AI go against the pitching AI

    @TropicalTrizzy@TropicalTrizzy20 күн бұрын
  • Only sport where matt aint good

    @G.A.M.Y.@G.A.M.Y.19 күн бұрын
KZhead