License | GPL-3 |
---|---|
Maintainer | rasmus@precenth.eu |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module provides functions for predicting the outcome of a game between two players.
Example usage:
>>>
:l test/Paper.hs
>>>
:m + Data.Default
>>>
let p1:p2:_ = compute players matches def
>>>
p1
Player { playerId = 1 , playerRating = 1464.0506705393013 , playerDev = 151.51652412385727 , playerVol = 5.9995984286488495e-2 , playerInactivity = 0 , playerAge = 1 }>>>
p2
Player { playerId = 2 , playerRating = 1398.1435582337338 , playerDev = 31.67021528115062 , playerVol = 5.999912372888531e-2 , playerInactivity = 0 , playerAge = 1 }>>>
predict p1 p2
0.5732533698644847 -- Player 1 has a 57.3% chance of winning a single game.>>>
let Just f = boX 5
>>>
predictBoX f p1 p2
0.6353973157904573 -- Player 1 has a 63.5% chance of winning a best-of-five match.