🏀 ApexShot AI

Inspiration

Traditional basketball statistics fail to capture the true context behind every shot. A wide-open corner three-pointer is valued the same as a heavily contested fadeaway jumper, while defensive impact is often reduced to blocks and steals, ignoring how defenders influence shot quality.

Inspired by the NBA Space-Time Data Bowl, we built ApexShot AI—an AI-powered sports analytics platform that combines spatial tracking, machine learning, and sports science. By analyzing defender proximity, dribble count, shot location, and player movement, ApexShot AI separates shot selection quality from player execution. We also integrated an Acute-to-Chronic Workload Ratio (ACWR) engine to help predict fatigue and reduce injury risk before it happens.


What it does

ApexShot AI is a real-time basketball analytics platform that evaluates shot quality, player performance, defensive impact, and workload management.

🏀 Interactive Spatial Courts

  • Shot scatter plots
  • Court efficiency heatmaps
  • Gaussian density visualizations
  • Interactive shooting zones

These visualizations reveal where players generate the highest-quality scoring opportunities.

🎯 Live Shot Quality Predictor

Users can adjust:

  • Shot distance
  • Defender proximity
  • Number of dribbles
  • Shot location

The platform instantly predicts shot success probability using our trained machine learning model while displaying animated possession simulations.

💪 Injury Predictor & Load Management

ApexShot AI monitors athlete workload using the Acute-to-Chronic Workload Ratio (ACWR):

$$ ACWR=\frac{\text{Weekly Workload}} {\text{Four Week Average Workload}} $$

When

$$ ACWR>1.5 $$

the athlete enters the Danger Zone, indicating a significantly increased risk of soft-tissue injuries.

🎮 Clutch Arcade Mini-Game

A fully playable basketball mini-game powered by our regression model.

Players can choose NBA-inspired avatars such as:

  • Stephen Curry
  • Giannis Antetokounmpo
  • Kevin Durant
  • Luka Dončić

Each avatar applies different real-world shooting residuals, making gameplay both entertaining and educational.


How we built it

Our solution consists of two primary layers.

Machine Learning Engine (Python)

We generated a spatial dataset of 8,000 simulated shot attempts containing:

  • Court coordinates
  • Defender distance
  • Dribble count
  • Shot type
  • Shot outcome

Using Scikit-learn, we trained a Logistic Regression model to estimate shot success.

The probability of making a shot is:

$$ P(\text{make})= \frac{1}{1+e^{-z}} $$

where

$$ z=\beta_0 +\beta_1(\text{Distance}) +\beta_2(\text{Defender Proximity}) +\beta_3(\text{Dribbles}) +\beta_4(\text{Catch&Shoot}) +\beta_5(\text{PullUp}) +\beta_6(\text{Layup/Dunk}) $$

Using the predicted probability, we derived:

Expected Effective Field Goal Percentage

For 2-point shots:

$$ xeFG=P(\text{make}) $$

For 3-point shots:

$$ xeFG=P(\text{make})\times1.5 $$

Expected Points

$$ xPTS=P(\text{make})\times\text{Point Value} $$

Comparing expected and actual efficiency produces a Shot-Making Delta, allowing analysts to distinguish elite shot creators from elite shot makers.


Interactive Dashboard (React + TypeScript + CSS)

We developed a premium glassmorphism-based interface featuring three arena themes:

  • 🖤 Obsidian Dark
  • 🏀 Hardwood Retro
  • ⚡ Cyberpunk Arena

The dashboard delivers:

  • Live court interaction
  • Animated possession playback
  • Dynamic heatmaps
  • Real-time analytics
  • Responsive cross-device performance

Challenges we ran into

Client-Side Machine Learning

Integrating Python-trained regression coefficients into a TypeScript frontend required creating a robust JSON schema to guarantee consistent predictions across platforms.

Smooth 60 FPS Performance

The arcade game initially experienced animation stutters due to frequent React re-renders.

We optimized performance by:

  • Using useRef() for frequently changing values
  • Leveraging requestAnimationFrame
  • Updating component state only when necessary

This achieved a smooth 60 FPS experience.

Deployment & Routing

Static assets failed to load correctly when deployed in subdirectories.

Configuring Vite with:

base: "./"

resolved routing issues and made the application portable across hosting environments.


Accomplishments that we're proud of

  • Developed fluid SVG Gaussian heatmaps without relying on heavy visualization libraries.
  • Combined live arcade gameplay with real-time machine learning predictions.
  • Integrated sports science through ACWR to provide proactive injury insights.
  • Built a responsive dashboard delivering smooth performance across desktop and mobile devices.

What we learned

Separating Shot Selection from Execution

A player's efficiency depends not only on shooting skill but also on shot quality. Expected metrics like xeFG% reveal hidden player value that traditional statistics often overlook.

Predicting Fatigue

Soft-tissue injuries are frequently linked to sudden workload spikes rather than random events. ACWR provides a practical mathematical framework for identifying injury risk before it occurs.

Gamifying Analytics

Interactive simulations, visual heatmaps, and playable experiences communicate advanced statistical concepts far more effectively than static spreadsheets or charts.


What's next for ApexShot AI

🎥 Computer Vision Integration

Integrate YOLOv8 or MediaPipe to automatically extract player and ball coordinates directly from broadcast footage.

🛡️ Defensive Coverage Analytics

Identify defensive schemes such as:

  • Drop Coverage
  • Blitz
  • Switch
  • Hedge

to provide deeper tactical insights.

🌍 Multi-Sport Expansion

Extend the platform to other sports using spatial analytics:

  • ⚽ Soccer – Shot quality, goalkeeper positioning, defensive pressure
  • 🎾 Tennis – Rally positioning, court coverage, stroke quality

🚀 Vision

ApexShot AI transforms basketball analytics by combining artificial intelligence, spatial tracking, predictive modeling, and sports science into a single interactive platform. Instead of evaluating only outcomes, it measures the quality of every decision on the court—helping coaches, analysts, and athletes make smarter, data-driven decisions while reducing injury risk.

Share this project:

Updates

Submission history