tourist's blog

By tourist, 5 weeks ago, translation, In English
logo

Hello everyone!

We, the RGBTeam (qwerty787788, Romka and tourist), are huge fans of heuristic programming competitions and are quite saddened by the fact that they are becoming less and less frequent each year. One day, we decided to organize our own competition :) Despite the fact that such ideas often remain just ideas, this time we have a serious mindset, and now we want to invite you all to participate in the first — and hopefully not last — Code Weekend #1!

The competition will be held in a format quite similar to ICFPC/Google Hashcode — there will be one problem and several dozen tests for it. You will need to submit just an output according to the rules of the problem for each test, which can be obtained using any algorithms, written in any language, and running for any duration of time. Midway through the competition, the problem statement will be expanded, and new tests will be added.

The competition starts on June 7th at 21:00 UTC and will last 48 hours. A day after it begins, on June 8th at 21:00 UTC, a second, expanded version of the problem along with a set of tests for it will be released. The competition ends another day after the release of the second version, on June 9th at 21:00 UTC.

The expanded version of the problem will be a superset of the basic version. For instance, if the problem is "given a chess position, find the best move," the basic version may only include pawns, bishops, and knights, while the expanded version will use rooks and queens.

The competition is team-based, and there is no limit on team size, but we've tried to balance the problem in a way that larger teams don't have a significant advantage over smaller ones. Therefore, the recommended team size is 1-4 people.

Unlike ICFPC, the focus of the competition will be on heuristic algorithms rather than functional programming (although in recent years ICFPC hasn't been focused on FP either).

Attention! The contest will be held on the website https://codeweekend.dev, you need to register there (once per team). All the announcements during the competition will be in the Discord chat, so join it via the link https://discord.gg/M6pG5zp3DF. Be sure to invite your friends, relatives, pets, and anyone else who might find it interesting :)

UPD. Our competition will be generously sponsored by the TON Foundation, for which we are immensely grateful!

As a result, the following prizes will be awarded in the competition:

  • 1st place — 400 TON
  • 2nd place — 300 TON
  • 3rd place — 200 TON
  • 4th place — 100 TON

Additional prizes:

  • 1st place after the first day of the competition — 111 TON.
  • At the end of each minute of the competition, the current leader (provided there is at least one team with a positive score) receives 0.1 TON.
  • 300 TON will be distributed equally for the best solution of each test at the end of the competition. For example, if there are 10 tests, and Team A has the best result in the first three tests while Team B has the best result in the remaining seven, Team A will receive 300/10*3 = 90 TON, and Team B will receive 300/10*7 = 210 TON.

All ties are resolved by time — the team that achieves its result earlier ranks higher.

Thus, the total prize fund for the competition is over $10,000 at the current exchange rate.

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

»
4 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

omg! tourist blog!

»
4 weeks ago, # |
  Vote: I like it +60 Vote: I do not like it

My pet wanted this contest badly. Thanks tourist.

»
4 weeks ago, # |
  Vote: I like it +28 Vote: I do not like it

i want a postcard written by tourist as prize although i absolutely can't get it :)

»
4 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

This is really neat. I really enjoy the heuristic contests as well!

»
4 weeks ago, # |
  Vote: I like it +159 Vote: I do not like it

Cool. It would be nice to save the leaderboard after the first 24 hours (and announce winners of day 1).

Prizes attract strong participants, which makes the competition more interesting for everybody. An incentive to participate is even more important for a long competition. So I hope that you do find a sponsor (at least for future editions). Just ask Huawei.

Possible prizes without sponsors: playing an online (board?) game with the organizers; appearing in the problem statement of Code Weekend #2.

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it +69 Vote: I do not like it

    Sure, we will save the scoreboard after the first day.

    We also found sponsors!

»
4 weeks ago, # |
  Vote: I like it +114 Vote: I do not like it

I showed this to my pet racoon and he is very excited

Look how happy Pedro is
»
4 weeks ago, # |
  Vote: I like it -12 Vote: I do not like it

Olala! My pet codehorses will enjoy that.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Discord invite has expired

»
4 weeks ago, # |
  Vote: I like it -32 Vote: I do not like it

»
4 weeks ago, # |
  Vote: I like it -32 Vote: I do not like it

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Is it rated?

»
3 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

What’s the maximum participation limit??

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +18 Vote: I do not like it

    Technically, there is no limit, but we believe that participating with more than 4-5 participants per team does not make much sense.

  • »
    »
    9 days ago, # ^ |
      Vote: I like it -35 Vote: I do not like it

    I am also from India, A NIT student, you IIT people only create monopoly in Indian society, you never make our country to win first rank in any Codeforces round, curse on all you. Our Indian Cricket team making all of us proud but you people are curse, donot know when my country will win first prize

»
3 weeks ago, # |
  Vote: I like it +18 Vote: I do not like it

I am looking for a teammate to participate in this competition. I have participated in other heuristic contests before, but I would like to learn more and improve.

Ideally, we would have similar rating so that both of us can enjoy the contest. My timezone is GMT+2. Contact via DM if you are interested.

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

RGBTeam has 3/4 participants. I can be the 4th.

»
2 weeks ago, # |
  Vote: I like it -10 Vote: I do not like it

Cool.

»
13 days ago, # |
  Vote: I like it +60 Vote: I do not like it

The contest starts in 4 hours!

Also, note that after every minute of the contest, we award the current top-1 team with 0.1 TON. So, if you have good prototyping skills and code simple solutions quickly, you could earn some easy money :)

