Documentation
¶
Overview ¶
Implementation of the Glicko 2 Rating system, for rating players. Glicko is an improvoment on ELO, but is much more computationally intensive.
For more information, see:
http://www.glicko.net/glicko/glicko2.pdf
http://en.wikipedia.org/wiki/Glicko_rating_system
The calculation process is broken into 8 steps.
Step 1: Determine initial values.
Step 2: Convert to Glicko2 Scale from the Glicko1 scale.
Step 3: Compute (v), the estimated variance based only on game outcomes.
Step 4: Compute the quantity Delta, the estimated improvement.
Step 5: Determine the new value, sigma', of the volatility, in an iterative process.
Step 6: Update the rating deviation to the new pre-rating period value, φ_z
Step 7: Update the rating and RD to the new values, μ′ and φ′:
Step 8: Convert back to the Glicko1 scale.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Constrains the volatility. Typically set between 0.3 and 1.2. Often // refered to as the 'system' constant. DefaultTau = 0.3 DefaultRat = 1500.0 // Default starting rating DefaultDev = 350.0 // Default starting deviation DefaultVol = 0.06 // Default starting volatility )
Overrideable Defaults
Functions ¶
This section is empty.
Types ¶
type Rating ¶
type Rating struct {
Rating float64 // Player's rating. Usually starts off at 1500.
Deviation float64 // Confidence/uncertainty in a player's rating
Volatility float64 // Measures erratic performances
}
Represents a player's rating and the confidence in a player's rating.
func CalculateRating ¶
func DefaultRating ¶
func DefaultRating() *Rating
Creates a default Rating using:
Rating = DefaultRat Deviation = DefaultDev Volatility = DefaultVol
func (*Rating) FromGlicko2 ¶
Creates a new rating, converted from Glicko2 scaling to Glicko1 scaling. This assumes the starting rating value is 1500.
func (*Rating) MostlyEquals ¶
Ensure that some other Rating is equal to this rating, given some epsilon. In other words, find the error between this rating's values and the other rating's values and make sure it's less than epsilon in absolute value.