How artificial intelligence is changing baseball

Listen to this story.

Imagine if a baseball club had an oracle that could say with certainty how many hits a batter would compile, or how many runs a pitcher would allow, in the coming year, three years or decade. The best-performing teams would then be those with the best oracles. Such oracles don’t exist, of course. But artificial-intelligence (AI) models do. And they don’t need a crystal ball: they can predict the future simply by looking for mathematical patterns in reams of historical data.

Such analysis is nothing new. In the 1970s the baseball analyst Bill James pioneered an empirical approach to the sport, developing a panoply of novel ways to quantify performance. Such “sabermetrics” (named for the Society for American Baseball Research, of which James was a member) entered the mainstream in the “Moneyball” era of the early 2000s. As documented in a book and, later, a film of that name, the Oakland Athletics began applying sabermetric principles to identify (and then sign) players whose statistical profiles suggested they might be more valuable than competing clubs realised. This paid off; the Athletics made the playoffs four years in a row despite having one of the lowest payrolls in North America’s Major League Baseball (MLB).

Moneyball has now entered its AI era. All teams in MLB have at least one analyst, with some employing dozens. The consistent and clever use of AI-powered analytics is letting teams with small budgets compete and those with large budgets dominate. More investment and innovation looks inevitable.

There are good reasons why baseball is such an ideal testing ground for AI-driven analysis. First, as in most sports, there are clear rules, uncontested winners, and few lives at stake if things go wrong. Baseball also has certain unique advantages. As Nicholas Kapur at Teamworks, a sports analytics company, puts it, “Baseball is a series of individual matchups that masquerades as a team sport.” Studying a series of discrete contests between batters and pitchers is much simpler than the many-body problem of a rugby scrum or a fast break in basketball.

Baseball is also overflowing with data. On top of a century and a half of recorded hits and runs, all pitched baseballs in MLB were simultaneously filmed by three cameras starting in 2006. This provided data about the ball’s origin point, how fast it went, and how much it curved or sank as well as precisely where it ended up. Now, its newer, radar-based replacement, TrackMan, is even more reliable. What’s more, all league games are recorded by several cameras in each stadium. This footage is then processed by algorithms to track every pitch and swing, along with the joint and body movements of each player.

Innovations in AI models offer tantalising possibilities for how this data could be put to use. Just as a large language model (LLM) analyses the structure of millions of existing sentences to suggest new ones, a baseball equivalent could predict the future performance of a player or team as well as suggest game strategies.

Curve balls

Statistical analysis has led to such changes before. Over the past two decades number-crunching has led to the increasing use of defensive shifts—where fielders are repositioned based on the likely outcome of a batter’s swing—becoming more common. (The most extreme infield defensive shifts were banned in 2023 in an effort to make games more exciting.) Machine-learning models employed by some teams help coaches make more fine-grained analyses based on ball data and player tendencies, allowing them to place fielders in positions where the statistics suggest the opposing batter is most likely to hit the ball. Other teams, meanwhile, use AI to recommend pitches that will be most effective against specific batters.

There are a number of ways AI models can do this. One sort plots pitches on a graph with its own distinctive axes, where pitches that are similar to each other wind up close together. For instance, two fastballs to the upper right of the strike zone will be close together in this “pitching space”, whereas a curveball to the same location will end up somewhere else. This sort of data-crunching lets a batter-v-pitcher model make predictions even for matchups it has never seen before, by, for example, looking at how a batter has fared against similar pitchers.

A future goal is to develop an AI model of any given pitcher. Batters could then use this to study a pitcher’s wind-up and pitching motion, and predict the location and type of the subsequent pitch. Training such a virtual pitcher would require hours of high-speed video as well as data about the subsequent pitches. The model would then be repeatedly asked to predict correlations between wind-up and pitch, hunting for distinctive tells that batters could use when faced with the real thing.

Such a tool would be in high demand: at present, a number of pitchers consistently outperform AI-model predictions. This may be because current models, which mainly use pitch trajectories, lack an understanding of how batters use physical cues to read the pitcher, and how pitchers use their body to bamboozle batters. Incorporating pitching motions into these models might fix that.

A related model could also be used to analyse the biomechanics of the throwing motion to determine the likelihood of injury within the next few months, and over the course of a career. If an AI model identifies a risky movement, this can be corrected to either keep the pitcher healthy or stop the team from wasting money on someone prone to injury.

As bat-tracking data become more widely available, equivalent AI batters may come soon to offer insights into how batters perform the superhuman feat of hitting a ball travelling at over 150kph from barely 20 metres away, potentially allowing this skill to be more efficiently taught.

Key to acting on such suggestions, though, is explainability: can the model’s reasoning be trusted—or even followed? Teams are experimenting with explainability techniques that allow for such interrogation. One approach uses LLMs as an interface to the projection model, so that a coach can ask questions directly, without having to learn to code. Some teams even employ internal “sales reps” that act as intermediaries between the analytics team and the one on-field. Their job is to work out how to interpret and contextualise the insights in a way that would be most useful to players and coaches.

The way that models are used should always allow for nuance or questioning, says Dr Kapur, because they “can miss things and assumptions can be wrong”. Thousands of unpredictable details can escape an AI model’s predictions—everything from a coach’s mood to a last-minute change of strategy. Even if such minutiae could one day be modelled, there is little chance of AI taking the fun out of baseball. “We know computers are better than humans at playing chess,” says Patrick Lucey at Stats Perform, a sports analytics company, “but we still love playing chess.”

Curious about the world? To enjoy our mind-expanding science coverage, sign up to Simply Science, our weekly subscriber-only newsletter.