| License | GPL-3 |
|---|---|
| Maintainer | prillan91@gmail.com |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Ranking.Glicko.Types
Contents
- data Player = Player {}
- data Match = Match {}
- type PlayerId = Int
- type Score = Int
- newtype ScoreFunction = ScoreFunction {
- compareScores :: Score -> Score -> Double
- data GlickoSettings = GlickoSettings {}
- pid :: Lens' Player PlayerId
- rating :: Lens' Player Double
- dev :: Lens' Player Double
- vol :: Lens' Player Double
- inactivity :: Lens' Player Int
- age :: Lens' Player Int
- pla :: Lens' Match PlayerId
- plb :: Lens' Match PlayerId
- sca :: Lens' Match Score
- scb :: Lens' Match Score
Data types
Data type representing a player's Glicko rating.
(NOTE: The system assumes Glicko ratings, to convert to Glicko-2
, use oldToNew)
Constructors
| Player | |
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
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