sublee / trueskill

An implementation of the TrueSkill rating system for Python
https://trueskill.org/
Other
742 stars 112 forks source link

Losers of a free-for-all are not affected equally #15

Open pbaranay opened 7 years ago

pbaranay commented 7 years ago

I would like to use the TrueSkill algorithm for modeling free-for-all games among N players, with one winner and N-1 losers. My assumption would be that, assuming the losers all have the same initial rating, the losers' ratings would all go down the same amount. However, this does not appear to be the case:

>>> num_players = 5
>>> players = [trueskill.Rating() for _ in range(num_players)]
>>> free_for_all = [(p,) for p in players]
>>> ranking_table = [0] + [1]*(num_players-1)
>>> trueskill.rate(free_for_all, ranks=ranking_table)
[(trueskill.Rating(mu=30.621, sigma=6.366),), (trueskill.Rating(mu=23.585, sigma=5.104),), (trueskill.Rating(mu=23.593, sigma=5.100),), (trueskill.Rating(mu=23.599, sigma=5.102),), (trueskill.Rating(mu=23.602, sigma=5.108),)]

Obviously the differences are slight, but still present. Do you know why this would be the case?

I'm using version 0.4.4 of the package on Python3, using the internal implementation.

sublee commented 7 years ago

I think it's a limitation of the algorithm. I got the exactly same result in a reference implementation:

image

bernd-wechner commented 6 years ago

Yes in Tom Minka's words:

"this happens due to the way draws are represented in the factor graph. It is possible to fix this at the cost of making the factor graph more complex."

In short it would require a revisit tot he TrueSkill algorithm itself, and the factor graph. They recently did this revisit the algorithm) and published TrueSKill2 but I have yet to digest that, and would be surprised if it addresses this problem. Though it might.

This by the way is a duplicate of: https://github.com/sublee/trueskill/issues/13, and could close, marked as such.