Using Operations Research to build the best Fantasy Premier League team

With Fantasy Premier League (FPL) about to get underway, it’s a chance for millions of fans from all over the world (more than 36M players so far) to showcase their knowledge of the league and of it’s players.

As a first timer, how can you decide which players to pick? What is a good price to pay for a player? Should you get as many superstars as possible, or get more of a balanced lineup? With all those possibilities, it can be hard to choose the best 15 players while respecting the 100M$ budget.

Considering my interest in sport analytics, I thought it would be interesting to build the best team, using maths. Here is how I procedeed.

After about 12 seconds of thinking, I quickly realized that this whole Fantasy Premier League thing was a textbook “knapsack problem”. The knapsack problem is a combinatorial optimization problem where you have a set of items that have a certain value and volume that you want to put in a backpack. Considering that the backpack has a limited capacity, you have to decide which items to put in the bag to maximize the value (sciencedirect.com). Here is a nice illustration, for visual learners.

Translating this to our FPL problem, we simply want to choose the combination of 15 players (3 goalkeepers, 5 defenders, 5 midfielders and 3 forwards) that would help us maximize our total number of points, while respecting the 100M$ budget. But how can we define the maximum number of points for the next season? Well, since we don’t know that information, I had to maximize the number of points obtained last season, while looking at this year’s costs for all players.

Now, on a normal matchweek, only our starting lineup will actually collect points. I therefore decided to pick myself substitutes that were as cheap as possible, and that had the best points per cost ratio in their cost category last season. One goalkeeper, two defenders and a midfielder were chosen, for a total of 17M$, which left me with 83M$ for the starting lineup.

I could then really work on the problem of creating the best starting 11. Below is the model (simplified to facilitate comprehension) created to represent the problem:

Simply put, we want to maximize the number of FPL points, while respecting four sets of constraints, being that the total cost of our players must be inferior or equal to 83M$ (constraint 1), that we need the right number of players for every position (constraint 2), that we can’t have more than 3 players coming from a single team (constraint 3) and that we can only select a player once and cannot have negative values (constraint 4).

Below is the starting 11 obtained using the Simplex Algorithm, available on the Excel Solver.

Of course, the method used to get to this starting lineup has it’s flaws. To begin with, it completely ignores new signings coming from other leagues since they all had no FPL points last season (which is what I was maximizing). While not ideal, it might not be the worst idea to avoid them anyway. It can be hard to know how they will perform in the Premier League and how their managers will use them.

Another obvious flaw is that with this model, we assume players will repeat the great seasons they had last year. Players like Robertson and Fraser had the best season of their careers. Can they really repeat that? Maybe not, but then again, we don’t know, and nobody knows with certainty which other players will come out of nowhere and have amazing breakout seasons. We can only look at previous history to give us an idea of what is to come, and the model does just that.

It should also be said that this model helps build a team in many ways. First, it completely removes bias and favoritism. Casual FPL managers will tend to choose players they like or that are popular. The model does not care about that, which makes him much more rational than us humans (yeah, I said him). Also, it allocates the budget in the most efficient way possible (given the data at hand), which is not something humans can do so easily, if at all.

With my starting lineup set for matchweek 1, I can start thinking about how I will be adjusting my team during the season. While I am not yet set on how I will be proceeding, I think that fixture difficulty will be huge. You want your forwards to have easy home games against lower opposition as often as possible, while you also want to avoid having defenders playing away games to Liverpool and Manchester City, for instance. Finally, I think patience will be key. With only one available transfer every week, it is safer to wait as much as possible before making it, to avoid having players that don’t play because of something that happened during the week. The more you wait, the more information you have, and the more that information is accurate!

Obviously, it has to be kept in mind that loads of uncertainties remain, and that even the best algorithms can’t predict with certainty what will happen during a season. Injuries, bad luck and more can happen, which can completely derail even the best of predictions! I had to say that in case I don’t win my leagues!

Enjoy the FPL season, and may the best team win!

3 thoughts on “Using Operations Research to build the best Fantasy Premier League team

Add yours

  1. I feel like having only 1 Chelsea player is setting yourself up for failure, but you’re the expert! Well written article anyways…

    Like

  2. I’ve played The Sun DreamTeam for many years as well as dipping into Premier League as well. They’re two completely different kettle of fish because DT includes European competitions but even though FPL is exclusively PL you do have to consider Europe and squad rotation. Obviously you’ve got subs that DT doesn’t offer.

    The advice I always provide with fantasy cricket and the same goes for football is yes, you probably need Kane, Sterling and Aguero etc but that only gets you the same points as many others. You’ve got to find those players that’ve been selected by less than 2% of gamers so that when you get those points your competitors don’t.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: