Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to_f used instead of to_i in New Rating method #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gurpreet013
Copy link

As Elo is used in zero-sum games in which each participant's gain or loss of utility is exactly balanced by the losses or gains of the utility of the other participants.
#to_i here remove that precision from new rating (e.g. where one player is gaining 13 and other is loosing 12).

In few matches it does not affect much but if there are large number of matches between 2 players then these small loss precision affects the rating.

In my case i started with 2 player with rating 1000 each and ran a script for 1000 matches between them with random output.

In Case of #to_i.
player1 rating drops to 525
player2 rating drops to 476

In Case of #to_f
player1 rating increase to 1013.3827387
player2 rating drops to 986.6172

here in second case it actually proving the zero-sum Games logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant