Блог пользователя scott_wu

Автор scott_wu, история, 4 года назад, По-английски

Hey all!

We've created a new 1v1 programming contest format: Lockout. Like in most contests, each round has a set of problems and contestants work to solve them as quickly as they can. In Lockout, however, contestants compete head-to-head and only the first contestant to solve each problem gets the points. Contestants can work on problems in any order, so speed and strategy are crucial to avoid getting sniped! The head-to-head action also makes the contest much more exciting for viewers.

We ran the first edition of Lockout at TCO Finals last month as a double-elimination bracket tournament. All of the finalists who were available competed (and even some of the problem writers) and we got to see a lot of exciting back-and-forth matches! As you can see though, there's still one set left to play. So we'll be streaming Grand Finals of Lockout 0 featuring tourist vs. Um_nik at 9:30 AM PST, right after the end of Good Bye 2019 on Sunday. Tune in at twitch.tv/ttocs45 to see the finals with live commentary from myself and ecnerwala! We'll watch the screens and scoreboard live, talk to tourist and Um_nik to hear their strategies, and even have a special exhibition match afterwards. :)

The finals will feature five problems with the following scoring: 100 — 200 — 300 — 400 — 500. There are 1500 points total, so the first person to get 800 or more points will be the winner. What strategies would you try? Start with A and B, then jump to E if you get them both? Or start with E, and try to win outright with either C or D afterwards? Read all the problems first and then choose a strategy based on what your opponent solves first? Let us know your thoughts!

  • Проголосовать: нравится
  • +1220
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +33 Проголосовать: не нравится

So exciting.

»
4 года назад, # |
  Проголосовать: нравится +69 Проголосовать: не нравится

Then Here comes another problem. If there are n people in the contest and they're going to solve m problems. people x solve problem y in p[x][y] minutes Then what's the score for each person if all of them compete properly? I think it's a nice problem.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +20 Проголосовать: не нравится

    I guess this is assuming that everyone has knowledge of the p matrix? Another possibly interesting problem is if you don't know p for sure, but you have some prior distribution on what it looks like and you have to devise a strategy while updating over the course of one/multiple contests.

  • »
    »
    4 года назад, # ^ |
    Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

    I believe this is an impossible problem like rock paper scissors. There is no optimal strategy. It depends on what your opponent does.

    There are 4 problems A, B, C, D, and 2 contestants X, Y

    X solves the problems A, B, C, D, in time (minutes): 5, 5, 9, 11

    Y solves the problems A, B, C, D, in time (minutes): 9, 9, 5, 5

    The "obvious" strategy would be for X to A and B (draw) Y can counter this by solving B first. Now with points tied, Y can solve problem C then D, winning the match. X can counter this by solving B first. Then X can force a draw by solving A. Y can counter this by solving A first, etc. Playing optimally, There's 50% chance of draw and 50% chance of Y winning. I couldn't think of an example where X and Y both might win. I feel like with more problems/more contestants, there must be an example.

    I think additional constraints should be added to make the match have a clear winner. I guess this is also a reason why tonight's match (it will be night time here) is going to be really fun to watch.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Yes,I get your meanings. You can't make the 'right' decision before you know others. So there won't be a 'proper' way to compete.... Then the luck is a huge factor of winning and losing. But it's still great fun ^-^.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +18 Проголосовать: не нравится

      There IS an optimal strategy in rock-paper-scissors: play each of them $$$\frac{1}{3}$$$ of the time. No matter what strategy your opponent uses, you win at least 50% of the time, hence as the game is symmetric this is provably the optimal strategy. In general, there is an optimal strategy in all finite two-player zero-sum games.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится -8 Проголосовать: не нравится

        But what if the opponent recognizes the pattern and plays accordingly

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          There is no pattern if in each turn, you choose randomly any of the three with equal probability.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +77 Проголосовать: не нравится

rick-and-morty

