Win loss code that does not make 1-0 record better than someone like 20-3

ok, am just looking for a win loss code example. This can be for any language, just wanting the outline. Fairly new to programming, so dummy it up for me 🙂

I can do (win-loss/total of win loss). Guessing that is a good standard win loss ratio, but I don’t want a new person that has 1-0 to be ranked higher than someone that has 20-3.

Any help is appreciated and thank you.

EDIT:

The chess styles are a little more than needed. Just want a ranking system with win/loss. so lest say 20-3 is top in league right now. he is, say 23 weeks in so far. if one guy comes in and wins first match against anyone, I don’t want him to take #1 spot over people thats been there longer and have a great winning record. To respond to ampt… maybe he will be best in league, but I don’t want him instantly there cause he had one good match. Not sure if that clarify any more. Didn’t really follow Doc all the way. Looks as if he is hindered in list up to his 11th game. Not sure if thats what you ment there. Thanks again for all reasponses.

10

http://www.evanmiller.org/how-not-to-sort-by-average-rating.html

The math is a bit advanced, but the idea is to calculate a confidence interval for the win percentage, and then use the lower bound to rank.

95% confidence intervals for your examples:

20-3: 0.68-0.95
 1-0: 0.21-1.00

Since the 20-3’s lower bound is higher (0.68 vs 0.21), it would rank higher.

1

Here is a very simple solution, not so sophisticated as the chess rating systems suggested in the comments, but easier to implement: divide your current score value (win-loss)/(# of games played) by a “factor of uncertainty f”, where f is a high value if the total number of games played is small, and f converges to 1 the more games a player has played. For example, you can choose

f(k)=10-k 

after k games as long as k<10, and

f(k)=1 if k>=10

Or, if you want to double the confidence with each game played, choose

f(k) = 2^(5/k)

(the ^ means here “to the power of”, translate this to your favorite programming language).

The values 5 or 10 are just arbitrary choosen, reflecting the confidence you want to assign to the a player after one game, and the point where you want to reach (almost) full confidence. Choose your own values accordingly.

2

Just want a ranking system with win/loss. so lest say 20-3 is top in league right now. he is, say 23 weeks in so far. if one guy comes in and wins first match against anyone, I don’t want him to take #1 spot over people thats been there longer and have a great winning record.

If you want to do it uniformly, temper the win fraction with the amount of participation. The more games a player plays, the more his win fraction counts in the rankings.

An established player with a 20-3 (0.869) record who’s played all 23 (1.000) of the possible games has a ranking of 0.869 x 1.000 = 0.869. He loses nothing because of his high participation.

A new player plays one game and wins it (1.000) but is cut back by the fact that he’s played only one of the 23 (0.043). His ranking is 1.000 x 0.043 = 0.043. This puts him at the same level as someone who’s played all 23 and won only one.

2

A very simple solution is to give points for any game played, lost or won.

Score = 3 * win + loss

A new player won’t appear in the top ranks until he has a number of matches comparable with other players. This can be good, or bad – if your number of games isn’t bound new players might have no practical chance to ever get to the top.

2

Since you’ve dismissed the tried and tested option of an ELO style ranking system then you have to re-examine your needs.

[if a player] wins first match against anyone, I don’t want him to take #1 spot

… seems to sum things up best. It suggests that a crude win/loss ratio seems to be adequate and that the only requirement is to stop new players from appearing on the leaderboard.

To do that really you just need a minimum game count.

Something like:-

winRatio = win / math.max(win + loss, minMatches)

…would mean that someone would have to win minMatches in order to get that 100% win rate and after that many games they should be starting to find their level anyway.

Ultimately the fairest system for unmatched competitors is more along the ELO lines and you’ll find you will want that in the end unless all your players are very evenly matched – I would suggest you code for it now, start using it in the backend and then when they complain that the scoring system is still unfair you can look responsive to user demands when in fact you knew it was coming all along… sometimes our game is all about perception.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật