From d18edb54b0847a64bd5d21351fba699c6456e8ec Mon Sep 17 00:00:00 2001 From: Givy120 <89256026+Givikap120@users.noreply.github.com> Date: Wed, 6 May 2026 15:31:20 +0300 Subject: [PATCH] Make Ok adjustment formula more stable (#37263) Current formula can output drastically different values on simlar countOk / estimatedSliderBreaks amounts. For example if countOk is 10, then changing estimatedSliderBreaks from 9 to 10 is gonna change okAdjustment from 0.15 to 0.05, what is a 3 times lower resulting "estimated sliderbreaks" value. This PR is fixing that in the most simple way - by increasing the buffer constants, so very small variables won't skew the result as much. --------- Co-authored-by: James Wilson Co-authored-by: StanR Co-authored-by: StanR <8269193+stanriders@users.noreply.github.com> --- osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index c2e8b38c61..7a2674a10a 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -397,7 +397,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty double estimatedSliderBreaks = Math.Min(nonMissMistakes, effectiveMissCount * topWeightedSliderFactor); // Scores with more Oks and Mehs are more likely to have slider breaks. - double nonMissMistakeAdjustment = ((nonMissMistakes - estimatedSliderBreaks) + 0.5) / nonMissMistakes; + // We add an arbitrary value to both sides of the division to make it more stable on extreme ends. + double nonMissMistakeAdjustment = (nonMissMistakes - estimatedSliderBreaks + 4.5) / (nonMissMistakes + 4); // There is a low probability of extra slider breaks on effective miss counts close to 1, as score based calculations are good at indicating if only a single break occurred. estimatedSliderBreaks *= DifficultyCalculationUtils.Smoothstep(effectiveMissCount, 1, 2);