Created
November 9, 2020 08:15
-
-
Save mattmazzola/041965a704a59681b4acb64262aff2b4 to your computer and use it in GitHub Desktop.
Create Rating System
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
export function createRatingSystem(kFactor = 32, exponentDenominator = 400, exponentBase = 10): RatingSystem { | |
// Standard Elo implementation with symmetric kfactor functions for each player | |
// This would be a true zero-sum game where A(-x) = B(+x) | |
const getPlayerProbabilities = createPlayerProbabilitiesFn(exponentBase, exponentDenominator) | |
const getNextRating = createNextRatingFn(kFactor) | |
return { | |
getPlayerProbabilities, | |
getNextRating | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment