Research news

Computers as basketball experts

UL FRI “basketball team”
Photo by: UL FRI / Željko Stevanić, IFP

Publish Date: 08.07.2020

Category: Interdisciplinary research,

At first glance, computer experts do not have much in common with sports, but some of them absolutely love it, especially when it comes to predictive modelling and match simulations. Petar Vračar, Erik Štrumbelj and Igor Kononenko from the Laboratory for Cognitive Modelling at the University of Ljubljana Faculty of Computer and Information Science (UL FRI) published a research article in the Knowledge and Information Systems journal titled Automatic Attribute Construction for Basketball Modelling. The article presents a machine-learning predictive model for basketball games.

The sequence of events at a basketball match is very uncertain. What follows depends on what has happened before. The problem is how to take all this into account when predicting the next event in a match. Therefore, the researchers decided to use machine learning to develop a basketball match model and to extract the game attributes from it that have the greatest impact on the score.

The play-by-play statistics record all events in a basketball match in a time sequence, including when a player of a specific team was successful or unsuccessful at scoring a two- or three-point field goal, the offensive and defensive rebounds, free throws, turnovers, violations and personal fouls. The researchers developed a method for detecting patterns in the sequence of such events at a basketball match. From these patterns, the machine-learning algorithms learn how to connect the attributes of the competing teams with the sequence of events taking place on the basketball court. This way the computer becomes a basketball expert who “understands” how individual game elements affect the final score. This methodology is not only applicable to basketball, as a computer can use it to analyse elements of other sports, turning into a specialist in water polo, volleyball, handball and similar sports.

At the core of a sports match simulator is a predictive model, which receives an entry description of a current match situation at every step of the simulation, after which it selects the next event and the time until it occurs in line with the predicted probability. In addition to the score and time until the end of the match, the description of the current situation in a match also includes the opposing team’s performance. A description of the opposing players is key to creating plausible simulations, because the sequence of events in a match is not entirely random, but is influenced by the players’ performance.

To check whether they had really turned the computer into an basketball expert that can be compared to real-life specialists with many years of experience and a wealth of knowledge, the researchers ran a simulation using the play-by-play statistics of 3,449 matches over three NBA regular seasons. The results showed that their predictive models were successful at predicting the course of a basketball match.

In terms of scores, Petar Vračar noted a sharp rise in the trend of new events towards the end of each quarter, which can be attributed to the teams’ desire to complete their attack before the end of the playing time. In addition, a sudden drop in the trend can be observed in the first three quarters, appearing approximately 20 s before the end of the playing time. This happens because the teams deliberately stall the ball, preventing the opposing team from performing another attack. However, this can no longer be observed at the end of the last quarter, because the losing team is eager to perform faster and riskier moves, and because of an increased number of free throws resulting from quick personal fouls.

A plausible match simulator must take into account all these principles. The methods described above could be used to develop a match simulator that would become part of a larger expert system. This way, it would help coaches select the players for an individual match or the entire season. The system would use the team composed of selected players to simulate the course of the match, providing expert information on which elements of the game could help the team win.

back to list