File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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 ++ ;
You can’t perform that action at this time.
0 commit comments