From 874b386c6acea21e327b3777475229299569f0c3 Mon Sep 17 00:00:00 2001 From: antzucaro Date: Fri, 16 Aug 2013 23:51:00 -0400 Subject: [PATCH] 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. --- scripts/update_elos.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.39.2