Skip to content

Commit

Permalink
Merge pull request ppy#1 from pw384/master
Browse files Browse the repository at this point in the history
Replace weight decay of geometric sequence with harmonic sequence
  • Loading branch information
Lawtrohux authored Dec 7, 2021
2 parents c38d8d9 + 199ab60 commit 03f5e1d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,16 @@ private double locallyCombinedDifficulty(Colour colour, Rhythm rhythm, Stamina s
}

double difficulty = 0;
double weight = 1;
double weight = 4;

foreach (double strain in peaks.OrderByDescending(d => d))
{
difficulty += strain * weight;
weight *= 0.9;
difficulty += strain * (1/weight);
weight += 1;
}

difficulty = difficulty * 2.56;

return difficulty;
}

Expand Down

0 comments on commit 03f5e1d

Please sign in to comment.