We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Might have to just use ELO. There's a lot of different ranking systems like HLTV, Valve, etc., each with their own algorithms.
function calculateExpectedScore(ratingA: number, ratingB: number): number { return 1 / (1 + Math.pow(10, (ratingB - ratingA) / 400)); } function calculateNewRating(rating: number, expectedScore: number, actualScore: number, kFactor: number): number { return rating + kFactor * (actualScore - expectedScore); } // Example usage: let player1Rating = 1500; let player2Rating = 1600; let kFactor = 32; let expectedScore1 = calculateExpectedScore(player1Rating, player2Rating); let expectedScore2 = calculateExpectedScore(player2Rating, player1Rating); // Assume player 1 wins let player1NewRating = calculateNewRating(player1Rating, expectedScore1, 1, kFactor); let player2NewRating = calculateNewRating(player2Rating, expectedScore2, 0, kFactor); console.log("Player 1 new rating:", player1NewRating); console.log("Player 2 new rating:", player2NewRating);
The text was updated successfully, but these errors were encountered:
lemonpole
No branches or pull requests
Might have to just use ELO. There's a lot of different ranking systems like HLTV, Valve, etc., each with their own algorithms.
The text was updated successfully, but these errors were encountered: