oppai-ng icon indicating copy to clipboard operation
oppai-ng copied to clipboard

on slider calcs

Open Francesco149 opened this issue 7 years ago • 18 comments

with the new system sliders affect star rating a lot more

I will think about adding slider calculations for better accuracy on maps that have a lot of sliders, however it won't happen anytime soon - I don't want to add low quality code

they will be added if I can implement it in few lines of code without adding too much complexity

Francesco149 avatar Jan 31 '19 17:01 Francesco149

if i remember correctly .osu files provide some length for sliders so maybe normalizing that would be a close enough approximation, or maybe it's what lazer is actually using? gotta check

Francesco149 avatar Jan 31 '19 19:01 Francesco149

dont slider-lines in .osu files have the length in them? Idk how up to date https://osu.ppy.sh/help/wiki/osu%21_File_Formats/Osu_%28file_format%29 is, but there it says one of the things there is the pixellength, and it also lists a formula to calc the duration

or am I misunderstanding something here lol

omkelderman avatar Feb 01 '19 10:02 omkelderman

yea thats what I pointed out in my 2nd comment. if it's not the "lazy" length (like old slidercalc) but just the slider length then it should be possible to implement it with few lines of code, im already using that length in taiko

Francesco149 avatar Feb 01 '19 13:02 Francesco149

hmm nope, it seems to be the lazy distance. but yeah I think i'll still try using the pixel length or w/e as an approximation https://github.com/ppy/osu/pull/3839/files#diff-b874c7fc814219aca9e1a1d700f90713

Francesco149 avatar Feb 01 '19 13:02 Francesco149

oh uh, I have no idea about this "lazy distance" stuff welp xd

omkelderman avatar Feb 01 '19 13:02 omkelderman

lazy distance is a simulation of following the approximate slider radius while moving the least possible, basically the minimum movement possible to get a 300 on the slider. it nerfs sliders that you dont have to fully follow

it's stupidly complex to compute because you have to literally implement all the slider curves to calculate the tick positions etc

Francesco149 avatar Feb 01 '19 13:02 Francesco149

ooooooooooooooooh right that makes a crapton of sense, yeee I can see that is a pain to implement ooof

omkelderman avatar Feb 01 '19 14:02 omkelderman

soo worst error so far is just under 6% on death dance, but most maps are within 0.6% error, so I still dunno if it's worth looking into this. will keep open

Francesco149 avatar Feb 10 '19 16:02 Francesco149

For the sake of completeness, the worst error I know of is 17.5% on Tia - Deal with the devil (UndeadCarpulet).

badeu's score is 352.16pp according to oppai, 427.24pp according to the site.

LeaPhant avatar Feb 11 '19 00:02 LeaPhant

McKay's pull request improved death dance to 1.8% error and the average error is down to 0.3% on the test suite, so the threshold is back to +-2%

deal with the devil is still way off so this issue stays open

Francesco149 avatar Feb 13 '19 18:02 Francesco149

I've now fully implemented slider curves into the McOsu star/pp calculation, so if anyone is up for translating any of this to C code:

  1. Curves: OsuSliderCurves.h, OsuSliderCurves.cpp
  2. Ticks/ScoringTimes: OsuBeatmapDifficulty::calculateAllSliderTimesAndClicksTicks().
  3. Stacks: OsuBeatmapDifficulty::generateDifficultyHitObjectsForBeatmap().
  4. DistanceCalc/OsuDifficultyHitObject: OsuDifficultyCalculator.h, OsuDifficultyCalculator.cpp

Delta is < 0.1% (average over 10000 beatmaps, including a lot of aspire/ming/2B maps, so probably even lower).

Outliers are only like 3 ming maps which differ by entire stars, mainly due to me limiting all floats to sane values during parsing, e.g. https://osu.ppy.sh/beatmapsets/594828#osu/1258033 (8.07* vs 9.18*)

McKay42 avatar Feb 15 '19 11:02 McKay42

cool! still unsure about including full blown slider calc, it's a lot of code, potentially slow and only helps a lot on fast slider maps which could be considered outliers. I feel like if you need 1:1 calcs you should just use osu itself, or lazer, or McOsu. legacy oppai used to have slider calcs but i removed them for these very reasons (my method for approximating curves probably wasnt the best anyway). eventually ill implement it in a branch and see how I feel about it.

Francesco149 avatar Feb 15 '19 12:02 Francesco149

at least having an option would be cool probably. I'm sure there's ppl out there who are less worried about things being slightly slower because of it.

Also what also might be cool is have an option to somehow split star-calc and pp-calc. So you input beatmap+mods and you get stars (here is where the "expensive" slider calc happens right?) and then you cache those numbers somewhere and then you input stars+score and you get pp. That way as long as the beatmap doesnt change you dont need to calc that stuff again (or am I missing something here now 🤔 )

omkelderman avatar Feb 15 '19 14:02 omkelderman

This is already possible by passing aim and speed stars parameters (3.23aim for example).

LeaPhant avatar Feb 15 '19 14:02 LeaPhant

well I'm looking to delete more code at the moment, and adding 1k lines of code for sliders seems too much

anyway the cli doesn't skip diff calc even if you override stars at the moment, but it will on the next release

Francesco149 avatar Feb 15 '19 14:02 Francesco149

I'd also prefer to have the option, but I guess it might result in a fork if that's not the direction this project will steer towards. A solution like osu-tools is not viable for projects like ezpp so having a standalone implementation is desirable.

LeaPhant avatar Feb 15 '19 14:02 LeaPhant

well I will definitely implement it in a branch but it might not make it on the master branch

Francesco149 avatar Feb 15 '19 14:02 Francesco149

Seems like the way to go.

LeaPhant avatar Feb 15 '19 14:02 LeaPhant