Alright, so lemme tell you about this “marvin hudson umpire” thing I was messing around with the other day. It’s kinda cool, kinda weird, but definitely a fun little project.

First off, what even IS it? Well, I stumbled upon this term while digging into some old baseball trivia. Marvin Hudson was apparently a pretty well-known MLB umpire. And I thought, “Hey, wouldn’t it be neat to try and simulate his umpiring style using some kind of AI or something?” Totally random, I know.
So, I started by gathering data. I mean, what’s an AI without data, right? I scraped some publicly available play-by-play data from a baseball stats website. I was mainly looking for things like:
- Pitch type (fastball, curveball, etc.)
- Pitch location (inside, outside, high, low)
- Batter stance (lefty, righty)
- Count (0-0, 1-0, etc.)
- And most importantly, whether the pitch was called a strike or a ball.
Cleaning up the mess was the next big hurdle. The data was all over the place. Missing values, weird formats… you name it. I spent a solid afternoon just wrangling the data into something usable. Pandas in Python saved my life, seriously. If you’re ever dealing with messy data, learn Pandas. It’s a game-changer.
Then came the fun part: building the model. I’m no data scientist, but I’ve dabbled with machine learning before. I decided to go with a simple logistic regression model. It’s not fancy, but it’s easy to understand and implement. The idea was to train the model on the historical data to predict the probability of a pitch being called a strike based on the features I mentioned earlier.
I used scikit-learn to train the model. Split the data into training and testing sets, fit the model, and then evaluated its performance. The accuracy wasn’t amazing, but it was decent enough to be interesting. Around 70%, if I remember correctly. That’s probably because I used such a simple model and didn’t do a ton of feature engineering.

Okay, so I had a model… now what? I wanted to make it interactive. So I built a super basic web app using Flask. I put in some input fields for pitch type, location, batter stance, etc. The user could enter these values, and the app would send them to the model, which would then predict whether Marvin Hudson (the AI version) would call it a strike or a ball.
It was clunky, to be honest. The UI looked like it was designed in the 90s, and the predictions were sometimes hilariously wrong. But it was still pretty cool to see it working. I even added a little “umpire scorecard” that would track the AI’s performance over a simulated game.
What did I learn? Well, a few things. First, data cleaning is a HUGE part of any data science project. Second, even a simple model can be surprisingly effective. And third, building a web app to showcase your work is a great way to learn and have fun. I mean, who wouldn’t want to see a robot umpire call balls and strikes?
Would I do it again? Absolutely. I’d probably try a more sophisticated model next time, maybe a neural network or something. And I’d definitely spend more time on feature engineering. But overall, it was a fun and rewarding project. If you’re looking for a weekend project, give it a shot! You might be surprised at what you can create.