Please turn on javascript in your browser to play chess.
Help Forum

Help Forum

  1. 09 Jan '07 18:25
    a minor question... could anyone say why the player tables aren't ranked exactly according to rating?
  2. Subscriber Silverstriker
    DANGER MOUSE
    09 Jan '07 18:41
    Originally posted by pootstick
    a minor question... could anyone say why the player tables aren't ranked exactly according to rating?
    they're updated every 24 hours, and player's ratings change all the time
  3. 09 Jan '07 19:21 / 1 edit
    yes, but the ratings don't all correlate to the position

    edit: eg. 46.Elephant0001 - 2097
    47. silvioPU - 2104
  4. 09 Jan '07 19:29
    Originally posted by pootstick
    yes, but the ratings don't all correlate to the position

    edit: eg. 46.Elephant0001 - 2097
    47. silvioPU - 2104
    The order of the tables are created overnight (UK overnight!), silvioPU must have won a game or two since then and his rating rose, but his position in the table won't change until the next refresh (tonight).

    Check tomorrow, you'll see that silvioPU should be 46nd, assuming ratings don't change again.
  5. 09 Jan '07 21:03
    As I can see this site relies on php and probably mysql.. Why aren't the player standings taken directly from the table that contains all the player information? In the "Find player" page the query is on the table that contains all the players and sorts them by the last move field. Why can't it be the same on the "Player tables", with different sorting parameters (like rating or nb of moves)?
  6. 09 Jan '07 21:32
    The lists used to be created dynamically, perhaps about a year ago. Alas, since the RHP population grew and grew it wasn't practical to take up precious server CPU running the query each time someone looked at the player list, therefore Russ batched it up an runs it once a day. At least the stats of each player are still retrieved dynamically.
  7. 09 Jan '07 21:43
    I did think that was the reason (the great number of players).. but as I've said the Find Player page does the same query as the Player Tables should do.. and I don't see any problem with speed. Maybe I'm mistaken. It's not really a problem.. But it just seems to me unnecessary.
  8. Standard member XanthosNZ
    Cancerous Bus Crash
    10 Jan '07 00:05 / 1 edit
    Originally posted by altfell
    I did think that was the reason (the great number of players).. but as I've said the Find Player page does the same query as the Player Tables should do.. and I don't see any problem with speed. Maybe I'm mistaken. It's not really a problem.. But it just seems to me unnecessary.
    If I want to view the 62nd page of the Player Tables then the site must know who is the 1831st ranked player on the site. There is no way to do this other than rank all the players up to this point (if we're doing it live). So I request a single page and the site must rank nearly 2000 players. Even with efficient sorting methods this is impractical.

    And remember, there are hundreds of pages I could view on the Tables, many requiring tens of thousands of players to be ranked.
    So instead the rankings are calculated once per day (rather than every time someone accesses the page) and they are displayed in that order until the next day. This means that sometimes there are slight discrepancies between the current ratings (accessed in real time as it is only 30 database queries per page) and the rankings but considering the alternative it's a small cost.
  9. 10 Jan '07 00:48
    succinctly answered, thanks!
  10. 10 Jan '07 22:33
    Originally posted by XanthosNZ
    If I want to view the 62nd page of the Player Tables then the site must know who is the 1831st ranked player on the site. There is no way to do this other than rank all the players up to this point (if we're doing it live). So I request a single page and the site must rank nearly 2000 players. Even with efficient sorting methods this is impractical.
    And isn't "find player" impractical also? I dispalys a table with 180,000+ players sorted by the last move field.. and it is done dynamically, not once a day.. but thousands of times per day..
  11. Standard member XanthosNZ
    Cancerous Bus Crash
    11 Jan '07 06:44
    Originally posted by altfell
    And isn't "find player" impractical also? I dispalys a table with 180,000+ players sorted by the last move field.. and it is done dynamically, not once a day.. but thousands of times per day..
    Imagine a list of all users sorted by their last move times (most recent at the top). Now imagine we want this data to be accessed live. So what we do is when a player moves (i.e. during the normal happenings when a player makes a move) we move them from their spot in the list to the top of the list. Now we have an accessable list that we can serve to people who view the find player list without having to generate it per view (it is adjusted everytime someone makes a move).
  12. 11 Jan '07 07:22
    Ok. Lovely thinking. This still doesn't explain why the player table cannot be refreshed in the same way. For it will need just 1 query for each match and not 30-50 last moves queries.
  13. Standard member XanthosNZ
    Cancerous Bus Crash
    11 Jan '07 23:37
    Originally posted by altfell
    Ok. Lovely thinking. This still doesn't explain why the player table cannot be refreshed in the same way. For it will need just 1 query for each match and not 30-50 last moves queries.
    If the player table were to function in the same way it would need to updated at the end of every game. So during the normal process of finishing a game the site would look at each player in the game's new rating and move them up/down until they are in the right position. And then it would readjust the rankings.
    Slightly more complicated but doable I think. You'll have to ask Russ why it isn't done this way.

    Also, I have no idea how it's actually done and I'm just showing how I'd do it.
  14. 12 Jan '07 05:15
    I don't need anything changed. That's why I asked in the Help Forum. I was just curious of how it's done. Why this way and not different. Anyway.. thanx for having the time to explain.