rtac.ac_functionalities.ranking.trueskill
Implements the player skill estimation algorithm from Herbrich et al., “TrueSkill(TM): A Bayesian Skill Rating System”.
Functions
|
Adjust the skills of a list of players. |
|
Compute the draw margin (epsilon) given the draw probability. |
|
Compute the draw probability given the draw margin (epsilon). |
|
Sets three global parameters used in the TrueSkill algorithm. |
|
|
|
|
|
|
|
Classes
|
Base class for a factor node in the factor graph. |
|
Object representing a gaussian distribution. |
|
Connects two variables, the value of one being the mean of the message sent to the other. |
|
Connects to a single variable, pushing a fixed (Gaussian) value to that variable. |
|
A factor that connects a sum variable with 1 or more terms, which are summed after being multiplied by fixed (real) coefficients. |
|
A factor for (approximately) truncating the team difference distribution based on a win or a draw (the choice of which is determined by the functions you pass as V and W). |
|
A variable node in the factor graph. |
- rtac.ac_functionalities.ranking.trueskill.AdjustPlayers(players)[source]
Adjust the skills of a list of players.
‘players’ is a list of player objects, for all the players who participated in a single game. A ‘player object’ is any object with a “skill” attribute (a (mu, sigma) tuple) and a “rank” attribute. Lower ranks are better; the lowest rank is the overall winner of the game. Equal ranks mean that the two players drew.
This function updates all the “skill” attributes of the player objects to reflect the outcome of the game. The input list is not altered.
- rtac.ac_functionalities.ranking.trueskill.SetParameters(beta=None, epsilon=None, draw_probability=None, gamma=None)[source]
Sets three global parameters used in the TrueSkill algorithm.
beta is a measure of how random the game is. You can think of it as the difference in skill (mean) needed for the better player to have an ~80% chance of winning. A high value means the game is more random (I need to be much better than you to consistently overcome the randomness of the game and beat you 80% of the time); a low value is less random (a slight edge in skill is enough to win consistently). The default value of beta is half of INITIAL_SIGMA (the value suggested by the Herbrich et al. paper).
epsilon is a measure of how common draws are. Instead of specifying epsilon directly you can pass draw_probability instead (a number from 0 to 1, saying what fraction of games end in draws), and epsilon will be determined from that. The default epsilon corresponds to a draw probability of 0.1 (10%). (You should pass a value for either epsilon or draw_probability, not both.)
gamma is a small amount by which a player’s uncertainty (sigma) is increased prior to the start of each game. This allows us to account for skills that vary over time; the effect of old games on the estimate will slowly disappear unless reinforced by evidence from new games.