Skip to content

Commit

Permalink
Completely disable Pass 2 and Pass 3
Browse files Browse the repository at this point in the history
  • Loading branch information
timoschwarzer committed Jul 7, 2024
1 parent 3fe58cf commit 78bca9e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/kotlin/wotw/server/database/model/LeagueSeason.kt
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ class LeagueSeason(id: EntityID<Long>) : LongEntity(id) {
submission.rankingMultiplier = (1.0 - seasonProgress).toFloat()
}

/*
// Pass 2: Find outliers and discard them right away as much as possible
for (submission in submissions) {
if (additionalPartsDiscarded >= availableAdditionalParts) {
Expand All @@ -235,12 +236,15 @@ class LeagueSeason(id: EntityID<Long>) : LongEntity(id) {
val partRequestedToDiscardAdditionally = max(0.0, inverseLerp(outlierMaxPoints, outlierMinPoints, submission.points.toDouble()))
val partToActuallyDiscardAdditionally = min(
submission.rankingMultiplier.toDouble(),
min(partRequestedToDiscardAdditionally, availableAdditionalParts - additionalPartsDiscarded)
val partToActuallyDiscardAdditionally = max(
0.0f,
min(
submission.rankingMultiplier.toDouble(),
min(partRequestedToDiscardAdditionally, availableAdditionalParts - additionalPartsDiscarded)
).toFloat()
)
submission.rankingMultiplier -= partToActuallyDiscardAdditionally.toFloat()
submission.rankingMultiplier -= partToActuallyDiscardAdditionally
additionalPartsDiscarded += partToActuallyDiscardAdditionally
}
Expand All @@ -254,6 +258,7 @@ class LeagueSeason(id: EntityID<Long>) : LongEntity(id) {
val additionalMultiplier = pointsToBoost / gameNearestToAverage.points
gameNearestToAverage.rankingMultiplier += additionalMultiplier.toFloat()
}
*/

// Calculate leaderboard points
membership.points = submissions.sumOf { (it.points * it.rankingMultiplier).toInt() }
Expand Down

0 comments on commit 78bca9e

Please sign in to comment.