1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-14 18:37:28 +08:00

Remove WIP ar11 stuff from Cognition

This commit is contained in:
apollo-dw 2022-10-17 22:05:04 +01:00
parent b6d4fbf8b5
commit d50e67f80d
2 changed files with 17 additions and 90 deletions

View File

@ -29,7 +29,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
var clockRateEstimate = current.BaseObject.StartTime / currObj.StartTime;
List<OsuDifficultyHitObject> pastVisibleObjects = retrievePastVisibleObjects(currObj);
//List<OsuDifficultyHitObject> currentVisibleObjects = retrieveCurrentVisibleObjects(currObj);
// Rather than note density being the number of on-screen objects visible at the current object,
// consider it as how many objects the current object has been visible for.
@ -72,35 +71,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
hiddenDifficulty += 2 * currVelocity;
}
double preemptDifficulty = 0.0;
if (currObj.preempt < 400)
{
preemptDifficulty += Math.Pow(400 - currObj.preempt, 1.5) / (10 + (currObj.StrainTime * 0.05));
// Buff spacing.
preemptDifficulty *= 1 + 0.6 * currVelocity;
// Buff rhythm.
preemptDifficulty *= Math.Max(1, RhythmEvaluator.EvaluateDifficultyOf(current) - 0.1);
// Buff small circles.
// Very arbitrary, but lets assume CS5 is when AR11 becomes more uncomfortable.
// This is likely going to need adjustments in the future as player meta develops.
preemptDifficulty *= 1 + Math.Max((30 - ((OsuHitObject)currObj.BaseObject).Radius) / 20, 0);
// Nerf repeated angles.
if (current.Index > 1)
{
preemptDifficulty *= getConstantAngleNerfFactor(currObj);
preemptDifficulty *= getConstantAngleNerfFactor(prevObj);
}
// Nerf constant rhythm.
preemptDifficulty *= getConstantRhythmNerfFactor(currObj);
}
double difficulty = Math.Max(preemptDifficulty, hiddenDifficulty) + noteDensityDifficulty;
double difficulty = hiddenDifficulty + noteDensityDifficulty;
// While there is slider leniency...
if (currObj.BaseObject is Slider)
@ -128,25 +99,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
return objects;
}
// Returns a list of objects that are visible on screen at
// the point in time at which the current object needs is clicked.
private static List<OsuDifficultyHitObject> retrieveCurrentVisibleObjects(OsuDifficultyHitObject current)
{
List<OsuDifficultyHitObject> objects = new List<OsuDifficultyHitObject>();
for (int i = 0; i < current.Count; i++)
{
OsuDifficultyHitObject loopObj = (OsuDifficultyHitObject)current.Next(i);
if (loopObj.IsNull() || (loopObj.StartTime - current.StartTime) > cognition_window_size)
break;
objects.Add(loopObj);
}
return objects;
}
private static double getDurationSpentInvisible(OsuDifficultyHitObject current)
{
var baseObject = (OsuHitObject)current.BaseObject;
@ -157,46 +109,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
return (fadeOutStartTime + fadeOutDuration) - (baseObject.StartTime - baseObject.TimePreempt);
}
private static double getConstantRhythmNerfFactor(OsuDifficultyHitObject current)
{
// Studies [citation needed] suggest that 33bpm is where humans stop interpreting notes as a part of a beat,
// instead interpreting them as individual events. We're gonna use this to both lessen the nerf of this factor,
// as well as using it as a convenient limit for how back in time we're gonna look for the calculation.
const double time_limit = 1800;
const double time_limit_low = 500;
double constantRhythmCount = 0;
int index = 0;
double currentTimeGap = 0;
while (currentTimeGap < time_limit)
{
var loopObj = (OsuDifficultyHitObject)current.Previous(index);
if (loopObj.IsNull())
break;
double longIntervalFactor = Math.Clamp(1 - (loopObj.StrainTime - time_limit_low) / (time_limit - time_limit_low), 0, 1);
if (Math.Abs(current.StrainTime - loopObj.StrainTime) < 10) // constant rhythm, o-o-o-o
constantRhythmCount += 1.0 * longIntervalFactor;
else if (Math.Abs(current.StrainTime - loopObj.StrainTime * 2) < 10) // speed up rhythm, o---o-o
constantRhythmCount += 0.33 * longIntervalFactor;
else if (Math.Abs(current.StrainTime * 2 - loopObj.StrainTime) < 10) // slow down rhythm, o-o---o
constantRhythmCount += 0.33 * longIntervalFactor;
else
break;
currentTimeGap = current.StartTime - loopObj.StartTime;
index++;
}
double difficulty = Math.Pow(Math.Min(1, 2 / constantRhythmCount), 2);
return difficulty;
}
private static double getConstantAngleNerfFactor(OsuDifficultyHitObject current)
{
const double time_limit = 2000;

View File

@ -102,7 +102,16 @@ namespace osu.Game.Rulesets.Osu.Difficulty
aimValue *= 0.97 * Math.Pow(1 - Math.Pow(effectiveMissCount / totalHits, 0.775), effectiveMissCount);
aimValue *= getComboScalingFactor(attributes);
double approachRateFactor = 0.0;
if (attributes.ApproachRate > 10.33)
approachRateFactor = 0.4 * (attributes.ApproachRate - 10.33);
if (score.Mods.Any(h => h is OsuModRelax))
approachRateFactor = 0.0;
aimValue *= 1.0 + approachRateFactor;
if (score.Mods.Any(m => m is OsuModBlinds))
aimValue *= 1.3 + (totalHits * (0.0016 / (1 + 2 * effectiveMissCount)) * Math.Pow(accuracy, 16)) * (1 - 0.003 * attributes.DrainRate * attributes.DrainRate);
@ -140,6 +149,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty
speedValue *= getComboScalingFactor(attributes);
double approachRateFactor = 0.0;
if (attributes.ApproachRate > 10.33)
approachRateFactor = 0.4 * (attributes.ApproachRate - 10.33);
speedValue *= 1.0 + approachRateFactor;
if (score.Mods.Any(m => m is OsuModBlinds))
{
// Increasing the speed value by object count for Blinds isn't ideal, so the minimum buff is given.