Tetrigraph

Thread in 'Discussion' started by Xkeeper, 29 Apr 2006.

  1. http://xkeeper.shacknet.nu:3/e/tetris.php


    Here's a graph showing my WiFi rating changes (blue is me, red is an opponent, more on that later). It may be helpful in figuring out the algorithm this game uses to determine ratings, since I've actually compiled my scores and such.



    If an opponent block shows up, that's his initial rating, and the rating I'll play with is the one just before it; the abnomaly at the start was becasue I couldn't take the rating in time [​IMG]

    I'll play more games shortly to help fill up the graph with more entries, as that'll help in confirming the scores and such.



    (edit: stupid bbcode)
     
  2. I think this game uses an algorithm similar to that used for chess ranking. Not that I could explain how that one works.


    And since you seem interested in details...

    I've stated this before in another thread, but nobody really went for it:

    If someone were to transcribe the sequence of pieces they receive, I would be able to figure out how the TDS piece randomizer deviates from pure random (aka NES/GB style). As in, I've made tools which I've already used to figure out TGM3, that could be put to further use with relatively little effort. 1500 pieces (roughly, marathon completed 3 times) should be enough. If 3 people each did a go we could crack it in a single afternoon!
     
  3. Guest

    Guest Unregistered

    Unfortunately, it doesn't. The ELO system is (mostly) zero-sum, meaning that in any game, the loser loses as many rating points as the winner wins. The Tetris DS system definitely isn't zero-sum. In fact, whenever the player with the higher rating wins (which is what's supposed to happen), some rating points are removed from the system. I'm kind of worried about the long-term stability of the ratings; I suspect that eventually we'll see a gradual deflation of ratings across the board. (Of course, I've been wrong so far, but I suspect that's just because the game is still attracting new players, who bring points into the system by beating higher-rated opponents.)
     
  4. Hmm, I thought I'd noticed that too. It is troubling.


    I hope the rankings are calculated with Nintedo's servers and not the game cart, and that they can change some constant to adjust the level of 'drain'. Something they could tweak depending on the game's popularity.
     
  5. This is one of the reasons I wanted to figure out the algorithm, so I could just create a small simulation in, say, PHP or Qbasic that runs through even 50 players of various 'skill' (read: chance to win) and tracks the eventual point changes...



    Interestingly, it would appear that it's also dependant on the difference in rank; for example, being 750~ above your opponent and winning leads to a removal of about 6 points from the system; a difference of about 300 is only a 3 point loss; a difference of 200 is one point.


    Conversely, a higher-player loss with a 700-point difference adds 33 points; a 400-difference loss would add about 12 points.


    I should really try graphing the win/loss ratios (rating difference before, rating difference after, winner change, loser change), but I'd need more samples, preferrably from a... well, loser.
     
  6. Sorry about double post, but..


    here it is?


    This shows:

    - x-axis: total points (removed: red, added: blue) from rating system after game

    - y-axis: difference in ratings before game


    This only shows games where I started out on top (as the higher player), though I could probably convert it to handle both. It'd just take a bit of work.



    (for more detail: games that I won are marked in red, overall points removed from the rating system. games I lost are blue, overall points added to rating system.)
     
  7. Wait, are you saying the better player winning removes more points from the system, while the better player losing will add more to the system then there originally was?


    Also, you might be interested to hear that the 9000 rated player was requiring multiple wins to gain a single point. So even though you see an integer, it's got to be a floating point number.
     
  8. That would be what the chart says, yes.


    Unfortunately, this silly rating system still makes no sense.
     
  9. So if you played a friend, and threw a match, and then he threw a match, alternating... You'd both be super 1337 in no time?
     
  10. Probably not; If the difference was around 300 at the start, and the higher player always threw the game, eventually the difference would drop to <100, in which case there would be no gain at all (and it'd just be a back-and-forth spree).
     
  11. So, it's just like the points are getting "compressed" in the upper players. Individual matches might not be zero sum, but perhaps the system as a whole doesn't suffer from constant drain.
     
  12. Depends; the system mostly relies on higher-losses to save it (i.e., relies on a higher-ranked player losing occasionally), which if never happened, would lead to point deflation.


    You'd have to lose about once every... 6 games for it to even out, assuming that the difference in rating is on average 300 (which is about right)
     
  13. tepples

    tepples Lockjaw developer

    I think point deflation was put in on purpose to counter the potential inflation by newbs with their 5000 provisional ratings. See Elo rating system in Wikipedia for more about provisional rating issues.
     
  14. Thanks for collecting and presenting this data. However, if it's not too much trouble, could you make a couple more graphs? I'd especially like to see:

    - rating difference on the x-axis, points gained by the winner on the y-axis

    - ratio of winner's rating to loser's rating on the x-axis, points gained by winner on the y-axis

    I'd find these very interesting, even if you only included the games where the higher-rated player won (i.e. positive x-coordinate).
     
  15. I'm suprised I didn't think of it earlier! D'oh...


    I'll get started on it right away, whenever my connection stops sucking.


    Which won't be soon, I guess.
     
  16. Here's the top one


    Y=points gained/lost


    red: winner

    blue: loser


    (only shows games that the higher player won, though making it graph both (on a negative X) wouldn't be too hard.)



    Really, what this shows (us/me) is really, really weird.
     
  17. jjdb210

    jjdb210 Unregistered

    Hey XKeeper, I noticed that this png is being auto-generated by php. I'm guessing you have some sort of tool posting to mysql DB, and then building the graph from that?


    If that is the case, is there any way I could steal that code (not the posting one, the image generation one). I think it would go really well with blockstats.org
     
  18. Hrm. Okay, so the weirdness in that graph suggests that it's not the rating difference that really matters. (The blue points are especially weird, and I think I know why.)


    I played someone with a rating just under 8000 just now (so, rated about 900 points higher than I was at the time). I noticed that he only got 2-3 points per win. On the other hand, in your data, you played a few games against people 1000 or more rating points below you, and got 5-6 points per win. This suggests again that the rating change isn't based on the difference in ratings, nor is it based on the ratio. I have a couple guesses as to how things might work, but nothing solid yet.


    Also, I'm going to try erasing my saved data so I can play at 5000 for a few games and see how ratings change there. (I should be able to back up my save, but if it fails, oh well...I'll be back to my normal rating before long.)
     
  19. I have a large PHP file that generates a huge array of ratings:


    Code:
      $ratings[] = array( 7248, 5031);
      $ratings[] = array( 7252, 5018);
      $ratings[] = array( 7252,  0);
      $ratings[] = array( 7252, 6734);
      $ratings[] = array( 7264, 6718);
      $ratings[] = array( 7273, 6705);
      $ratings[] = array( 7273,  0);
      $ratings[] = array( 7273, 5535);
      $ratings[] = array( 7277, 5525);
      $ratings[] = array( 7280, 5515);
      $ratings[] = array( 7280,  0);
    And then it just loops through this array.


    If you give me the db specs, I can probably make a quick edit of this to work with MySQL database, maybe make it use some sort of bars or something (as the graph is actually quite easy to generate and plot on)...
     
  20. jjdb210

    jjdb210 Unregistered

    Xkeeper, I'm more interested in the file generating the PNG than the mysql portion (I can take care of that), I just think it would be a cool tool to add to the blockstats site so people can record their own win loss data... Maybe at the same time we can get some more detailed stats to figure out the formula.
     

Share This Page