top of page
Search

Whack! Home Run!

I spent the last weekend in Brighton watching my 9-year old brother play in a baseball tournament. As I cheered on his runs-batted-in and applauded every great play, I couldn't help but pick up on a few patterns throughout the game. The sound of a baseball bat hitting the ball-- the pitch of that sound varied a lot, and when it did, so did the direction that the ball traveled in. I asked my dad about this, and he said that baseball enthusiasts can often tell where a ball is going to go, solely based on the sound it makes when it hits the bat. For example, a loud crack usually sends the ball to the Center Outfield, whereas a higher-pitched ping may send it straight to first base.


If baseball enthusiasts can classify ball-bat contact pitches... why can't an intelligent machine? I surfed Google, trying to find if someone else had already started such a project, but to my surprise (because there is an algorithm for almost everything nowadays), they hadn't. Well then, I guess it's up to me to combine baseball and AI.


For this project, I would simply need over a hundred samples of baseball hit sound files, their corresponding direction of travel (perhaps an angle value relative to home plate), and a computer. By training an algorithm on 80% of the data, and then repeatedly testing it on the remaining 20%, I will eventually have a model that can predict the direction a baseball will travel based (haha get it, base?) on the pitch (haha get it, pitch?) of its contact with the bat.


Here's are two different visuals for how I could enumerate/classify the ball's travel direction:



I know this sounds like a whimsical little project, but such an algorithm could have meaningful applications in the world of sports. For live baseball games, cameras can use these algorithms to follow the ball's path when it is hit, eliminating the need for a human to continually steer the camera. He can sit back and enjoy the game with some nachos instead! The same thing can be applied to golf, where the ball often travels much further than a baseball could. Additionally, this algorithm could help train a baseball player to make smarter decisions during the game. If the hitter hears his hit's pitch and instantly knows that the ball has gone to the Outfield, he can immediately decide to run 2-3 bases instead of making that decision after reaching first base. I'm no expert on baseball (I didn't play for more than 2 years), but I think that could be a game-changer!


I'll be spending the next few days "practicing" baseball with my brother, as I unobtrusively record his hits and note down their travel angles/zones. Maybe I need to make a giant protractor. Here's a video of my star player:



Look at those hits! The application of AI in sports intrigued me right off the bat ;), especially in baseball, which I've had plenty of time to observe. Stay tuned for updates on the project.

107 views0 comments

Recent Posts

See All
Post: Blog2_Post
bottom of page