Submits predictions for all 5 seeds to the Astar Island API with safety guardrails. Accepts a directory of per-seed JSON files or a single file. Floors at 0.01, renormalizes, fixes NaN/Inf, validates dimensions, checks static terrain, detects degenerate predictions. Missing seeds get uniform fallback. Use when submitting predictions or says "submit prediction", "submit to api", "upload results".
Submits prediction tensors to the Astar Island API. Always ensures all 5 seeds are submitted.
$AINM_TOKEN set (run /setup-ainm-token if missing)numpypython3 "${CLAUDE_SKILL_DIR}/scripts/submit.py" <round_id> <predictions_dir/>
Directory should contain seed_0.json..seed_4.json (also accepts 0.json or prediction_0.json). Missing files → uniform (1/6) fallback.
python3 "${CLAUDE_SKILL_DIR}/scripts/submit.py" <round_id> <file.json> <seed_index>
Only that seed is submitted. The other 4 score 0 unless submitted separately.
/astar-submit abc-123-uuid ./predictions/
Seed 0:
Loading: ./predictions/seed_0.json
Shape: 40×40×6 | Confidence: 0.742 | Empty:820, Settlement:45, ...
Static terrain: OK
-> Submitted seed 0: ok
...
SUBMISSION REPORT
Seed 0: [OK] success
Seed 1: [OK] success
Seed 2: [UNIFORM] no prediction file
Seed 3: [OK] success
Seed 4: [OK] success
Total: 5 submitted, 0 failed
JSON array [40][40][6] — prediction[y][x][class] is probability.
Classes: 0=Empty, 1=Settlement, 2=Port, 3=Ruin, 4=Forest, 5=Mountain.
The script in scripts/submit.py applies these per seed automatically:
Hard failures (4, 5) fall back to uniform rather than aborting — all 5 seeds always get submitted.
/setup-ainm-token