Haskell implementation of OpenSkill
git clone git@github.com:yoonthegoon/openskill.hs.git
cd openskill.hs
cabal install
import OpenSkill
( PlackettLuce (..), -- or any other ranking model
Rating (..)
)
main :: IO ()
main = do
let pl = PlackettLuce (25, 25 / 3)
let team1 =
[ Rating 25 (25 / 6),
Rating 25 (25 / 6)
]
let team2 =
[ Rating 25 (25 / 6),
Rating 25 (25 / 6)
]
let teams = [team1, team2]
print $ rate pl teams [0, 1]
print $ winProbability pl teams
[[Rating {theta = 26.964295, beta = 8.1779626},Rating {theta = 26.964295, beta = 8.1779626}],[Rating {theta = 23.035705, beta = 8.1779626},Rating {theta = 23.035705, beta = 8.1779626}]]
[0.5,0.5]