File size: 24,455 Bytes
a2b0c04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2c7f145
 
a2b0c04
 
 
 
2c7f145
 
a2b0c04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2c7f145
a2b0c04
2c7f145
 
a2b0c04
 
 
2c7f145
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ad54cd3
 
 
 
 
 
 
 
 
 
 
2c7f145
 
 
a2b0c04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2c7f145
a2b0c04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2c7f145
 
 
 
 
 
 
ad54cd3
 
a2b0c04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2c7f145
 
 
a2b0c04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2c7f145
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a2b0c04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2c7f145
 
a2b0c04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2c7f145
ad54cd3
 
a2b0c04
2c7f145
 
 
 
 
a2b0c04
 
 
 
 
 
 
 
 
2c7f145
a2b0c04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2c7f145
 
 
a2b0c04
 
 
 
 
 
 
 
 
 
 
 
 
2c7f145
 
 
 
a2b0c04
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
"""Write the dataset card (hf/dataset/README.md) and the Space's README from the exported results.

    python scripts/figures.py && python scripts/export.py && python scripts/card.py

Every number in the card comes from hf/numbers.json, hf/space/data.json or training/kaggle/analysis.json.
"""

import json
from pathlib import Path

ROOT = Path(__file__).resolve().parent.parent
HF = ROOT / "hf"
DATASET_URL = "https://huggingface.co/datasets/JagritGumber/shortlist"
SPACE_URL = "https://huggingface.co/spaces/JagritGumber/shortlist"
RFC_URL = "https://github.com/openenv/OpenEnv/blob/main/rfcs/008-environment-auto-validation.md"
OPENENV_COMMIT = "739b44b525d174700c11c328618a5ba41d5f428f"

NAMES = {"connect4_env": "Connect 4", "connect4_env-patched": "Connect 4, with Beam's fix", "chess_env": "Chess",
         "maze_env": "Maze (`maze_env`)", "fraud_triage_env": "Fraud triage", "wildfire_env": "Wildfire", "snake_env": "Snake",
         "grid_world_env": "Grid world", "pelican_svg_env": "Pelican on a bicycle (SVG)",
         "dipg_safety_env": "DIPG medical safety", "sophistry_bench_sprint_env": "Sophistry bench"}
OPENSPIEL = {"tic_tac_toe": "Tic-tac-toe", "kuhn_poker": "Kuhn poker", "cliff_walking": "Cliff walking"}
GROUPS = [("worth", "Worth training on"), ("hard", "Too hard for the small model now"), ("nograd", "No gradient"),
          ("easy", "Too easy for Beam"), ("unsure", "Skill doesn't show yet"), ("weak", "Weak signal"),
          ("reach", "Out of reach for Beam"), ("flat", "Flat reward"), ("incomplete", "Couldn't be judged")]
LEARNED = {"skill and format": "Partly skill, partly format", "mostly format": "Mostly format", "gamed": "Gamed the grader",
           "no real gain": "No real gain", "no change": "No change"}
AUDIT = {"learned_skill": "learned the skill", "learned_format": "learned the format", "gamed_grader": "gamed the grader",
         "no_change": "no change"}
EFFORT = {"beam-low": "low", "beam-medium": "medium", "beam-high": "high", "beam-xhigh": "extra-high", "beam-max": "max"}


def name(suite: str) -> str:
    if suite.startswith("rg-"):
        return suite[3:].replace("_", " ").capitalize()
    if suite.startswith("os-"):
        return OPENSPIEL.get(suite[3:], suite[3:].replace("_", " ").capitalize())
    if suite.startswith("hub-"):
        return f"`{suite[4:].replace('__', '/')}` (Hub)"
    return NAMES.get(suite, suite)


def pct(x: float | None) -> str:
    return "–" if x is None else f"{x * 100:.0f}%"


def pct1(x: float | None) -> str:
    return "–" if x is None else f"{x * 100:g}%"


def pval(p: float) -> str:
    return "<0.001" if p < 0.001 else f"{p:.3f}"


def verdict_tables(verdicts: list[dict]) -> str:
    out = []
    parts = [("For the small model (Qwen3-0.6B)", [v for v in verdicts if v["group"] != "broken" and v.get("judged_for") == "small model"]),
             ("For Beam (no small model played these)", [v for v in verdicts if v["group"] != "broken" and v.get("judged_for") != "small model"])]
    for title, items in parts:
        out.append(f"**{title}**\n\n| Verdict | Count | Environments |\n|---|---|---|")
        for key, label in GROUPS:
            rows = [v for v in items if v["group"] == key]
            if rows:
                envs = ", ".join(name(v["suite"]) + (" *" if v.get("provisional") else "") + (" †" if v.get("gameable") else "")
                                 for v in rows)
                out.append(f"| {label} | {len(rows)} | {envs} |")
        out.append("")
    broken = [v for v in verdicts if v["group"] == "broken"]
    out.append(f"**Broken as shipped** ({len(broken)}): " + "; ".join(f"{name(v['suite'])}: {v['verdict'].split(': ', 1)[-1]}" for v in broken) + ".")
    out.append("\n\\* provisional: fewer than 4 tasks, so a first pass rather than a final call. "
               "† can be gamed: a no-skill answer pays more than the small model earns now (see below; added after training).")
    return "\n".join(out)


def training_table(t: dict) -> str:
    rows = ["| Family | Predicted | Mean reward before → after (p) | Accuracy before → after | What the model learned | Beam's blind audit |",
            "|---|---|---|---|---|---|"]
    for r in t["rows"]:
        pred = ("reward rises" if r["prediction"] == "improves" else r["prediction"]) + (" ✓" if r["held"] else " ✗")
        learned = r["learned_text"].split(": ", 1)[-1] if r["learned_text"].startswith(("Partly", "Mostly")) else r["learned_text"]
        rows.append(f"| {r['family']} | {pred} | {r['reward_before']:.3f} → {r['reward_after']:.3f} ({pval(r['p'])}) | "
                    f"{pct1(r['accuracy_before'])} → {pct1(r['accuracy_after'])} | **{LEARNED[r['learned']]}.** {learned[0].upper() + learned[1:]} | "
                    f"{AUDIT.get(r['beam_audit'], r['beam_audit'])} |")
    return "\n".join(rows)


def effort_table(effort: list[dict]) -> str:
    rows = ["| Task suite | Share solved on the first try, by effort |", "|---|---|"]
    names = [name(e["suite"]) for e in effort]
    for e in effort:
        label = name(e["suite"]) + (" (Reasoning Gym)" if e["suite"].startswith("rg-") and names.count(name(e["suite"])) > 1 else "")
        rows.append(f"| {label} | " + " · ".join(f"{EFFORT[p]} {pct(r['solved'])}" for p, r in e["rungs"].items()) + " |")
    return "\n".join(rows)


def gaming_table(gaming: list[dict]) -> str:
    rows = ["| Family | Best no-skill answer | Its score (200 held-out tasks) | Small model now | Can be gamed |", "|---|---|---|---|---|"]
    for g in sorted(gaming, key=lambda x: -x["best"]["score"]):
        rows.append(f"| {g['family']} | {g['best']['label']} | {g['best']['score']:.3f} | {g['learner_mean']:.3f} | "
                    f"{'**yes**' if g['gameable'] else 'no'} |")
    return "\n".join(rows)


