Skip to content

Inconsistent ratings when drawing #63

@marcbr84

Description

@marcbr84

I'm using TrueSkill to try to create a rating system for a tennis tournament among my friends. Games are 1v1, so I'm trying out the following:

from trueskill import Rating, quality_1vs1, rate_1vs1
alice, bob = Rating(25), Rating(25)
print('#############')
print('No games')
print('#############')
print(alice)
print(bob)

alice, bob = rate_1vs1(alice, bob)
print('#############')
print('First game, winner alice')
print('#############')
print(alice)
print(bob)

alice, bob = rate_1vs1(bob, alice)
print('#############')
print('Second game, winner bob')
print('#############')
print(alice)
print(bob)

This outputs the following:

#############
No games
#############
trueskill.Rating(mu=25.000, sigma=8.333)
trueskill.Rating(mu=25.000, sigma=8.333)
#############
First game, winner alice
#############
trueskill.Rating(mu=29.396, sigma=7.171)
trueskill.Rating(mu=20.604, sigma=7.171)
#############
Second game, winner bob
#############
trueskill.Rating(mu=26.643, sigma=6.040)
trueskill.Rating(mu=23.357, sigma=6.040)

I would have expected either both players having the same rating after these two games or bob have a higher rank, since according to TrueSkill FAQ

TrueSkill always takes more recent game outcomes more into account than older game outcomes.

but let's gogo with that for now, that's another issue.

However, if I remove the second game and replace it with a draw and re-run the thing:

alice, bob = rate_1vs1(bob, alice, True)
print('#############')
print('Second game, draw')
print('#############')
print(alice)
print(bob)

I get the following:

#############
First game, winner alice
#############
trueskill.Rating(mu=29.396, sigma=7.171)
trueskill.Rating(mu=20.604, sigma=7.171)
#############
Second game, draw
#############
trueskill.Rating(mu=23.886, sigma=5.678)
trueskill.Rating(mu=26.114, sigma=5.678)

bob seems to have a better ranking when having drawn than when having won. Not only that, but also sigma is decreasing more than if there had been a winner, as it somehow was more significant a draw than a loss/victory.

What's going on here? What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions