Add AI redshirting endpoint#29
Merged
Merged
Conversation
CalebRose
approved these changes
Mar 16, 2026
CalebRose
reviewed
Mar 16, 2026
CalebRose
left a comment
Owner
There was a problem hiding this comment.
The sync logic looks good. I think my only concern would be to check for the team's depth at position.
This algorithm will likely target players that haven't played a game, which is the primary intention of why an AI team should redshirt a player.
With that said, I think we should check to make sure that a team doesn't become too shallow at a position because of the redshirting of a player.
Just my two cents. I appreciate the work you're doing with this, thank you.
Collaborator
Author
|
Logs from a second round of testing with the position minimum tracking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an admin endpoint, intended to be run just prior to the redshirt deadline, that assigns redshirts for AI-controlled teams. It will redshirt the top 20 redshirt-eligible players by OVR on each AI team that have either A) not had any snaps in the first few weeks of the season or B) sustained a long-term injury in that time frame. This should help improve the AI's frankly rather terrible roster management, and set up AI teams to be in a somewhat more advantageous position should a user take them over.
I'm considering changing the injury threshold to 8 weeks - even though such a player would usually be able to eventually return to action for the last game or two of that regular season, an injury of that severity that early in the year tends to be a bit of a lost season anyway, I think. Looking for some feedback on that.
I performed a test run of the endpoint locally with the call to
SetRedshirtStatusForPlayercommented out, and saved the results. I've confirmed that user-controlled teams are being skipped, no healthy players with games played were being marked for redshirting, and found one instance of a player with a 10-week injury that was marked.RedshirtTest.txt