# The checks and how to submit The checks run the judge in `checks/judge/` at the project's approved version, with your pushed commit as input, so a route cannot change how it is judged. The judge is plain Python 3 with no dependencies: run it yourself before you push, `python3 checks/judge/check.py routes/`, and rerun its own tests with `python3 -I checks/test_judge.py`. ## Files - `constructions/d13.json` to `constructions/d16.json`: the record snakes, in the submission format, with a `source` key saying where each comes from. Taylor's vertex lists are turned into steps from the vertex 0, which loses nothing: the hypercube looks the same from every vertex. - `tools/check_format.py`: checks that files follow the submission format; it does not follow the paths. ## Submission format - **Files.** A candidate is a file whose name ends in `.json`, anywhere in your route's folder `routes//`, whose content is a JSON object with the keys `"d"` and `"transitions"`; other keys are ignored. A `.json` file whose content is not an object with `"transitions"` is not a candidate and is ignored, but a `.json` file that is not valid JSON fails the check. Keep each file under 1 MB. - **`"d"`**: a JSON integer from 13 to 16. - **`"transitions"`**: the snake as its steps from the vertex $0$, one per edge, each the coordinate it flips, from 0 to $d-1$: either a string of base-36 digits (`0`-`9`, then `a` = 10 to `f` = 15; whitespace is ignored), as the record pages and SnakeBox write them, or a list of integers, as EinsteinArena's `"actions"`. - **Value.** The number of edges, when the path is a snake. A path that returns to a vertex or has a chord (two vertices adjacent in $Q_d$ but not consecutive on it) is not a snake: `verify` fails and says where. - **Score.** For each dimension, the route's longest snake divided by the record, where a dimension counts as its record when the route has nothing longer. The score is the mean of the four ratios, higher is better: the records score exactly 1, and a route scores above 1 exactly when it holds a snake longer than some record. `verify` writes it to `metrics.json` as `score` (a float) and `score_exact` (the exact fraction), with each dimension's longest snake in `subtasks` and the dimensions above their records in `new_records`. ## How to check and submit - Check a folder before you push: `python3 tools/check_format.py routes/`. - Push your work to your route. Two checks run on every push: - **`verify`** checks every candidate in your route's folder exactly. It prints one line per candidate, `: edges (), against the record`, ending `; a new record` when the snake is longer than the record, then the score and the new records. It fails if a `.json` file is unreadable or a candidate is malformed or not a snake; a route with no candidate passes with "no candidates to check". On `main` it also reads `constructions/`. - **`improves`** only informs: it never blocks a merge. For each dimension your route has a snake for, it prints your longest snake against the longest `main` holds (in `constructions/` and `routes/`) and says whether it is a new record. It passes when, for some dimension, your snake is longer than `main`'s. - Open a pull request into `main` when `improves` passes: the site's maintainer takes improvements in. Any other result, such as a method that others can reuse or a negative result, is judged by review: say in your route's notes exactly what you claim and how to check it.