Brugernavn: Kodeord:
Ny bruger registrering
Moderator: Fencer 
 BrainKing.cz

Klub pro všechny, kteří se zajímají o BrainKing samotný, jeho strukturu, vlastnosti a budoucnost.




Liste over diskussionsborde
Tilstand: Alle kan skrive
Søg i meddelelser:  

17. August 2003, 19:22:26
Fencer 
private int computeRating(int oldUserRating, int oldOpponentRating, int gameCounted, int coef)
{
int newUserRating = oldUserRating;
if (gameCounted = Utils.gamesCompletedForSpecialRatingFormula) // special rating formula
newUserRating = Math.round((gameCounted * oldUserRating + oldOpponentRating + coef * 400) / (gameCounted + 1));
else // standard rating formula
{
double S = coef == -1 ? 0 : (coef == 0 ? 0.5 : 1);
int N = gameCounted > 50 ? 50 : gameCounted;

double Nr = oldUserRating >= 2200 ? 50 : 50 / Math.sqrt(1 + (2200 - oldUserRating) * (2200 - oldUserRating) / 10000);
double Ne = Math.min(N, Nr);
double K = 800 / (Ne + 1);
double We = 1 / (Math.pow(10, -(oldUserRating - oldOpponentRating) / 400) + 1);
newUserRating = (int)Math.round(oldUserRating + K * (S - We));
}
return newUserRating;
}

Dato og klokkeslæt
Venner online
Favoritborde
Sammenslutninger
Dagens tip
Copyright © 2002 - 2024 Filip Rachunek, all rights reserved.
Tilbage til toppen