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
刷 leetcode 的时候突发奇想,leetcode 是怎么算空间复杂度跟时间复杂度的(大概有想法,监听进程内存消耗变化就好)但是它是怎么定最后的百分比的呢。于是搜到了 ELO rating system 埃洛等级分系统。 以下复制粘贴自百度百科:
假设棋手A和B的当前等级分分别为RA和RB,则按Logistic distribution A对B的胜率期望值当为:
类似B对A的胜率为:
假如一位棋手在比赛中的真实得分(胜=1分,和=0.5分,负=0分)和他的胜率期望值不同,则他的等级分要作相应的调整。具体的数学公式为:
和分别为棋手调整前后的等级分。在大师级比赛中K通常为16。
例如,棋手A等级分为1613,与等级分为1573的棋手B战平。若K取32,则A的胜率期望值为
因而A的新等级分为。
甚至,我找到了这个数学模型的包。只需要传入,Ra Rb 以及胜负(true / false),它就能返回最后两者的得分。
var EloRating = require('elo-rating'); var playerWin = false; var result = EloRating.calculate(1750, 1535, playerWin); console.log(result.playerRating) // Output: 1735 console.log(result.opponentRating) // Output: 1550 result = EloRating.calculate(1750, 1535); console.log(result.playerRating) // Output: 1754 console.log(result.opponentRating) // Output: 1531
由此得出猜测,百分比是根据最后 rank 积分的百分比分布来判断。
而像周赛这种,直接返回 rank 积分。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
背景
刷 leetcode 的时候突发奇想,leetcode 是怎么算空间复杂度跟时间复杂度的(大概有想法,监听进程内存消耗变化就好)但是它是怎么定最后的百分比的呢。于是搜到了 ELO rating system 埃洛等级分系统。
![image](https://user-images.githubusercontent.com/12029924/126418183-1e65dccc-9419-4ebb-99b1-14bc44470da9.png)
以下复制粘贴自百度百科:
假设棋手A和B的当前等级分分别为RA和RB,则按Logistic distribution A对B的胜率期望值当为:
![image](https://user-images.githubusercontent.com/12029924/126418592-71a96b66-6155-495d-92d3-b70196f24b12.png)
类似B对A的胜率为:
![image](https://user-images.githubusercontent.com/12029924/126418604-168c7388-2cf3-488a-b39d-e8778feb9ce6.png)
假如一位棋手在比赛中的真实得分(胜=1分,和=0.5分,负=0分)和他的胜率期望值不同,则他的等级分要作相应的调整。具体的数学公式为:
![image](https://user-images.githubusercontent.com/12029924/126418620-00d8ba17-1993-419b-8df8-a3c65c3c5865.png)
和分别为棋手调整前后的等级分。在大师级比赛中K通常为16。
例如,棋手A等级分为1613,与等级分为1573的棋手B战平。若K取32,则A的胜率期望值为
![image](https://user-images.githubusercontent.com/12029924/126418705-e5d93976-69f5-413a-9607-6a68a202a557.png)
因而A的新等级分为。
![image](https://user-images.githubusercontent.com/12029924/126418668-5576a0a0-f62d-4de3-b813-de8a3570d08d.png)
Javascript
甚至,我找到了这个数学模型的包。只需要传入,Ra Rb 以及胜负(true / false),它就能返回最后两者的得分。
尾声
由此得出猜测,百分比是根据最后 rank 积分的百分比分布来判断。
而像周赛这种,直接返回 rank 积分。
The text was updated successfully, but these errors were encountered: