Voting algorithm: how to calculate rank?

纵然是瞬间 提交于 2019-12-04 23:11:58

问题


I am trying to figure our a way to calculate rank. Right now it simply takes ratio of wins / losses of each individual entry, so e.g. one won 99 times out of a 100, it has 99% winning rank. BUT if an entry won 1 out of total 1 votes, it will have a 100% winning rank, but definitely it can't be higher that of the one that won 99 times. What would be a better way to do this?


回答1:


Depending on how complicated you want to make it, the Elo system chess uses (or something similar) may be what you want: http://en.wikipedia.org/wiki/Elo_rating_system

Even if a person has won 1/1 matches, his rating would be far below someone who has won/lost hundreds of matches against tough opponents, for instance.




回答2:


Try something like this:

votes = wins + losses
score = votes * ( wins / votes )

That way, something with 50% wins, but a million votes would still be ahead of something with 100% wins but only one vote.

You can add in an extra weight based on age (in days in this example), too, something like

if age < 5:
    score = score + ((highest real score on site) * ((5 - age) / 5)

This will put brand new entries right at the top of the first page, and then they will move slowly down the list over the course of the next 5 days (I'm assuming age is a fractional number, not just an integer). After the 5 days are up, they will be put in the list based solely on the score from the previous bit of pseudo-code.




回答3:


You could always use a point system rather than win/loss ratio. Winning would always give points and then you could play around with either removing points for losing, not awarding points at all for losing, or awarding less points for losing. It all depends on exactly how you want people to be ranked. For example you may want to give 2 points for winning and 1 point for losing if you want to favor people who participate over those who do not (which sounds kind of like what you were talking about in your example of the person playing 100 games vs 1 game). The NHL uses a similar technique for rankings (2 points for a win, 1 point for an overtime loss, 0 points for a regular loss). That might give you some more flexibility.




回答4:


if i understand the question correctly, then whoever gets more votes has the higher rank.




回答5:


Would it make sense to add more rank to winning entry if losing entry originally had a much higher rank, e.g. much stronger competitor?



来源:https://stackoverflow.com/questions/2119242/voting-algorithm-how-to-calculate-rank

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!