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 personal_result = [
  1. | `Win
  2. | `Lose
  3. | `Draw
]
type opponent = {
  1. rating : float;
  2. rating_deviation : float;
}
val player_to_opponent : player -> opponent
type game_outcome = {
  1. opponent : opponent;
  2. result : personal_result;
}
type game_results = {
  1. player : player;
  2. games : game_outcome * game_outcome list;
}
val default_player : ?rating:int -> ?rating_deviation:int -> unit -> player_result
val update_player_after_not_player_in_rating_period : player -> player_result
OCaml

Innovation. Community. Security.