按比赛场数计算的加权胜率
我希望为游戏网站上的用户创建一个排名系统。
该系统应基于加权获胜百分比,加权元素是所玩的游戏数量。
例如:
55 胜 2 负 = 96% 胜率
1 胜 0 负 = 100% 胜率
第一个记录应该排名较高,因为他们的胜场数较多。 我确信数学非常简单,我只是无法理解它。有人可以帮忙吗?
Im looking to create a ranking system for users on a gaming site.
The system should be based of a weighted win percentage with the weighted element being the number of games played.
For instance:
55 wins and 2 losses = 96% win percentage
1 win and 0 losses = 100% win percentage
The first record should rank higher because they have a higher number of wins.
I'm sure the math is super simple, I just can't wrap my head around it. Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
ELO 更彻底,因为它在得分时考虑对手的实力,但如果对手是随机匹配的,一个简单且非常有效的方法是:(
胜场 + 常数 * 所有玩家的平均胜率)/(胜场 + 败场 + 常数)
因此,对于 0 场比赛,公式是所有玩家的平均值,随着比赛次数的增加,公式会收敛于实际记录。该常数决定了执行此操作的速度,您可能可以选择 5 到 20 之间的值。
ELO is more thorough because it considers opponent strength when scoring a win or loss, but if opponents are randomly matched a simple and very effect approach is:
(Wins + constant * Average Win % of all players) / (Wins + Losses + constant)
so with 0 games the formula is the average for all players, as you increase the number of games played the formula converges on the actual record. The constant determines how quickly it does this and you can probably get away with choosing something between 5 and 20.
是的,它“超级简单”:
要舍入为整数,您通常使用round或Math.round(但您没有指定编程语言)。
该值可以使用给定的比率根据获胜次数进行加权:
但是还有其他系统可以更好地理解该问题,例如 Elo(请参阅我的评论)。
Yes, it is "super simple":
To round to an integer you usually use
round
orMath.round
(but you didn't specify a programming language).The value could be weighted on the number of wins, using the given ratio:
But there are other systems that understand the problem better, like Elo (see my comment).
另一种可能性是我对我应该如何排序这些“有用”分数?的回答。基本上,使用获胜次数来确定玩家赢得一场比赛的可能性范围,然后取较低的一端。对于任何合理的置信水平选择,这使得 55-2 击败 1-0。 (没有理由这样做,我建议将其设置为 50% - 请参阅帖子了解详细信息,这实际上非常简单。)
作为一个小技术问题:我已经看到了一些使用 Wald 间隔的建议而不是 Agresti-Coull。实际上,对于大量输入,它们给出相同的结果。但如果比赛数量较少,就有充分的理由选择 Agresti-Coull。 (顺便说一句,这个想法是我自己想出来的——虽然我肯定不是第一个——后来才发现它有些标准。)
Another possibility would be my answer to How should I order these “helpful” scores?. Basically, use the number of wins to determine the range of likely possibilities for the probability that the player win a game, then take the lower end. This makes 55-2 beat 1-0 for any reasonable choice of the confidence level. (Lacking a reason to do otherwise, I'd suggest setting that to 50% -- see the post for the details, which are actually very simple.)
As a small technical aside: I've seen some suggestions to use the Wald interval rather than Agresti-Coull. Practically, they give the same results for large inputs. But there are good reasons to prefer Agresti-Coull if the number of games might be small. (By the way, I came up with this idea on my own—though surely I was not the first—and only later found that it was somewhat standard.)
得分=(每次胜利的分数)*(获胜的次数)+(每次失败的分数)*(失败的次数)怎么样,其中每次胜利的分数是某个正数,而每次失败的分数是某个负数,选择它可以很好地发挥作用你的应用程序。
How about score = (points per win) * (number of wins) + (points per loss) * (number of losses), where points per win is some positive number and points per loss is some negative number, chosen to work well for you application.