]> git.xonotic.org Git - xonotic/xonstatdb.git/commitdiff
Use a new Elo rot scheme.
authorantzucaro <azucaro@gmail.com>
Sat, 17 Aug 2013 03:51:00 +0000 (23:51 -0400)
committerantzucaro <azucaro@gmail.com>
Sat, 17 Aug 2013 03:51:00 +0000 (23:51 -0400)
The old rot was to decay 1 Elo point per day of inactivity beyond
30 days of inactivity. This was extremely conservative and leads
to people staying on the leaderboards for an extraordinary amount
of time after they have ceased playing (or ceased recording).

The new system uses a weeks-based rot  Starting on your 31st day
of inactivity (as defined by no recorded games in the particular
game type), you will lose 1 point per week of inactivty *each day*.
This looks like so:

Days 1-30: nothing happens - no penalty
Days 31-37: 1 point docked per day
Days 38-44: 2 points docked per day

... and so on.

It is my hope that this system will favor active, skilled players
while at the same time penalizing inactive players.

scripts/update_elos.sql

index 087f21361e5f5f46ff581c2c15aa9cd23c54e0a5..38d456d8aa2eabd5ba03500b5612a9b3ccd0cef0 100644 (file)
@@ -1,5 +1,6 @@
 begin;
   update player_elos
-  set elo=greatest(elo-1, 100.00)
-  where update_dt < (current_timestamp at time zone 'UTC' - interval '30 days');
+  set elo=greatest(100, elo - ((current_date - (update_dt::date)-31)/7))
+  where update_dt < (current_timestamp at time zone 'UTC' - interval '30 days')
+  and elo != 100;
 end;