mirror of
https://github.com/ppy/osu.git
synced 2025-03-14 05:47:20 +08:00
Rename cognition to reading
This commit is contained in:
parent
090b408229
commit
82cbdccb57
@ -11,9 +11,9 @@ using osu.Game.Rulesets.Osu.Objects;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
|
||||
{
|
||||
public static class CognitionEvaluator
|
||||
public static class ReadingEvaluator
|
||||
{
|
||||
private const double cognition_window_size = 3000;
|
||||
private const double reading_window_size = 3000;
|
||||
|
||||
public static double EvaluateDifficultyOf(DifficultyHitObject current, bool hidden)
|
||||
{
|
||||
@ -21,8 +21,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
|
||||
return 0;
|
||||
|
||||
var currObj = (OsuDifficultyHitObject)current;
|
||||
var prevObj = (OsuDifficultyHitObject)current.Previous(0);
|
||||
|
||||
double currVelocity = currObj.LazyJumpDistance / currObj.StrainTime;
|
||||
|
||||
// Maybe I should just pass in clockrate...
|
||||
@ -38,8 +36,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
|
||||
|
||||
foreach (var loopObj in pastVisibleObjects)
|
||||
{
|
||||
var prevLoopObj = loopObj.Previous(0) as OsuDifficultyHitObject;
|
||||
|
||||
double loopDifficulty = currObj.OpacityAt(loopObj.BaseObject.StartTime, false);
|
||||
|
||||
// Small distances means objects may be cheesed, so it doesn't matter whether they are arranged confusingly.
|
||||
@ -80,7 +76,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
|
||||
{
|
||||
OsuDifficultyHitObject loopObj = (OsuDifficultyHitObject)current.Previous(i);
|
||||
|
||||
if (loopObj.IsNull() || current.StartTime - loopObj.StartTime > cognition_window_size)
|
||||
if (loopObj.IsNull() || current.StartTime - loopObj.StartTime > reading_window_size)
|
||||
break;
|
||||
|
||||
objects.Add(loopObj);
|
@ -39,10 +39,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
public double FlashlightDifficulty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The difficulty corresponding to the cognition skill.
|
||||
/// The difficulty corresponding to the reading skill.
|
||||
/// </summary>
|
||||
[JsonProperty("cognition_difficulty")]
|
||||
public double CognitionDifficulty { get; set; }
|
||||
[JsonProperty("reading_difficulty")]
|
||||
public double ReadingDifficulty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Describes how much of <see cref="AimDifficulty"/> is contributed to by hitcircles or sliders.
|
||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
double speedRating = Math.Sqrt(skills[2].DifficultyValue()) * difficulty_multiplier;
|
||||
double speedNotes = ((Speed)skills[2]).RelevantNoteCount();
|
||||
double flashlightRating = Math.Sqrt(skills[3].DifficultyValue()) * difficulty_multiplier;
|
||||
double cognitionRating = Math.Sqrt(skills[4].DifficultyValue()) * difficulty_multiplier;
|
||||
double readingRating = Math.Sqrt(skills[4].DifficultyValue()) * difficulty_multiplier;
|
||||
|
||||
double sliderFactor = aimRating > 0 ? aimRatingNoSliders / aimRating : 1;
|
||||
|
||||
@ -65,14 +65,14 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
if (mods.Any(h => h is OsuModFlashlight))
|
||||
baseFlashlightPerformance = Math.Pow(flashlightRating, 2.0) * 25.0;
|
||||
|
||||
double baseCognitionPerformance = Math.Pow(5 * Math.Max(1, cognitionRating / 0.0675) - 4, 3) / 100000;
|
||||
double baseReadingPerformance = Math.Pow(5 * Math.Max(1, readingRating / 0.0675) - 4, 3) / 100000;
|
||||
|
||||
double basePerformance =
|
||||
Math.Pow(
|
||||
Math.Pow(baseAimPerformance, 1.1) +
|
||||
Math.Pow(baseSpeedPerformance, 1.1) +
|
||||
Math.Pow(baseFlashlightPerformance, 1.1) +
|
||||
Math.Pow(baseCognitionPerformance, 1.1), 1.0 / 1.1
|
||||
Math.Pow(baseReadingPerformance, 1.1), 1.0 / 1.1
|
||||
);
|
||||
|
||||
double starRating = basePerformance > 0.00001 ? Math.Cbrt(OsuPerformanceCalculator.PERFORMANCE_BASE_MULTIPLIER) * 0.027 * (Math.Cbrt(100000 / Math.Pow(2, 1 / 1.1) * basePerformance) + 4) : 0;
|
||||
@ -98,7 +98,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
SpeedDifficulty = speedRating,
|
||||
SpeedNoteCount = speedNotes,
|
||||
FlashlightDifficulty = flashlightRating,
|
||||
CognitionDifficulty = cognitionRating,
|
||||
ReadingDifficulty = readingRating,
|
||||
SliderFactor = sliderFactor,
|
||||
ApproachRate = preempt > 1200 ? (1800 - preempt) / 120 : (1200 - preempt) / 150 + 5,
|
||||
OverallDifficulty = (80 - hitWindowGreat) / 6,
|
||||
@ -133,7 +133,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
new Aim(mods, false),
|
||||
new Speed(mods),
|
||||
new Flashlight(mods),
|
||||
new Cognition(mods),
|
||||
new Reading(mods),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
[JsonProperty("flashlight")]
|
||||
public double Flashlight { get; set; }
|
||||
|
||||
[JsonProperty("cognition")]
|
||||
public double Cognition { get; set; }
|
||||
[JsonProperty("reading")]
|
||||
public double Reading { get; set; }
|
||||
|
||||
[JsonProperty("effective_miss_count")]
|
||||
public double EffectiveMissCount { get; set; }
|
||||
@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
yield return new PerformanceDisplayAttribute(nameof(Speed), "Speed", Speed);
|
||||
yield return new PerformanceDisplayAttribute(nameof(Accuracy), "Accuracy", Accuracy);
|
||||
yield return new PerformanceDisplayAttribute(nameof(Flashlight), "Flashlight Bonus", Flashlight);
|
||||
yield return new PerformanceDisplayAttribute(nameof(Cognition), "Cognition", Cognition);
|
||||
yield return new PerformanceDisplayAttribute(nameof(Reading), "Reading", Reading);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,14 +67,14 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
double speedValue = computeSpeedValue(score, osuAttributes);
|
||||
double accuracyValue = computeAccuracyValue(score, osuAttributes);
|
||||
double flashlightValue = computeFlashlightValue(score, osuAttributes);
|
||||
double cognitionValue = computeCognitionValue(score, osuAttributes);
|
||||
double readingValue = computeReadingValue(score, osuAttributes);
|
||||
double totalValue =
|
||||
Math.Pow(
|
||||
Math.Pow(aimValue, 1.1) +
|
||||
Math.Pow(speedValue, 1.1) +
|
||||
Math.Pow(accuracyValue, 1.1) +
|
||||
Math.Pow(flashlightValue, 1.1) +
|
||||
Math.Pow(cognitionValue, 1.1), 1.0 / 1.1
|
||||
Math.Pow(readingValue, 1.1), 1.0 / 1.1
|
||||
) * multiplier;
|
||||
|
||||
return new OsuPerformanceAttributes
|
||||
@ -83,7 +83,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
Speed = speedValue,
|
||||
Accuracy = accuracyValue,
|
||||
Flashlight = flashlightValue,
|
||||
Cognition = cognitionValue,
|
||||
Reading = readingValue,
|
||||
EffectiveMissCount = effectiveMissCount,
|
||||
Total = totalValue
|
||||
};
|
||||
@ -237,27 +237,27 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
return flashlightValue;
|
||||
}
|
||||
|
||||
private double computeCognitionValue(ScoreInfo score, OsuDifficultyAttributes attributes)
|
||||
private double computeReadingValue(ScoreInfo score, OsuDifficultyAttributes attributes)
|
||||
{
|
||||
double rawCognition = attributes.CognitionDifficulty;
|
||||
double rawReading = attributes.ReadingDifficulty;
|
||||
|
||||
if (score.Mods.Any(m => m is OsuModTouchDevice))
|
||||
rawCognition = Math.Pow(rawCognition, 0.8);
|
||||
rawReading = Math.Pow(rawReading, 0.8);
|
||||
|
||||
double cognitionValue = Math.Pow(rawCognition, 2.0) * 25.0;
|
||||
double readingValue = Math.Pow(rawReading, 2.0) * 25.0;
|
||||
|
||||
// Penalize misses by assessing # of misses relative to the total # of objects. Default a 3% reduction for any # of misses.
|
||||
if (effectiveMissCount > 0)
|
||||
cognitionValue *= 0.97 * Math.Pow(1 - Math.Pow(effectiveMissCount / totalHits, 0.775), Math.Pow(effectiveMissCount, .875));
|
||||
readingValue *= 0.97 * Math.Pow(1 - Math.Pow(effectiveMissCount / totalHits, 0.775), Math.Pow(effectiveMissCount, .875));
|
||||
|
||||
cognitionValue *= getComboScalingFactor(attributes);
|
||||
readingValue *= getComboScalingFactor(attributes);
|
||||
|
||||
// Scale the cognition value with accuracy _harshly_.
|
||||
cognitionValue *= accuracy * accuracy;
|
||||
// Scale the reading value with accuracy _harshly_.
|
||||
readingValue *= accuracy * accuracy;
|
||||
// It is important to also consider accuracy difficulty when doing that.
|
||||
cognitionValue *= 0.98 + Math.Pow(attributes.OverallDifficulty, 2) / 2500;
|
||||
readingValue *= 0.98 + Math.Pow(attributes.OverallDifficulty, 2) / 2500;
|
||||
|
||||
return cognitionValue;
|
||||
return readingValue;
|
||||
}
|
||||
|
||||
private double calculateEffectiveMissCount(OsuDifficultyAttributes attributes)
|
||||
|
@ -11,19 +11,19 @@ using osu.Game.Rulesets.Osu.Mods;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
{
|
||||
public class Cognition : Skill
|
||||
public class Reading : Skill
|
||||
{
|
||||
private readonly List<double> difficulties = new List<double>();
|
||||
private readonly bool hasHiddenMod;
|
||||
private const double skill_multiplier = 2.4;
|
||||
|
||||
public Cognition(Mod[] mods)
|
||||
public Reading(Mod[] mods)
|
||||
: base(mods)
|
||||
{
|
||||
hasHiddenMod = mods.Any(m => m is OsuModHidden);
|
||||
}
|
||||
|
||||
public override void Process(DifficultyHitObject current) => difficulties.Add(CognitionEvaluator.EvaluateDifficultyOf(current, hasHiddenMod) * skill_multiplier);
|
||||
public override void Process(DifficultyHitObject current) => difficulties.Add(ReadingEvaluator.EvaluateDifficultyOf(current, hasHiddenMod) * skill_multiplier);
|
||||
|
||||
public override double DifficultyValue()
|
||||
{
|
Loading…
x
Reference in New Issue
Block a user