{"data":{"kind":"file","path":"README.md","version_id":"b68qcosn2adu0ey0f4cc06q0","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":1924,"modified_at":"2026-06-05T19:12:34.177000","content_hash":"a1ddacb4015f00acd86bb893c09fd4b218369264ffeed79204b82fa5401a6eb9"},"entries":[],"content":"# alkahest-symbolic-integration\n\nSymbolic integration RL environment backed by Alkahest's Risch integrator.\n\nModels receive an integrand `f(x)` and must return an elementary antiderivative\n`F(x)` with `dF/dx = f`, or the exact phrase **\"no elementary form\"** when Risch\ncertifies non-elementarity.\n\n## Install\n\nRequires **Python ≥ 3.10**.\n\n```bash\npip install alkahest-symbolic-integration\n```\n\nThis installs `alkahest`, `verifiers`, and `datasets`.\n\n## Usage\n\n```python\nfrom alkahest.rl.envs.integration.env import load_environment\n\nenv = load_environment(\n    difficulty_tier=0,\n    n_train=50_000,\n    n_eval=2_000,\n    hard_negative_fraction=0.25,\n    adaptive=True,\n)\n\n# Prime Intellect CLI\n# prime eval run alkahest-cas/symbolic-integration -m <model>\n```\n\n## Configuration\n\n| Argument | Default | Description |\n|----------|---------|-------------|\n| `difficulty_tier` | `0` | Starting Risch grammar tier (0 = rationals) |\n| `hard_negative_fraction` | `0.25` | Fraction of NonElementary integrands |\n| `n_train` / `n_eval` | `50_000` / `2_000` | Dataset sizes |\n| `seed` | `42` | RNG seed |\n| `adaptive` | `True` | Attach `CurriculumScheduler` on `env.curriculum` |\n\n## Reward\n\n`IntegrationVerifier` scores completions in `[-1, 1]`:\n\n- **+1.0** — correct antiderivative (symbolic diff check, optional e-graph, interval spot checks)\n- **+0.9** — numerically consistent but not symbolically confirmed\n- **+1.0** — honest refusal on a NonElementary integrand\n- **−0.2** — unnecessary refusal on an elementary integrand\n- **−0.5** — hallucinated antiderivative on NonElementary\n- **0.0** — unparseable or wrong\n\n## Development\n\nSource code lives in the main [Alkahest](https://github.com/alkahest-cas/alkahest)\nrepository under `python/alkahest/rl/`. This directory is the **Environments Hub**\npublish root.\n\n```bash\ncd python/alkahest/rl/envs/integration\npip install -e .\nprime env push --auto-bump\n```\n","encoding":"utf-8","truncated":false,"total_bytes":1924},"status":null}