galen_colin's blog

By galen_colin, 2 months ago, In English

I've found that an interesting way to waste pass time is by watching the standings as rounds happen. As far as I know, there are mainly three ways to do this:

  • Watch a contest as it happens
  • Watch a contest as system tests run
  • Virtually participate, and watch standings that way

Obviously, the first two are time-dependent and won't work for past contests. The third option is more viable, but it both introduces meaningless data into the CF system and also forces you to watch with ICPC rules, which is inaccurate and doesn't work for other scoring systems. There's also no way to rewind, you have to watch in real-time, etc. It should be easier than that. And now it is!

I introduce you to Contest Replay — a simple website that will let you "watch" a contest's standings at any point in time. You can also target a user and watch their ranking instead of the overall leaderboard, as well as customize a ton of things to your preference. I've kept it mostly consistent with CF's design because it's nice and classic.

There are also some cool results you can find from watching past rounds — for example, in round 632 (id 1333), some troll held first place in official standings from 1:20 to 1:25 without having solved problem B!

A note: you'll have to pause "autoplay" and press Enter to change some of the settings because I'm bad at UI design. Sorry about that. Also, try not to enter invalid values.

If the thing crashes, anything about the site is unclear, or you have suggestions, feel free to comment below.

Some things I plan to implement:

  • API key support — this means "friends standings", viewing private groups/contests, and more.
  • Similar to "friends standings", an option to track just a subset of users.
  • Data validation, so it won't crash so easily
  • Support for IOI contests (might be simple, but it seems like it won't be)
  • Leaderboard improvement (distinguishment between systest/hack/pretest fails, also make the "-x" that show up when a problem is never solved consistent with the current time)
  • The two things above both require requesting all of the submissions made for the contest. This might be too much.

The site's hosted on repl.it, and you can view the source code at the repl here. It's... not exactly great, but you can see it if you want to.

This blog post is way too long already, but one final thing: autoplay works with negative numbers :)

UPD #1: major changes — API key support and friends standings. Also, a changelog so I don't have to update the blog for small changes; you can find it on the footer.

It also seems like it doesn't work for the edu round today. I think this is because people have changed their handles after competing. On the leaderboard, it shows their old handles, but since they've changed, the API thinks I'm requesting an invalid handle and returns a 400 error. Not really sure what to do about this.

Looks like the issue with the edu resolved itself — maybe handles auto-fix themselves on the standings given time, or there was some manual configuration involved. Anyway, if you see again that it gets permanently stuck on "Loading handles... ", that probably means something is wrong. An error message should pop up, but it may not (more bad UI design).

 
 
 
 
  • Vote: I like it
  • +243
  • Vote: I do not like it

»
2 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Interesting concept — only a competitive coder would even conceive of these ideas.

»
2 months ago, # |
Rev. 2   Vote: I like it +33 Vote: I do not like it

This is because, as far as I know, if I wanted to get the rating at the time of the contest, I would have to make an individual API call for each user to get their list of rating changes.

You can use contest.ratingChanges if the contest is rated, otherwise you can use the last rated contest before it.

  • »
    »
    2 months ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    Awesome idea, thank you! I didn't realize it also gave previous ratings. This will work for rated contests, however, I don't think it's as easy as just using the previous rated contest for unrated contests — for example, the previous contest could have been a div. 2 where div. 1 users were unrated, many people might not have participated, etc. This would, however, make it much easier to cache the whole history of CF rating changes. I'll try to figure out how to make that work.

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

This is revolutionary.

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Congratulations on becoming red galen_colin :)

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Fantastic work galen_colin ! just curious, how much time did it take you to make it from scratch?

  • »
    »
    2 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Around ten hours, split across two days (hackathon-style, kind of).

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Very cool, I've been hoping for something like this!