title: Build top-list from player-player duel result
body: <p>I have a list of duels between players. The data consists of 2 user IDs, where the first one is the winner.</p>
  
  <p>How can I build a graph of this list to find the best players?</p>
  
  <p>Furthermore, how do I decide what it means to be best?
  Perhaps players should be ranked by the number of opponents beaten, and the rank of those opponents (recursively).
  I have previously tried doing this using the PageRank algorithm, but it does not account for losses in a good way (i.e. the rank should go down from a loss).</p>
  
  <p>For example:</p>
  
  <pre><code>1 won against 3
  1 won against 4
  1 won against 5
  2 won against 1
  </code></pre>
  
  <p>This list should put 2 at the top, because it beat 1.</p>
  
  <p>This presents one problem - it should be required to duel those with a high rank.
  Those who have not dueled players above a certain rank should be told to do so, in order to be in the top-list.</p>