English-Video.net comment policy

The comment field is common to all languages

Let's write in your language and use "Google Translate" together

Please refer to informative community guidelines on TED.com

TED2015

Rajiv Maheswaran: The math behind basketball's wildest moves

Filmed
Views 1,923,145

Basketball is a fast-moving game of improvisation, contact and, ahem, spatio-temporal pattern recognition. Rajiv Maheswaran and his colleagues are analyzing the movements behind the key plays of the game, to help coaches and players combine intuition with new data. Bonus: What they're learning could help us understand how humans move everywhere.

- Researcher
Using advanced data analysis tools, Rajiv Maheswaran and Second Spectrum help make basketball teams smarter. Full bio

My colleagues and I are fascinated
by the science of moving dots.
00:12
So what are these dots?
00:16
Well, it's all of us.
00:18
And we're moving in our homes,
in our offices, as we shop and travel
00:19
throughout our cities
and around the world.
00:24
And wouldn't it be great
if we could understand all this movement?
00:26
If we could find patterns and meaning
and insight in it.
00:30
And luckily for us, we live in a time
00:34
where we're incredibly good
at capturing information about ourselves.
00:36
So whether it's through
sensors or videos, or apps,
00:40
we can track our movement
with incredibly fine detail.
00:44
So it turns out one of the places
where we have the best data about movement
00:48
is sports.
00:53
So whether it's basketball or baseball,
or football or the other football,
00:54
we're instrumenting our stadiums
and our players to track their movements
01:00
every fraction of a second.
01:04
So what we're doing
is turning our athletes into --
01:05
you probably guessed it --
01:10
moving dots.
01:12
So we've got mountains of moving dots
and like most raw data,
01:13
it's hard to deal with
and not that interesting.
01:18
But there are things that, for example,
basketball coaches want to know.
01:21
And the problem is they can't know them
because they'd have to watch every second
01:25
of every game, remember it and process it.
01:29
And a person can't do that,
01:31
but a machine can.
01:33
The problem is a machine can't see
the game with the eye of a coach.
01:35
At least they couldn't until now.
01:39
So what have we taught the machine to see?
01:42
So, we started simply.
01:45
We taught it things like passes,
shots and rebounds.
01:47
Things that most casual fans would know.
01:51
And then we moved on to things
slightly more complicated.
01:53
Events like post-ups,
and pick-and-rolls, and isolations.
01:56
And if you don't know them, that's okay.
Most casual players probably do.
02:01
Now, we've gotten to a point where today,
the machine understands complex events
02:05
like down screens and wide pins.
02:10
Basically things only professionals know.
02:14
So we have taught a machine to see
with the eyes of a coach.
02:16
So how have we been able to do this?
02:22
If I asked a coach to describe
something like a pick-and-roll,
02:24
they would give me a description,
02:27
and if I encoded that as an algorithm,
it would be terrible.
02:29
The pick-and-roll happens to be this dance
in basketball between four players,
02:33
two on offense and two on defense.
02:37
And here's kind of how it goes.
02:39
So there's the guy on offense
without the ball
02:41
the ball and he goes next to the guy
guarding the guy with the ball,
02:43
and he kind of stays there
02:46
and they both move and stuff happens,
and ta-da, it's a pick-and-roll.
02:48
(Laughter)
02:51
So that is also an example
of a terrible algorithm.
02:53
So, if the player who's the interferer --
he's called the screener --
02:56
goes close by, but he doesn't stop,
03:01
it's probably not a pick-and-roll.
03:04
Or if he does stop,
but he doesn't stop close enough,
03:06
it's probably not a pick-and-roll.
03:10
Or, if he does go close by
and he does stop
03:12
but they do it under the basket,
it's probably not a pick-and-roll.
03:15
Or I could be wrong,
they could all be pick-and-rolls.
03:19
It really depends on the exact timing,
the distances, the locations,
03:22
and that's what makes it hard.
03:26
So, luckily, with machine learning,
we can go beyond our own ability
03:28
to describe the things we know.
03:33
So how does this work?
Well, it's by example.
03:35
So we go to the machine and say,
"Good morning, machine.
03:37
Here are some pick-and-rolls,
and here are some things that are not.
03:41
Please find a way to tell the difference."
03:44
And the key to all of this is to find
features that enable it to separate.
03:47
So if I was going
to teach it the difference
03:50
between an apple and orange,
03:52
I might say, "Why don't you
use color or shape?"
03:54
And the problem that we're solving is,
what are those things?
03:56
What are the key features
03:59
that let a computer navigate
the world of moving dots?
04:00
So figuring out all these relationships
with relative and absolute location,
04:04
distance, timing, velocities --
04:09
that's really the key to the science
of moving dots, or as we like to call it,
04:11
spatiotemporal pattern recognition,
in academic vernacular.
04:16
Because the first thing is,
you have to make it sound hard --
04:19
because it is.
04:22
The key thing is, for NBA coaches,
it's not that they want to know
04:24
whether a pick-and-roll happened or not.
04:27
It's that they want to know
how it happened.
04:29
And why is it so important to them?
So here's a little insight.
04:31
It turns out in modern basketball,
04:34
this pick-and-roll is perhaps
the most important play.
04:36
And knowing how to run it,
and knowing how to defend it,
04:39
is basically a key to winning
and losing most games.
04:41
So it turns out that this dance
has a great many variations
04:44
and identifying the variations
is really the thing that matters,
04:48
and that's why we need this
to be really, really good.
04:51
So, here's an example.
04:55
There are two offensive
and two defensive players,
04:56
getting ready to do
the pick-and-roll dance.
04:58
So the guy with ball
can either take, or he can reject.
05:01
His teammate can either roll or pop.
05:04
The guy guarding the ball
can either go over or under.
05:07
His teammate can either show
or play up to touch, or play soft
05:10
and together they can
either switch or blitz
05:14
and I didn't know
most of these things when I started
05:17
and it would be lovely if everybody moved
according to those arrows.
05:20
It would make our lives a lot easier,
but it turns out movement is very messy.
05:23
People wiggle a lot and getting
these variations identified
05:28
with very high accuracy,
05:33
both in precision and recall, is tough
05:34
because that's what it takes to get
a professional coach to believe in you.
05:36
And despite all the difficulties
with the right spatiotemporal features
05:40
we have been able to do that.
05:43
Coaches trust our ability of our machine
to identify these variations.
05:45
We're at the point where
almost every single contender
05:49
for an NBA championship this year
05:53
is using our software, which is built
on a machine that understands
05:54
the moving dots of basketball.
05:59
So not only that, we have given advice
that has changed strategies
06:01
that have helped teams win
very important games,
06:07
and it's very exciting because you have
coaches who've been in the league
06:10
for 30 years that are willing to take
advice from a machine.
06:14
And it's very exciting,
it's much more than the pick-and-roll.
06:17
Our computer started out
with simple things
06:20
and learned more and more complex things
06:22
and now it knows so many things.
06:24
Frankly, I don't understand
much of what it does,
06:26
and while it's not that special
to be smarter than me,
06:29
we were wondering,
can a machine know more than a coach?
06:33
Can it know more than person could know?
06:36
And it turns out the answer is yes.
06:38
The coaches want players
to take good shots.
06:40
So if I'm standing near the basket
06:43
and there's nobody near me,
it's a good shot.
06:44
If I'm standing far away surrounded
by defenders, that's generally a bad shot.
06:47
But we never knew how good "good" was,
or how bad "bad" was quantitatively.
06:51
Until now.
06:56
So what we can do, again,
using spatiotemporal features,
06:57
we looked at every shot.
07:00
We can see: Where is the shot?
What's the angle to the basket?
07:02
Where are the defenders standing?
What are their distances?
07:05
What are their angles?
07:08
For multiple defenders, we can look
at how the player's moving
07:09
and predict the shot type.
07:12
We can look at all their velocities
and we can build a model that predicts
07:13
what is the likelihood that this shot
would go in under these circumstances?
07:17
So why is this important?
07:22
We can take something that was shooting,
07:24
which was one thing before,
and turn it into two things:
07:26
the quality of the shot
and the quality of the shooter.
07:29
So here's a bubble chart,
because what's TED without a bubble chart?
07:33
(Laughter)
07:36
Those are NBA players.
07:38
The size is the size of the player
and the color is the position.
07:39
On the x-axis,
we have the shot probability.
07:42
People on the left take difficult shots,
07:44
on the right, they take easy shots.
07:46
On the [y-axis] is their shooting ability.
07:49
People who are good are at the top,
bad at the bottom.
07:51
So for example, if there was a player
07:53
who generally made
47 percent of their shots,
07:55
that's all you knew before.
07:57
But today, I can tell you that player
takes shots that an average NBA player
07:59
would make 49 percent of the time,
08:04
and they are two percent worse.
08:06
And the reason that's important
is that there are lots of 47s out there.
08:08
And so it's really important to know
08:13
if the 47 that you're considering
giving 100 million dollars to
08:16
is a good shooter who takes bad shots
08:20
or a bad shooter who takes good shots.
08:23
Machine understanding doesn't just change
how we look at players,
08:27
it changes how we look at the game.
08:30
So there was this very exciting game
a couple of years ago, in the NBA finals.
08:32
Miami was down by three,
there was 20 seconds left.
08:36
They were about to lose the championship.
08:39
A gentleman named LeBron James
came up and he took a three to tie.
08:41
He missed.
08:44
His teammate Chris Bosh got a rebound,
08:46
passed it to another teammate
named Ray Allen.
08:47
He sank a three. It went into overtime.
08:50
They won the game.
They won the championship.
08:52
It was one of the most exciting
games in basketball.
08:54
And our ability to know
the shot probability for every player
08:57
at every second,
09:00
and the likelihood of them getting
a rebound at every second
09:02
can illuminate this moment in a way
that we never could before.
09:05
Now unfortunately,
I can't show you that video.
09:09
But for you, we recreated that moment
09:12
at our weekly basketball game
about 3 weeks ago.
09:16
(Laughter)
09:19
And we recreated the tracking
that led to the insights.
09:21
So, here is us.
This is Chinatown in Los Angeles,
09:25
a park we play at every week,
09:29
and that's us recreating
the Ray Allen moment
09:31
and all the tracking
that's associated with it.
09:33
So, here's the shot.
09:36
I'm going to show you that moment
09:38
and all the insights of that moment.
09:40
The only difference is, instead
of the professional players, it's us,
09:43
and instead of a professional
announcer, it's me.
09:47
So, bear with me.
09:49
Miami.
09:53
Down three.
09:54
Twenty seconds left.
09:56
Jeff brings up the ball.
09:59
Josh catches, puts up a three!
10:02
[Calculating shot probability]
10:04
[Shot quality]
10:07
[Rebound probability]
10:09
Won't go!
10:12
[Rebound probability]
10:13
Rebound, Noel.
10:15
Back to Daria.
10:17
[Shot quality]
10:18
Her three-pointer -- bang!
10:22
Tie game with five seconds left.
10:24
The crowd goes wild.
10:26
(Laughter)
10:28
That's roughly how it happened.
10:30
(Applause)
10:31
Roughly.
10:32
(Applause)
10:34
That moment had about a nine percent
chance of happening in the NBA
10:36
and we know that
and a great many other things.
10:41
I'm not going to tell you how many times
it took us to make that happen.
10:43
(Laughter)
10:47
Okay, I will! It was four.
10:49
(Laughter)
10:51
Way to go, Daria.
10:52
But the important thing about that video
10:53
and the insights we have for every second
of every NBA game -- it's not that.
10:57
It's the fact you don't have to be
a professional team to track movement.
11:02
You do not have to be a professional
player to get insights about movement.
11:07
In fact, it doesn't even have to be about
sports because we're moving everywhere.
11:10
We're moving in our homes,
11:15
in our offices,
11:21
as we shop and we travel
11:24
throughout our cities
11:29
and around our world.
11:32
What will we know? What will we learn?
11:35
Perhaps, instead of identifying
pick-and-rolls,
11:37
a machine can identify
the moment and let me know
11:39
when my daughter takes her first steps.
11:42
Which could literally be happening
any second now.
11:45
Perhaps we can learn to better use
our buildings, better plan our cities.
11:48
I believe that with the development
of the science of moving dots,
11:52
we will move better, we will move smarter,
we will move forward.
11:56
Thank you very much.
12:00
(Applause)
12:01

▲Back to top

About the speaker:

Rajiv Maheswaran - Researcher
Using advanced data analysis tools, Rajiv Maheswaran and Second Spectrum help make basketball teams smarter.

Why you should listen

Sports fans can get obsessed with stats about player performance and game-day physics. But basketball, a fluid and fast-moving game, has been tough to understand through numbers. Rajiv Maheswaran is working to change that, by offering pro basketball teams insight into game data to make better decisions. Maheswaran is the CEO and co-founder of Second Spectrum, a startup transforming sports through technology. He is also a Research Assistant Professor at the University of Southern California's Computer Science Department and a Project Leader at the Information Sciences Institute at the USC Viterbi School of Engineering, where he co-directs the Computational Behavior Group.

His research spans various aspects of multi-agent systems and distributed artificial intelligence using decision-theoretic and game-theoretic frameworks and solutions. His current interests focus on data analytics, visualization and real-time interaction to understand behavior in spatiotemporal domains. Like, say, the spatiotemporal domain around a basketball hoop.

More profile about the speaker
Rajiv Maheswaran | Speaker | TED.com