AdjustPlayers: Update the Skills of a List of Players

Description Usage: Arguments: Examples

View source: R/player.r

Description

Runs the trueskill algorithm and updates the skills of a list of players. Assumes each team has one player.

Usage:

AdjustPlayers(players, parameters)

AdjustPlayers(list(Alice, Bob), parameters)

Arguments:

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' field (a Gaussian) and a 'rank' field. 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 skills of the player objects to reflect the outcome of the game. Not the function sorts the players by rank and returns the sorted list. Creates all the variable nodes in the graph. "Teams" are each a single player; there's a one-to-one correspondence between players and teams.

parameters

Parameters object to hold input variables:
beta, epsilon and gamma. See Parameters for more details.

Examples

1
2
3
4
5
6
7
8
9
  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)
  
  parameters <- Parameters$new()
  players <- AdjustPlayers(players, parameters) 		

Example output

There were 50 or more warnings (use warnings() to see the first 50)

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