Ranking formula refinements (#3288)
* Reduce the maximum scaling time from 600s to 500s 8m20s is already much longer than nearly all ranked races will be, so it matters most for eliminated players. It would be too punishing if kept to 600 with the new time scaling method. * New helper function for ranking computations * Make short races less important for ranking points And long races more important
This commit is contained in:
parent
05572b0084
commit
7c14fd28ba
@ -970,13 +970,13 @@ void ServerLobby::computeNewRankings()
|
||||
{
|
||||
result = 0.0;
|
||||
ranking_importance = mode_factor *
|
||||
MAX_SCALING_TIME * MAX_POINTS_PER_SECOND * player_factors;
|
||||
scalingValueForTime(MAX_SCALING_TIME) * player_factors;
|
||||
}
|
||||
else if (!players[j])
|
||||
{
|
||||
result = 1.0;
|
||||
ranking_importance = mode_factor *
|
||||
MAX_SCALING_TIME * MAX_POINTS_PER_SECOND * player_factors;
|
||||
scalingValueForTime(MAX_SCALING_TIME) * player_factors;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -994,10 +994,11 @@ void ServerLobby::computeNewRankings()
|
||||
(player1_time - player2_time) / (player2_time / 20.0);
|
||||
result = std::max(0.0, 0.5 - result);
|
||||
}
|
||||
|
||||
float max_time = std::min(std::max(player1_time, player2_time),
|
||||
MAX_SCALING_TIME);
|
||||
ranking_importance = mode_factor *
|
||||
std::min(
|
||||
std::max(player1_time, player2_time), MAX_SCALING_TIME) *
|
||||
MAX_POINTS_PER_SECOND * player_factors;
|
||||
scalingValueForTime(max_time) * player_factors;
|
||||
}
|
||||
// Compute the ranking change
|
||||
scores_change[i] +=
|
||||
@ -1070,6 +1071,15 @@ double ServerLobby::getModeSpread()
|
||||
return 1.4;
|
||||
} // getModeSpread
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** Compute the scaling value of a given time
|
||||
* Short races are more random, so we don't use strict proportionality
|
||||
*/
|
||||
double ServerLobby::scalingValueForTime(float time)
|
||||
{
|
||||
return time * sqrt(time/120.0) * MAX_POINTS_PER_SECOND;
|
||||
} // scalingValueForTime
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** Manages the distribution of the base points.
|
||||
* Gives half of the points progressively
|
||||
|
@ -106,7 +106,7 @@ private:
|
||||
/* Ranking related variables */
|
||||
// If updating the base points, update the base points distribution in DB
|
||||
const double BASE_RANKING_POINTS = 4000.0;
|
||||
const double MAX_SCALING_TIME = 600.0;
|
||||
const double MAX_SCALING_TIME = 500.0;
|
||||
const double MAX_POINTS_PER_SECOND = 0.125;
|
||||
|
||||
/** Online id to profile map, handling disconnection in ranked server */
|
||||
@ -197,6 +197,7 @@ private:
|
||||
double distributeBasePoints(uint32_t online_id);
|
||||
double getModeFactor();
|
||||
double getModeSpread();
|
||||
double scalingValueForTime(float time);
|
||||
void checkRaceFinished();
|
||||
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user