Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Optimize week #16

Open
craigjmidwinter opened this issue Oct 6, 2022 · 1 comment
Open

Feature request: Optimize week #16

craigjmidwinter opened this issue Oct 6, 2022 · 1 comment

Comments

@craigjmidwinter
Copy link

At least in the league that I'm in when you specify the max amount of players, the way it works is as long as you are under the max before the day starts on Sunday, you can ice as many players as you have available on Sunday. So the optimal strategy is to either aim for Monday-Saturday ice (limit-1) and then max out sunday, or just go over the limit on the Saturday if it ends up resulting in more players that way.

It would be cool to have a feature to optimize the picks for the week. The way I see this working would be:

  1. Page through the week to determine the optimal lineup for each day ordered by a column selected by the user (ie, fantasy points current season, fantasy points prev season or rostered percentage, etc)
  2. Determine what day the user maxes out on and what the total number for that column would be at the end of that day and store that in a var as a potential line-up
  3. If the day the user maxes out is not the last day of the week, start removing slotted players ranked the lowest in that metric until you have limit-1 players, then fill the next day with every available player and store that as another potential line-up combo
  4. Repeat step 3 until you've figured out the potential maximum rostered player scenarios for the week.
  5. Compare which potential line-up that you stored has the highest tally for the selected column for the week and apply it
@magnusbakken
Copy link
Owner

Hello Craig! Thanks for the suggestion, and the thorough description. I'm afraid I don't have the time to implement a large feature from scratch at the moment, but if you get the ball rolling with a PR I will definitely help out.

By the way, I noticed you said "ice as many players as you have available". Do you happen to know if what you're describing is an NHL-only feature, or if the same thing is available for the other sports (especially the NBA)? That would have some implications for the implementation.

If this feature were implemented, do you think it should be a separate button in the extension? Or could it somehow detect that this is what you would want from the league settings? At the moment the extension works only with what's available in the DOM, without any custom API calls, but of course adding API calls could be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants