Skip to content

Commit 23b9696

Browse files
committed
restrict ladders to players of last 30 days, slightly increase decay, much lower ranking threshold
1 parent 889c0eb commit 23b9696

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

Shared/PlasmaShared/GlobalConst.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ public static BasicHttpBinding CreateBasicHttpBinding()
135135
public const int MinDurationForElo = 60;
136136
public const int MinDurationForPlanetwars = 0;
137137

138-
public const int LadderActivityDays = 70;
138+
public const int LadderActivityDays = 30;
139139
public const int LadderSize = 50; // Amount of players shown on ladders
140-
public const float MinimumDynamicMaxLadderUncertainty = 50; // uncertainties > this are marked unranked, max age ~ 2-3 months
141-
public const float EloDecayPerDaySquared = 30; //whr thingie
140+
public const float MinimumDynamicMaxLadderUncertainty = 100; // uncertainties > this are marked unranked, max age ~ 2-3 months
141+
public const float EloDecayPerDaySquared = 35; //whr thingie
142142
public const float LadderUpdatePeriod = 1; //Ladder is fully updated every X hours
143143

144144
public const int XpForMissionOrBots = 25;

ZkData/Ef/WHR/WholeHistoryRating.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,10 @@ private void UpdateRankings(IEnumerable<Player> players)
347347
float[] playerUncertainties = new float[playerRatings.Count];
348348
int index = 0;
349349
float DynamicMaxUncertainty = GlobalConst.MinimumDynamicMaxLadderUncertainty;
350+
int maxAge = GlobalConst.LadderActivityDays;
350351
foreach (var pair in playerRatings)
351352
{
353+
if (currentDay - pair.Value.LastGameDate > maxAge) continue;
352354
playerUncertainties[index++] = (float)pair.Value.Uncertainty;
353355
}
354356
Array.Sort(playerUncertainties);
@@ -359,7 +361,7 @@ private void UpdateRankings(IEnumerable<Player> players)
359361
int matched = 0;
360362
foreach (var pair in sortedPlayers)
361363
{
362-
if (playerRatings[pair.Value].Uncertainty <= DynamicMaxUncertainty)
364+
if (playerRatings[pair.Value].Uncertainty <= DynamicMaxUncertainty && currentDay - playerRatings[pair.Value].LastGameDate <= maxAge)
363365
{
364366
newTopPlayers.Add(pair.Value);
365367
if (rank == matched && rank < topPlayers.Count && topPlayers[rank] == pair.Value) matched++;

0 commit comments

Comments
 (0)