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

Refactor update pass quality #481

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jdabapo
Copy link
Contributor

@jdabapo jdabapo commented Mar 22, 2025

update pass quality. notes r in the commit, ill take them out later

Comment on lines 2117 to 2118
However, what if a pass comes from a 'bad' passer? Or what if the pass is from a 'great' passer, but external factors
(such as the pass being contested) make the pass less effective? We will set the lower bound to -2.5% for now, and 4% for the upper bound.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually need to consider this? Obviously that's how it happens IRL, but when you're just looking at text play-by-play you're never going to notice if this pass gave a 4% bonus but the next one gave a 2% bonus. You would only maybe slightly notice the bonus in overall season stats and team performance being slightly better. But that'd look the same as if both passes had a 3% bonus.

For stuff like that, where it's something realistic but not noticeable in the game, I tend towards just leaving it out of the simulation. Makes things faster and simpler!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay! took your suggestions here and removed some of the complexity for this function. Now its just a flat -0.015 - 0.03, with the passingAtr divided by 5000, so that a 100 passAtr would give 2%, 50 would be 1%, and this is added onto the random number generated between the range

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am skeptical we even need the random number. Nobody will notice that either. Just make it scale compositeRating.passing between those limits. Then the only thing to do would be testing to make sure it didn't change stats too much, but I can do that.

Besides this, do you think this is done? I should proceed with testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, id classify this as done! I scale it now between the limits. I think the only thing that needs to be checked is if this somehow makes the shot prob negative or positive

Comment on lines 2113 to 2116
/*
We want the % chance for better shot to be a higher number, as there are ~ 1.5-2 AST/TOV ratio for NBA teams
https://www.basketball-reference.com/leagues/NBA_2025.html#per_game-team
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace this comment with a quick explanation (doesn't have to be any longer than what you have already) about the effect of pass quality on FG%, including some source ideally? On Discord you linked to https://www.nba.com/stats/players/passing?dir=D&sort=POTENTIAL_AST but like where are you getting the (-0.015, 0.03) range from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally I only did a few players on this list and it averaged to about a 4% increase, but as I did more on the list, it jumps up to about 7%. I don't know if 7% seems like a bit too high of a number? And the -0.015, that isn't as easy of a percentage to calculate since this same calculation won't hold with worse passers, since the sample size would be lower

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I see. What is league average, can you do that? Or per team average, does it vary much?

I'll have to do some testing to see, but it could be that we also need to decrease the FG% for non-assisted shots to compensate.

Comment on lines 2118 to 2119
const upperBound = 0.03;
const lowerBound = -0.015;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a random players league, since ratings don't go all the way from all 0s to all 100s, the actual min/max passing composite rating results in output values of like (0.005, 0.02). So if (-0.015, 0.03) are derived roughly from the current NBA, the absolute limits here should be wider because current NBA players do not correspond with all 0 ratings or all 100 ratings in BBGM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I widened the ranged to go from (-0.015,0.08), but this could break things a bit

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

Successfully merging this pull request may close these issues.

2 participants