»
11 days ago, # |
  Vote: I like it +31 Vote: I do not like it

Thank you for the contest, it was really interesting. Is it going to be hosted so that we can submit after the contest ends?

On another note, could someone share their top 10 approaches for the contest (especially part 2)? We tried a greedy heuristic with a little bit of ‘poor man’s RL’, but we had a hard time tuning it to task 2.

»
11 days ago, # |
Rev. 2   Vote: I like it +66 Vote: I do not like it

I applaud the organizers. I don't remember an optimization competition that was so well prepared. Smooth platform and visualization, efficient judging, reasonably small tests (no N=1e6), good variety of tests. At any moment of the competition, no one person was winning by holding maximum on all tests. I'm not aware of any bugs or issues (maybe because I slept for the first 8 hours of the competition). The problem was fine too.

I participated with mareksom and we got 8th place. We did well with the harder version so here's the solution.

Greedy solution, no annealing etc.

  1. Run BFS from your current position. For every point on the grid, find the smallest number of steps to get there, in case of ties minimize the total fatigue. (I didn't have time to implement allowing for a few more steps to get smaller fatigue.) For efficiency, only consider moving with the full speed to the border of the circle of radius SPEED. Exception: from the starting BFS position, consider all O(SPEED^2) moves to all points inside of the circle. This way, you will reach everything in the grid in an almost optimal way.
  2. For every point on the grid, see what monsters you could attack from there. Try different subsets and order to attack.
  3. Among all possibilities (where to move, subset&order of monsters to attack from there), choose the one that maximizes some heuristic function, e.g. minimize fatigue, then maximize gold/turn, then maximize exp/turn.
  4. Try different heuristic functions. Choose a random turn (or level) when you switch from maximizing exp to maximizing gold. If there are ties of where to go (in order to attack the same monsters anyway), choose a random option.
  5. Move back to step 1 unless you run out of turns.
  • »
    »
    10 days ago, # ^ |
      Vote: I like it +16 Vote: I do not like it

    Thank you for sharing your solution!

    One thing that has been a little sad in my optinion about optimization contests is that the source code of the solutions never gets released, so if one wants to get better at it there's virtually no way. Sadly, it has been the same for this contest (as no source codes would get uploaded anywhere to start with), but I personally hope to see a more open-sourced environment for optimization contests in the future.

    • »
      »
      »
      7 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I think it's worth asking on Discord whether anyone would be willing to share their code on GitHub or another platform — maybe some people won’t mind.

»
10 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Thank you! It was fun =)