Fall Challenge 2020 - Bugs & Questions

Ok. Got it! Thanx.

Maybe that is a pun, intended…
Or this is the Wood league of the CG Tongue Twister contest. In its Legend league you will have to say the sentence loud 100x per minute. :slight_smile:

3 Likes

Suggestion: Make it easier to figure out the urgency bonuses. It’s always possible to find out, but right now you need to keep track of which potions have been brewed and it’s annoying to do so.

From description:

A single line with your command:

  • BREW id: your witch attempts to brew the potion with the given id.
    (…)

Looks like:

  • BREW id [custom message]
    also works, which is very nice but not mentioned. :wink:

It is actually mentioned in the debugging tips:

  • Append text after any command and that text will appear next to your witch
2 Likes

I guess it is not good when the side that got timeout can become a winner if it has better score. It encourages to include timeouts to strategy when one temporary has better score.

3 Likes

Using Rust, reading input is taking way to long … I measure the duration from the start of my program to after reading all input. According to my code, this takes nearly 3 seconds the first time, and anywhere from 30 to over 80 ms thereafter. I can run my program successfully though, with “Play My Code”, but it fails on the 1st or 2nd turn when Submitting my code (fails to output an action/command). It seems that before I can even read the input, the 50 ms turn limit has expired. Can’t proceed with the tournament this way. It is the 1st line of input that takes all the time.

You have to start your timer after reading the first line of input. Otherwise you time a lot of other things (opponent, referee and what not) too.

2 Likes

If I start my timer after, it still times out. The time to read the input is still counted against my time limit. Other challenges have not had this problem.

And I’m pretty sure that the bug is in your code. An infinite loop or taking too long in some cases. You won’t see the stopwatch result for the turn taking too long, as the process gets killed before you can print it.

I have my time limit set to 5 ms, verified by error console logging. Code runs fine in Play Code mode (many times). Fails when submitted (most of the time). Not sure what else it could be. I’ll look at it again tomorrow. Thanks.

Heh … the only ones I win are the ones where my opponent fails first. :wink:

Tried limiting to 1 ms (about 100 turn simulations), still fails on Submit. :confused:

I see some Rust bots at the top of the leaderboard which implies that it’s somehow related to your bot.
On the other hand a bot that only crashes in the arena but not the IDE does sound like a bug. The arena code is in release mode while you have debug mode in the IDE.
Sounds like a job for @TwoSteps to have a closer look.

You should measure time AFTER the first input.
Otherwise you count enemy’s turn time as well.

@eulerscheZahl currently you can win using timeouts. So probably those Rust leaders [ab]use it.

@tutubalin I know, see my post from above where I reported the issue and which was repeated by BorisZ. But looking at the replays, there are Rust bots playing just fine.
My own attempted to abuse the bug ranked at the bottom of the league :frowning:

I have the exact same issue with my Scala bot.
When I submit, I get 12 wins (wood 1…), then 90% of my games fail with timeout.
Any lost game I try in IDE mode I win with no timeout.

The logic is still very simple in my bot and does not involve any randomization.

I remember there was the same issue in past contests and something was fixed on CG side.

Well the bonus is available only 4 times, so you kinda need to know when your opponent brewed the first order and decremented that counter. Otherwise you would not know that it is not available anymore.

Small bug in the referee summary outputs: when a potion with an urgency bonus is completed, the price displayed in the message does not include the bonus.
See for instance https://www.codingame.com/replay/500171328, frame #22, potion #60 is first and gets a 3 rupee bonus, so the earning is 18, but the summary says:

Bob learnt spell 24
Default brewed potion 60 and earned 15 rupees
They have now brewed 2 potions. 

Hpwever the scoring appears to be OK, only the summary is wrong.

Maybe something is wrong with the release version of the code? My Submitted code can only manage 3 simulated moves before the timeout, during 50 ms turns. Runs fine in IDE. On the second turn, I output a message after each simulation. What is weird is it simulates ~150,000 easily on the first turn.

Without knowing opponent outputs, How can we keep track of how many potions he already brewed?