The Math Behind Basketball's Wildest Moves | Rajiv Maheswaran | TED Talks

1,107,248 views ・ 2015-07-06

TED


Please double-click on the English subtitles below to play the video.

00:12
My colleagues and I are fascinated by the science of moving dots.
0
12954
3583
00:16
So what are these dots?
1
16927
1150
00:18
Well, it's all of us.
2
18101
1287
00:19
And we're moving in our homes, in our offices, as we shop and travel
3
19412
5085
00:24
throughout our cities and around the world.
4
24521
2066
00:26
And wouldn't it be great if we could understand all this movement?
5
26958
3669
00:30
If we could find patterns and meaning and insight in it.
6
30918
2890
00:34
And luckily for us, we live in a time
7
34259
1785
00:36
where we're incredibly good at capturing information about ourselves.
8
36068
4497
00:40
So whether it's through sensors or videos, or apps,
9
40807
3663
00:44
we can track our movement with incredibly fine detail.
10
44494
2809
00:48
So it turns out one of the places where we have the best data about movement
11
48092
5032
00:53
is sports.
12
53148
1208
00:54
So whether it's basketball or baseball, or football or the other football,
13
54682
5333
01:00
we're instrumenting our stadiums and our players to track their movements
14
60039
4402
01:04
every fraction of a second.
15
64465
1313
01:05
So what we're doing is turning our athletes into --
16
65802
4382
01:10
you probably guessed it --
17
70208
1959
01:12
moving dots.
18
72191
1396
01:13
So we've got mountains of moving dots and like most raw data,
19
73946
4934
01:18
it's hard to deal with and not that interesting.
20
78904
2502
01:21
But there are things that, for example, basketball coaches want to know.
21
81430
3769
01:25
And the problem is they can't know them because they'd have to watch every second
22
85223
3810
01:29
of every game, remember it and process it.
23
89057
2589
01:31
And a person can't do that,
24
91804
1930
01:33
but a machine can.
25
93758
1310
01:35
The problem is a machine can't see the game with the eye of a coach.
26
95661
3410
01:39
At least they couldn't until now.
27
99363
2261
01:42
So what have we taught the machine to see?
28
102228
2103
01:45
So, we started simply.
29
105569
1787
01:47
We taught it things like passes, shots and rebounds.
30
107380
3799
01:51
Things that most casual fans would know.
31
111203
2541
01:53
And then we moved on to things slightly more complicated.
32
113768
2832
01:56
Events like post-ups, and pick-and-rolls, and isolations.
33
116624
4588
02:01
And if you don't know them, that's okay. Most casual players probably do.
34
121377
3543
02:05
Now, we've gotten to a point where today, the machine understands complex events
35
125560
5340
02:10
like down screens and wide pins.
36
130924
3073
02:14
Basically things only professionals know.
37
134021
2726
02:16
So we have taught a machine to see with the eyes of a coach.
38
136771
4388
02:22
So how have we been able to do this?
39
142009
1857
02:24
If I asked a coach to describe something like a pick-and-roll,
40
144511
3118
02:27
they would give me a description,
41
147653
1640
02:29
and if I encoded that as an algorithm, it would be terrible.
42
149317
2856
02:33
The pick-and-roll happens to be this dance in basketball between four players,
43
153026
4278
02:37
two on offense and two on defense.
44
157328
1912
02:39
And here's kind of how it goes.
45
159486
1618
02:41
So there's the guy on offense without the ball
46
161128
2533
02:43
the ball and he goes next to the guy guarding the guy with the ball,
47
163685
3209
02:46
and he kind of stays there
48
166918
1257
02:48
and they both move and stuff happens, and ta-da, it's a pick-and-roll.
49
168199
3317
02:51
(Laughter)
50
171540
2215
02:53
So that is also an example of a terrible algorithm.
51
173779
2508
02:56
So, if the player who's the interferer -- he's called the screener --
52
176913
4204
03:01
goes close by, but he doesn't stop,
53
181278
2872
03:04
it's probably not a pick-and-roll.
54
184174
1765
03:06
Or if he does stop, but he doesn't stop close enough,
55
186560
3945
03:10
it's probably not a pick-and-roll.
56
190529
1761
03:12
Or, if he does go close by and he does stop
57
192642
3237
03:15
but they do it under the basket, it's probably not a pick-and-roll.
58
195903
3324
03:19
Or I could be wrong, they could all be pick-and-rolls.
59
199462
2524
03:22
It really depends on the exact timing, the distances, the locations,
60
202010
4568
03:26
and that's what makes it hard.
61
206602
1495
03:28
So, luckily, with machine learning, we can go beyond our own ability
62
208579
4944
03:33
to describe the things we know.
63
213547
1743
03:35
So how does this work? Well, it's by example.
64
215314
2280
03:37
So we go to the machine and say, "Good morning, machine.
65
217759
2830
03:41
Here are some pick-and-rolls, and here are some things that are not.
66
221077
3359
03:44
Please find a way to tell the difference."
67
224720
2252
03:47
And the key to all of this is to find features that enable it to separate.
68
227076
3707
03:50
So if I was going to teach it the difference
69
230807
2109
03:52
between an apple and orange,
70
232940
1381
03:54
I might say, "Why don't you use color or shape?"
71
234345
2375
03:56
And the problem that we're solving is, what are those things?
72
236744
2943
03:59
What are the key features
73
239711
1247
04:00
that let a computer navigate the world of moving dots?
74
240982
3499
04:04
So figuring out all these relationships with relative and absolute location,
75
244505
4823
04:09
distance, timing, velocities --
76
249352
1909
04:11
that's really the key to the science of moving dots, or as we like to call it,
77
251440
4928
04:16
spatiotemporal pattern recognition, in academic vernacular.
78
256392
3344
04:19
Because the first thing is, you have to make it sound hard --
79
259925
2898
04:22
because it is.
80
262847
1278
04:24
The key thing is, for NBA coaches, it's not that they want to know
81
264410
3141
04:27
whether a pick-and-roll happened or not.
82
267575
1922
04:29
It's that they want to know how it happened.
83
269521
2076
04:31
And why is it so important to them? So here's a little insight.
84
271621
2986
04:34
It turns out in modern basketball,
85
274631
1771
04:36
this pick-and-roll is perhaps the most important play.
86
276426
2539
04:39
And knowing how to run it, and knowing how to defend it,
87
279065
2620
04:41
is basically a key to winning and losing most games.
88
281709
2670
04:44
So it turns out that this dance has a great many variations
89
284403
3801
04:48
and identifying the variations is really the thing that matters,
90
288228
3648
04:51
and that's why we need this to be really, really good.
91
291900
2529
04:55
So, here's an example.
92
295228
1176
04:56
There are two offensive and two defensive players,
93
296428
2379
04:58
getting ready to do the pick-and-roll dance.
94
298831
2152
05:01
So the guy with ball can either take, or he can reject.
95
301007
2683
05:04
His teammate can either roll or pop.
96
304086
3001
05:07
The guy guarding the ball can either go over or under.
97
307111
2986
05:10
His teammate can either show or play up to touch, or play soft
98
310121
4565
05:14
and together they can either switch or blitz
99
314710
2618
05:17
and I didn't know most of these things when I started
100
317352
2659
05:20
and it would be lovely if everybody moved according to those arrows.
101
320035
3920
05:23
It would make our lives a lot easier, but it turns out movement is very messy.
102
323979
3905
05:28
People wiggle a lot and getting these variations identified
103
328047
5484
05:33
with very high accuracy,
104
333555
1303
05:34
both in precision and recall, is tough
105
334882
1868
05:36
because that's what it takes to get a professional coach to believe in you.
106
336774
3618
05:40
And despite all the difficulties with the right spatiotemporal features
107
340416
3380
05:43
we have been able to do that.
108
343820
1474
05:45
Coaches trust our ability of our machine to identify these variations.
109
345318
3927
05:49
We're at the point where almost every single contender
110
349478
3533
05:53
for an NBA championship this year
111
353035
1623
05:54
is using our software, which is built on a machine that understands
112
354682
4408
05:59
the moving dots of basketball.
113
359114
1634
06:01
So not only that, we have given advice that has changed strategies
114
361872
5153
06:07
that have helped teams win very important games,
115
367049
3352
06:10
and it's very exciting because you have coaches who've been in the league
116
370425
3732
06:14
for 30 years that are willing to take advice from a machine.
117
374181
3067
06:17
And it's very exciting, it's much more than the pick-and-roll.
118
377874
2906
06:20
Our computer started out with simple things
119
380804
2076
06:22
and learned more and more complex things
120
382904
2064
06:24
and now it knows so many things.
121
384992
1561
06:26
Frankly, I don't understand much of what it does,
122
386577
2835
06:29
and while it's not that special to be smarter than me,
123
389436
3715
06:33
we were wondering, can a machine know more than a coach?
124
393175
3644
06:36
Can it know more than person could know?
125
396843
2055
06:38
And it turns out the answer is yes.
126
398922
1745
06:40
The coaches want players to take good shots.
127
400691
2557
06:43
So if I'm standing near the basket
128
403272
1651
06:44
and there's nobody near me, it's a good shot.
129
404947
2166
06:47
If I'm standing far away surrounded by defenders, that's generally a bad shot.
130
407137
3940
06:51
But we never knew how good "good" was, or how bad "bad" was quantitatively.
131
411101
4876
06:56
Until now.
132
416209
1150
06:57
So what we can do, again, using spatiotemporal features,
133
417771
3058
07:00
we looked at every shot.
134
420853
1374
07:02
We can see: Where is the shot? What's the angle to the basket?
135
422251
3005
07:05
Where are the defenders standing? What are their distances?
136
425280
2762
07:08
What are their angles?
137
428066
1331
07:09
For multiple defenders, we can look at how the player's moving
138
429421
2977
07:12
and predict the shot type.
139
432422
1433
07:13
We can look at all their velocities and we can build a model that predicts
140
433879
4074
07:17
what is the likelihood that this shot would go in under these circumstances?
141
437977
4052
07:22
So why is this important?
142
442188
1500
07:24
We can take something that was shooting,
143
444102
2803
07:26
which was one thing before, and turn it into two things:
144
446929
2680
07:29
the quality of the shot and the quality of the shooter.
145
449633
2651
07:33
So here's a bubble chart, because what's TED without a bubble chart?
146
453680
3262
07:36
(Laughter)
147
456966
1014
07:38
Those are NBA players.
148
458004
1311
07:39
The size is the size of the player and the color is the position.
149
459339
3120
07:42
On the x-axis, we have the shot probability.
150
462483
2132
07:44
People on the left take difficult shots,
151
464639
1953
07:46
on the right, they take easy shots.
152
466616
2229
07:49
On the [y-axis] is their shooting ability.
153
469194
2057
07:51
People who are good are at the top, bad at the bottom.
154
471275
2562
07:53
So for example, if there was a player
155
473861
1760
07:55
who generally made 47 percent of their shots,
156
475621
2097
07:57
that's all you knew before.
157
477718
1389
07:59
But today, I can tell you that player takes shots that an average NBA player
158
479345
4850
08:04
would make 49 percent of the time,
159
484219
1961
08:06
and they are two percent worse.
160
486204
1684
08:08
And the reason that's important is that there are lots of 47s out there.
161
488266
4515
08:13
And so it's really important to know
162
493714
2549
08:16
if the 47 that you're considering giving 100 million dollars to
163
496287
3956
08:20
is a good shooter who takes bad shots
164
500267
3055
08:23
or a bad shooter who takes good shots.
165
503346
2397
08:27
Machine understanding doesn't just change how we look at players,
166
507130
3333
08:30
it changes how we look at the game.
167
510487
1858
08:32
So there was this very exciting game a couple of years ago, in the NBA finals.
168
512369
3755
08:36
Miami was down by three, there was 20 seconds left.
169
516148
3207
08:39
They were about to lose the championship.
170
519379
2025
08:41
A gentleman named LeBron James came up and he took a three to tie.
171
521428
3341
08:44
He missed.
172
524793
1198
08:46
His teammate Chris Bosh got a rebound,
173
526015
1837
08:47
passed it to another teammate named Ray Allen.
174
527876
2159
08:50
He sank a three. It went into overtime.
175
530059
1919
08:52
They won the game. They won the championship.
176
532002
2096
08:54
It was one of the most exciting games in basketball.
177
534122
2444
08:57
And our ability to know the shot probability for every player
178
537438
3429
09:00
at every second,
179
540891
1188
09:02
and the likelihood of them getting a rebound at every second
180
542103
2956
09:05
can illuminate this moment in a way that we never could before.
181
545083
3443
09:09
Now unfortunately, I can't show you that video.
182
549618
2668
09:12
But for you, we recreated that moment
183
552310
4493
09:16
at our weekly basketball game about 3 weeks ago.
184
556827
2336
09:19
(Laughter)
185
559279
2167
09:21
And we recreated the tracking that led to the insights.
186
561573
3410
09:25
So, here is us. This is Chinatown in Los Angeles,
187
565199
4255
09:29
a park we play at every week,
188
569478
1564
09:31
and that's us recreating the Ray Allen moment
189
571066
2231
09:33
and all the tracking that's associated with it.
190
573321
2229
09:36
So, here's the shot.
191
576772
1517
09:38
I'm going to show you that moment
192
578313
2516
09:40
and all the insights of that moment.
193
580853
2587
09:43
The only difference is, instead of the professional players, it's us,
194
583464
3730
09:47
and instead of a professional announcer, it's me.
195
587218
2618
09:49
So, bear with me.
196
589860
1477
09:53
Miami.
197
593153
1150
09:54
Down three.
198
594671
1150
09:56
Twenty seconds left.
199
596107
1150
09:59
Jeff brings up the ball.
200
599385
1198
10:02
Josh catches, puts up a three!
201
602656
1535
10:04
[Calculating shot probability]
202
604631
1849
10:07
[Shot quality]
203
607278
1150
10:09
[Rebound probability]
204
609048
1785
10:12
Won't go!
205
612373
1173
10:13
[Rebound probability]
206
613570
1446
10:15
Rebound, Noel.
207
615777
1256
10:17
Back to Daria.
208
617057
1150
10:18
[Shot quality]
209
618509
3365
10:22
Her three-pointer -- bang!
210
622676
1620
10:24
Tie game with five seconds left.
211
624320
2197
10:26
The crowd goes wild.
212
626880
1618
10:28
(Laughter)
213
628522
1659
10:30
That's roughly how it happened.
214
630205
1547
10:31
(Applause)
215
631776
1151
10:32
Roughly.
216
632951
1175
10:34
(Applause)
217
634150
1531
10:36
That moment had about a nine percent chance of happening in the NBA
218
636121
5484
10:41
and we know that and a great many other things.
219
641629
2261
10:43
I'm not going to tell you how many times it took us to make that happen.
220
643914
3491
10:47
(Laughter)
221
647429
1747
10:49
Okay, I will! It was four.
222
649200
1872
10:51
(Laughter)
223
651096
1001
10:52
Way to go, Daria.
224
652121
1165
10:53
But the important thing about that video
225
653647
4263
10:57
and the insights we have for every second of every NBA game -- it's not that.
226
657934
4568
11:02
It's the fact you don't have to be a professional team to track movement.
227
662639
3929
11:07
You do not have to be a professional player to get insights about movement.
228
667083
3657
11:10
In fact, it doesn't even have to be about sports because we're moving everywhere.
229
670764
3858
11:15
We're moving in our homes,
230
675654
2369
11:21
in our offices,
231
681428
1205
11:24
as we shop and we travel
232
684238
2690
11:29
throughout our cities
233
689318
1253
11:32
and around our world.
234
692065
1618
11:35
What will we know? What will we learn?
235
695270
2295
11:37
Perhaps, instead of identifying pick-and-rolls,
236
697589
2305
11:39
a machine can identify the moment and let me know
237
699918
3010
11:42
when my daughter takes her first steps.
238
702952
2059
11:45
Which could literally be happening any second now.
239
705035
2536
11:48
Perhaps we can learn to better use our buildings, better plan our cities.
240
708140
3697
11:52
I believe that with the development of the science of moving dots,
241
712362
4173
11:56
we will move better, we will move smarter, we will move forward.
242
716559
3643
12:00
Thank you very much.
243
720607
1189
12:01
(Applause)
244
721820
5045
About this website

This site will introduce you to YouTube videos that are useful for learning English. You will see English lessons taught by top-notch teachers from around the world. Double-click on the English subtitles displayed on each video page to play the video from there. The subtitles scroll in sync with the video playback. If you have any comments or requests, please contact us using this contact form.

https://forms.gle/WvT1wiN1qDtmnspy7