|
SuperTuxKart
|
Public Member Functions | |
| void | computeNewRankings (std::vector< RaceResultData > &data, bool time_trial) |
| Compute the new player's rankings used in ranked servers. | |
| void | cleanup () |
| void | fill (uint32_t online_id, const XMLNode *result, std::shared_ptr< NetworkPlayerProfile > npp) |
| bool | has (uint32_t online_id) |
| double | getDelta (uint32_t online_id) |
| const RankingEntry | getScores (uint32_t online_id) const |
| const RankingEntry | getTemporaryPenalizedScores (uint32_t online_id) const |
Static Private Member Functions | |
| static double | getModeFactor (bool time_trial) |
| Returns the mode race importance factor, used to make ranking move slower in more random modes. | |
| static double | getModeSpread (bool time_trial) |
| Returns the mode spread factor, used so that a similar difference in skill will result in a similar ranking difference in more random modes. | |
| static double | getTimeSpread (double time) |
| Returns the time spread factor. More... | |
| static double | scalingValueForTime (double time) |
| Compute the scaling value of a given time This is linear to race duration, getTimeSpread takes care of expecting a more random result in shorter races. | |
| static double | computeH2HResult (double player1_time, double player2_time) |
| Computes the score of a head-to-head minimatch. More... | |
| static double | computeDataAccuracy (double player1_rd, double player2_rd, double player1_scores, double player2_scores, int player_count, bool handicap_used) |
| Computes a relative factor indicating how much informative value the new race result gives us. More... | |
Private Attributes | |
| std::map< uint32_t, RankingEntryAndProfile > | m_entries |
| std::map< uint32_t, RankingEntry > | m_old_entries |
|
staticprivate |
Computes a relative factor indicating how much informative value the new race result gives us.
For a player with a high own rating deviation, the current rating is unreliable so any new data holds more importance. This is crucial to allow reasonably fast rating convergence of new players, provided they play accurately rated opponents.
When the opponent has a high rating deviation, the expected scores are likely off. Therefore, the information from such a result is much less valuable.
We also reduce rating changes when the player ratings are very different, even after considering the uncertainties from rating deviation. This is multi-purpose :
A downside of this method is that a legitimate loss to a much lower rated player won't change the rating much, but these are rare enough that it's better to miss them than to reward "farming" and to incorrectly reward wins due to external factors.
In a race with many players, a single event can have a significant impact on the results of all the H2H. To avoid races with high players count having too strong rating swings, we apply a modifier scaling down accuracy.
Finally, while handicap is allowed in ranked races and a rating offset is applied to keep expected results realistic (without incentivizing playing handicap-only), the results of such races are much less reliable.
|
staticprivate |
Computes the score of a head-to-head minimatch.
If time difference > 2,5% ; the result is 1 (complete win of player 1) or 0 (complete loss of player 1) Otherwise, it is averaged between 0 and 1.
|
staticprivate |
Returns the time spread factor.
Short races are more random, so the expected result changes depending on race duration. TODO: collect real-world data on the relationship between race duration and the likelihood of winning of players, and fit the formula based on it.