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