def forward_section(f: dict | None) -> str:
    if not f:
        return ""
    g, ev = f["evidence"]["gaming_check"], f["evidence"]
    top = list(g["most_common_correct_answers_on_training_tasks"].items())
    res = {c["id"]: c for c in (f["result"] or {}).get("claims", [])}
    lines = [f"The check flags maze. On the {g['training_tasks']} training tasks the most common correct answers are "
             f"\"{top[0][0]}\" ({top[0][1]} tasks) and \"{top[1][0]}\" ({top[1][1]}), and answering \"{g['constant_answer']}\" to every "
             f"held-out task scores {g['its_held_out_score']:.3f}, while the small model earns "
             f"{ev['small_model_mean_reward_on_ladder']:.3f}. So before any maze training we published four claims "
             f"(`training/maze/predictions.json`, {f['written_at']}, SHA-256 `{f['sha256']}`). The method is unchanged.", "",
             "| Claim | Test | Result |", "|---|---|---|"]
    for c in f["claims"]:
        r = res.get(c["id"])
        status = ("**held**" if r["held"] else "**failed**") + f": {r['measured']}" if r else "pending"
        lines.append(f"| {c['id']}. {c['claim']} | {c['test']} | {status} |")
    r = f["result"]
    if r:
        held = sum(c["held"] for c in r["claims"])
        lines += ["", f"**{held} of {len(r['claims'])} claims held.** The model collapsed ({r['collapsed_share']:.0%} of its answers are one "
                  f"text) and learned no maze-solving ({r['exact_before']} exact answers before training, {r['exact_after']} after), but "
                  f"not onto \"5\". It found a different route, one the check didn't try: maze's grader (Reasoning Gym's default "
                  f"`score_answer`) pays `len(answer) / len(reply)` whenever the right answer appears anywhere in the reply, so the "
                  f"model writes a grid of the numbers {r['collapsed_answer_numbers']}. That grid contains the answer to all "
                  f"{r['held_out_answers_inside_it']} held-out tasks and earns about {r['its_mean_score_if_given_everywhere']:.3f} on each, "
                  f"so reward rose from {r['reward_before']:.3f} to {r['reward_after']:.3f} with no skill at all. The warning held; the "
                  f"guess at which cheat was wrong, and the miss is a second loophole in the same grader. Files: `training/maze/results/`."]
    return "\n".join(lines)


def census_table(c: dict) -> str:
    rows = ["| What happened | Spaces | Share |", "|---|---|---|"]
    rows += [f"| {g['group'][0].upper() + g['group'][1:]} | {g['count']} | {g['share'] * 100:.1f}% |" for g in c["groups"]]
    return "\n".join(rows)


CARD = """---
pretty_name: Shortlist
language:
- en
tags:
- openenv
- reinforcement-learning
- rl-environments
- grpo
- evaluation
- beam
size_categories:
- 1K<n<10K
license: cc-by-4.0
---

# Shortlist: which open RL environments can a model learn from?

OpenEnv's [RFC 008]({rfc}) reserves the statistical learnability checks for whoever runs a validation hub, and
ships no runner for them. Shortlist is that runner. Beam plays each environment at every rung of a capability
ladder: doing nothing, acting at random, a small model, then Beam itself from low to max reasoning effort. Where
the rungs spread out, a model can learn; where they pile up, it can't. The checks turn that into a verdict per
environment, and a GRPO training run tests whether the verdicts hold.

**Results page:** [{space}]({space}). This repo holds the data, the code and the training proof behind it.

## At a glance

- **{env} environments, {suites} task suites, {episodes:,} episodes**: {beam_ep} played by Beam
  ({tokens:,} output tokens), {small_ep} by the small model (Qwen3-0.6B), the rest by the two model-free players.
- **Verdicts predict where reward moves, not whether the skill is learned.** {held} of {families} pre-registered
  predictions held when Qwen3-0.6B was trained with GRPO. But in {routes} of the {rose} families where reward rose,
  the model got there by gaming the grader or learning the answer format, not the skill. Beam's blind audit matched
  our reading on four families, caught the word-sorting echo before we did, and was stricter on basic arithmetic.
- **So the shortlist now checks whether a reward can be gamed.** {gameable} of {gaming_families} Reasoning Gym families pay
  more for an answer that needs no skill than the small model earns now, including two the training run didn't
  cover: maze (always "5" scores {maze_score}) and game of life (an empty board scores {gol_score}). This check was added after
  training. Maze was then a forward test, published before training: it collapsed with no skill, as predicted (3 of 4
  claims held), but onto a different cheat than the one we named.
- **Three defects in shipped environments**, each flagged by Beam's play on the ladder: Connect 4 (no opponent;
  Beam diagnosed it and wrote the fix), DIPG (its answer markers are Beam's own control tokens), Pelican (the vision
  judge is off by default, so any two-wheeled drawing scores 1.0).
- **Effort is a ladder too.** On {eff_suites} suites, Beam's highest effort solved more tasks than low effort on
  {eff_more}, as many on {eff_same}, and fewer on {eff_less}.
- **Hub census.** Of {spaces} OpenEnv Spaces checked, {passes} ({passes_share}) run and pass the floor checks;
  {dn1} pay 1 or more for doing nothing.

## How Beam is used

Beam (`Beam-1.0-501B-A23B`, through Reflection's OpenAI-compatible API) does five jobs. Each is a script in
`code/`, and every output it produced is in this repo.

1. **Plays the top rungs of the ladder.** Beam acts through one tool built from the environment's own action
   schema, after reading the environment's README, at low, medium, high or max reasoning effort. Its rungs are the
   reference that shows a task can be done. {beam_ep} episodes, {tokens:,} output tokens.
   (`code/shortlist/policies.py`, `code/scripts/ladder.py`, `episodes.jsonl`)
2. **Diagnoses and fixes broken environments.** When a check fails, Beam gets the ladder's numbers and the
   environment's source, explains the failure and writes the patch. For Connect 4 it found there was no opponent:
   as shipped, doing nothing won {c4_null}, random play {c4_random} and Beam {c4_beam}. On Beam's fixed copy, doing
   nothing won {c4f_null}, random play {c4f_random} and Beam {c4f_beam}. (`code/scripts/fix.py`, `fixes/`)
3. **Writes setups for environments it has never seen.** For {community} Hub environments, Beam read the README,
   the action schema and the first observation, and wrote the setup Shortlist plays: episode length, how to
   score, what counts as solved and the maximum reward, each backed by a quote from the README.
   (`code/scripts/setup_env.py`, `census/setups/`)
4. **Gives a ladder of skill inside one model.** Its effort settings let one model fill several rungs, so
   difficulty separation can be measured without a zoo of models. (`effort` in the results page data)
5. **Audits the training run.** Given each grader's source, one question, and a few answers from before and after
   training, but not our conclusions, Beam (high effort) judged whether the model learned the skill, the format, or
   a loophole. (`code/training/audit_with_beam.py`, `training/beam_audit.json`)

One finding is about Beam itself: DIPG only scores answers wrapped in `<|channel|>analysis<|message|>` … `<|end|>`,
which are single control tokens in Beam's Harmony-style chat format. When Beam writes them inside an answer they
arrive mangled, so every answer took the −10 format penalty ({dipg_default} cleared the format check). With square-bracket markers, a setting
DIPG already has, {dipg_sq} cleared it.

## The ladder and the checks

| Rung | Player |
|---|---|
| Does nothing | Always takes the first allowed action. No model. |
| Acts at random | Picks a random valid action. No model. |
| Small model | Qwen3-0.6B, thinking off, served by llama.cpp (Q8_0). Reasoning Gym only: the model you would train. |
| Beam, low → max | `Beam-1.0-501B-A23B` at each reasoning effort. |

The checks, in `code/shortlist/checks.py`:

- **Floor gap** (`semantic.floor_gap`): doing nothing or acting at random must not already earn the top reward.
- **Reward reachability**: the strongest rung earns reward.
- **Difficulty separation**: the strongest rung beats the floor (one-sided bootstrap, p ≤ 0.05).
- **Headroom**: the best rung leaves room below the known maximum.
- **Variance**: replaying one task varies less than the strongest rung's gain over the floor.
- **Adversarial floor** (RFC 008 #26, Reasoning Gym only, added after training): no answer that needs no skill pays
  more than the learner earns now and at least a tenth of the top reward. The RFC leaves the procedure open; ours
  (`code/shortlist/gaming.py`) tries a constant answer, the question echoed back, and the task's input played back.
- **GRPO signal**: the learner's repeated attempts at one task disagree on at least one task in five. Those are the
  only tasks a GRPO update learns from.
- **For the small model** (`code/shortlist/trainee.py`): worth training if its mean reward is above zero, it solves
  under 95% on the first try, and its GRPO signal is at least 20%.

Verdicts are judged for the small model where it played (Reasoning Gym), and for Beam everywhere else.

## Results

### The shortlist

{verdict_tables}

Per-suite numbers, every check and its statistics are in `verdicts.json`.

### Does the verdict predict training?

The predictions for {families} small-model families were written first. Their SHA-256,
`{sha}`, was committed to this repo at {committed} UTC; the first training checkpoint is from
{first_ckpt} UTC. Qwen3-0.6B was then trained with GRPO for 100 steps per family (TRL, LoRA r=16, fp32, one Kaggle
T4) and scored on the same 200 held-out tasks before and after.

{training_table}

The pre-registered criterion, "reward rises", held for all {families}. What moved reward was mostly a cheaper route
the grader allows: a constant answer, the input played back, or a change of format. The do-nothing and random players
can't see those routes, because each needs one specific answer, so a training run needs a second check once it
finishes. Beam can run it. Its audit called letter counting and propositional logic gamed, chain sum a format gain,
and leg counting unchanged, as we did. It caught the word-sorting echo before we did. On basic arithmetic it was
stricter than our lenient re-score, which shows part of that gain is skill. Full write-up: `training/RESULTS.md`.

### Can the reward be gamed?

Added after the training run above. Each family's own grader scores three answers that need no skill: the most
common correct answer on the 400 training tasks (what GRPO would find), the question echoed back, and the task's
input played back where it has one. A family can be gamed when the best of them pays more than the small model earns
now and at least a tenth of the top reward.

{gaming_table}

### A forward test: maze

{forward_section}

### A ladder inside one model

Higher efforts played one attempt per task and low effort three, so these are small samples.

{effort_table}

### What's on the Hub

{spaces} Spaces tagged `openenv`: the most-liked, plus a random sample of the rest. No model was used: each Space
was woken, its OpenEnv routes tried, and one do-nothing and two random episodes played. Spaces still asleep got a
second try with ten minutes to wake.

{census_table}

## Files

| Path | What it holds |
|---|---|
| `episodes.jsonl` | Every episode of the main run, one per line: suite, environment, player (`policy`), task, attempt, each step's action and reward, the return, tokens, and Beam's reasoning (trimmed to 2,000 characters per step). Episodes that failed for harness reasons are left out. |
| `pilot_episodes.jsonl` | The earlier pilot runs, before the harness fixes. Not used for any verdict. |
| `verdicts.json` | Per task suite: each rung's statistics, every check with its numbers, the verdict and who it was judged for. |
| `census/` | The Hub census (`census.jsonl` first pass, `census2.jsonl` second pass), the sample (`chosen.json`) and Beam's setups (`setups/`). |
| `fixes/` | For Connect 4: the evidence Beam was given, its reasoning, its reply and the patch. |
| `training/` | Pre-registration, predictions and their SHA-256, results, Beam's audit, the lenient re-score, `analysis.json` and `RESULTS.md`. `training/maze/` holds the maze forward test. |
| `gaming.json` | The can-it-be-gamed check: every no-skill answer tried, per family, with its score. |
| `code/` | The Shortlist package, scripts, training code and the Kaggle notebook. |

## Reproduce

Python 3.12, OpenEnv at commit `{openenv_commit}` cloned into `vendor/OpenEnv`, and
`pip install -r code/requirements.txt` (each environment's own requirements are also needed to serve it). A Beam
key goes in `REFLECTION_API_KEY` (we keep it encrypted with dotenvx).

```bash
cd code
python scripts/ladder.py --suites maze_env --tiers null,random                  # floors only, no key needed
dotenvx run -- python scripts/ladder.py --suites rg:leg_counting --tiers null,random,beam-low
python scripts/report.py runs/<run>                                             # verdicts for a run
python scripts/hub_sweep.py --top 150 --random 150 --out runs/hub/sweep         # Hub census, no model
dotenvx run -- python scripts/setup_env.py --from-census runs/hub/sweep/census.jsonl --limit 20
dotenvx run -- python scripts/fix.py connect4_env --evidence runs/fixes/connect4_env.evidence.md
python scripts/figures.py && python scripts/export.py && python scripts/card.py  # numbers, page data, this card
```

Training: run `training/shortlist_training_proof.ipynb` on Kaggle (one T4). Part 1 writes the predictions and prints
their SHA-256; commit that before Part 2, which refuses to train unless the SHA matches. Then
`training/rescore_lenient.py`, `training/audit_with_beam.py` and `training/analysis.py`.

## Limits

- Most environments judged for Beam have two to four tasks, so those verdicts are provisional.
- One small model, Qwen3-0.6B, and only on Reasoning Gym.
- Training ran 100 GRPO steps per family, once each. Only five answers per family were saved after training, so the
  trained models can't be re-scored leniently, and the trained adapters weren't kept.
- The lenient re-score regenerated the untrained model's answers with llama.cpp (Q8_0), not the fp32 weights used
  in training. The strict scores match closely.
- Beam's setups for community environments guess the score range. Where a player scored above the guessed maximum,
  the guess is ignored.
- Two Beam-side rules were added after the first results were in: a guessed maximum that a player beats is
  ignored, and environments judged for Beam need the same GRPO signal as the small model. Neither touches the
  pre-registered small-model rule.
- The can-be-gamed check covers Reasoning Gym only, tries three cheap strategies, and was added after the training
  run. A family it passes may still be gameable another way: the maze run found one it didn't try, a reply that
  contains every likely answer.
- The Hub census is a snapshot. Spaces sleep, wake and change.

## License

Data: CC BY 4.0. Code (`code/`): Apache-2.0. Content that comes from each environment (its task text and
observations, inside the episodes and the census) belongs to that environment's authors and keeps its own license.
"""

