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

Remove estimations where score data is available for osu! difficulty calculations #27691

Merged
merged 41 commits into from
Oct 22, 2024
Merged
Changes from 27 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
941c048
Make length bonus account for sliders, use proper misscount for classic
Finadoggie Mar 22, 2024
4db6f28
Use actual sliderends dropped instead of estimating
Finadoggie Mar 22, 2024
3dafdc0
Revert "Make length bonus account for sliders, use proper misscount f…
Finadoggie Mar 22, 2024
8408455
Use miss count for effective miss count
Finadoggie Mar 22, 2024
12afa8d
Merge pull request #1 from Finadoggie/miss-count-fix
Finadoggie Mar 22, 2024
eb30b4a
Merge branch 'estimation-removal' into dropped-tail-fix
Finadoggie Mar 22, 2024
c9e3c10
Merge pull request #2 from Finadoggie/dropped-tail-fix
Finadoggie Mar 22, 2024
b0d20e6
Update OsuPerformanceCalculator.cs
Finadoggie Mar 22, 2024
6fe478c
Add slider ticks and reverse arrows to effective misscount
Finadoggie Mar 22, 2024
4f5f0e5
Merge branch 'master' into estimation-removal
Finadoggie Mar 23, 2024
58bc184
Use sliderend data for all non-legacy scores
Finadoggie Mar 23, 2024
c24f99e
Merge branch 'estimation-removal' of https://github.com/Finadoggie/os…
Finadoggie Mar 23, 2024
2dd4903
Cap Buzz Slider Related Misses
Finadoggie Apr 11, 2024
dd17c89
removed large tick misses from effectivemisscount
Finadoggie Apr 12, 2024
ca24601
Add bool useSliderHead
Finadoggie Apr 19, 2024
77814ec
Fix getting slider head drops
Finadoggie Apr 19, 2024
759a826
Clamp estimatedSliderEndsDrop
Finadoggie Apr 19, 2024
4a7b813
Re-add bool useSliderHead
Finadoggie Apr 19, 2024
d1dcac0
fix code formatting
Finadoggie Apr 19, 2024
4fe55d4
Renamed useSliderHead to useClassicSlider (and refactored code accord…
Finadoggie Apr 20, 2024
1f55c14
merged givi's accuracy changes
Finadoggie May 24, 2024
6c9e906
Revert "merged givi's accuracy changes"
Finadoggie May 24, 2024
8dea601
Merge branch 'master' into estimation-removal
Finadoggie May 25, 2024
44c9425
Merge branch 'ppy:master' into estimation-removal
Finadoggie Sep 27, 2024
3d7f4ae
Merge branch 'ppy:master' into estimation-removal
Finadoggie Oct 12, 2024
b921424
Update to use variable usingClassicSliderAccuracy
Finadoggie Oct 12, 2024
3b517e0
Convert estimateSliderEndsDropped assignment into '?:' expression
Finadoggie Oct 12, 2024
3ac6a9f
Join variable assignments with declarations
Finadoggie Oct 12, 2024
29b1697
consolidated if statements for getting effectiveMissCount and countSl…
Finadoggie Oct 12, 2024
88af578
only assign countLargeTickMiss for slider accuracy scores
Finadoggie Oct 12, 2024
5192599
remove score debugging code I accidentally left in
Finadoggie Oct 12, 2024
6bcfed8
Revert "remove score debugging code I accidentally left in"
Finadoggie Oct 12, 2024
1337b7e
use LargeTickHit instead of LargeTickMiss
Finadoggie Oct 17, 2024
6d4cb60
Revert "use LargeTickHit instead of LargeTickMiss"
Finadoggie Oct 19, 2024
31e0853
add large tick misses back into effectivemisscount
Finadoggie Oct 21, 2024
e31e10d
merge effectivemisscount functions
Finadoggie Oct 21, 2024
3778246
Addressed code quality concerns
Finadoggie Oct 21, 2024
5907c2a
Only clamp estimated miss count with relevant statistics
Finadoggie Oct 21, 2024
98800fe
Fix variables being used before being assigned
Finadoggie Oct 21, 2024
bcb9970
Refactor and add comments
stanriders Oct 21, 2024
acf282d
Fix effectiveMissCount being calculated wrong
stanriders Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
private int countOk;
private int countMeh;
private int countMiss;
private int countLargeTickMiss;
private int countSliderEndsDropped;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since slider-related code uses the term "tail" (and the hit result does too), I'd suggest renaming this to countSliderTailMiss or countSliderTailsDropped. I'd prefer to consider "miss" the opposite of hit even for slider tails but calling them "dropped" is arguable


private double effectiveMissCount;

Expand All @@ -44,7 +46,15 @@
countOk = score.Statistics.GetValueOrDefault(HitResult.Ok);
countMeh = score.Statistics.GetValueOrDefault(HitResult.Meh);
countMiss = score.Statistics.GetValueOrDefault(HitResult.Miss);
effectiveMissCount = calculateEffectiveMissCount(osuAttributes);
countLargeTickMiss = score.Statistics.GetValueOrDefault(HitResult.LargeTickMiss);

if (!usingClassicSliderAccuracy)
Finadoggie marked this conversation as resolved.
Show resolved Hide resolved
countSliderEndsDropped = osuAttributes.SliderCount - score.Statistics.GetValueOrDefault(HitResult.SliderTailHit);

if (usingClassicSliderAccuracy)
effectiveMissCount = calculateEffectiveMissCount(osuAttributes);
Finadoggie marked this conversation as resolved.
Show resolved Hide resolved
else
effectiveMissCount = countMiss;

double multiplier = PERFORMANCE_BASE_MULTIPLIER;

Expand Down Expand Up @@ -124,8 +134,11 @@

if (attributes.SliderCount > 0)
{
double estimateSliderEndsDropped = Math.Clamp(Math.Min(countOk + countMeh + countMiss, attributes.MaxCombo - scoreMaxCombo), 0, estimateDifficultSliders);
double sliderNerfFactor = (1 - attributes.SliderFactor) * Math.Pow(1 - estimateSliderEndsDropped / estimateDifficultSliders, 3) + attributes.SliderFactor;
double estimateSliderEndsDropped;

Check failure on line 137 in osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Join declaration and assignment in osu.Game.Rulesets.Osu\Difficulty\OsuPerformanceCalculator.cs on line 137
estimateSliderEndsDropped = usingClassicSliderAccuracy ? Math.Clamp(Math.Min(countOk + countMeh + countMiss, attributes.MaxCombo - scoreMaxCombo), 0, estimateDifficultSliders) : Math.Min(countSliderEndsDropped + countLargeTickMiss, estimateDifficultSliders);
Finadoggie marked this conversation as resolved.
Show resolved Hide resolved
Finadoggie marked this conversation as resolved.
Show resolved Hide resolved

double sliderNerfFactor = 0;

Check failure on line 140 in osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Value assigned is not used in any execution path in osu.Game.Rulesets.Osu\Difficulty\OsuPerformanceCalculator.cs on line 140
sliderNerfFactor = (1 - attributes.SliderFactor) * Math.Pow(1 - estimateSliderEndsDropped / estimateDifficultSliders, 3) + attributes.SliderFactor;
Finadoggie marked this conversation as resolved.
Show resolved Hide resolved
aimValue *= sliderNerfFactor;
}

Expand Down
Loading