Open mzuenni opened 5 months ago
Could you provide a minimal problem we can test this with?
@mzuenni as discussed in person, I'll close this issue as this requires the problemspec to first have a definition for this. Please re-open when that is in a reasonable state so we can start implementing this.
Just a small update:
A multi-pass validator can be used for problems that should run the submission multiple times sequentially, using a new input generated by output validator during the previous invocation of the submission.
To signal that the submission should be run again, the output validator must exit with code
42
and output the new input in the filenextpass.in
in the feedback directory. Judging stops if no nextpass.in was created, or the output validator exited with any other code.It is a judge error to create the
nextpass.in
file and exit with any other code than 42.
multipass
can be combined with validation
set to custom
or custom interactive
.judgemessage.txt
and judgeerror.txt
should not be removed between invocations of the output validator i.e. the validator is responsible for appending/overwriting to the files in thereComments:
stdout
and stderr
you likely want to display that per invocationAre there more things that need to be properly defined?
Example interactive problem on Kattis: https://open.kattis.com/problems/guessinggame2
To summarize my understanding of the spec:
feedback/nextpass.in
IMHO, the spec should be extended to include a required upper bound of passes. @mzuenni was this considered?
The following changes are likely required in DOMjudge:
All in all doable, but still touches more than just the backend.
I think an upper bound was not considered (it is intended that the number of passes is variable so the validator is responsible for deciding the number of passes)... still an upper bound might be a good safeguard against bugs in the validator that result in an infinite loop... ~but not sure if that should be part of the spec or just a domjudge thing (is the maximum runtime of the output validator specified for normal problem?).~ maybe a new entry in limits should be added
Description of the enhancement request
In multipass problems the submission gets started multiple times and is fed with the output of the output valdiator from the previous run (but besides that the new run has no knowledge of any prior run). This allows some new types of problems about information theory and some other fields.
Expected behaviour
Any other information that you want to share?
Multipass seems to also get added to the kattis problem package format: https://www.kattis.com/problem-package-format/spec/2023-07-draft.html#multi-pass-validation Maybe it would also be nice to run the output validator with an argument which indicates which iteration this is or provide a way for the output validator to keep information between invocations.