← Back to portfolio

Holes in the Defense: A Geometric Currency for Basketball Advantage

By Luke Blommesteyn • Built on the SkillCorner open ACB tracking release • Code, paper and results • Interactive replay

This is the web version of a longer write-up. The model and the numbers are the same. The PDF with every table is in the repo.

The second the box score misses

I wanted to put a number on the space a pick-and-roll opens, frame by frame, and check whether that number behaves the way basketball says it should.

Watch a pick-and-roll from behind the play. A defender is a step late. The big steps up to show and leaves the paint empty behind him. For about a second the strong side belongs to the offense. Then help arrives, the corner defender sinks, and the space closes. Sometimes the ball gets there first. Usually it doesn't.

Coaches call that second advantage. Offensive actions try to create it and defensive rotations try to repair it, but the play-by-play only records how the possession ended. Can you measure the space itself, every fifth of a second, and does the number move when it should?

The data is SkillCorner's open release of ten Liga ACB games from Spain's top league, tracked from the broadcast: every player and the ball at 25 Hz, each position with its own expected error, plus a marked play-by-play of picks, off-ball screens, handoffs, drives, isolations, closeouts and matchups. That is enough to build the field and, more usefully, enough to test it.

Five court panels showing the exploitable-space field opening after an on-ball screen, with the A(t) trace underneath
An on-ball screen on the right wing. Bright is space the offense will reach first and would score from. Within a second the whole strong side above the arc belongs to the offense; A goes from 253 to 571, and the defense never gets it back before the shot.

What an "empty hole" is

The model has three steps.

1. Who gets there first. For every player and every square foot of the offensive half court, I estimate an arrival time. The player keeps his current velocity through a 0.2 s reaction time, then accelerates toward the spot at up to 20 ft/s² with a top speed of 20 ft/s (both fitted from the tracking; a player running the wrong way has to stop first). The arrival time is uncertain: there is a 0.15 s floor for indecision, a term from SkillCorner's stated position error (inflated for extrapolated players), and a term that grows with distance. From that I compute the probability that the first offensive player arrives before the first defender. With Gaussian arrival times this has a closed form (Clark's recursion for the minimum of Gaussians). Against Monte Carlo on real frames the mean absolute error is 0.016 in probability.

2. What the spot is worth. Multiply by the expected points of an open shot from that spot. The map is fitted on open and lightly contested shots from the other nine games and shrunk toward a simple parametric shape where data are thin. The rim is worth about 1.35, mid-range 0.85, the corner three a bit over 1.

3. Add it up. The exploitable-space measure \(A\) is the integral of that field over the cells worth at least half a point:

The field and the measure

\[ \begin{aligned} H(q,t) &= \underbrace{P\big(\min_{i\in O} T_i(q,t) < \min_{j\in D} T_j(q,t)\big)}_{\text{offense reaches } q \text{ first}} \\ &\quad \times \underbrace{V(q)}_{\text{open-shot value}} \end{aligned} \]

\[ A(t) = \int \max\big(0,\,H(q,t)-0.5\big)\,dq. \]

Units are ft²·points. A typical half-court frame sits around 250-300.

One split turned out to matter. Every cell that counts toward \(A\) is either within 5 ft of an offensive player or it isn't. The first kind is an open player, like a shooter in the corner with nobody near him. The second kind is an empty hole: valuable space nobody is standing in, which an attacker who cut or drove there would reach before any defender. An empty hole is what a defender out of position looks like on the floor. Different actions create the two kinds.

Two simpler models run alongside as baselines throughout: plain Euclidean Voronoi (nearest body wins, no velocity, no uncertainty) and the same kinematic arrival times with the uncertainty removed, so the faster player always wins. I wanted to know whether the probabilistic version earns its extra complexity.

Six panels: three control models on one frame (Voronoi, kinematic, probabilistic) and two value maps with the resulting field
One frame, three control models (top) and the two value maps plus their product (bottom). Voronoi and kinematic control are hard partitions; the probabilistic field is soft where players are close, fast, or badly tracked.

You can scrub through eight possessions yourself, with the empty-holes-only view, in the interactive replay.

Does it move the way basketball says?

For every marked action in the ten games I took the mean of \(A\) over the 1.5 s after it minus the mean over the second before it. I did the same for 1,350 random moments at least a second from any marked event. \(A\) drifts up by about 11 units on its own as the shot clock runs down, so the number to read is the excess over that null.

ActionnΔA over nullP(ΔA > 0)empty-hole partopen-player part
Pick (on-ball screen)1,196+49.80.84+43.5+6.2
Drive512+44.20.80+40.0+4.2
Off-ball screen838+11.70.63+12.4−0.7
Isolation146+9.20.56+6.0+3.2
Handoff325+7.90.61+9.1−1.2
Pass2,676−8.20.50−7.4−0.7
Closeout (defensive)453−15.60.46−11.8−3.8
No action (null)1,35200.55——

Picks and drives are significant at \(p<10^{-30}\); off-ball screens, closeouts and passes at \(p<10^{-3}\); handoffs and isolations are not (Mann-Whitney against the null).

None of this was tuned in. The ordering is the one a coach would give: screens and drives create advantage, off-ball actions create less, and the closeout, the one defensive action in the data, is the only thing that destroys it. Almost everything a pick or drive creates shows up as empty holes, not open players, so the measure is picking up the defense being pulled out of shape. And the average pass loses a little, because the defense moves while the ball is in the air. Passes spend advantage. They don't make it.

Mean change in A around each action kind for the probabilistic field, the Voronoi field, and the ball-handler's nearest-defender distance
Mean \(A(t)\) around each action, baseline-subtracted. Left: the probabilistic field. Middle: the same thing on Voronoi control, where the closeout curve (dark) goes up. Right: the nearest-defender distance to the ball handler, which barely notices anything except the closeout itself.

The baselines get the closeout backwards

This is the result I care about most. On Euclidean Voronoi the closeout scores +23 over the null. A defender sprinting at the ball handler gives up the Voronoi cells behind him, so the area measure reads a defensive recovery as an offensive gain. Voronoi also scores handoffs at −20. The ball handler's nearest-defender distance moves less than 4 ft for any action, and the offensive convex hull shrinks on drives and picks. Only the two models that know about motion recover the basketball ordering, and only the probabilistic one gets the sign of every action right.

Measure (excess over null)PickDriveOff-ballHandoffCloseoutPass
Probabilistic \(A\)+49.8+44.2+11.7+7.9−15.6−8.2
Kinematic \(A\)+70.8+60.3+4.1+5.3−14.9−14.8
Voronoi \(A\)+26.9+24.8+0.6−20.1+23.2+1.4
Handler nearest-defender distance (ft)+0.3−1.0+0.5+0.7+4.0+1.9
Offensive convex hull (ft²)−12−63+36+52+4+27

How fast the defense repairs it

After the post-action peak, \(A\) falls halfway back to its pre-action level in a median of 0.6 s for picks, drives, handoffs and off-ball screens. The defense fixes most holes quickly. What differs is how often it can't: 68% of drive-created advantage is still there 3 s later, against 54% for picks, 54% for the null and 47% for closeouts. Drives are the action whose advantage most often outlives the reaction, which is why they end in shots.

Box plots of change in A, gain to peak, and half-life by action kind
Change in \(A\), gain to the post-action peak, and half-life by action.

One currency, every coverage

Because every action is scored on the same field, the SkillCorner coverage labels can be compared directly. They line up with coaching vocabulary, and nothing was tuned to make them.

ContextnΔA over null
Pick, handler defended over the screen775+58.6
Pick, defense switches168+35.7
Pick, handler defended under219+29.4
Pick, screener's man shows485+58.0
Pick, screener's man drops504+46.6
Pick at the step-up / middle / wing154 / 734 / 288+64.6 / +55.5 / +27.3
Off-ball screen, cutter trailed441+18.6
Off-ball screen, cutter whipped (defender beats him through)319+0.7
Off-ball screen, screener's man shows / drops47 / 594+49.9 / +9.2
Drive created by a pick / by an isolation260 / 62+49.8 / +20.3
Pass under 12 ft / 20-30 ft / over 30 ft (skip)642 / 650 / 133+2.4 / −19.2 / −21.6
Closeout followed by a shot / by a pass215 / 83−12.2 / −22.8

Switching or going under costs the offense about 25 units relative to a defender who fights over. A show leaves the paint and concedes more than a drop. A step-up screen in the middle of the floor is the most productive on-ball action in the data; a wing screen creates less than half as much. A whipped off-ball screen creates nothing.

The skip pass, which coaches love because it exploits a hole, comes out negative. This is a real limitation of a field that values space and ignores where the ball is. A skip pass moves the ball into a hole that already exists, and the defense moves during the flight. Here is one.

A skip pass into a weak-side hole that was already bright before the pass
A skip pass exploiting a hole. The weak-side wing is bright before the ball is thrown; the pass moves the ball into it and \(A\) rises only modestly (329 to 459). The advantage was made earlier; the pass uses it.

Does the number predict anything?

Pictures are easy to make. The real test is whether \(A\) knows something that ball location, defender distances, convex hulls and Voronoi areas don't. From every half-court frame I predicted what happens in the next 3 s of the same possession, training on nine games and testing on the tenth, ten times over. Splitting neighbouring frames at random would leak badly, so I didn't.

Next 3 s (logistic, AUC)rateball onlybaseline (16 spacing / defender features)+ Voronoi+ kinematic+ probabilistic
Any shot0.240.6600.7220.7310.7410.766
Open / lightly contested shot0.060.6060.6990.7120.7230.740
Shot at the rim0.080.7240.7750.7760.7850.797
Assist opportunity0.110.5390.6060.6150.6170.651
Paint touch0.140.5230.5780.5830.5850.617
Blow-by0.020.5990.6190.6070.6280.615

With a linear model, every target but blow-bys improves in step with the model: Voronoi adds a little, kinematic more, probabilistic the most. That is +0.04 AUC on shots and open shots and +0.045 on assist opportunities and paint touches. The field's own summaries, with no ball or defender information at all, predict a shot in the next 3 s at 0.69.

Gradient boosting narrows the gap, as it should, since enough trees can rebuild spatial structure from raw coordinates. The field still helps on the two targets most about space: blow-bys (0.599 to 0.614 AUC) and SkillCorner's quality grade of the next shot (\(R^2\) 0.166 to 0.200, Voronoi 0.181). Nothing gets worse. Adding the one-second change in \(A\) on top of its level adds nothing. The level carries the information.

Two results went the other way. Nothing predicts the points a possession ends with from a single frame (\(R^2 < 0.005\) for every feature set). The next three seconds are geometric; the end of the possession is not. And within an action kind, the advantage an action creates does not predict the points scored on that possession. Creating advantage and using it are different skills, and this field only measures the first.

Bar chart of leave-one-game-out AUC and R-squared by feature set and target
Leave-one-game-out prediction of the next 3 s, gradient boosting, by feature set.

Possessions, one at a time

I picked these examples by rule rather than by eye: clean tracking (no more than one extrapolated player), gain between the 85th and 97th percentile for the action kind, distinct possessions. Dotted circles are the 5 ft occupancy radius; the white line is the \(H = 0.5\) contour. Bright space outside every dotted circle is an empty hole.

A drive from the top collapsing the defense and opening the weak side
A drive collapses the defense and moves the hole. The drive from the top pulls three defenders into the lane; the space that opens is the weak-side wing and corner, away from the ball (\(A\): 163 to 498).
A closeout erasing the bright region around a shooter on the right wing
A closeout repairs a hole. The catch on the right wing meets a sprinting defender and the bright region around the shooter disappears within a second (\(A\): 474 to 213). The grey Voronoi trace underneath barely moves.
A made contested pull-up with a low, flat A trace
Two points, no geometry. A contested pull-up that went in; \(A\) is low and flat through the whole possession.
An off-ball screen that opens the weak side but is never used
Big geometry, no box score. An off-ball screen opens the corner and wing (\(A\): 112 to 315); the ball never goes there.

Holes as objects

Take every connected region of \(H > 0.5\) more than 5 ft from every attacker, link the regions frame to frame, and you get 15,795 holes across the ten games. Most close quickly: median lifetime 0.6 s, mean 2.0 s. The ball enters only 8% of them, but it goes where you would hope. Holes that survive 2.4 s get used 30% of the time, holes in the top mass tercile 24%, and holes that live under 1.2 s almost never. Holes born after an off-ball screen (mean 1.5 s) or a handoff (1.4 s) outlast those born after a drive (0.7 s). Off-ball actions open space that waits. Drives open space that is already closing.

What it took to break it

For 1,010 event windows I recomputed everything under 24 alternative configurations. I resampled every position from its own stated tracking error and varied every constant in the movement model, the threshold and the grid. Per-event changes stayed correlated above 0.96 with the reference, and the action ranking stayed at or near 1.0. Only two choices matter, and they are the ones that should: the value map (parametric vs. empirical, correlation 0.86) and the control model. With kinematic control the correlation drops to 0.80. With Voronoi it drops to 0.39 and the closeout flips sign.

Horizontal bar chart of correlation with the reference run under each modelling perturbation
Robustness of the level of \(A\), of per-event \(\Delta A\), and of the action ranking to each modelling choice.

What it does not do

Reproduce it

Everything is in a fork of SkillCorner's release under analysis/: the library, the eight pipeline stages, the results tables, the paper, and the replay. Stage 1 takes about four minutes a game and the rest takes minutes in total. Courts are drawn with mplbasketball, whose FIBA half court matches the tracking frame to within 0.05 ft.

Open the interactive replay →