smadigan91 / pyathono

python + yahoo
0 stars 0 forks source link

Roster Evaluation #5

Open smadigan91 opened 6 years ago

smadigan91 commented 6 years ago

Bot should be able to evaluate its own positional scarcity / surplus relative to an "ideal" lineup and not allow moves that push it beyond a threshold that implies frequently benched-yet-starting players.

Probably should factor position relative to a team's "roster score" for that position into a non-team-player's player score

smadigan91 commented 6 years ago

relevant notes:

https://math.stackexchange.com/questions/1926838/calculating-total-possible-fantasy-football-lineup-combinations (can calculate total # of unique lineups but need to know whether the result is good or not)

https://rotogrinders.com/threads/lineup-builder-programming-code-982092

https://addons.mozilla.org/en-US/firefox/addon/sortplayers/ <--- this is essentially exactly what I want to implement:

For selected day(s), program performs a cartesian product of every available player (player with an opponent on selected day), and every available player's possible roster position (i.e. PG, G, SG). For every resulting line-up the program makes a sum for that line-up's ranking (i.e. player 1 combined 7-day/14-day ranking = 10, player 2 combined 7-day/14-day ranking = 50, so line-up sum would be 60 points). As players are ranked in ascending order from best to worst, i.e. best player is 1, worst player is in the 500s, the line-up with the lowest combined ranking will be chosen. However, the program first selects the line-up with the most possible roster positions filled.

There are three options for automatically benching players in Rotisserie leagues: 1) if a player is injured, 2) if a player is not active, and 3) if a player has a rank above a user-set threshold.