Francesco149 / oppai-ng

difficulty and pp calculator for osu!. better, smaller, faster rewrite of https://github.com/Francesco149/oppai
The Unlicense
155 stars 36 forks source link

oppai result doesnt match osu api #66

Open Atilogit opened 3 years ago

Atilogit commented 3 years ago

Trying to reproduce the pp value of this score on 1955170 grafik using curl https://osu.ppy.sh/osu/1955170 | ./oppai - 509x 8x100 returns a value of 271.59 pp which doesnt match the returned 272.347pp when calling https://osu.ppy.sh/api/v2/users/{userid}/scores/best. Version is 3.3.0-b237

Francesco149 commented 3 years ago

yeah it's normal, it's not expected to be 1:1 accurate, just close enough. we don't do slider calculations at all

Atilogit commented 3 years ago

Ah i see. I guess i'll figure out something with peppys calculator then. Is it reasonable to have something like a precision mode in later versions?

Francesco149 commented 3 years ago

the slider calculations add so much complexity and code and makes the calculation slower it isn't worth it in my opinion. I used to have them but removed. I dont think even the official calculator based on lazer is 100% accurate. you need the exact aim/speed star ratings used by bancho and then you can plug them into the pp formula and get 1:1 pp values

Atilogit commented 3 years ago

Looking through the code at https://github.com/ppy/osu/blob/master/osu.Game.Rulesets.Osu/Difficulty/ and plugging in the right star values for the play i mentioned at the beginning i get a value that is consistent with the one returned by the api. But when i plug in the generated speed and aim star difficulties into oppai the resulting pp is still off. Doing it the other way around by getting the difficulties from oppai and using peppys pp calculator results in a way better approximation. Is there any reason that oppai's implementation yields a different result there? The original code doesn't seem too expensive.

Francesco149 commented 3 years ago

the expensive part is calculating the star rating itself, which is an order of magnitude slower if you do slider calculations. when you plug the star values you are skipping that part

there also have been some slight changes to the pp formula recently which I haven't added to oppai, so that could be the reason it doesn't match osu!lazer perfectly