Sports and eSports Analytics
with the Wolfram Language

Philip Z. Maymin
Vantage Sports and
University of Bridgeport

Join the Conversation #WolframTechConf

Abstract

Sports and eSports provide a rich challenge of communicating quantitative computational findings to largely qualitatively thinking people who are often on the road without access to powerful hardware. The Wolfram Language is uniquely suited to bridge the gap with its ability to quickly generate machine learning results, custom visualizations, interactive tools, and cloud-deployed solutions.

I present here a wide-ranging multi-project case study on how the Wolfram language has been deployed at NBA teams to explore and interact with optical player tracking data, project college player performance at the professional level, and evaluate trades and free agents, and how it has been deployed at Vantage Sports for eSports such as League of Legends to establish in-game win probabilities, provide unique data visualizations, and support professional teams in live drafting applications.

NBA Optical Player Tracking Data

What is the STATS/SportVu optical tracking data?

Six video cameras installed high above every National Basketball Association (NBA) court track the x- and y-coordinates of all ten players on the floor, as well as the x-, y-, and z-coordinates of the basketball itself, twenty-five frames per second.

This results in about 40MB per game or about 50GB per season, which is too much data for the typical NBA team to process, explore, and visualize, let alone interact with. Many teams resort to outsourced solutions or large inhouse teams with relatively slow turnaround times.

Using Wolfram Language allows building quick interactive tools that coaches and managers and even players can use themselves, to get answers to questions in a matter of seconds rather than weeks, and therefore generate further questions and exploration.

Examples

TabView[{"Rebounds 1"->,"Rebounds 2"->,"Shooting 1"->,"Shooting 2"->,"Shooting 3"->,"Post-Up 1"->,"Post-Up 2"->,"Summary Sheets"->}]

Automating General Management

Machine learning has beaten humans in chess, Jeopardy!, and Go. Is it so hard to imagine they could beat them in managing professional basketball teams?

Most teams have lost out on tremendous opportunity because of suboptimal drafting decisions alone. At the very least, an automated general manager can serve as a benchmark for performance.

Draft

A machine learning model using Predict[] based on-court college performance information, as well as proxies for qualitative off-court prospect information, such as consensus rankings after high school, appearance in various mock drafts, awards won, combine measurements, and more.

Interactively change the inputs and get immediate feedback.

Compare packages of later draft picks to earlier ones to see the typical falloff in productivity.

Backtesting

In addition to historical statistical analysis, we can also showcase what each team should have done...

.. and what it would have looked like today if they had.

Free Agency

Another machine learning model trained on past performance to project current players production into future years, as they age.

Trades

Interactive tools let general managers quickly evaluate trades of players for draft picks and cash.

eSports Analytics

Esports is a massive, exploding field that is projected to soon overtake traditional sports in terms of viewership and revenue.

But ironically, despite being played on powerful computers, very little advanced analytics are used.

Part of the problem is the paucity of good fine-grained data -- many still rely on coarse metrics such as the number of kills or deaths in the game.

But another part of the problem is the same as with the NBA: there are too many important strategic qualitative questions that have no simple quantitative answers.

Wolfram Language can help by providing visualizations on custom data as well as fine-grained comparisons to your in-game opponent.

Team Compositions

In games such as League of Legends, five human players compete against five others. Each human chooses a particular champion to control from a pool of more than 100. So the number of possible combinations is enormous. The composition of the team matters: how tanky are we, how much burst damage do we deal, how much mobility do we have, and so on.

Win Probabilities

How do you know how well you are doing in game? A one-line machine learning application using logistic regression does a lot of behind-the-scenes work but generates a simple formula that can be plugged in to an iPhone app or used to generate a time series throughout the game.

Website Generation

An entire website of data and visualization can be generated from the backend by the Wolfram Language which then display incredibly fast because they are simply static websites. An example can be found at: https://static.vantagesports.com/lol/elite/2250639076-NA1/6/index.html

Other Websites and Examples

* https://storage.googleapis.com/vsp-static-public/lol/draft.cdf
  Don’t forget about good old CDF’s
  
* https://www.wolframcloud.com/objects/user-528d5c69-2574-4a43-8ae8-727720aa8adf/itemization 
  FormPage and API in one; Grid with embedded graphics

* https://static.vantagesports.com/lol/optipool.html 
  Form Page with links to a cloud-deployed API; lots of server-side web computation 
  
* http://nbagm.pm 
  Organized collection of CDF’s to accompany or replace a paper