ppy / osu-web

the browser-facing portion of osu!
https://osu.ppy.sh
GNU Affero General Public License v3.0
973 stars 380 forks source link

Use weighted performance for country leaderboards #11269

Closed tsunyoku closed 3 months ago

tsunyoku commented 3 months ago

Resolves #10525.

Added the user count as a config variable just in case it's something that wants to be messed with but seems general consensus from peppy's poll that top 1000 is the best idea.

Unsure if the column on the page should be reworded to say something like "Weighted Performance" so that the difference is clear for those who've looked at the page in the past but it might seem weird since pp leaderboards for example just use "Performance".

Formula for weighted performance is the same as user total performance.

I don't know how often this command is ran in production but if this gets in then it might be worth running the recalculation if it's not usually ran often.

nanaya commented 3 months ago

the formula question is still open. I think the 0.95 factor is too steep for country-sized population. It's effectively 0 after around 300th.

tsunyoku commented 3 months ago

if we want to encapsulate the entire top 1000 then we should use something around 0.99 for the factor, for the 999th user it's ~0.004 assuming they have 100pp (random number for easy math)

nanaya commented 3 months ago

maybe make it configurable for now with 0.99 as the default

nanaya commented 3 months ago

@peppy please confirm whether or not we want to go on with this

peppy commented 3 months ago

@nanaya i'm on board with this change, yes.

nanaya commented 3 months ago

merge conflicts 👀

tsunyoku commented 3 months ago

presumedly from https://github.com/ppy/osu-web/pull/11282, i'll fix