title: How do Clash of Clans and other games rank + match-up their players so effectively?
body: <p>So, a few days ago I worked on a pretty standard ELO system. A player can attack another player's defense, and based on the result, points are redistributed.</p>
  <p>It started out working pretty well, but eventually the lower-ranked players could not find match-ups because the way the system finds match-ups is:</p>
  <ul>
  <li>Start at the rank #1 player</li>
  <li>Go down ranks until it finds the player who requested the match-up</li>
  </ul>
  <p>Obviously this resulted in having to request data for 2,000 players if the participant's was near rank 2000.</p>
  <p>So, now the low-ranked players are finding it impossible to request.</p>
  <p>I noticed in other popular titles like Summoners War and Clash of Clans, your ranking is instantly visible whenever your points are adjusted, and I can't possibly imagine them going down the list of every single player until they've reached #200,000.</p>
  <p>I'm unable to use the first strategy that came to mind (the number-guessing game), which would be, if there are 100 players, check #50's points. If your points are lower, check #75's, lower: check #88's, etc. This is because I cannot check #50 without also checking #2, #3, etc due to the nature of the OrderedDataStore</p>
  <p>I'm trying to store data in such a way that:</p>
  <ul>
  <li>The top 50 players can be displayed</li>
  <li>An algorithm can quickly find 4 defenses of players near your rank</li>
  <li>You can view your own rank</li>
  </ul>
  <p>Any solutions?</p>