What happens when you combine your love for football and programming? I am a huge fan of the English Premier League and its fantasy league game which allows players to play as managers by creating their team and earn points based on the performance of their selected players in the real field.
Fantasy Premier League is the most famous fantasy game in the world with over 7 million players(that’s more than New Zealand’s population), known as managers, trying their managing skills and getting as many points as they can over 38 game weeks spanned over 10 months of football.
Now you might be asking what’s difficult about it. Just select the best players in the league and let ‘em do the rest. Things aren’t as easy as they seem. It’s a complex game of certain sets of rules that are to be followed to create a team, then there is Champions League, Europa League, International Breaks and the most dreaded one, Pep’s Rotation. So to be a successful manager you have to make good decisions, considering all the above factors and also be able to foresee the future and create something that will give you a chance to leap in front of others.
The big question now is what can we manage a team using Data Science and Artificial Intelligence. Certain previous managing experience says yes. The problem with managers is, while creating a team, we indulge in favoritism and sheep herding. What this means is we intend to choose players from our favorite teams or players who only have hype. Such players usually do not add any value to the squad.
But in data, we can trust. Hence what we do is get the data, process it and find meaningful information from it and see whether it works or not. After all, it is a game of chance and a problem is that a machine doesn’t show patience, this AI would work in collaboration with the manager to get the best results.
At the very start of the season, I had to get a team that could do well until the first international break. So I had to use the previous season’s data for the AI and it gave the following team. I suffered a huge blow as Allison was injured in the very first half and the same happened with Holebas as well. So this cost me at least 6 points. Other than that I guess it did pretty well, in fact, better than my expectations.
I didn’t do any transfers here as I didn’t have any internet on the final day of the transfer deadline. And just look at the results. Disappointing! But there was a bright side as well. I got two free transfers for the next game week and so the next game week was going to be the good first test for my AI.
Look at that beauty. I had 2 free transfers, so my AI suggested me to do two replacements, Rui Patricio in for Allison as a Goalkeeper and Teemu Pukki in for Raul Jimenez as a Forward. It was just a bad captaincy choice that cost me some points, otherwise, it was a good week for the business.
At this point just one week before the international break, I thought of using a Wildcard and assembled a whole new squad. My AI did a great job but it was again my fault of handing Teemu Pukki the armband and dropped points for a bad captaincy pick.
During the international break, I did some changes to my AI gave it a pinch more of thinking prowess. If you are interested in the technicalities of my AI, you can find a detailed blog post here. I took 2 hits because I know the decisions made by AI were reasonable and I could easily recover my lost points. Just another average gameweek.
This was the gameweek I have been waiting for. I was among 10% of managers. Just look at the bench. 19 points! Sterling didn’t play, so he was automatically substituted by Mark Nobel and gave me crucial 5 points. I think I could have made 100 points in this gameweek. My AI gave me the best set of players but I let it down by choosing a wrong captain and having points worthy players on the bench.
My AI was asking me to remove Ashley Barnes as he was only giving me playing points. But I decided to show patience for a week as he had easy fixtures ahead. This gave me two free transfers for the next week. Otherwise, it was a good week.
Finally, my patience ran out with Ashley Barnes, I decided to use my two free transfers and my AI suggested to bring in two Chelsea players, Tammy Abraham and Fikayo Tomori. And look at that 8 points from Abraham. That’s my AI. Intelligent!
So this was a gameweek after the international break and I had one free transfer and asked my AI whether I should go for it. My AI referred me to sell Raheem Sterling and get in Sadio Mane. Being a Liverpool fan, I was really disappointed that we couldn’t beat Manchester United and Mane was lackluster. But what about other players? Ask any FPL manager in the world, it was the poorest gameweek in the last few. Only 18 goals scored across 10 matches. The average points reflect the pain.
For this one, my AI suggested me to bring in Rui Patricio in place of Tom Heaton as Aston Villa has difficult fixtures ahead. But I wish I had some Leicester City players in my squad as they ran riot against Southampton, scoring 9 goals and kept a clean sheet as well. It was a bad week at the back. Pukki party is over now and keeping Sergio Aguero is too risky due to Pep’s Rotation.
This above graph again shows that humans are inferior to the machine. My AI gave me the right choices but I couldn’t decide on captains and bench players. The
BEST line shows what would have been my progress if I had made the right decisions. Well, on one side I am happy as well because my AI is something that I wrote and it’s doing well. The thing is the big buck players haven’t really fired in the last few game weeks. So should the formation go from 3-4-3 to 3-5-2 or 4-4-2? Well, that’s a big question.
Patience is an important thing in this game. Trust the AI, it’s guiding you towards the right path. Data is the secret. During the first phase, we had less data, so the suggestions were approximate. But the graph is an encouragement, as we are nearing the top-ranked manager.
I would be doing another blog post regarding my progress on Christmas but still, I would really love to have suggestions from you guys. Should I do blog posts more often or should I write for each game week? Also, if you guys are interested in knowing the technicalities of the AI, just mention me on twitter.
Lemme know if you have any doubt, appreciation or anything else that you would like to communicate to me. You can tweet me @ravgeetdhillon. I reply to all the questions as quickly as possible. 😄 And if you liked this post, please share it with your twitter community as well.