Building an NBA Game Simulator

Home for all your discussion of basketball statistical analysis.
BigLeagueInsights
Posts: 63
Joined: Thu Oct 23, 2014 9:59 pm
Location: Las Vegas
Contact:

Building an NBA Game Simulator

Post by BigLeagueInsights »

Hey all,

Currently working on using 4+ years of play by play data to develop a Markov Model that simulates a regular season game.

More details here:
http://bigleagueinsights.com/simulate-n ... kov-model/

Feedback welcome. If you're interested in obtaining our data or participating in development in any way, please let me know!
Crow
Posts: 10533
Joined: Thu Apr 14, 2011 11:10 pm

Re: Building an NBA Game Simulator

Post by Crow »

Happy to see you running with this. I guess some of those academic articles got read and are useful.
BigLeagueInsights
Posts: 63
Joined: Thu Oct 23, 2014 9:59 pm
Location: Las Vegas
Contact:

Re: Building an NBA Game Simulator

Post by BigLeagueInsights »

Thanks Crow!

Appreciate all your time and hard work on this site and on twitter, your links are always useful and informative.
Crow
Posts: 10533
Joined: Thu Apr 14, 2011 11:10 pm

Re: Building an NBA Game Simulator

Post by Crow »

Thank you for finding sone of it useful.

By the way, how big would the dataset download be? What format?

I am do not know if I be useful to you on the further development of the model but I am interested in following it and hearing about the issues and strategies employed to address them. Here or by pm (or email if that is strongly preferred). I know I wouldn't be useful for technical modeling issues, but some chance on conceptual level or for results evaluation.

Your openness to sharing is admirable, though it makes me curious also. Did you have a specific use in mind when you started or are you experimenting and will decide later?
kohanz
Posts: 34
Joined: Fri Jan 04, 2013 6:58 pm
Contact:

Re: Building an NBA Game Simulator

Post by kohanz »

Very interesting project. I will definitely follow closely and am tempted to throw my hat in for developer support, but not sure if I have the time for it. What's your tech-stack looking like?
Crow wrote:Did you have a specific use in mind when you started or are you experimenting and will decide later?
Unless I'm misunderstanding your question, I thought the usage was indicated in the article:
Predictive modeling in sports betting has long been the “holy grail” of gamblers around the world.
BigLeagueInsights
Posts: 63
Joined: Thu Oct 23, 2014 9:59 pm
Location: Las Vegas
Contact:

Re: Building an NBA Game Simulator

Post by BigLeagueInsights »

Data is in the DB, and can be exported in pretty much any format desired. We typically use CSV.

As far as sharing goes, we feel that the gains from collaboration are greater than the gains of "protecting IP" at this point. Main applications of the simulations will be for sports betting, but we believe there are some interesting possibilities for daily fantasy. Still in "exploration" mode at this point.
BigLeagueInsights
Posts: 63
Joined: Thu Oct 23, 2014 9:59 pm
Location: Las Vegas
Contact:

Re: Building an NBA Game Simulator

Post by BigLeagueInsights »

kohanz wrote:Very interesting project. I will definitely follow closely and am tempted to throw my hat in for developer support, but not sure if I have the time for it. What's your tech-stack looking like?
Thanks for the interest. DB is MySQL, JSON parser is done in PHP.
kohanz
Posts: 34
Joined: Fri Jan 04, 2013 6:58 pm
Contact:

Re: Building an NBA Game Simulator

Post by kohanz »

BigLeagueInsights wrote:
kohanz wrote:Very interesting project. I will definitely follow closely and am tempted to throw my hat in for developer support, but not sure if I have the time for it. What's your tech-stack looking like?
Thanks for the interest. DB is MySQL, JSON parser is done in PHP.
What's your scraping source? I'm using SI.com.
BigLeagueInsights
Posts: 63
Joined: Thu Oct 23, 2014 9:59 pm
Location: Las Vegas
Contact:

Re: Building an NBA Game Simulator

Post by BigLeagueInsights »

Straight from NBA.com
kohanz
Posts: 34
Joined: Fri Jan 04, 2013 6:58 pm
Contact:

Re: Building an NBA Game Simulator

Post by kohanz »

BigLeagueInsights wrote:Straight from NBA.com
Ah. Do you work-around the last name issue, or does it not matter for your purposes?
Crow
Posts: 10533
Joined: Thu Apr 14, 2011 11:10 pm

Re: Building an NBA Game Simulator

Post by Crow »

I wonder how many teams use a by start state possession level Markov chain model in game planning for and against specific teams. I wonder how many use it specifically to optimize lineups for defense to offense and offense to defense transitions. I wonder how many use it for roster construction. I know at least 2 teams that do something with simulations but don't know where specifically and how intensely used.
BigLeagueInsights
Posts: 63
Joined: Thu Oct 23, 2014 9:59 pm
Location: Las Vegas
Contact:

Re: Building an NBA Game Simulator

Post by BigLeagueInsights »

kohanz wrote:
Ah. Do you work-around the last name issue, or does it not matter for your purposes?
We do have a workaround. If you want more detail, PM me.
BigLeagueInsights
Posts: 63
Joined: Thu Oct 23, 2014 9:59 pm
Location: Las Vegas
Contact:

Re: Building an NBA Game Simulator

Post by BigLeagueInsights »

Crow wrote:I wonder how many teams use a by start state possession level Markov chain model in game planning for and against specific teams. I wonder how many use it specifically to optimize lineups for defense to offense and offense to defense transitions. I wonder how many use it for roster construction. I know at least 2 teams that do something with simulations but don't know where specifically and how intensely used.
I'm surprised to hear that teams actually do simulations at all.

There are some interesting surprises in the transition matrix. Stuff like, "Does inbounding after a made 3 give us a better chance at scoring than inbounding after a free throw?" I provided a couple examples in the article, but there is a ton of information that can be gleaned if you know how to ask the right questions. I am hoping some smart folks will take a look at the data and offer some insight.
Crow
Posts: 10533
Joined: Thu Apr 14, 2011 11:10 pm

Re: Building an NBA Game Simulator

Post by Crow »

The 2 teams who I hear use simulations may use static, non-start state dependent models. At least the public talk of those models didn't clearly articulate use of start states, to my recollection.
BigLeagueInsights
Posts: 63
Joined: Thu Oct 23, 2014 9:59 pm
Location: Las Vegas
Contact:

Re: Building an NBA Game Simulator

Post by BigLeagueInsights »

Our developer and data guru is going to jump on here shortly and can offer answers to any technical questions.
Post Reply