Predicting Shot Making in Basketball using Convolutional Neural Networks Learnt from Adversarial Multiagent Trajectories

Mark Harmon, Patrick Lucey, Diego KlabjanarXiv 2016

Abstract

In this paper, we predict the likelihood of a player making a shot in basketball from multiagent trajectories. Previous approaches to similar problems center on hand-crafting features to capture domain specific knowledge. Although intuitive, recent work in deep learning has shown this approach is prone to missing important predictive features. To circumvent this issue, we present a convolutional neural network (CNN) approach where we initially represent the multiagent behavior as an image. To encode the adversarial nature of basketball, we use a multi-channel image which we then feed into a CNN. Additionally, to capture the temporal aspect of the trajectories we "fade" the player trajectories. We find that this approach is superior to a traditional FFN model. By using gradient ascent to create images using an already trained CNN, we discover what features the CNN filters learn. Last, we find that a combined CNN+FFN is the best performing network with an error rate of 39%.

Introduction

Predicting the success of a basketball shot is a complex challenge in sports analytics. It depends on a dynamic web of adversarial interactions—the positioning of defenders, the shooter's velocity, and the overall offensive flow. Traditional methods rely on hand-crafted features, such as the distance to the nearest defender. However, these often fail to capture the high-dimensional nuances of multiagent movement. The core challenge is representing raw trajectory data ($x, y$ coordinates over time) in a way that preserves adversarial context for deep learning models.

Methodology

The researchers proposed treating basketball plays as multi-channel images to leverage the spatial processing power of Convolutional Neural Networks (CNNs).

Image Representation and Encoding

The 50x94 foot court is mapped to a 50x94 pixel image. To avoid data "blurring" when players overlap, the authors used an 11-channel representation: five channels for offensive players (assigned by role), five for defensive players, and one for the ball.

Comparison of grayscale temporal fading (left) and multi-channel role-based encoding (right) for basketball trajectories.

Temporal Fading

To capture movement within a static image, a temporal "fading" effect was applied. Recent positions are rendered at full brightness, while older positions from a 5-second window are progressively dimmed. This allows the CNN to discern the direction and speed of each agent.

Hybrid Architecture

The final model, a CNN+FFN, combines a CNN for spatial feature extraction with a Feed-Forward Network (FFN) that processes 197 traditional statistical features (e.g., angles to the hoop). These streams are merged in a final dense layer to output the probability of a successful shot.

Dataset

The study utilized SportsVU tracking data from the 2012-2013 NBA season, covering 13 teams and approximately 40 games each. The raw data, recorded at 25 frames per second, was processed into 75,000 unique five-second plays ending in a shot. The data was split into 52,000 training samples, 10,000 validation samples, and 10,000 test samples.

Examples of processed multiagent trajectory data used for training the CNN.

Results and Discussion

The CNN+FFN model achieved the best performance with an error rate of 39% (61% accuracy). This hybrid approach outperformed standalone CNN and FFN models, indicating that spatial patterns and discrete statistics provide complementary predictive information.

Key insights include:

  • Role-Based Importance: Moving from a single-channel to an 11-channel image significantly reduced error, highlighting that player roles (e.g., Point Guard vs. Center) are vital for understanding basketball logic.
  • Automated Feature Discovery: The image-based CNN performed nearly as well as an FFN using 200 engineered features, suggesting that deep learning can autonomously discover relevant geometric and physical features.
  • Role Predictability: The model was most accurate for Centers, likely due to their more constrained and predictable movement patterns in the "paint."

Conclusion

While successful, the authors note that linear fading is a lossy representation of time. Future work could explore recurrent architectures like LSTMs to better capture temporal dependencies. Additionally, incorporating player-specific embeddings could account for individual talent variations, moving beyond generic roles to capture the unique impact of star players.

Summary updated

BibTeX
@misc{harmon2016predicting,
  author = {Mark Harmon and Patrick Lucey and Diego Klabjan},
  title = {{Predicting Shot Making in Basketball using Convolutional Neural Networks Learnt from Adversarial Multiagent Trajectories}},
  year = {2016},
  eprint = {1609.04849},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1609.04849},
}
Figure