Created
November 10, 2015 03:19
-
-
Save lambda-fairy/783616180dd2515e0e57 to your computer and use it in GitHub Desktop.
Elo rating code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Elo where | |
updateRating :: Double -> Double -> Double -> Double -> Double | |
updateRating volatility me you result = me + change | |
where | |
change = volatility * (result - expected) | |
expected = 1 / (1 + (10 ** ((you - me) / 400))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment