From 7d34542c12a8e1db707d101fc7988e32e9da74d8 Mon Sep 17 00:00:00 2001 From: TextAdventurer12 Date: Thu, 22 Feb 2024 15:14:56 +1300 Subject: [PATCH 1/5] use difficulty instead of topstrain --- osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs index 918e702b45..13d89cf2b8 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs @@ -37,6 +37,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills protected virtual double DifficultyMultiplier => DEFAULT_DIFFICULTY_MULTIPLIER; protected List objectStrains = new List(); + protected double difficulty; protected OsuStrainSkill(Mod[] mods) : base(mods) @@ -45,7 +46,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills public override double DifficultyValue() { - double difficulty = 0; + difficulty = 0; double weight = 1; // Sections with 0 strain are excluded to avoid worst-case time complexity of the following sort (e.g. /b/2351871). @@ -78,9 +79,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills /// public double CountDifficultStrains() { - double topStrain = objectStrains.Max(); + double consistentTopStrain = difficulty / 10; // What would the top strain be if all strain values were identical - return objectStrains.Sum(s => Math.Pow(s / topStrain, 4)); + return objectStrains.Sum(s => Math.Pow(1, s / consistentTopStrain, 5)); } } } From 0db910deb90b792f41203ee9410ef6dc05231308 Mon Sep 17 00:00:00 2001 From: TextAdventurer12 Date: Thu, 22 Feb 2024 15:20:32 +1300 Subject: [PATCH 2/5] cap each note at adding 1 difficult strain count --- osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs index 13d89cf2b8..84bf8e3bf6 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs @@ -81,7 +81,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills { double consistentTopStrain = difficulty / 10; // What would the top strain be if all strain values were identical - return objectStrains.Sum(s => Math.Pow(1, s / consistentTopStrain, 5)); + return objectStrains.Sum(s => Math.Pow(Math.Min(1, s / consistentTopStrain), 5)); } } } From 9f5f6b5d37405787a4308db875331060f54572b4 Mon Sep 17 00:00:00 2001 From: TextAdventurer12 Date: Sat, 6 Apr 2024 21:39:27 +1300 Subject: [PATCH 3/5] stop capping difficult strains per note --- osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs index 84bf8e3bf6..b585a30855 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs @@ -81,7 +81,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills { double consistentTopStrain = difficulty / 10; // What would the top strain be if all strain values were identical - return objectStrains.Sum(s => Math.Pow(Math.Min(1, s / consistentTopStrain), 5)); + // Apply a power to nerf diffspikes, but only apply that power if s / adjustedDifficulty is less than 1, to prevent buffing certain spiky maps + return objectStrains.Sum(s => s >= adjustedDifficulty ? s / adjustedDifficulty : Math.Pow(s / adjustedDifficulty, 8)); } } -} +} \ No newline at end of file From b32d73ec9b7be94b3f55a7007e236cffd9228ca1 Mon Sep 17 00:00:00 2001 From: TextAdventurer12 Date: Sat, 13 Apr 2024 02:43:33 +1200 Subject: [PATCH 4/5] adjust weighting function --- osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs index b585a30855..c20ea732ec 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs @@ -80,9 +80,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills public double CountDifficultStrains() { double consistentTopStrain = difficulty / 10; // What would the top strain be if all strain values were identical - - // Apply a power to nerf diffspikes, but only apply that power if s / adjustedDifficulty is less than 1, to prevent buffing certain spiky maps - return objectStrains.Sum(s => s >= adjustedDifficulty ? s / adjustedDifficulty : Math.Pow(s / adjustedDifficulty, 8)); + // Use a weighted sum of all strains. Constants are arbitrary and give nice values + return objectStrains.Sum(s => 1.3 / (1 + Math.Exp(-14.15 * (Math.Pow(s / consistentTopStrain, 2) - 0.945)))); } } } \ No newline at end of file From e2a5d1904b000965f009ee746a3175396011e3fc Mon Sep 17 00:00:00 2001 From: TextAdventurer12 Date: Wed, 17 Apr 2024 01:21:06 +1200 Subject: [PATCH 5/5] adjust count difficult strains formula --- osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs index c20ea732ec..beaf1d1288 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs @@ -81,7 +81,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills { double consistentTopStrain = difficulty / 10; // What would the top strain be if all strain values were identical // Use a weighted sum of all strains. Constants are arbitrary and give nice values - return objectStrains.Sum(s => 1.3 / (1 + Math.Exp(-14.15 * (Math.Pow(s / consistentTopStrain, 2) - 0.945)))); + return objectStrains.Sum(s => 1.1 / (1 + Math.Exp(-10 * (s / consistentTopStrain - 0.88)))); } } } \ No newline at end of file