License | GPL-3 |
---|---|
Maintainer | prillan91@gmail.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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).
Player | |
|
Match | |
|
newtype ScoreFunction Source #
ScoreFunction
s 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
ScoreFunction | |
|
Instances
Show ScoreFunction Source # | |
Defined in Ranking.Glicko.Types showsPrec :: Int -> ScoreFunction -> ShowS # show :: ScoreFunction -> String # showList :: [ScoreFunction] -> ShowS # | |
Default ScoreFunction Source # | |
Defined in Ranking.Glicko.Types 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
Show GlickoSettings Source # | |
Defined in Ranking.Glicko.Types showsPrec :: Int -> GlickoSettings -> ShowS # show :: GlickoSettings -> String # showList :: [GlickoSettings] -> ShowS # | |
Default GlickoSettings Source # | |
Defined in Ranking.Glicko.Types def :: GlickoSettings # |