{"data":{"kind":"file","path":"README.md","version_id":"le2gky8ivqyt7mvzrjmj8kg8","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":4448,"modified_at":"2026-08-25T06:24:12.775000","content_hash":"cd2f8c6d693a82eff0f6dd9ac9b588632c883a5b0026dc5135aaf4e70c0b31bc"},"entries":[],"content":"# ramsey-combinatorics\n\nFrontier construction environment for classical Ramsey-type numbers. The model emits a coloring; a bitset verifier scores it in well under 50ms. The difficulty ceiling is open: `R(5,5)`, `R(4,6)`, `S(5)`, `W(5,2)`.\n\n### Overview\n- **Environment ID**: `ramsey-combinatorics`\n- **Short description**: Construct Ramsey / Schur / van der Waerden witnesses; bitset-verified, open-problem ceiling\n- **Tags**: math, combinatorics, ramsey, schur, vdw, single-turn, train, eval, open-problems\n\n### Datasets\n- **Primary dataset(s)**: Procedural curriculum of construction tasks (no external corpus)\n- **Source links**: Radziszowski, *Small Ramsey Numbers*, Dynamic Survey DS1; classical exact values `R(3,3)=6`, `R(4,4)=18`, `R(4,5)=25`; `R(5,5) ∈ [43, 46]`\n- **Split sizes**: `train` ~40 curriculum tasks, `eval` ~11 held-out named witnesses, `frontier` ~8 published-lower-bound instances\n\n| Split | What it is |\n| --- | --- |\n| `eval` (default) | Paley 5/13/17, `R(3,4)>8`, Schur `S(3)>12`, van der Waerden `W(3,2)>8` |\n| `train` | Dense curriculum from `K_5` up through `K_27` plus Schur/VdW ladders |\n| `frontier` | `R(5,5)>42`, `R(4,6)>35`, `R(3,10)>39`, `S(5)>160`, `W(5,2)>177` |\n\nA valid coloring of `K_n` with no red `K_s` and no blue `K_t` is a proof that `R(s,t) > n`. Frontier tasks sit at the best published lower bounds — solutions exist, they are just hard.\n\n### Task\n- **Type**: single-turn construction\n- **Output format**: one boxed witness\n  - Graph Ramsey: `circulant:<floor(n/2) bits>`, `bits:<C(n,2) bits>`, or `residues:<ints>`\n  - Schur / van der Waerden: `n` digits in `0..r-1`\n- **Rubric overview**:\n  - `construction` (reward): `1.0` on a fully valid coloring, dense partial credit from clique number / forbidden-substructure counts\n  - `valid`: `1.0` iff the coloring is a true witness\n  - `parse_ok`: construction parsed\n  - `verifier_ms`: bitset-check wall time\n\nWorked example (`R(3,3) > 5`): the 5-cycle, circulant red distances `{1,4}`:\n\n```\n\\boxed{circulant:10}\n```\n\n### Quickstart\nRun an evaluation with default settings:\n\n```bash\nprime eval run ramsey-combinatorics\n```\n\nConfigure model, sampling, and split:\n\n```bash\nprime eval run ramsey-combinatorics \\\n  -m openai/gpt-4.1-mini \\\n  -n 11 -r 1 \\\n  --taskset.split eval \\\n  --sampling.max-tokens 2048 \\\n  --sampling.temperature 0.7\n```\n\nTrain against the curriculum:\n\n```bash\nprime eval run ramsey-combinatorics --taskset.split train -n 20\n```\n\nFrontier (open lower-bound witnesses):\n\n```bash\nprime eval run ramsey-combinatorics --taskset.split frontier -n 6 --sampling.max-tokens 4096\n```\n\nNotes:\n- Put task-owned settings under `[taskset]` in TOML configs.\n- No sandbox image is required. The verifier is a host-side Python bitset clique search (Bron–Kerbosch with a pivot), the same algorithm as a C++ `uint64` implementation. n=42 / K5 is comfortably under 50ms.\n- Do not put gold constructions in the user prompt; they live on `TaskData.gold` for `validate()` only.\n\n### Taskset Config\n\n| Field | Type | Default | Description |\n| --- | ---- | ------- | ----------- |\n| `split` | `train \\| eval \\| frontier` | `eval` | Curriculum slice |\n| `families` | list[str] | `[\"graph_ramsey\",\"schur\",\"vdw\"]` | Problem families to load |\n| `seed` | int | `0` | RNG seed for circulant search / shuffle |\n\nOverride from the CLI with `--taskset.split frontier` or `--taskset.families '[\"graph_ramsey\"]'`.\n\n### Harness Config\nThe package exports `RamseyEnv`, which pins:\n\n- harness `null` — one-shot chat; the model writes a boxed coloring, no shell\n- runtime `subprocess` — grader is host-side Python bitsets, no container\n\nOverride for hosted isolation with `--env.agent.runtime.type prime`.\n\n### Metrics\n\n| Metric | Meaning |\n| ------ | ------- |\n| `reward` / `construction` | Main scalar in `[0, 1]`: 1.0 on a valid witness, partial credit otherwise |\n| `valid` | 1.0 iff no forbidden monochromatic subgraph / Schur triple / AP |\n| `parse_ok` | 1.0 iff the boxed construction parsed |\n| `verifier_ms` | Bitset verifier latency in milliseconds |\n\n### Why this environment\nLean 4, Sage, SnapPy, and tensor-rank sandboxes already exist on the Hub or need heavy runtimes. Two-color Ramsey constructions do not: the verifier is a pure bitset check, GRPO gets a dense reward, and a solved `K_42` (5,5)-coloring is a real paper. Paley graphs of orders 5, 13, and 17 are included as gold so `Task.validate` proves the grader accepts known mathematics.\n","encoding":"utf-8","truncated":false,"total_bytes":4448},"status":null}