question

Brent Batas (Lisk) avatar image
Brent Batas (Lisk) asked

Recommended way to implement "inactivity" decay for a statistic?

In my game, players have skill ratings (Elo). High-skill players who go inactive for a while should have their ratings decay.

What would be the recommended way to implement something like:

Players above 1600 rating should lose 10 rating points every two weeks of inactivity. Inactivity is just defined as not having played a match.

(I may change my mind on those numbers, but I'm just trying to give an order of magnitude for this question).

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Personally, I'd lower them once a day after two weeks, to decay them off the leaderboard faster, so that active players move up. To do that, just create a player segment whose rules are "rating > 0" and "last login > 20160 minutes", then a scheduled task that runs once per day on that segment and lowers each player's score by 10. If you only want to lower their score once every two weeks, you could additionally use their last login time from their profile (get their statistic from the profile call as well, so that it's just one API call) and use it to do the math of the elapsed time versus the current time to determine if it's the first day since they've been offline for 2 weeks, 4 weeks, etc. But in either case, having it in Cloud Script means you'll be able to change it later, if you feel like you need to.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.