Add the can-it-be-gamed check, the maze forward test notebook, license, and wording fixes
2c7f145 verified Download code/scripts/gaming.py from JagritGumber/shortlist: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/datasets/JagritGumber/shortlist/resolve/main/code/scripts/gaming.py
- Command line
-
hf download hf://datasets/JagritGumber/shortlist/code/scripts/gaming.py
-
curl -L -o gaming.py https://huggingface.co/datasets/JagritGumber/shortlist/resolve/main/code/scripts/gaming.py
1.2 kB
| """Run the can-it-be-gamed check on every Reasoning Gym family the small model played. | |
| python scripts/gaming.py # writes hf/gaming.json; figures.py and export.py read it | |
| The learner's current reward is the small model's mean score on the ladder (runs/day2). | |
| """ | |
| import json | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) | |
| from shortlist.gaming import judge # noqa: E402 | |
| ROOT = Path(__file__).resolve().parent.parent | |
| def main() -> None: | |
| verdicts = json.loads((ROOT / "hf" / "dataset" / "verdicts.json").read_text()) | |
| out = [] | |
| for v in verdicts: | |
| if v["suite"].startswith("rg-") and "small" in v.get("tiers", {}): | |
| r = judge(v["suite"][3:], v["tiers"]["small"]["mean"]) | |
| out.append({"suite": v["suite"], **r}) | |
| b = r["best"] | |
| print(f"{r['family']:22s} best no-skill: {b['strategy']:14s} {b['answer'][:30]!r:34s} {b['score']:.3f} " | |
| f"small model now {r['learner_mean']:.3f} gameable={r['gameable']}", flush=True) | |
| (ROOT / "hf" / "gaming.json").write_text(json.dumps(out, indent=2, ensure_ascii=False)) | |
| if __name__ == "__main__": | |
| main() | |