pydfs-lineup-optimizer
pydfs-lineup-optimizer copied to clipboard
Forcing a 5 man game stack - not allowing a 6th, or DST to trickle in
Im trying to force a 5 man game stack, 2 with the QB + 2 opposition. Not including DSTs. The following works great, except it does allow for a 6th player sometimes(defense) included.
optimizer.add_stack(GameStack(5, min_from_team=2)) # stack 5 players from the same game, 3 from one team and 2 from another
Dak + 2 of (lamb, cooper, jarwin, schultz, zeke) + (Saquon, golladay, toney, engram) from this past week.
Is this possible @DimaKudosh
You can try to forbid using defense with opposite QB.
optimizer.restrict_positions_for_opposing_team(['QB'], ['DST'])
I don't necessarily have a solution to this problem, but how often do you really foresee a 5-man single game stack working out? Strictly from a philosophical point of view, I feel like that's capping your upside a lot. At any given moment in that single game, only two players in your lineup can score together (QB+WR1/2/TE). On the other side of the ball, it's one or the other in the stack. Just food for thought.
I don't necessarily have a solution to this problem, but how often do you really foresee a 5-man single game stack working out? Strictly from a philosophical point of view, I feel like that's capping your upside a lot. At any given moment in that single game, only two players in your lineup can score together (QB+WR1/2/TE). On the other side of the ball, it's one or the other in the stack. Just food for thought.
Think small slate 3-4 gms