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

Ranking.Glicko.Types

Contents

Description

For examples, see Core and Inference.

Synopsis

Data types

data Player (version :: Nat) Source #

Data type representing a player's Glicko rating. The type version is used to differentiate between Glicko (Player 1) and Glicko-2 (Player 2).

Constructors

Player 

Fields

Instances

Instances details
Eq (Player version) Source # 
Instance details

Defined in Ranking.Glicko.Types

Methods

(==) :: Player version -> Player version -> Bool #

(/=) :: Player version -> Player version -> Bool #

Show (Player version) Source # 
Instance details

Defined in Ranking.Glicko.Types

Methods

showsPrec :: Int -> Player version -> ShowS #

show :: Player version -> String #

showList :: [Player version] -> ShowS #

NFData (Player v) Source # 
Instance details

Defined in Ranking.Glicko.Types

Methods

rnf :: Player v -> () #

data Match Source #

Instances

Instances details
Eq Match Source # 
Instance details

Defined in Ranking.Glicko.Types

Methods

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

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

Show Match Source # 
Instance details

Defined in Ranking.Glicko.Types

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

Instances

Instances details
Show ScoreFunction Source # 
Instance details

Defined in Ranking.Glicko.Types

Default ScoreFunction Source # 
Instance details

Defined in Ranking.Glicko.Types

Methods

def :: ScoreFunction #

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.

Instances

Instances details
Show GlickoSettings Source # 
Instance details

Defined in Ranking.Glicko.Types

Default GlickoSettings Source # 
Instance details

Defined in Ranking.Glicko.Types

Methods

def :: GlickoSettings #