EbTech/Elo-MMR

Possible logical error

Closed this issue · 2 comments

duhby commented

let continuous_drift = self.drift_per_sec * player.update_time as f64;

To my understanding, Player.update_time is the time (in seconds) that the current competition we're rating for took place since the epoch, and Player.delta_time is the time in seconds between the current competition and the last competition that the player played in.

So, correct me if I'm wrong, but shouldn't this reference player.delta_time instead of player.update_time? Looking through the code, I didn't see a single place where player.delta_time was used for something, so I thought it might be here. If I'm wrong, then is there some place else in the code that uses it that I'm missing?

Oops, I think you're right. Time decay is an extra feature that's off by default, so the bug wouldn't have appeared in our use cases...

Done, Thanks!