1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 11:02:54 +08:00

TAIKO-6 Tweak encoding and parameters, reduce rhythm weight

This commit is contained in:
vun 2022-07-07 16:04:46 +08:00
parent f6dedc77fb
commit 6660379a0e
7 changed files with 54 additions and 56 deletions

View File

@ -53,7 +53,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Evaluators
/// </summary> /// </summary>
public static void PreEvaluateDifficulties(CoupledColourEncoding encoding) public static void PreEvaluateDifficulties(CoupledColourEncoding encoding)
{ {
double coupledEncodingDifficulty = EvaluateDifficultyOf(encoding); double coupledEncodingDifficulty = 2 * EvaluateDifficultyOf(encoding);
encoding.Payload[0].Payload[0].EncodedData[0].Colour!.EvaluatedDifficulty += coupledEncodingDifficulty; encoding.Payload[0].Payload[0].EncodedData[0].Colour!.EvaluatedDifficulty += coupledEncodingDifficulty;
for (int i = 0; i < encoding.Payload.Count; i++) for (int i = 0; i < encoding.Payload.Count; i++)
{ {
@ -63,7 +63,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Evaluators
for (int j = 0; j < colourEncoding.Payload.Count; j++) for (int j = 0; j < colourEncoding.Payload.Count; j++)
{ {
MonoEncoding monoEncoding = colourEncoding.Payload[j]; MonoEncoding monoEncoding = colourEncoding.Payload[j];
monoEncoding.EncodedData[0].Colour!.EvaluatedDifficulty += EvaluateDifficultyOf(monoEncoding, j) * colourEncodingDifficulty; monoEncoding.EncodedData[0].Colour!.EvaluatedDifficulty += EvaluateDifficultyOf(monoEncoding, j) * colourEncodingDifficulty * 0.5;
} }
} }
} }

View File

@ -16,8 +16,8 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Evaluators
/// <param name="interval">The interval between the current and previous note hit using the same key.</param> /// <param name="interval">The interval between the current and previous note hit using the same key.</param>
private static double speedBonus(double interval) private static double speedBonus(double interval)
{ {
// return 10 / Math.Pow(interval, 0.6); // return 15 / Math.Pow(interval, 0.6);
return Math.Pow(0.1, interval / 1000); return Math.Pow(0.2, interval / 1000);
} }
/// <summary> /// <summary>

View File

@ -7,7 +7,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour
{ {
public List<MonoEncoding> Payload { get; private set; } = new List<MonoEncoding>(); public List<MonoEncoding> Payload { get; private set; } = new List<MonoEncoding>();
public bool isIdenticalTo(ColourEncoding other) public bool isRepetitionOf(ColourEncoding other)
{ {
return hasIdenticalMonoLength(other) && return hasIdenticalMonoLength(other) &&
other.Payload.Count == Payload.Count && other.Payload.Count == Payload.Count &&

View File

@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour
Previous = lastEncoded Previous = lastEncoded
}; };
bool isCoupled = i < data.Count - 2 && data[i].isIdenticalTo(data[i + 2]); bool isCoupled = i < data.Count - 2 && data[i].isRepetitionOf(data[i + 2]);
if (!isCoupled) if (!isCoupled)
{ {
lastEncoded.Payload.Add(data[i]); lastEncoded.Payload.Add(data[i]);
@ -52,7 +52,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour
lastEncoded.Payload.Add(data[i]); lastEncoded.Payload.Add(data[i]);
i++; i++;
isCoupled = i < data.Count - 2 && data[i].isIdenticalTo(data[i + 2]); isCoupled = i < data.Count - 2 && data[i].isRepetitionOf(data[i + 2]);
} }
// Skip over peeked data and add the rest to the payload // Skip over peeked data and add the rest to the payload

View File

@ -2,12 +2,9 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System; using System;
using System.Collections.Generic;
using osu.Game.Rulesets.Difficulty.Preprocessing; using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Difficulty.Skills; using osu.Game.Rulesets.Difficulty.Skills;
using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing;
using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour;
using osu.Game.Rulesets.Taiko.Difficulty.Evaluators; using osu.Game.Rulesets.Taiko.Difficulty.Evaluators;
namespace osu.Game.Rulesets.Taiko.Difficulty.Skills namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
@ -17,7 +14,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
/// </summary> /// </summary>
public class Colour : StrainDecaySkill public class Colour : StrainDecaySkill
{ {
protected override double SkillMultiplier => 0.2; protected override double SkillMultiplier => 0.12;
protected override double StrainDecayBase => 0.8; protected override double StrainDecayBase => 0.8;
/// <summary> /// <summary>
@ -40,33 +37,34 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
return difficulty; return difficulty;
} }
public static String GetDebugHeaderLabels() // TODO: Remove before pr
{ // public static String GetDebugHeaderLabels()
return "StartTime,Raw,Decayed,CoupledRunLength,RepetitionInterval,EncodingRunLength,Payload(MonoRunLength|MonoCount)"; // {
} // return "StartTime,Raw,Decayed,CoupledRunLength,RepetitionInterval,EncodingRunLength,Payload(MonoRunLength|MonoCount)";
// }
// TODO: Remove befor pr // // TODO: Remove before pr
public string GetDebugString(DifficultyHitObject current) // public string GetDebugString(DifficultyHitObject current)
{ // {
double difficulty = ColourEvaluator.EvaluateDifficultyOf(current); // double difficulty = ColourEvaluator.EvaluateDifficultyOf(current);
difficulty *= speedBonus(current.DeltaTime); // difficulty *= speedBonus(current.DeltaTime);
TaikoDifficultyHitObject? taikoCurrent = (TaikoDifficultyHitObject)current; // TaikoDifficultyHitObject? taikoCurrent = (TaikoDifficultyHitObject)current;
TaikoDifficultyHitObjectColour? colour = taikoCurrent?.Colour; // TaikoDifficultyHitObjectColour? colour = taikoCurrent?.Colour;
if (taikoCurrent != null && colour != null) // if (taikoCurrent != null && colour != null)
{ // {
List<ColourEncoding> payload = colour.Encoding.Payload; // List<ColourEncoding> payload = colour.Encoding.Payload;
string payloadDisplay = ""; // string payloadDisplay = "";
for (int i = 0; i < payload.Count; ++i) // for (int i = 0; i < payload.Count; ++i)
{ // {
payloadDisplay += $"({payload[i].Payload[0].RunLength}|{payload[i].Payload.Count})"; // payloadDisplay += $"({payload[i].Payload[0].RunLength}|{payload[i].Payload.Count})";
} // }
return $"{current.StartTime},{difficulty},{CurrentStrain},{colour.Encoding.Payload[0].Payload.Count},{colour.Encoding.RepetitionInterval},{colour.Encoding.Payload.Count},{payloadDisplay}"; // return $"{current.StartTime},{difficulty},{CurrentStrain},{colour.Encoding.Payload[0].Payload.Count},{colour.Encoding.RepetitionInterval},{colour.Encoding.Payload.Count},{payloadDisplay}";
} // }
else // else
{ // {
return $"{current.StartTime},{difficulty},{CurrentStrain},0,0,0,0,0"; // return $"{current.StartTime},{difficulty},{CurrentStrain},0,0,0,0,0";
} // }
} // }
} }
} }

