Mikasa's blog

By Mikasa, history, 5 hours ago, In English

Hello, Codeforces!

We're excited to invite you to UNSW Battlecode, a 4-week bot-programming competition sponsored by Jump Trading and HRT.

In teams of up to 4, you can implement procedural (rule-based algorithms allowed, ML allowed) decision-making logic for autonomous bots in a grid-based, turn-based strategy game. Your submissions will compete against other teams in 1v1 matches.

There are $20,000+ AUD in prizes, alongside exclusive recruiting opportunities with our sponsors. The competition starts on 21 September, and registration is open now!

Competition format

Unlike a normal CF contest, the objective is to develop a strategy that performs well against other submissions (you can think of it as a PvP heuristic contest). The competition combines algorithm design, adversarial decision-making, and iterative optimisation — implement a strategy, evaluate its behaviour in matches, identify failure cases, and refine your approach. Furthermore, you will have to make sure your algorithm runs within a fixed instruction limit and runtime/memory limits.

The full game rules and starter kit will be released at launch. Throughout the competition, you can:

  • Test and debug through our local and web visualizers to inspect matches and evaluate your bot through self-play.
  • Iterate on your implementation by submitting updated versions of your bot to the judge as often as you like.
  • Evaluate against other teams, where your submissions will automatically compete in matches on the leaderboard.

You'll have 4 weeks to experiment with different approaches and adapt your strategy as other teams improve theirs.

Eligibility and prizes

Participants from anywhere in the world are welcome! The Sprint Tournament is an early knockout tournament with a $1,200 AUD prize pool shared between the top two teams. It is open to all entrants.

To qualify for the Grand Final and its prizes, every member of your team must meet one of the following criteria:

  • Be currently enrolled at a university or high school in the Asia-Pacific (APAC) region.
  • Be an APAC citizen currently enrolled at a university or high school outside APAC.

High school students who meet these criteria are also eligible.

Travel (up to a certain cap) and accommodation (fully covered) will be covered for the Top 10 attending the Grand Final at UNSW. We also have merch like AirPods, headphones, and $1500 in special prizes open to everyone!

Schedule

  • 21 September: Competition opens; game rules and starter kit released.
  • 1 October: Sprint Tournament.
  • 10 October: Qualifier Tournament.
  • 17 October: Grand Final at UNSW.

Registration

Register on our website and join the UNSW Battlecode Discord for announcements, competition details, and questions.

We look forward to seeing your approaches. Good luck and have fun!

Full text and comments »

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

By Mikasa, history, 5 years ago, In English

The reason why I'm writing this blog is that the constraint of N and K is only 5000, also the time limit per test was 2 seconds. Wasn't the problem supposed to be solved in like $$$O(NlogN)$$$ or $$$O(N^2)$$$.

My approach:

First, check if the answer is 1.

Second, for each char in S, I calculate the number of strings that I can generate which differs at the position $$$i$$$.

if char at $$$i$$$-th position is '1' we have to replace it with 0 and all possible solutions which we can calculate in O(1) with a preprocessing. otherwise, if $$$i$$$-th position is '0' we have to replace it with 1 and all possible solutions which we can calculate in O(1) with a preprocessing.

here is my solution: 140804991 this solution works in 15ms and its memory is 176kb

If you have any solution that's different from mine can you share it with me?

Thanks for reading :).

Full text and comments »

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