# ELO Rating as a sorting algorithm

Let $N$ be the number of players each with a true rating $R_i$, where $i \in \{1,2,...,N\}$. Two players, $A$ and $B$, are selected at random and made to play a game. Let their current ratings be $R_A$ and $R_B$, respectively. We use the ELO rating system to calculate the expectation of a player to win the game as

$$E_A = \frac{1}{1 + 10^{(R_B - R_A)/400}}, \\ E_B = \frac{1}{1 + 10^{(R_A - R_B)/400}}.$$

Their new ratings are given by the expressions

$$R'_A = R_A + K(S_A - E_A),\\ R'_B = R_B + K(S_B - E_B).$$

If $A/B$ wins, $S_{A/B} = 1$. If $A/B$ loses, $S_{A/B} = 0$. $K$ is a constant (say 32). If each of these $N$ players start with a base rating of 1400, what order of games are required for the players to arrive at an accurate ranking? More generally, how does ELO rating serve as a sorting algorithm?

• What is an "accurate rating" (in the world of only two players playing only themselves repeatedly)? – dan_fulea Jun 8 '18 at 17:57
• The question isn't well-defined because there are three outcomes and we only know the mean, so we don't know the probabilities of the three outcomes. In the one extreme, the players might never draw; in the other extreme, one of the players might never win. It may be that the number of games required to equilibrate the ratings would be similar, but this is not immediately obvious. – joriki Jun 8 '18 at 18:56
• @dan_fulea: The question isn't clear in this regard, but it would make sense to ask how long it takes to equilibrate the difference between their two ratings. – joriki Jun 8 '18 at 18:57
• @squeak: Rating changes are usually rounded to integer values -- are you omitting that to simplify the problem? Also, if you don't round, you need to specify how precisely you want to approximate the rating, since the expected rating will never actually reach the true rating. You could either specify a target precision, or require that the difference between the expected rating and the true rating be less than some number of standard deviations of the rating. – joriki Jun 8 '18 at 19:01
• @joriki: I agree the question isn't well defined, largely because I am not sure how to do so. Intuitively it makes sense that as more games are played, the current ratings will tend to the true ratings. Is there a way to quantify how close the current ratings will be to their true rating? If we only talk about win/loss, the expected value of $S_A$ should be the $E_A$ computed with the true rating. More generally, how does ELO rating work as a sorting algorithm? – squeak Jun 9 '18 at 14:43