From: antzucaro Date: Sat, 17 Aug 2013 03:51:00 +0000 (-0400) Subject: Use a new Elo rot scheme. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=874b386c6acea21e327b3777475229299569f0c3;p=xonotic%2Fxonstatdb.git Use a new Elo rot scheme. 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. --- diff --git a/scripts/update_elos.sql b/scripts/update_elos.sql index 087f213..38d456d 100644 --- a/scripts/update_elos.sql +++ b/scripts/update_elos.sql @@ -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;