Defrag Rating - nsavch/xanmel-web GitHub Wiki

Goal

To build a better version of the defrag ladder, which can hopefully be used to build a cross-server global rating of XDF players.

Why the current ladder is bad

The standard xonotic ladder computes a player's rating by counting how many times he has been in the top 15.

The problem with this method is that it rewards players that have completed the most maps on the server, not the fastest players. Also, the ladder completely ignores the actual difference between times. I believe a player who set the 1st record 5 seconds above the 2nd place should be rewarded far more than the player who is only 0.01 seconds above the 2nd place.

Proposing an alternative rating method.

  1. For each map on the server, we compute each player's score (in the high-scores) using the following formula:

where

  • R_i - score for the player on position i
  • N - total number of players in the high-scores list
  • t_i - time that the player on position i has set
  • f_c - position correction function (currently f_c(n) = (N-n)^2)

The position correction function is needed to emphasize importance of difference between top positions. For example, 1 second above the 2nd player shouldn't be less rewarding than 30 seconds above the 15th player.

Total rating is computed as an average score for each map the player has finished. For each player, their 3 worst negative map scores are annulled. After averaging, the scores are shifted so the lowest rating score is 100.

Example implementation

The system is implemented for exe.pub | Relaxed Running server and the rating is available publicly at https://portal.exe.pub/xdf/rating/4/

The score each player got on each map can be viewed on the map highscore pages like https://portal.exe.pub/xdf/map/4/290/

Source code is available in this repo at https://github.com/nsavch/xanmel-web/blob/master/xdf/player_rating.py

Flaws

While the system gives a rather precise ordering of players based on their actual defrag skill, it can still be improved upon. The biggest disadvantage is that only the first 15 results of each map are stored in the database. So if, say, 50 players have set a time on the map, the 15th player will get huge negative rating while 16th player will get just 0.

Also the system can be affected by "adventure" maps which are hard to complete and usually have only few records set. Similar as in the above example, the system will penalise players just for completing the map.