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.
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;