My first meta question here, so please be gentle.
I'd like to know what the prohibition on "hard-coding the output" means.
Background: I answered this question: Sudoku Compression
The question concerns producing a minimal size compressed output for a sudoku board. Unfortunately, the scoring is such that the score is calculated as the sum of the compressed size for 10 inputs. As there is no limit on program size, trivially this can be accomplished by hard coding the 10 input cases to one byte, and handling all others as 81 bytes.
Fortunately, we have the standard loopholes to prevent this. My understanding is that they are here: Loopholes that are forbidden by default
What that says is:
Hard-coding the output
Unless the question is an obvious exception (the primary exception being those tagged kolmogorov-complexity), your program is expected to do work, not just print a pre-calculated result. If the question doesn't require input and so a solution which just prints the answer would seem to meet the spec, downvote the question rather than post a protest answer consisting of the literal output.
Now, what I did was produce a real answer that compresses any Sudoku board to 12 characters (or fewer), but then optimise it so that one of the input boards produces a zero size output (details are irrelevant but I've clearly marked how it does it in the code). Clearly it meets the criterion of "expected to do work" and it does not "just print a pre-calculated result". It works on every Sudoku grid.
In my view it's a good question (I certainly enjoyed producing the code), but the scoring is faulty. But it's too late to change that.
I'm not asking for special treatment as far as my answer's concerned. But I would like to understand what "no hardcoding" means. I'd read this as a ban on trivial solutions which do no calculation, but merely print the test output. Does the ban in fact mean one is not allowed to optimise for test data? If so, I'd suggest the loophole document needs updating. Is there some other general prohibition against taking advantage of weak scoring algorithms?
sort
rather than asort reverse
deep inside the algorithm. Is choosing the better option to improve the score on the test data cheating? If it makes the worst case no worse? I'm less concerned as to this specific question than to what "in the spirit of the question" means here, given OP had ample opportunity to change the scoring or clarify. \$\endgroup\$