Fantasy Football Optimization Algorithm Ideas

So, this is a little different than standard fantasy football. I have a list of players, their average "points per game" (PPG) and their salary. I want to maximize the number of points per game under the restriction that my team does not exceed the salary. The team consists of 1 QB, 1 TE, 3 WR and 2 RB. So, if we have 15 positions, we have 15X15 X (15 c 3) X (15 c 2) = 10749375 possible teams.

Quite a complex computing complex. I can use the branch bit and bind, i.e. When the team surpassed the salary, I can trim the tree, but even with this the algorithm is still pretty slow. I tried another option when I used the "genetic algorithm", i.e. He made 10 random teams, chose the best one and “mutated” it (randomly changing some players) into 10 more teams, then selected from them, and then went in cycles until the points for the “best team” game stopped improving.

There must be a better way to do this. I am not a computer scientist, and I just started a course in algorithms. Programmers - what do you think? I have a feeling that some kind of dynamic programming application may help.

thank

+5
source share
4 answers

I think that a genetic algorithm, intelligently implemented, will give you an acceptable result. You might want to use a metric, such as points per dollar, rather than direct PPG, to select the best team. Thus, you are essentially measuring value added. In addition, you must check the complete algorithm / mutation many times before satisfactory completion so that you can identify which players are constantly appearing in the final results. Then these players must be rated higher than others.

Of course, the problem with the genetc approach is that you need a good mutation algorithm, and this is very personal for how you want to implement it.

+2
source

n , j - . m [i, j] .

Then m[i, 0] = 0, m[0, j] = 0
and

m[i, j] = m[i - 1, j] if salary for player i is greater than j

else

m[i, j] = max ( m[i - 1, j], m[i - 1, j - salary of player i] + PPG of player i)

, R, , , .

, , , m [i, j], DP ( )

0

, , , . - 3 .

, , : , , , ,

- . - , , . , , - . , .

0

All Articles