View File

@ -11,11 +11,11 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
{ {
public class Peaks : Skill public class Peaks : Skill
{ {
private const double rhythm_skill_multiplier = 0.3 * final_multiplier; private const double rhythm_skill_multiplier = 0.2 * final_multiplier;
private const double colour_skill_multiplier = 0.4 * final_multiplier; private const double colour_skill_multiplier = 0.375 * final_multiplier;
private const double stamina_skill_multiplier = 0.35 * final_multiplier; private const double stamina_skill_multiplier = 0.375 * final_multiplier;
private const double final_multiplier = 0.06; private const double final_multiplier = 0.0625;
private readonly Rhythm rhythm; private readonly Rhythm rhythm;
private readonly Colour colour; private readonly Colour colour;
@ -26,8 +26,8 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
public double StaminaDifficultyValue => stamina.DifficultyValue() * stamina_skill_multiplier; public double StaminaDifficultyValue => stamina.DifficultyValue() * stamina_skill_multiplier;
// TODO: remove before pr // TODO: remove before pr
private StreamWriter? colourDebugOutput; // private StreamWriter? colourDebugOutput;
bool debugColour = false; // bool debugColour = false;
public Peaks(Mod[] mods, IBeatmap beatmap) public Peaks(Mod[] mods, IBeatmap beatmap)
: base(mods) : base(mods)
@ -36,13 +36,13 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
colour = new Colour(mods); colour = new Colour(mods);
stamina = new Stamina(mods); stamina = new Stamina(mods);
if (debugColour) // if (debugColour)
{ // {
String filename = $"{beatmap.BeatmapInfo.OnlineID} - {beatmap.BeatmapInfo.Metadata.Title}[{beatmap.BeatmapInfo.DifficultyName}].csv"; // String filename = $"{beatmap.BeatmapInfo.OnlineID} - {beatmap.BeatmapInfo.Metadata.Title}[{beatmap.BeatmapInfo.DifficultyName}].csv";
filename = filename.Replace('/', '_'); // filename = filename.Replace('/', '_');
colourDebugOutput = new StreamWriter(File.OpenWrite($"/run/mount/secondary/workspace/osu/output/colour-debug/{filename}")); // colourDebugOutput = new StreamWriter(File.OpenWrite($"/run/mount/secondary/workspace/osu/output/colour-debug/{filename}"));
colourDebugOutput.WriteLine(Colour.GetDebugHeaderLabels()); // colourDebugOutput.WriteLine(Colour.GetDebugHeaderLabels());
} // }
} }
@ -59,11 +59,11 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
colour.Process(current); colour.Process(current);
stamina.Process(current); stamina.Process(current);
if (debugColour && colourDebugOutput != null) // if (debugColour && colourDebugOutput != null)
{ // {
colourDebugOutput.WriteLine(colour.GetDebugString(current)); // colourDebugOutput.WriteLine(colour.GetDebugString(current));
colourDebugOutput.Flush(); // colourDebugOutput.Flush();
} // }
} }
/// <summary> /// <summary>

View File

@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
/// </remarks> /// </remarks>
public class Stamina : StrainDecaySkill public class Stamina : StrainDecaySkill
{ {
protected override double SkillMultiplier => 1.2; protected override double SkillMultiplier => 1.1;
protected override double StrainDecayBase => 0.4; protected override double StrainDecayBase => 0.4;
/// <summary> /// <summary>