trueskill-package: Implementation of the TrueSkill algorithm

Description Details Main Functions and Classes Author(s) References Examples

Description

An R implementation of the TrueSkill Algorithm (Herbrich, R., Minka, T. and Grapel, T. [1]), a Bayesian skill rating system with inference by approximate message passing on a factor graph. Used by Xbox to rank gamers and identify appropriate matches.

http://research.microsoft.com/en-us/projects/trueskill/default.aspx

Current version allows for one player per team. Will update as time permits. Requires R version 3.0 as it is implemented with Reference Classes.

The code for the examples can be found at:

system.file('', package = 'trueskill')

Acknowledgements to Doug Zongker [2] and Heungsub Lee [3] for their python implementations of the algorithm and for the liberal reuse of Doug's code comments.

Details

Package: trueskill
URL: http://www.bhoung.com/trueskill
Version: 0.1
License: Apache
Depends: R (>= 3.0)
Built: R 3.0.1

Main Functions and Classes

Reference Classes:

Gaussian, Player, Parameters

Methods:

Multiply, Divide

Functions:

AdjustPlayers, Trueskill, DrawMargin, DrawProbability, PrintList

Data:

data

Author(s)

Brendan Houng <brendan.houng@gmail.com>

References

[1]

TrueSkill: A Bayesian Skill Rating System, Herbrich, R., Minka, T. and Grapel, T.

[2]

Doug Zongker's python implementation:
https://github.com/dougz/trueskill

[3]

Heungsub Lee's python implementation:
https://github.com/sublee/trueskill.

[4]

Jeff Moser's explanatory notes:
http://www.moserware.com/2010/03/computing-your-skill.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  # Example 1.
  
  # set default values for BETA, EPSILON and GAMMA where BETA is sigma / 2
  # EPSILON is DrawProbability(0.1)
  # GAMMA is sigma / 100
  parameters <- Parameters$new()
  
  Alice  <- Player(rank = 1, skill = Gaussian(mu = 25, sigma = 25 / 3), name = "1")
  Bob    <- Player(rank = 2, skill = Gaussian(mu = 25, sigma = 25 / 3), name = "2")
  Chris  <- Player(rank = 2, skill = Gaussian(mu = 25, sigma = 25 / 3), name = "3")
  Darren <- Player(rank = 4, skill = Gaussian(mu = 25, sigma = 25 / 3), name = "4") 
   
  players <- list(Alice, Bob, Chris, Darren)
  
  players <- AdjustPlayers(players, parameters)  
  PrintList(players)
  print(Alice$skill)

  # Relying on positional arguments looks much cleaner:
  Alice  <- Player(1, Gaussian(25, 8.3), "Alice")
  Bob    <- Player(2, Gaussian(25, 8.3), "Bob")
  Chris  <- Player(2, Gaussian(25, 8.3), "Chris")
  Darren <- Player(4, Gaussian(25, 8.3), "Darren") 
 
  # Example 2 - see https://gist.github.com/bhoung/5596282  
  # the example applies trueskill to tennis tournament data
  # (runtime is approx 50 secs)
  

Example output

There were 50 or more warnings (use warnings() to see the first 50)
[1] "[rank, skill, player]: [1, [(31.564, 6.405), (0.024, 0.769)], 1]"
[1] "[rank, skill, player]: [2, [(24.993, 5.559), (0.032, 0.809)], 2]"
[1] "[rank, skill, player]: [2, [(25.007, 5.559), (0.032, 0.809)], 3]"
[1] "[rank, skill, player]: [4, [(18.436, 6.405), (0.024, 0.449)], 4]"
[1] "Guassian [(mu, sigma), (pi, tau)]: [(31.564, 6.405), (0.024, 0.769)]"

trueskill documentation built on May 2, 2019, 5:15 a.m.