Walk-Off Labs
Published on

Introducing Perfect Game

Authors
  • avatar
    Name
    Tristan Mott
    Twitter
  • avatar
    Name
    Caleb Bradshaw
    Twitter

What is Perfect Game?

Imagine a pre-game meeting where coaches and analysts gather around a whiteboard and someone asks, "Tie-game, bottom of the 9th, Shohei Ohtani up to bat with a runner on second. Do we walk him?" Perhaps the game is already in progress and the manager asks, "According to our data, who should we be warming up in the bullpen right now?" Or maybe the game is over after a close win or loss, and the team wants to know, "Was that pinch-hit really our best option?"

We built Perfect Game to answer all of these questions and more. Perfect Game is a platform that uses game theory to compute optimal management decisions for every baseball scenario imaginable. There are no complex heuristics, no black-box AI models, no unexplainable recommendations. All Perfect Game does is take in a simple, user specified player matchup model along with constraints for how each player is allowed to be used (defensive positional eligibility, pitcher usage limits, etc.). Then, using a powerful game-theoretic solver, Perfect Game computes optimal management strategies for every possible game state that maximize expected wins. The best part: every recommendation is fully explainable by the user's own model and beliefs about their players.

As a small group of academics and engineers, our mission is to enable teams to fully leverage their own data, analytics, and domain expertise in order to make optimal decisions on the field.

Creating a Game

The first step in using our platform is to create a game. The user specifies the primary team, the opponent, and the date. They can optionally specify future opponents if they want their strategies to take into account the possibility of saving relief pitchers for future games.

Create Game

Once the game has been created, the user builds the rosters. Perfect Game automatically imports default rosters for both teams according to the game date, but the user can edit these and create their own custom teams if desired.

Dodgers Roster

Once all players have been added to the rosters, it is time to specify the player matchup model. For more information about what a matchup model is, refer to this blog post. The user can choose between our model and uploading their own custom model. Our model will only use player data up to the game date in order to make our predictions as accurate as we can. We also allow users to download our model if they want to edit it or compare it to their own. The matchup model is the source of truth for all recommendations made by our platform, so we recommend that users experiment with different models, finding one that they believe in.

Create Matchups

Solving the Game

Once a game has been created, the user can create one or more custom "solution". In this context, a solution is defined as the stored Nash equilibrium strategy according to the matchup model and constraints specified by the user.

Create Solution

Within a solution, the user sets parameters for each pitcher in the game:

Blue Jays Bullpen
1 / 2

They set batter lineups, positional eligibility, and can optionally optimize batting orders according to the opposing pitchers they selected:

Dodgers Lineup
1 / 2

They select the maximum number of innings and the maximum score deficit they are willing to consider (the game ends in a tie after this many innings and ends in an immediate win or loss once the deficit is reached, otherwise there would be an infinite number of game states):

Solution Parameters

Before solving, the user can optionally configure future games. Perfect Game will solve Nash equilibria up to 6 games into the future and backpropagate these strategies into the current game. That way the current game can compare the benefits of using a relief pitcher now versus saving them for a future game (if the user has constrained the inter-game usage of said reliever).

Series Configuration
1 / 5

After specifying all of the constraints for their solution, the user clicks "Solve" and watches as Perfect Game rapidly considers every possible sequence of decisions and outcomes as it computes equilibrium strategies for both teams.

Solving Game

Navigating the Solution

Once a particular solution for a game has been solved, the user can open up Perfect Game's navigator. From the navigator, users can explore the entire state space, walking through the game sequentially or jumping forwards and backwards. At any point, they can view the win value of every single decision. If they chose to solve future games, they have the option to toggle between series expected wins and single game win probability.

Navigator Start (Expected Wins)
1 / 4

Examples

We can now see some examples of optimal strategies computed by Perfect Game (according to our own matchup model and the constraints shown above). All of these examples are taken from Game 1 of the 2025 World Series between the Dodgers and Blue Jays. We solved Game 1 with respect to games 1-3 in the series. The purpose of these examples is not to make definitive claims about what decisions should have been made, but to showcase how game theory can be used to convert a matchup model into explainable insights.

The first example comes in the top of the 3rd inning with Freddie Freeman and Mookie Betts on first and second base, with Will Smith up to bat. Unsurprisingly, the optimal strategy with respect to total wins was for Trey Yesavage to stay in the game, likely because it was only the 3rd inning. Interestingly, if winning the current game was the only goal, our algorithm recommends bringing in Eric Lauer.

Lauer for Yesavage (Expected Wins)
1 / 2

The next scenario comes in the bottom of the 6th inning. The Blue Jays lead 3-2 and the bases are loaded with no outs. Myles Straw is up to bat against Emmet Sheehan. With respect to both the series and the current game, our algorithm recommends pinch-hitting Nathan Lukes which is what the Blue Jays did. He walked after 9 pitches, scoring a run and extending the lead.

Lukes for Straw (Expected Wins)
1 / 2

Later in that same inning, Davis Schneider came up to bat with the bases still loaded and one out. Against Schneider, our algorithm recommended keeping Sheehan in the game. When the Blue Jays pinch-hit lefty Addison Barger, the series algorithm still recommended keeping Sheehan in the game (at the point the Dodgers' win probability was down to 6%, so the algorithm was trying to conserve arms). However, the current game algorithm changed its recommendation to lefties Justin Wrobleski or Jack Dreyer. The Dodgers went with its third choice, Anthony Banda, and Barger took him deep for a grand slam.

Dodgers Bullpen Before Barger (Expected Wins)
1 / 4

By the time the game reached the bottom of the 7th, the Dodgers were down 4-11 with less than 1% chance of winning the game. The current game algorithm computed that Justin Wrobleski was the best pitcher for this situation and that Blake Treinen was the worst reliever they could have brought in. The series algorithm, of course, understood how valuable Wrobleski could be in future games, so it suggested that Treinen was the best option and that Wrobleski was by far the worst option (because of the future implications). The Dodgers went with Wrobleski. He retired the next 3 batters, but this did basically nothing for his team's win probability.

Wrobleski vs Treinen (Expected Wins)
1 / 2

Want to learn more? Try Perfect Game or reach out to us.