Hi
Can anyone help me with the working out of rating changes after a game finishes??
Idealy a nice simple program would be perfect if one exists??
What i want to do is set up a rating list for a league that i am helping set up which is full of good players and people who play just for fun. We recently had a knockout tournament that i won and during it we sort of decided a league system should be setup. To assist the structure better i want to keep track of peoples ratings so you know if you are playing a good player or not.
Any help greatly appreciated
Keith
Help Needed concerning calculating rating changes
-
- Uranium
- Posts: 266
- Joined: Mon Apr 12, 1999 3:52 am
- Location: NW England
- Contact:
-
- Site Admin
- Posts: 1388
- Joined: Sun Mar 14, 1999 11:13 am
- Location: Jeffersonville, IN
- Contact:
Here's the code I use, in Perl, it probably won't be that helpful to you unless you're into programming.
Code: Select all
sub rateplayer{
my $self=shift;
my $player=shift;
my $orating=shift;
my $score=shift;
my ($rate,%rec,$d,$p,$newrating,$diff,$newfloor);
local (*I);
open(I,">>log/ratings.txt");
%rec=$self->readrec($player);
print I "$player\t$rec{rating}\t$orating\t$score\t$rec{provisional}\t";
$rate=$rec{rating};
$p=$rec{gamesplayed};
if($p==0){$p++;}
$rec{averating}=($orating+(($p-1)*$rec{averating}))/$p;
if($rec{provisional} eq "y"){
$p=($rec{gameswon}*2+$rec{gamesdrawn})/($p*2);
if($p==0){
$d=-400;
} elsif($p==1) {
$d=400;
} else {
$d=-200*((log((1-$p)/$p))/(log(10)));
}
if($rec{gamesplayed}>7){$newrating=$d+$rec{averating};}else{$newrating=$rec{rating};}
} else {
$diff=$rec{rating}-$orating;
$p=1/(1+10**((-$diff)/400));
$newrating=$rate+int(32*($score-($p)));
$newfloor=int($newrating/100)*100-200;
if($newfloor > $rec{ratingfloor}){$rec{ratingfloor}=$newfloor;}
if($rec{nofloor} eq "y"){
$rec{ratingfloor}=0;
}
if($newrating < $rec{ratingfloor}){$newrating=$rec{ratingfloor};}
if($rec{ratingfloor}>2100){$rec{ratingfloor}=2100;}
}
$rec{rating}=int($newrating);
if($rec{rating}>3000){$rec{rating}=3000;}
print I "$rec{rating}\n";
%{$self->{rec}}=%rec;
$self->storerec();
}
-
- Uranium
- Posts: 266
- Joined: Mon Apr 12, 1999 3:52 am
- Location: NW England
- Contact:
-
- Uranium
- Posts: 46
- Joined: Mon Dec 06, 1999 10:56 pm
A google search for Chess rating calculator revealed about 30,000 hits!!
This one looked most promising
http://www.arizonachess.com/calculator.php
hope it helps
This one looked most promising
http://www.arizonachess.com/calculator.php
hope it helps
-
- Posts: 4
- Joined: Tue May 18, 2004 5:28 pm
Excel 97 spreadsheets http://dooley.m.tripod.com/ratings/templates.zip
are the result of another google search.
As I recall, tripod.com has aggressive ads and cookies . Be sure to pump up your web filter before you look there.
Ed
are the result of another google search.
As I recall, tripod.com has aggressive ads and cookies . Be sure to pump up your web filter before you look there.
Ed
-
- Uranium
- Posts: 266
- Joined: Mon Apr 12, 1999 3:52 am
- Location: NW England
- Contact:
Thanks for this one looks the easiest to use provided i can figure out what you are meant to enter as a scoreknightmare wrote:A google search for Chess rating calculator revealed about 30,000 hits!!
This one looked most promising
http://www.arizonachess.com/calculator.php
hope it helps