Wednesday, September 2, 2015

Autodraft Program

I spent some time this past week working on a Python script that will autodraft a ranked list of players across a specified number of teams.  It's nothing fancy, but will help me execute some experiments I've been meaning to run.

The script is called autodraft.py and works off of this input file.  It performs a snake draft and you can customize the following variables:
  • number of teams
  • number of rounds
  • positions and number of each
  • specify test team
  • specify test position
There is logic that allows you to force certain teams to draft certain positions later or earlier than desired.  This can be customized, as well.

The code needs some significant cleaning up.  There is some redundant logic I can drop into a function.  Also, I need to add some comments explaining what each block of code actually does.  Of course, I can also take inputs on the command line, build a web interface around it, etc., but I'm more interested in using the guts to do some analytical work than building a product.  However, it totally works, so feel free to use it for your own evil schemes.

Some experiments I plan on running in the next week using this program:
  • Is it better to wait on a QB, or draft a top-flight one early?  Given the projected fantasy points for all players, do we see a difference in season totals if we draft a QB early or late?
  • Is Zero RB a viable strategy?  If we delay drafting RBs until mid- to late-round choices, and stock up on top-flight WRs and QBs in the interim, what is the effect on total projected fantasy points for the season?
I'm interested in hearing any other draft analysis ideas you might have that could employ this program.