Class games.Rating.Rating
All Packages Class Hierarchy This Package Previous Next Index
Class games.Rating.Rating
java.lang.Object
|
+----games.Rating.Rating
- public class Rating
- extends Object
The Rating class implements the Glicko Rating System, devised by Mark
Glickman to replace the Elo system that is currently used to rate chess
matches.
The advantage of this system is that there is no ad-hoc "wild period" of
some number of games that it takes the player to become established. In
the Elo system this method is used to account for the need to quickly
get the players rating into the right ballpark, by allowing huge swings
before using the normal updating algorithm. Instead, the Glickman system
uses a Rating and a Rating Deviation, which may be thought of as similar
to a mean and a standard deviation in a normal distribution. Initially
the Rating is in the centre of the 0-3000 range, and the deviation is
quite high (350); as the player plays more and more games the rating and
the deviation settle down. Once the deviation is small the player is
assured of having a reasonably accurate estimate of their strength in
the game.
Ratings adjustments are always based on a win-loss system. To simulate
a draw, it is necessary to adjust the ratings as though there was one
win and one loss, which is not currently supported by this code.
For details of how the rating system works, see
Mark Glickman's home page
.
-
Rating()
- Constructs a default rating for an unknown player.
-
Rating(int, int)
- Constructs a particular rating for a known player.
-
Rating(String)
- Constructs a particular rating for a known player, from the string
representation of the rating, for example, "1500/350".
-
calculateRatings(Rating[])
- Adjust ratings to reflect the result of a match or a tournament.
-
getRating()
- Returns this rating in double precision.
-
getRatingDeviation()
- Returns this rating's deviation in double precision.
-
toString()
- Convert the rating to an integer representation embedded in a string,
for exmaple, 1500/350.
Rating
public Rating()
- Constructs a default rating for an unknown player.
Rating
public Rating(int mu,
int sigma)
- Constructs a particular rating for a known player.
Rating
public Rating(String stringRep)
- Constructs a particular rating for a known player, from the string
representation of the rating, for example, "1500/350". Assumes that
the string representation records the rating with integers.
getRating
public double getRating()
- Returns this rating in double precision.
getRatingDeviation
public double getRatingDeviation()
- Returns this rating's deviation in double precision.
calculateRatings
public static void calculateRatings(Rating player[])
- Adjust ratings to reflect the result of a match or a tournament. The
input is an array of ratings, where the 0th entry is the winner of
the game, the 1st player is in second place, and so on. All ratings
are adjusted simultaneously to reflect the oucome of the game, so this
is suitable for evaluating the result of a multiplayer game where all
players competed simultaneously, or to adjust after a tournament.
- Parameters:
- player - the array of players to be adjusted.
toString
public String toString()
- Convert the rating to an integer representation embedded in a string,
for exmaple, 1500/350.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index