rating-systems-0.1: Implementations of several rating systems: Elo, Glicko, etc

Safe HaskellNone
LanguageHaskell98

Ratings.Glicko

Synopsis

Documentation

initialGlicko :: Glicko Source #

Initial rating to use when we have no prior knowledge of a player's strength.

class HasGlicko a where Source #

This type class forces the user to provide a static c value to be used for their whole system. Typically you'll provide a simple orphan instance for Glicko like this:

instance HasGlicko Glicko where
  mkGlicko = Glicko
  glickoRating = _glickoRating
  glickoRD = _glickoRD
  glickoC _ = 34.6

Alternatively, if you really want to avoid the orphan instance you can use a newtype wrapper around Glicko.

Minimal complete definition

mkGlicko, glickoRating, glickoRD, glickoC

updateGlicko Source #

Arguments

:: HasGlicko glicko 
=> Int

Number of rating periods since rating was last updated

-> [(glicko, Score)]

Outcomes against each player

-> glicko

Previous glicko strength estimate

-> glicko

New glicko strength estimate

Updates a player's glicko strength based on all outcomes in a single rating period.