sertalpbilal / FPL-Optimization-Tools

A collection of tutorials and recipes to use optimization for winning Fantasy Premier League :)
Apache License 2.0
129 stars 45 forks source link

Definition and values of bench weights #24

Closed daniegr closed 5 months ago

daniegr commented 5 months ago

@sertalpbilal I am intrigued about your work on FPL optimization and I am eager to learn more about particular aspects of your engine. Regarding bench weights, I would highly appreciate a brief introduction to how these are defined, how you exploit this in the optimization, and how you came to decide on the different weight values (which seems to be assigned to fixed decimal numbers except for solve_autobench_problem(). Feel free to point me to any resources which could be helpful to enhance understanding.

sertalpbilal commented 5 months ago

Hi Daniel, thanks for your interest. Bench weights are unfortunately a non-linear aspect due to autosub rules of FPL. In the simplified model, I have scanned past seasons on the percentage of bench players coming into play and used it as a weight in decision making. We also had a full replay of the season to decide the default values. For auto bench problem, the idea is to solve the model using default values. Then, we convert expected minute data from our data source into "probability of playing" which helps us to calculate actual bench autosubbing probability. With these values, you solve the problem once again. In my experience it converges after 2 or 3 iterations, but sometimes oscillates between two teams. Here is the tutorial episode about it: https://youtu.be/CF9IH0UyLiM?si=7Rd-_W31vaVjeeh5

daniegr commented 5 months ago

Thank you for the elaboration, @sertalpbilal! Cheers

sertalpbilal commented 5 months ago

My pleasure! If you have any ideas to improve the logic, please let me know.