package glicko2

  1. Overview
  2. Docs
include Glicko2_types.PLAYER
type player = {
  1. rating : float;
  2. rating_deviation : float;
  3. volatility : float;
}

The type containing the data need for the Glicko2 algorithm. You can create this structure yourself, but we recommend you use the "default_player" function defined in this module.

type game_outcome = [
  1. | `Player1Win
  2. | `Player2Win
  3. | `Draw
]
type new_ratings = {
  1. new_player1 : player;
  2. new_player2 : player;
}
type game_result = {
  1. player1 : player;
  2. player2 : player;
  3. game_outcome : game_outcome;
}

The input type to the Glicko2 rating functions. The two players, and the outcome of the game.

val default_player : ?rating:int -> ?rating_deviation:int -> unit -> player_result

The recommended way of creating a new player. It will have a rating of 1500 (unless overwritten), a rating deviation of 350 (unless overwritten), and a volatility of 0.06.

val update_player_after_not_player_in_rating_period : player -> player_result