»
4 года назад, # |
Rev. 3   Проголосовать: нравится -34 Проголосовать: не нравится

[deleted]

»
4 года назад, # |
  Проголосовать: нравится +48 Проголосовать: не нравится

Huh, you can shuffle problems and do not show the cost of them to participants. It would make the ability to rate problems really useful. Also it would be more entertaining than classical format

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +48 Проголосовать: не нравится

    But then luck will be a huge factor. Whoever opens the easiest question first will be at a huge advantage.

»
4 года назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

This is so exciting, but I thought this is only for the real legends, since for the ones who can't jump into E that is simply not a choice! Very nice thing to watch though.

»
4 года назад, # |
  Проголосовать: нравится +31 Проголосовать: не нравится

Will playbacks be available after the competition?

»
4 года назад, # |
  Проголосовать: нравится +22 Проголосовать: не нравится

Will we be able to challange our friends in CF ?

»
4 года назад, # |
  Проголосовать: нравится +24 Проголосовать: не нравится

Were any previous sets streamed / available to watch?

»
4 года назад, # |
  Проголосовать: нравится +121 Проголосовать: не нравится

Entering e-sports territory in 5 4...

»
4 года назад, # |
  Проголосовать: нравится +27 Проголосовать: не нравится

Interesting at the top level with very few participants, but I don't see it as something the vast majority of people here will ever encounter in a meaningful way simply because it doesn't scale. You need too many problems if there are many contestants, and if you split people into separate groups/rooms, then luck can be a massive factor.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    I agree, but the same applies in most of the tournaments of a similar kind, right? And I think if this gets some hype and some try to do it on a large scale, there can be some ideas that reduce the luck portion.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +52 Проголосовать: не нравится

    I think it actually scales quite well, in each "round" of the bracket, you can use the same problems for everyone, so you only need a few rounds worth of problems. If you want, you can even run single rounds (not tournaments), just as a fun opportunity to play lockout.

    I'm not sure what you mean by "split people into separate groups/rooms"; the tournament is head-to-head (1v1), so people are always paired up and compete with one other person. (You can pair people who are close in rating for a ladder-tournament, or you can use a bracket or swiss-style tournament.)

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

      Oh, I missed that it's 1v1 with parallel matches. Matchups matter even more then.

      Imagine that in the first round, you have two people who competed against each other, and both solved 3/5 problems very quickly — of course, one of them had points for at most 2 problems, but let's say you have enough AC submissions from both which show that paired with anyone else, each of them would have comfortably gone to round 2. Yet, one of them won and the other one is out. It doesn't even have to be a question of reds competing in local Indian competition, just being familiar with problems / having a good day / something works. It poses a question which was almost completely (only in room assignment) non-existent until now: should the general skill you demonstrate correspond to your final place?

      Swiss tournament seems to be the only reasonably working format for events on a bigger scale than TCO Finals, but the matchup concern is still there — a tournament costs much more time (rounds) and problems than a single round for everyone with fine partial scoring.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +36 Проголосовать: не нравится

        Yeah, it's true that matchups definitely could affect the outcome, but I think it's less extreme than you're saying. Other competitve sports and games have these same problems, and there are a lot of known solutions for matching players and seeding.

        First off, I think seeding by CF rating makes a lot of sense. From the tournament we ran, it seems like outcomes are actually pretty highly correlated with rating.

        Once you have seeds, you have a few options: instead of a single-elimination bracket, you could expand it to a double-elimination bracket (like many fighting games) or even a Swiss-style tournament (which also has the benefit that everyone gets to compete every round). All of these formats (including single-elimination) reduce variance by putting high-seeds against low-seeds in early rounds, and they're pretty well understood from other sports.

        Alternatively, we could run a ladder-style contest and pair people with similarly ratings to make it more fun and competitive; then, whether you won or lost obviously doesn't determine your absolute rank, but can be used to update rating and track general progress.

        Finally, I agree that the actual rank you get is probably less stable than, say Codeforces rankings, but that's okay; this is designed to be a fun format for people to compete in and spectate, and I think CF-style rounds still have their place in this community. I do think the 1v1 format will make it more exciting to compete in though, even if there's some luck involved!

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +69 Проголосовать: не нравится

        So what? That's for fun

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Do ACD

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Well, first i would solve a and b and c then i would read d and e then choose the easiest then ill go through f. I think this is a good strategy! By the way, its too exciting!

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

scott_wu I think it will be too exciting if you do not let them know the standing!!!

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +112 Проголосовать: не нравится

    That kills strategic part. If we cannot adjust strategy then it's just solving problems.

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится -89 Проголосовать: не нравится

      Could you tell me what strategires you follow?

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +5 Проголосовать: не нравится

        Strategy is important. For example if I am reading problemA (easiest), and the other person has already solved A, B, then I should immediately skip A, B and jump to D, assuming that the opponent will target C, (if they fail to solve C and I do D, then I win) :) And so on and so forth. So showing the opponents solved problems is important here.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +52 Проголосовать: не нравится

        Good for you, but did you read the blog?

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится +5 Проголосовать: не нравится

          After reading many comments I felt that they are completely overlooking that one problem can be solved (for points) by only one of the participants.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Good luck for the match Sir.

»
4 года назад, # |
  Проголосовать: нравится +96 Проголосовать: не нравится

teamum_nik

»
4 года назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

Woah ! Nice ! This seems super fun and exciting !

»
4 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

Optimal paths are : 500->300 and 400->300->200/100 problem with 300 score seems crucial here, and 400 or 500 needs to be solved first... But as they would think that their opponent would try to take the 500->300 path... maybe 400->300->* would be a better strategy..! xD

This match for sure would be too exciting to see ! Just to see at what level of psychology and reverse psychology both of them would need to operate at :P !

»
4 года назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

Do you have any good system to do that? If I remember correctly CS academy has a great system to choose problems randomly and run a contest every hour. Is there anything like that?

»
4 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

By the way, watching some screen live could be unfair because it may give one participant a piece of information about what another one is solving and how is he close to the submission

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +25 Проголосовать: не нравится

    Yes, for people who are willing to cheat in for fun competitions, it could.

»
4 года назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

ASDAQWQWE xd

»
4 года назад, # |
  Проголосовать: нравится +462 Проголосовать: не нравится

ASDAQWQWE xd

»
4 года назад, # |
  Проголосовать: нравится +21 Проголосовать: не нравится

What is the penalty for a wrong attempt?

»
4 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

What a brilliant format!

I really want to watch the epic blitz between the two legendary participants and feel the thrills...if the starting time wasn't that late like 2:30 AM in my timezone. Will the matchup broadcast be stored for the future for those who missed?

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +8 Проголосовать: не нравится

Wow, sounds really cool. Maybe Codeforces can add possibility for each one to participate in contests of that format later? For example 2 people with most close raitings make a pair of contestants, that the best one get some rating, other loses. Or even forget about rating, this is really cool idea just to duel against your friends, who think they are better. Idea of such format is the great New Year's present to whole Codeforces community, thank you, Mr scott_wu :)

»
4 года назад, # |
  Проголосовать: нравится +47 Проголосовать: не нравится

I think it might be better if, after one of the contestants solve a problem, the problem's score for the another contestant gradually reduce to 0 within 2 minutes..? As in the original way if a contestant is delayed by website and is few seconds slower than the other, he'll get nothing at all, which brings a lot of uncertainty.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +16 Проголосовать: не нравится

    I think longer is also OK. What about reducing to 0 in 30 minutes linearly?

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +25 Проголосовать: не нравится

      That's closer to CF round.

      It's strange that many people don't get the basic idea why scott_wu and ecnerwala came up with the idea of this competition format. It's faster, it's more head-to-head, it is an attempt to make a competition more fun and enjoyable to watch.

      Yes, one round could be a bit unfair, just like most other sports. But that's the point!

