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

[QL] Idea: Please indicate how much pp would be gained after weighing a score #200

Open
Mombei opened this issue May 24, 2021 · 6 comments

Comments

@Mombei
Copy link

Mombei commented May 24, 2021

Mostly just title. I've been looking for a tool to calculate weighed pp gains given a score but I figured having this feature on Tillerino itself would be a nice QL change

@omkelderman
Copy link
Collaborator

Weighted pp gain is one of the most complicated things there is to calculate.

First you gotta figure out where in ur top plays the score will end up, to know the weight factor for this score (this is easy). Then you can apply that weight factor and you might think you're done, except you're really not! Your profile total pp amount does not actually gain this weighted pp value we just calculated!
Because you added a new score to the list, this changes the position and thus the weight of every single score below the newly just added one, so all of them need to be "reweighted" and recalculated giving you a new predicted total pp which you can then compare with your actual current total pp to know the actual weighted gained pp.

And even now we're still not done! On top of all this we also have bonus pp, adding a new score will increment the amount of total ranked scores which is directly responsible for the amount of bonus pp. So first you gotta figure out how much bonus pp you first had and how much you'll have with the newly added score and take that also into account.

tldr: weighted pp is easy, weighted pp gain is hard

@Tillerino
Copy link
Owner

I think the computation logic isn't that complicated. However, what I dislike is that you'd have to do this based on an up-to-date version of the top scores and user data (number of scores). Usually, that data is updated quite lazily. This would add a lot of API calls. However, I think that this might be a cool thing to add for Patrons, since it is purely quality of life and we could surely afford that small increase in API calls.

@omkelderman
Copy link
Collaborator

Is the number of ranked plays even available in the osu api? 🤔 I think the the most common way of calculating this stuff is to take the current user pp value, the current top 100 and then basically reverse engineer the amount of bonus pp by calculating the weighted pp of the current top 100 and subtracting that from the profile total (in which you assume that everything outside the top100 contributes zero to the total pp which probably is close enough to the truth that it doesnt matter)

@Tillerino
Copy link
Owner

There's a playcount property. Might that be the correct one?

@Tillerino
Copy link
Owner

Oh, it isn't. I see. You can see what you described in action over here: https://github.com/ThePooN/osu-pp_weighting

I guess we could do that, then. Worst case, you don't account for 0.006 of the pp by only considering the top 100 plays. Usually, your scores fall off, so it would be considerably less in practice. For the approximation of the diff, it would be an okay approximation IMO.

@omkelderman
Copy link
Collaborator

ye, the difference should be as good as negligible. Iirc the playcount property from the api includes loved plays and alike which shouldnt be counted towards bonus pp since those plays dont reward pp

I dunno if I have any time in the near future to implement this (for sure not this week) so I guess if you have time go for it xd

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

3 participants