website statistics
We left off last time with Indiana Jones trying to decide among dozens of items of treasure to stuff in his knapsack. His knapsack could only hold so much weight, and he had to decide which combination of items maximized the total value of loot without busting his sack's seams. It's a complicated problem already, but in our salary cap analogy, it got even more complicated. We required exactly 11 players, with certain numbers of players at the various positions. This would be like Marcus (Indy's dean at the University) requiring Indy to take exactly one gold idol, 2 ruby jewels, 2 emerald jewels, and so on, while still maximizing value and remaining within the knapsack weight limit.

The last post highlighted the ability of optimization to build a starting offensive lineup, constrained by the salary cap. For the purpose of demonstration, I made a 2014 all-star team of players that satisfied cap limits. Although this is just a toy project for now, it's not too hard to see the potential that real-world roster construction can be aided using optimization, as long as we tackle some major complications.

The first major complication I'll deal with is backups. As you would imagine, the requirement for backups complicates the problem greatly. Fortunately, with some clever optimization tricks we can handle backups nicely.

You might be wondering what the big problem is. Why not simply expand the roster limits and say we want 2 QBs, 4 Ts, 4 Gs, etc. instead of 1 QB, 2 Ts, 2Gs, etc? We could then re-solve the problem just like before, seeking the most player value subject to cap limits and have an optimum roster. The wrinkle is that your starters are on the field for about 80% of the snaps, and backups only about 20% of snaps. We shouldn't count the value of the backups on the same level as our starters. A good roster will concentrate most of its value in the players that see the field the most.

We can expand the roster constraints and tell the model to only award full value to the starters and award 20% value to the backups. Now the problem is telling the model which players are going to be my starters. It should be obvious enough--the starters should be the guys with the highest value at each position.

Unfortunately, linear optimization models need things to be, well, linear. And saying "give partial value to the players who aren't the 2 best at their position" is not a linear mathematical statement. The good news is that there are many strategies to handle wrinkles like this, and we can use one to give partial value to reserve players. In fact, for any given position we could tailor the weighting according to real-world constraints. For example, defensive tackle backups are often in rotation and see the field quite often. Nicklebacks are obviously another unique position that sees more than 20% of snaps. For now, I'll keep the backup weight at 20% for this demo just for simplicity, but keep in mind this can be customized to be as realistic as needed.

Here is the resulting all-salary-cap offense, complete with backups. Keep in mind the backups aren't true backups, but are "all-star team" backups. Again, this is all just a big demo project for now. The actual names and numbers are just data to the model, and any set of players and player values can be substituted. We've come in just under my spending limit of $55M on the offensive side of the ball and built a great offensive team. It might fall short of the AP's All-Pro squad, but it certainly costs a lot less.

Pos Player Cap Hit AV
QB R.Wilson 880,474 19
C M.Pouncey 5,387,139 15
T T.Smith 5,360,645 14
T D.Bakhtiari 655,910 10
G M.Yanda 9,103,128 17
G Z.Martin 1,756,536 14
RB D.Murray 1,720,033 19
WR A.Brown 4,866,672 16
WR R.Cobb 1,100,109 16
WR J.Nelson 6,382,962 18
TE R.Gronkowski 5,817,383 12
QB R.Fitzpatrick 942,632 9
C C.Linsley 502,288 10
T J.Britt 677,114 9
T R.Harris 614,057 9
G J.Sweezy 629,368 9
G K.Long 2,032,400 11
TE T.Kelce 761,459 9
TE C.Fleener 1,569,415 7
RB L.Bell 1,008,885 17
RB E.Lacy 830,596 16
RB J.Forsett 614,057 12
WR T.Hilton 761,485 12
WR C.Johnson (MIN) 399,232 8
WR K.Stills 585,630 8
Total   54,959,610 199.2*

The total value is 199.2, which accounts for the 20% weight on backup values. Notice how the model put as much player value into the starting slots as possible, and left lesser values in the backup slots. The model was also willing to spend more on the starters to get as much total value on the field as possible.

Interestingly, the model didn't change many starters from the original 11 we chose before considering backups. It only swapped the more expensive Gronkowski for the better bargain Kelce, putting Kelce in as our #2 TE. It makes sense. Given more money to work with, it sought out positions where some more maneuvering space would make a big difference.

Going from here to building a full roster, including defense, is only a matter of scale. We just need to add more position types into the model and more players into the dataset. But there are several more hurdles to clear before this approach is of any real use to a GM. For example,

-What about players already on the roster? What happens when we want to release one?
-What about future years? We don't want to put the team in cap purgatory just to win now.
-How do we know how much a potential free-agent would cost to sign?
-How does the draft figure into this?

There are good solutions for each of those questions, and I'll address them in upcoming posts.