mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 11:42:56 +08:00
Change scaling to make high AR woth more on low SR
This commit is contained in:
parent
639f877d04
commit
e6f1a4067d
@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
|
|||||||
{
|
{
|
||||||
var currObj = (OsuDifficultyHitObject)current;
|
var currObj = (OsuDifficultyHitObject)current;
|
||||||
|
|
||||||
double result = highArCurve(currObj.Preempt);
|
double result = GetDifficulty(currObj.Preempt);
|
||||||
|
|
||||||
if (applyAdjust)
|
if (applyAdjust)
|
||||||
{
|
{
|
||||||
@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
|
|||||||
// follow lines make high AR easier, so apply nerf if object isn't new combo
|
// follow lines make high AR easier, so apply nerf if object isn't new combo
|
||||||
inpredictability *= 1 + 0.1 * (800 - currObj.FollowLineTime) / 800;
|
inpredictability *= 1 + 0.1 * (800 - currObj.FollowLineTime) / 800;
|
||||||
|
|
||||||
result *= 0.85 + 1 * inpredictability;
|
result *= 0.9 + 1 * inpredictability;
|
||||||
result *= 1.05 - 0.4 * EvaluateFieryAnglePunishmentOf(current);
|
result *= 1.05 - 0.4 * EvaluateFieryAnglePunishmentOf(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,29 +119,32 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
|
|||||||
return zeroFactor * angleSimilarityFactor * angleSharpnessFactor;
|
return zeroFactor * angleSimilarityFactor * angleSharpnessFactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static double EvaluateLowDensityBonusOf(DifficultyHitObject current)
|
// High AR curve
|
||||||
{
|
|
||||||
//var currObj = (OsuDifficultyHitObject)current;
|
|
||||||
|
|
||||||
//// Density = 2 in general means 3 notes on screen (it's not including current note)
|
|
||||||
//double density = CalculateDenstityOf(currObj);
|
|
||||||
|
|
||||||
//// We are considering density = 1.5 as starting point, 1.0 is noticably uncomfy and 0.5 is severely uncomfy
|
|
||||||
//double bonus = 1.5 - density;
|
|
||||||
//if (bonus <= 0) return 0;
|
|
||||||
|
|
||||||
//return Math.Pow(bonus, 2);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// https://www.desmos.com/calculator/hbj7swzlth
|
// https://www.desmos.com/calculator/hbj7swzlth
|
||||||
private static double highArCurve(double preempt)
|
public static double GetDifficulty(double preempt)
|
||||||
{
|
{
|
||||||
double value = Math.Pow(3, 3 - 0.01 * preempt); // 1 for 300ms, 0.25 for 400ms, 0.0625 for 500ms
|
double value = Math.Pow(3, 3 - 0.01 * preempt); // 1 for 300ms, 0.25 for 400ms, 0.0625 for 500ms
|
||||||
value = softmin(value, 2, 1.7); // use softmin to achieve full-memory cap, 2 times more than AR11 (300ms)
|
value = softmin(value, 2, 1.7); // use softmin to achieve full-memory cap, 2 times more than AR11 (300ms)
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is very accurate on preempt > 300ms, breaking starting somewhere around 120ms
|
||||||
|
public static double GetPreempt(double difficulty)
|
||||||
|
{
|
||||||
|
double fixCoef = difficulty / GetDifficulty(highArCurveReversed(difficulty));
|
||||||
|
return highArCurveReversed(difficulty * fixCoef);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is an approximation cuz high AR curve is unsolvable
|
||||||
|
// https://www.desmos.com/calculator/n9vk18bcyh
|
||||||
|
private static double highArCurveReversed(double value)
|
||||||
|
{
|
||||||
|
double helperValue = value / Math.Pow(1 - Math.Pow(1.7, value - 2), 0.45);
|
||||||
|
double preempt = -(Math.Log(helperValue, 3) - 3) / 0.01;
|
||||||
|
|
||||||
|
return preempt;
|
||||||
|
}
|
||||||
|
|
||||||
// We are using mutiply and divide instead of add and subtract, so values won't be negative
|
// We are using mutiply and divide instead of add and subtract, so values won't be negative
|
||||||
// https://www.desmos.com/calculator/fv5xerwpd2
|
// https://www.desmos.com/calculator/fv5xerwpd2
|
||||||
private static double softmin(double a, double b, double power = Math.E) => a * b / Math.Log(Math.Pow(power, a) + Math.Pow(power, b), power);
|
private static double softmin(double a, double b, double power = Math.E) => a * b / Math.Log(Math.Pow(power, a) + Math.Pow(power, b), power);
|
||||||
|
@ -29,9 +29,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
|
|
||||||
private readonly List<double> difficulties = new List<double>();
|
private readonly List<double> difficulties = new List<double>();
|
||||||
private int objectsCount = 0;
|
private int objectsCount = 0;
|
||||||
|
private double preempt = -1;
|
||||||
|
|
||||||
public override void Process(DifficultyHitObject current)
|
public override void Process(DifficultyHitObject current)
|
||||||
{
|
{
|
||||||
|
if (preempt < 0) preempt = ((OsuDifficultyHitObject)current).Preempt;
|
||||||
|
|
||||||
aimComponent.Process(current);
|
aimComponent.Process(current);
|
||||||
speedComponent.Process(current);
|
speedComponent.Process(current);
|
||||||
|
|
||||||
@ -61,9 +64,16 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
}
|
}
|
||||||
public override double DifficultyValue()
|
public override double DifficultyValue()
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Degree of High AR Complexity = {aimComponent.DifficultyValue() / aimComponentNoAdjust.DifficultyValue():0.##}");
|
// Get number how much high AR adjust changed difficulty
|
||||||
|
double difficultyRatio = aimComponent.DifficultyValue() / aimComponentNoAdjust.DifficultyValue();
|
||||||
|
|
||||||
// Simulating summing
|
// Calculate how much preempt should change to account for high AR adjust
|
||||||
|
double difficulty = ReadingHighAREvaluator.GetDifficulty(preempt) * difficultyRatio;
|
||||||
|
double adjustedPreempt = ReadingHighAREvaluator.GetPreempt(difficulty);
|
||||||
|
|
||||||
|
Console.WriteLine($"Degree of High AR Complexity = {difficultyRatio:0.##}, {preempt:0} -> {adjustedPreempt:0}");
|
||||||
|
|
||||||
|
// Simulating summing to get the most correct value possible
|
||||||
double aimValue = Math.Sqrt(aimComponent.DifficultyValue()) * OsuDifficultyCalculator.DIFFICULTY_MULTIPLIER;
|
double aimValue = Math.Sqrt(aimComponent.DifficultyValue()) * OsuDifficultyCalculator.DIFFICULTY_MULTIPLIER;
|
||||||
double speedValue = Math.Sqrt(speedComponent.DifficultyValue()) * OsuDifficultyCalculator.DIFFICULTY_MULTIPLIER;
|
double speedValue = Math.Sqrt(speedComponent.DifficultyValue()) * OsuDifficultyCalculator.DIFFICULTY_MULTIPLIER;
|
||||||
|
|
||||||
@ -78,8 +88,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
totalPerformance *= lengthBonus;
|
totalPerformance *= lengthBonus;
|
||||||
|
|
||||||
double adjustedDifficulty = OsuStrainSkill.PerformanceToDifficulty(totalPerformance);
|
double adjustedDifficulty = OsuStrainSkill.PerformanceToDifficulty(totalPerformance);
|
||||||
|
double difficultyValue = Math.Pow(adjustedDifficulty / OsuDifficultyCalculator.DIFFICULTY_MULTIPLIER, 2.0);
|
||||||
|
|
||||||
return Math.Pow(adjustedDifficulty / OsuDifficultyCalculator.DIFFICULTY_MULTIPLIER, 2.0);
|
return 75 * Math.Sqrt(difficultyValue * difficulty);
|
||||||
|
// return difficultyValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +106,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
private bool adjustHighAR;
|
private bool adjustHighAR;
|
||||||
private double currentStrain;
|
private double currentStrain;
|
||||||
|
|
||||||
private double skillMultiplier => 19;
|
private double skillMultiplier => 18.5;
|
||||||
private double strainDecayBase => 0.15;
|
private double strainDecayBase => 0.15;
|
||||||
|
|
||||||
private double strainDecay(double ms) => Math.Pow(strainDecayBase, ms / 1000);
|
private double strainDecay(double ms) => Math.Pow(strainDecayBase, ms / 1000);
|
||||||
@ -109,14 +121,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
aimDifficulty *= ReadingHighAREvaluator.EvaluateDifficultyOf(current, adjustHighAR);
|
aimDifficulty *= ReadingHighAREvaluator.EvaluateDifficultyOf(current, adjustHighAR);
|
||||||
aimDifficulty *= skillMultiplier;
|
aimDifficulty *= skillMultiplier;
|
||||||
|
|
||||||
double totalStrain = currentStrain;
|
|
||||||
|
|
||||||
currentStrain += aimDifficulty;
|
currentStrain += aimDifficulty;
|
||||||
totalStrain += aimDifficulty;
|
|
||||||
|
|
||||||
// Console.WriteLine($"{current.BaseObject.StartTime},{aimDifficulty:0.#}");
|
return currentStrain;
|
||||||
|
|
||||||
return totalStrain;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user