Rating decay and other ladder tweaks

We now have a rating decay of -1/day at 1400, -2/day at 1450, -3/day
at 1500, etc. This roughly translates to a fall from the top of OU to
the bottom over a month of full inactivity, which is somewhat harsh
considering it's done regardless of inactivity. I might tweak this to
be less harsh later.

There's no rating decay below 1400. People can stay there as long as
they want.

The only other tweak is that K is now 40 at >1300 instead of >1400.
Very very slight tweak so that ratings in the 1300-1500 range are
very very slightly more precise.
This commit is contained in:
Guangcong Luo
2014-02-27 19:28:11 -06:00
parent 2aa6a67b09
commit e04eb7d113

View File

@@ -255,6 +255,8 @@ class NTBBLadder {
return false;
}
$elo = $user['rating']['acre'];
$rating = new GlickoPlayer($user['rating']['r'], $user['rating']['rd']);
if ($user['rating']['rpdata']) {
$rpdata = explode('##',$user['rating']['rpdata']);
@@ -274,10 +276,16 @@ class NTBBLadder {
$rating->rating += $offset;
$offset = 0;
}
if ($elo >= 1400) {
$elo -= 1 + intval(($elo-1400)/50);
}
$user['rating']['rptime'] = $this->nextrp($user['rating']['rptime']);
}
$user['rating']['r'] = $rating->rating;
$user['rating']['rd'] = $rating->rd;
$user['rating']['lacre'] = $user['rating']['acre'] = $elo;
}
if ($newM) {
@@ -324,9 +332,8 @@ class NTBBLadder {
$user['rating']['rpdata'] .= '##'.$offset;
}
if ($newM) {
$elo = $user['rating']['oldacre'] = $user['rating']['acre'];
$user['rating']['oldacre'] = $elo;
$K = 50;
if ($elo < 1100) {
@@ -335,7 +342,7 @@ class NTBBLadder {
} else if ($newM['score'] > 0.5) {
$K = 80 - ($elo - 1000)*30/100;
}
} else if ($elo > 1400) {
} else if ($elo > 1300) {
$K = 40;
} else if ($elo > 1600) {
$K = 32;