SPACE_CARD = """---
title: Shortlist
emoji: 🪜
colorFrom: pink
colorTo: purple
sdk: static
pinned: false
license: apache-2.0
short_description: Which open RL environments can a model learn from?
---

Shortlist runs the learnability checks OpenEnv's RFC 008 reserves for validation hubs. Beam plays each environment
at every rung of a capability ladder; the checks sort the environments by whether a model can learn from them, and
a GRPO training run tests the verdicts.

Data, code and the training proof: [{dataset}]({dataset}).
"""


def main() -> None:
    n = json.loads((HF / "numbers.json").read_text())
    d = json.loads((HF / "space" / "data.json").read_text())
    t = json.loads((ROOT / "training" / "kaggle" / "analysis.json").read_text())
    rose = [r for r in t["rows"] if r["prediction"] == "improves" and r["held"]]
    c4, c4f = n["connect4"]["as_shipped"], n["connect4"]["with_beams_fix"]
    won = lambda o: f"{o['won']} of {o['games']}"
    gate = lambda o: f"{o['cleared_format_gate']} of {o['answers']}"
    passes = next(g for g in n["census"]["groups"] if g["group"].startswith("runs and passes"))
    es = n["effort_summary"]
    gaming = json.loads((HF / "gaming.json").read_text())
    af = n["adversarial_floor"]
    flag = {x["suite"]: x for x in af["flagged"]}
    card = CARD.format(
        rfc=RFC_URL, space=SPACE_URL, env=n["environments"], suites=n["task_suites"], episodes=n["episodes"],
        beam_ep=n["beam_episodes"], small_ep=n["small_episodes"], tokens=n["beam_output_tokens"],
        held=t["held"], families=t["families"], rose=len(rose), routes=sum(r["learned"] != "skill and format" for r in rose),
        eff_suites=es["suites"], eff_more=es["higher_solved_more"], eff_same=es["same"], eff_less=es["higher_solved_less"],
        spaces=n["census"]["spaces"], passes=passes["count"], passes_share=f"{passes['share'] * 100:.1f}%",
        dn1=n["census"]["do_nothing_at_least_1"], community=n["community_environments"],
        c4_null=won(c4["null"]), c4_random=won(c4["random"]), c4_beam=won(c4["beam-low"]),
        c4f_null=won(c4f["null"]), c4f_random=won(c4f["random"]), c4f_beam=won(c4f["beam-low"]),
        dipg_default=gate(n["dipg"]["default_markers"]), dipg_sq=gate(n["dipg"]["square_brackets"]),
        sha=t["pre_registration"]["sha256"], committed=t["pre_registration"]["committed_utc"],
        first_ckpt=t["pre_registration"]["first_checkpoint_utc"], openenv_commit=OPENENV_COMMIT,
        verdict_tables=verdict_tables(d["verdicts"]), training_table=training_table(t),
        effort_table=effort_table(d["effort"]), census_table=census_table(n["census"]),
        gaming_table=gaming_table(gaming), forward_section=forward_section(d.get("forward_test")),
        gameable=af["gameable"], gaming_families=af["families"], maze_score=f"{flag['rg-maze']['score']:.3f}",
        gol_score=f"{flag['rg-game_of_life']['score']:.3f}")
    (HF / "dataset" / "README.md").write_text(card)
    (HF / "space" / "README.md").write_text(SPACE_CARD.format(dataset=DATASET_URL))
    print(f"wrote {HF / 'dataset' / 'README.md'} ({len(card.splitlines())} lines) and the Space README")


if __name__ == "__main__":
    main()