[CG]Thibaud just said that this rule does not consider the following things as cheating:
CGSpunk
A personal tool that download all your replays in the arena and compile statistics
So you can download replays and feed a Neural Network with it if you want. I’m not sure what this rule is targeting. Maybe it is just here to prevent submit bots.
Some of you have used this kind of code since The Accountant contest. We can’t run anti-cheat on it, so we added this rule to make it clearer and not to have to deal with this kind of code anymore.
PS: We’re sorry for not informing you of it earlier. A notification will ensure every participant knows about it.
I have the same question as Icebox’s. I’ve encoded and compressed arrays (or lists of arrays) especially for neural networks that I have pre-trained. Like Icebox’s code, I think it is reasonably clear what I am doing when you look at the code. (Also, of course, increasing the code file size would eliminate some of the need for these tricks.)
@Magus - just for curiosity - using @Agade code is better then
'#pragma GCC optimize “O3,omit-frame-pointer,inline” ’
or
'#pragma GCC optimize “Ofast,omit-frame-pointer,inline,unroll-loops” ’
?
Code is faster?
Yes if you use the STL.
If you don’t use the STL, there’s no difference. But this is the only point of using the flag O3: to be able to code like in the normal world.
_CG_SaiksyApo had concerns about compressing executable parts. You don’t need to worry about compressing data unless, of course, your data is used to generate code later on.
Let’s say you write Python code on-the-fly and execute it (I don’t know why you would do that but let’s assume you’re doing it). Usually you would store the Python source code in a string, write it down to a file, and execute it. In that case, if the Python source code is compressed, it is unreadable and you may use it to execute hidden lines of code -> please don’t.
Apart from this crazy example, I’m pretty sure compressing data is totally legit here at Codingame.
We should not being forbidden to obfuscate our source code to keep a free software.
I think that forbid that is not the good solution to avoid cheating. If it is easy to cheat to a game, game rules should be adapted, or codingame should not take result score as reliable.
In an environment sponsored by many private companies, prohibiting code obfuscating is not an ethical solution.
obfuscation is used mostly in proprietary software though.
I don’t know what are you referring to as “free” software, but usually that means that a user can freely modify the software to suit one’s needs. Obfuscating obviously not helping here.
Well, I must confess that I was looking into that tool to be able to compile rust code in release mode instead of in debug mode as (I assume) codingame does. The performance difference is abysmal.
I mean, it’s just a command-line argument that can actually make rust much more competitive, with performance allegedly comparable to C/C++. And debug mode is not how you are supposed to compile programs when performance matters.
As the resident Perl maniac… somehow (guess we’ll just have to wait until we get a better Perl maniac. Maybe it is because you don’t have a poorly coloured bike shed–the mascot of the Perl language)…
I’m well aware of the concept of obfuscating code… and there is a difference between messy code… and pieces of beautiful artwork that serve to marvel as much as they serve to make one vomit.
One is more inclined to merely stride through the gates of mordor than they are to accidentally make obfuscated code.
It has been stated there is a difference between poorly organised/designed code… and obfuscated code.
If anybody wants… I can try to track down some resources on proper code obfuscating–mostly making use of Perl… but only if you ask. As well–a lot of it is really really beautiful vomit inducing. Like… the things I’ve seen done. The beautiful beautiful terrible things I’ve seen done.
@_CG_SaiksyApo provide a really meanful of “what is obfuscating code” for Codingame : write directly a binary file and try to execute it. I don’t think that the fear of @Icebox holds. In the case that someone trains a neural network and his/her program loads the training data, this practice should be allowed (in my opinion).
Assuming that the above remarks are true, anyone can write code as duty as he/she wants but never try to write directly binary code.
I don’t know if I’m right, but to close this thread, my remarks should be confirmed or discuted by codingame.
PS : if I’m right, this means that the tool provided by @Agade is legal on codingame (cf. first post of @Magus)