glicko-0.1.1.1: Glicko-2 implementation in Haskell.

LicenseGPL-3
Maintainerprillan91@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Ranking.Glicko.Types

Contents

Description

For examples, see Core and Inference.

Synopsis

Data types

data Player Source #

Data type representing a player's Glicko rating.

(NOTE: The system assumes Glicko ratings, to convert to Glicko-2 , use oldToNew)

Constructors

Player 

Fields

  • _pid :: PlayerId

    Player id, can be anything

  • _rating :: Double

    Rating

  • _dev :: Double

    Deviation

  • _vol :: Double

    Volatility

  • _inactivity :: Int

    Inactivity (not part of Glicko-2), keeps track of the number of rating updates a player has been inactive.

  • _age :: Int

    Age (not part of Glicko-2), keeps track of the number of rating updates since the player was added.

Instances

data Match Source #

Constructors

Match 

Fields

Instances

Eq Match Source # 

Methods

(==) :: Match -> Match -> Bool #

(/=) :: Match -> Match -> Bool #

Show Match Source # 

Methods

showsPrec :: Int -> Match -> ShowS #

show :: Match -> String #

showList :: [Match] -> ShowS #

type Score = Int Source #

newtype ScoreFunction Source #

ScoreFunctions are used in compute to evaluate two players performances against eachother. It should obey the following laws,

0 <= compareScores x y
1 >= compareScores x y
compareScores x y == 1 - compareScores y x

The default implementation is

\s1 s2 -> case s1 `compare` s2 of
            LT -> 0
            EQ -> 0.5
            GT -> 1

Constructors

ScoreFunction 

Fields

data GlickoSettings Source #

Provides the compute function with parameters. See http://glicko.net/glicko/glicko2.pdf for an explanation.

(NOTE: scoreFunction is not a part of Glicko-2)

The default settings are as defined in the above paper.

Lenses

Player

Match