»
4 года назад, # |
  Проголосовать: нравится +25 Проголосовать: не нравится

I'm betting 20$ for Um_nik with 40:60 odds (I get 30$ if I win). Anybody interested? I need to know you though.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Well, just one thing remains ... are you guys seriously going right after good bye 2019 ?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

As a suggestion, I think it would be good if there is a peer-to-peer code battle of this kind of format. For example, anyone can create a room and there will be three team: team A, team B and spectator team (or individual A and B if you want to have a person battle rather than a team one). It could be an extra type of mashup, a battle intended for (coding) friends. I think it would be fun and exciting for everyone if it is played with friends or people you've known.

»
4 года назад, # |
  Проголосовать: нравится -46 Проголосовать: не нравится

For me, I don't like the idea of streaming div-1 level competitive programing. The viewers who could truly enjoy the content will be limited to div-1 users, while mostly div-2 users have nothing to do while watching. You will likely have to sit for 2 hours just to watch codes which you don't understand and wait for them to be accepted.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +17 Проголосовать: не нравится

    Then don't watch...??

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится -23 Проголосовать: не нравится

      Of course i wouldn't watch this kind of content, at least for now, since i'm not be able to truly enjoy it. I believe there would be many div-2-3 people who think the streaming is worth watching then end up wasting time instead.

      By the way i think sharing my thought is better than "just don't watch".

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        I believe there would be many div-2-3 people who think the streaming is worth watching then end up wasting time instead.

        Well. What other people want to do with their time is their business isn't it? Just like there are many shameless shitposters here. Just let them be.

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится -8 Проголосовать: не нравится

          Who knows. Maybe there is someone who thinks "oh, this is right". If not, then let them be (at least i offended them).

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +11 Проголосовать: не нравится

    Yep, these are common issues for live/streamed Div. 1 contests featuring the top competitors.

    We think that Lockout improves on this significantly. First the duration of the contest is much shorter, around 30 minutes rather than 2 hours. On top of that, the problems include a much wider range of difficulty, from Div. 3 all the way to Div. 1, so everyone watching can find an interesting problem at their level.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Too excited

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Has it begun?

»
4 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

its 9:32 when it is going to start?

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится
»
4 года назад, # |
Rev. 3   Проголосовать: нравится +3 Проголосовать: не нравится

Are the problems for this contest chosen from a contest which is already over and whose editorial is already released ?

What if the participants have already solved the exact same problems ?

»
4 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

congrats tourist !!!

»
4 года назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

Last minutes were so exciting !!!!

»
4 года назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

Does tourist use this to do modular arithmetic automatically ? I can't find it in the STL

using Mint = Modular <std::integral_constant<decay<decltype(md)>::type,md>>;
  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Have you considered looking at the previous 200 lines? It only contains the string Modular about a hundred times. You know, maybe there's the class definition.

»
4 года назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

Where can we see their solutions' source code please ?

»
4 года назад, # |
  Проголосовать: нравится +23 Проголосовать: не нравится

scott_wu + ecnerwala wins against Um_nik + tourist

»
4 года назад, # |
  Проголосовать: нравится +86 Проголосовать: не нравится

I really want this format to be made into something you can play on codeforces. Something like Code Arena on Hackerearth but better!

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

I missed the stream :( will the video be available somewhere?

»
4 года назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

add this new feature to codeforces so that two friends can compete each other.they would make fun and i think it is great idea..

»
4 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Instead of only giving points to the person who submitted first, what if all points were given to the person with the fastest program? During the competition you can see which problems your opponent has solved but not their runtime. If you are worried that their program is faster, you can improve your program and submit again. Constant factors will be very important but I think it could still be fun :)

People who like code golf could play the same thing but with code length instead of runtime.