| License | GPL-3 |
|---|---|
| Maintainer | rasmus@precenth.eu |
| Stability | experimental |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Ranking.Glicko.Types
Contents
Synopsis
- data Player (version :: Nat) = Player {}
- data Match = Match {}
- type PlayerId = Int
- type Score = Int
- newtype ScoreFunction = ScoreFunction {
- compareScores :: Score -> Score -> Double
- data GlickoSettings = GlickoSettings {}
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
| |
Constructors
| Match | |
Fields
| |
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
| Show ScoreFunction Source # | |
Defined in Ranking.Glicko.Types Methods showsPrec :: Int -> ScoreFunction -> ShowS # show :: ScoreFunction -> String # showList :: [ScoreFunction] -> ShowS # | |
| Default ScoreFunction Source # | |
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.
Constructors
| GlickoSettings | |
Fields | |
Instances
| Show GlickoSettings Source # | |
Defined in Ranking.Glicko.Types Methods showsPrec :: Int -> GlickoSettings -> ShowS # show :: GlickoSettings -> String # showList :: [GlickoSettings] -> ShowS # | |
| Default GlickoSettings Source # | |
Defined in Ranking.Glicko.Types Methods def :: GlickoSettings # | |