Skip to content

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