glicko-0.3.0.0: Glicko-2 implementation in Haskell.
LicenseGPL-3
Maintainerprillan91@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Ranking.Glicko.Core

Description

This module contains the main function, compute. Use this to compute new ratings from old ones.

>>> let ps = compute [] [Match 1 2 1 0] def
>>> ps
[ Player { playerId = 1
         , playerRating = 1662.3108939062977
         , playerDev = 290.31896371798047
         , playerVol = 5.999967537233814e-2
         , playerInactivity = 0
         , playerAge = 1 }
, Player { playerId = 2
         , playerRating = 1337.6891060937023
         , playerDev = 290.31896371798047
         , playerVol = 5.999967537233814e-2
         , playerInactivity = 0
         , playerAge = 1 }]
>>> compute ps [Match 1 3 0 0] def
[ Player { playerId = 1
         , playerRating = 1623.996484575735
         , playerDev = 256.3451684359266
         , playerVol = 5.999869083062934e-2
         , playerInactivity = 0
         , playerAge = 2 }
, Player { playerId = 2
         , playerRating = 1337.6891060937023
         , playerDev = 290.5060065906196
         , playerVol = 5.999967537233814e-2
         , playerInactivity = 1
         , playerAge = 2 }
, Player { playerId = 3
         , playerRating = 1557.6214863132009
         , playerDev = 286.9272058793522
         , playerVol = 5.999899836136578e-2
         , playerInactivity = 0
         , playerAge = 1 }]
Synopsis

Documentation

compute Source #

Arguments

:: [Player 1]

Input players

-> [Match]

Matches played this period

-> GlickoSettings

Settings for computing the score values and adding new players.

-> [Player 1]

Updated player ratings

Computes new ratings from the previous and adds new ones using the specified settings.

computeP :: Int -> [Player 1] -> [Match] -> GlickoSettings -> [Player 1] Source #

Same as compute but runs in parallel using the specified chunkSize

newToOld :: Player 2 -> Player 1 Source #

Convert ratings from Glicko-2 to Glicko

oldToNew :: Player 1 -> Player 2 Source #

Convert ratings from Glicko to Glicko-2