Wondev Woman - Fog of war Tool

Hi there,

I’m fairly new to Codingame so I’d like some advice about good or bad practice in contests.

I have developed a tool for Wondev Woman which tries to find where the enemy units are, in order to see what’s happening in the fog of war at Bronze league or higher. If the enemy units can’t be found precisely, at the very least it computes a map of the possible locations. Ultimately, it detects if legalActions are going to fail, e.g. ordering MOVE&BUILD where there is a presumed invisible unit at the build location.

I’ve spent about 20 hours to make it right, and I think people could be interested in such tool without spending another 20 hours. I’d be willing to share it but I don’t know if this is allowed or if this is considered bad practice in contests (every man for himself, etc.).

The code is in C++ (but easily portable to many languages), is about 600 lines of code / 30K chars (utility classes included), and takes up to 400 μs (including reading from stdin) or less with preprocessor optimizations. You need at least 2 calls to use it: reading at the beginning of each turn, and tell which action you chose at the end of each turn. The intelligence in between is totally up to you.

What do you think? Am I getting ahead of myself? Should I wait until the contest is finished before submitting the code to the community?

As far as I understand the rules, code sharing is strictly prohibited during a contest. What is allowed after the contest is subject of much debate that would be hard to summarize, so “maybe” is the best answer I can give you.


It’s forbidden to share code during a contest.

Granted the fact that this tool doesn’t make for a complete AI capable of reaching legend, I’d say you could share it after the contest. I’m not sure it’s a good idea for the competition in the multi though.