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

Increase accscalingshift and include countok in hit proportion #31195

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Changes from all commits
Commits
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
17 changes: 7 additions & 10 deletions osu.Game.Rulesets.Taiko/Difficulty/TaikoPerformanceCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private double computeDifficultyValue(ScoreInfo score, TaikoDifficultyAttributes

// Scale accuracy more harshly on nearly-completely mono (single coloured) speed maps.
double accScalingExponent = 2 + attributes.MonoStaminaFactor;
double accScalingShift = 300 - 100 * attributes.MonoStaminaFactor;
double accScalingShift = 400 - 100 * attributes.MonoStaminaFactor;

return difficultyValue * Math.Pow(SpecialFunctions.Erf(accScalingShift / (Math.Sqrt(2) * estimatedUnstableRate.Value)), accScalingExponent);
}
Expand Down Expand Up @@ -134,6 +134,11 @@ private double computeAccuracyValue(ScoreInfo score, TaikoDifficultyAttributes a

const double z = 2.32634787404; // 99% critical value for the normal distribution (one-tailed).

double? deviationGreatWindow = calcDeviationGreatWindow();
double? deviationGoodWindow = calcDeviationGoodWindow();

return deviationGreatWindow is null ? deviationGoodWindow : Math.Min(deviationGreatWindow.Value, deviationGoodWindow!.Value);

// The upper bound on deviation, calculated with the ratio of 300s to objects, and the great hit window.
double? calcDeviationGreatWindow()
{
Expand All @@ -160,22 +165,14 @@ private double computeAccuracyValue(ScoreInfo score, TaikoDifficultyAttributes a
double n = totalHits;

// Proportion of greats + goods hit.
double p = totalSuccessfulHits / n;
double p = Math.Max(0, totalSuccessfulHits - 0.0005 * countOk) / n;

// We can be 99% confident that p is at least this value.
double pLowerBound = (n * p + z * z / 2) / (n + z * z) - z / (n + z * z) * Math.Sqrt(n * p * (1 - p) + z * z / 4);

// We can be 99% confident that the deviation is not higher than:
return h100 / (Math.Sqrt(2) * SpecialFunctions.ErfInv(pLowerBound));
}

double? deviationGreatWindow = calcDeviationGreatWindow();
double? deviationGoodWindow = calcDeviationGoodWindow();

if (deviationGreatWindow is null)
return deviationGoodWindow;

return Math.Min(deviationGreatWindow.Value, deviationGoodWindow!.Value);
}

private int totalHits => countGreat + countOk + countMeh + countMiss;
Expand Down
Loading