Default Rules: Loopholes
What sort of loopholes are assumed to be disallowed in any challenge on this site?
One loophole per answer, please. Vote up answers if you want them disallowed, and down otherwise.
Outsourcing the answer to unof …
3y ago
Interpreting the challenge too …
3y ago
Using the lack of features in …
3y ago
Multiple URL shorteners in a w …
3y ago
Cat Quines Quines that simp …
3y ago
Optimizing specifically for th …
3y ago
Using inconsistent I/O An e …
3y ago
Using a non-free (beer) langua …
3y ago
Storing information in the pla …
3y ago
Abusing native number types …
3y ago
Empty answers to questions req …
3y ago
Bypassing source restrictions …
3y ago
Sneakily using macros In a …
3y ago
13 answers
Storing information in the platform specs
We should disallow requiring the program to be run on some platform to store information for the challenge. An extreme example would be Nullary, in which all programs are ignored and instead execution depends on time since epoch.
0 comment threads
Outsourcing the answer to unofficial conditions
An example would be a program to print the Fibonacci numbers: instead of actually computing them, it queries an API and gives back its output. Another example would be a program that executes a program in another file instead of computing the Fibonacci numbers itself.
Of course this is allowed if the challenge specifically permits it or if it could not function without it (e.g. Googling "google" and bringing the results back).
0 comment threads
Using the lack of features in a language to trivialize the problem
For example, in a challenge which requires your program to check if it is connected to the internet, using Brainfuck to always print a falsey output would violate this loophole. Of course Brainfuck can't connect to the internet.
0 comment threads
Interpreting the challenge too literally
If the challenge asks that you print the nth prime given input n, a program printing the nth prime given input n
isn't allowed.
0 comment threads
Multiple URL shorteners in a web-based challenge
In challenges which require fetching data from the Internet, URL shorteners can be problematic. This is because:
-
shorteners made after the challenge was posted are like features that were added after the challenge was posted and there's no easy way to find when a URL was created
-
they outsource the "actual" URL which is a violation of the outsourcing loophole
-
noncanonical URLs are somewhat boring and using them is a tedious way to save bytes
I propose that each web-based challenge would have a single "canonical" URL to be used in each answer, such that the actual challenge doesn't depend on its length.
0 comment threads
Cat Quines
Quines that simply output the source code due to some sort of implicit I/O, such as 1
in many languages.
0 comment threads
Using inconsistent I/O
An example would be a program whose only two outputs given some input can be 2 and 11. The program is print(11)
: claiming that it outputs in unary for some outputs and in decimal for others shouldn't be allowed even if output in either of these is allowed.
0 comment threads
Using a non-free (beer) language on a cops-and-robbers challenge
For a discussion on what counts as "free", see this post.
Cops-and-robbers challenges have two components: a cop posts a program optimized to be as good as possible in some property and a robber tries to invalidate the program. An important part of cops-and-robbers is that the robbers can test code in the same language to see if it works to invalidate a cop program.
Although non-free languages would do very well in a cops-and-robbers challenge, they are not within the spirit and introduce an arbitrary barrier to entry. This means that languages which cannot be used freely (as in beer) are banned from competing.
Languages with a free trial that eventually expires are also banned, even if unofficial methods can circumvent the free trial (we don't want companies looking at us and closing the circumventions...).
Optimizing specifically for the given test cases
Applies to "code-speeding" or fastest-code where your program must run as quickly as possible, as well as compression challenges. Obviously, there is a finite amount of cases because we have to measure speed/compression somehow.
It's not in the spirit of the challenge if you optimize your program to work extremely quickly for some cases (E.g. hardcoding the test cases and mapping them to ASCII characters to compress them in one byte), but the program works much worse for other input.
As there is no way around test cases, the general conduct should be that an algorithm's performance on the test cases is representative of its performance on other cases.
Rule of thumb: if you make your algorithm do well on the majority of cases and the test cases happen to be in the majority, that's fine, but not if your algorithm does well on a minority of cases which happens to cover the test cases given.
2 comment threads
Abusing native number types
It's common to restrict inputs, outputs, intermediate algorithm values, etc. to fit into the native number type of the language.
This can be a problem for languages like Boolfuck whose only integer type is the 1-bit integer. With a minimum of one bit of input and one bit of output, there exist four Boolfuck programs able to solve any decision problem by abusing the limitation.
A program is abusing its number type if it has to be nontrivially changed in order to work for larger numbers.
(x << n) | (x >> (32 - n))
is allowed for bit rotations since the only thing that has to be changed for larger integers is the 32, but hard-coding a list of primes 1-128 is not allowed.
0 comment threads
Empty answers to questions requiring an interpreter
In particular,
-
"simulating" a machine on this very machine by accepting the initial state as the simulation's initial state and returning the final state as its own final state
-
"interpreting" a language with an empty program that "takes input" through insertion into its source of the rest (aka all) of the program
0 comment threads
Bypassing source restrictions by storing data in the file name
In some languages, like Pxem, programs are usually stored in the file name and the file's contents are irrelevant. On Somewhere Else, a Pxem answer has been disqualified before because the file content did not adhere to restrictions even if the file name did.
I propose that the area where the source code is stored should adhere to restrictions. There might be some cases in which this won't work but I'll let the voters decide what's fair for this loophole and what isn't.
Sneakily using macros
In a code golf challenge, you are tasked to use as small bytes as possible. However, it's considered unacceptable in a language like C to use macros to hide code or shorten it without including the macro itself.
An example:
C (clang), 5 bytes
hello
In other words, it's a messy way to shorten code, and therefore, a challenge loophole.
0 comment threads