Inspiration

Baseball bullpen decisions are made in seconds but are often judged entirely by what happened afterward. If the reliever succeeds, the move looks brilliant; if he fails, it looks like a mistake.

We wanted to ask a fairer question:

Given only the information available at that moment, which plausible reliever offered the best chance of winning?

That question inspired THE HOOK, an interactive and explainable MLB bullpen decision simulator.

What it does

THE HOOK replays three verified, high-leverage MLB pitching decisions. Each replay presents the inning, score, outs, occupied bases, upcoming hitters, and the manager’s actual decision.

The application ranks plausible relievers by estimated win probability and expected runs. Users can select another reliever and immediately see the projected results and explanation update.

Our flagship scenario is the bases-loaded, two-out 12th inning of Game 3 of the 2025 World Series. The Dodgers chose Clayton Kershaw, while THE HOOK recommends keeping Emmet Sheehan in the game.

Under the model’s shared assumptions:

$$ \Delta WP = WP_{\text{recommended}} - WP_{\text{actual}} $$

$$ \Delta WP = 47.6\% - 44.0\% = 3.6\text{ percentage points} $$

This is a comparative estimate—not proof of what would have happened.

How we built it

We processed approximately 1.27 million MLB Statcast pitches from the 2025 season through August 2026, producing 324,435 modelable plate appearances.

Every player profile uses only information available before the relevant game. Small samples are adjusted toward league averages using a fixed 200-plate-appearance prior.

A regularized multinomial logistic regression estimates four plate-appearance outcomes:

$$ P(Y)={P(\text{out}),P(\text{walk/HBP}),P(\text{single}),P(\text{extra-base hit})} $$

For each candidate, THE HOOK runs 2,000 simulations over the next three hitters. Each simulation updates runners, outs, and runs before a chronological game-state model estimates win probability.

The matchup model achieved a holdout log loss of 0.9645, compared with 0.9700 for the league-rate baseline. The game-state model achieved 0.4743, compared with 0.6927 for a constant baseline.

The interface was built with Python, Streamlit, Plotly, pandas, NumPy, and scikit-learn. All deployed predictions and scenarios are stored locally, so the application requires no runtime API calls or model training.

Challenges we ran into

Our biggest challenge was preventing data leakage. Historical sports models can accidentally use information that was unavailable when the real decision occurred. We created prior-only player profiles and chronological validation to prevent that.

Other challenges included:

  • Reliably downloading and caching a large Statcast dataset
  • Mapping baseball events into four consistent outcome classes
  • Reconstructing base occupancy from runner movements
  • Normalizing labels across different data sources
  • Verifying scenarios against official MLB play-by-play
  • Approximating historical bullpen availability
  • Keeping 2,000 simulations per candidate fast enough for an interactive app
  • Explaining close rankings without overstating certainty

We balanced realism with transparency by using a clearly documented three-hitter horizon instead of an opaque full-game simulator.

Accomplishments that we're proud of

  • Processed 1.27 million Statcast pitch records
  • Created 324,435 point-in-time-safe plate appearances
  • Verified three historical scenarios against official play-by-play
  • Simulated 12 candidate relievers
  • Produced deterministic explanations without an LLM
  • Improved over league and constant-rate validation baselines
  • Built a responsive two-page Streamlit application
  • Eliminated runtime network and training dependencies
  • Passed 26 automated tests
  • Published a public repository and live application

What we learned

We learned that trustworthy sports analytics depends as much on data discipline and communication as it does on modeling.

A recommendation becomes more credible when every candidate is evaluated under identical assumptions, the data reflects only what was known at the time, and the interface distinguishes an estimate from an observed outcome.

We also learned that not every decision needs a dramatic verdict. Some scenarios produce a meaningful alternative, while others produce an effective tie. Showing both honestly makes the system more useful than manufacturing certainty.

What's next for THE HOOK

Future versions could add:

  • Official historical roster and bullpen-availability information
  • Pitch-family and hitter-specific matchup interactions
  • More realistic baserunning and defensive effects
  • Warm-up, injury, and workload context
  • Model and simulation uncertainty
  • Additional seasons, leagues, and decision types
  • A pregame bullpen-planning mode
  • Custom decision replays for analysts and broadcasters

Our long-term vision is a responsible decision-support system that helps managers, analysts, broadcasters, and fans understand the tradeoffs behind one of baseball’s most consequential decisions.

Built With

Share this project:

Updates

Submission history