{"data":{"kind":"file","path":"README.md","version_id":"aphuu6a7iuv3rv3ipj0l7osd","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":2202,"modified_at":"2026-04-25T09:17:48.198000","content_hash":"23a860544252aceb2cb20228a9e496ca45b474d7abc9a569603a3b429ecb9ec3"},"entries":[],"content":"# prime-rh-research\r\n\r\nNumber theory reasoning environment for Prime Intellect Verifiers. 11 problem types covering Euler's totient, modular arithmetic, primality, Carmichael numbers, and discrete logarithms. Problems are procedurally generated, answers verified algorithmically.\r\n\r\n## Problem Types\r\n\r\n| Type | Description | Difficulties |\r\n|------|-------------|:---:|\r\n| mandala | Euler's totient φ(n) — 6 subtypes | E/M/H |\r\n| hub | Smallest involution in (ℤ/nℤ)* | E/M/H |\r\n| cross | Crusader Cross residue detection (n mod 12) | E/M/H |\r\n| shifter_gap | Largest gap transition in a prime window | E/M/H |\r\n| shifter_residue | Residue-class transitions mod 12 | M/H |\r\n| sequence | Next term in a (ℤ/nℤ)* multiplicative sequence | E/M/H |\r\n| gap | Gap to the next prime | E/M/H |\r\n| primality | Is n prime? | E/M/H |\r\n| counting | π(n) — primes ≤ n | E/M/H |\r\n| carmichael | Carmichael number detection via Korselt's criterion | H |\r\n| discrete_log | Find x: g^x ≡ h (mod p) | H |\r\n\r\n## Install\r\n\r\n```bash\r\nprime env install prime-rh-research\r\n```\r\n\r\n## Usage\r\n\r\n```bash\r\nuv run vf-eval -s prime-rh-research -m openai/gpt-4o-mini -n 5\r\n```\r\n\r\n```python\r\nfrom prime_rh_research.environment import load_environment\r\n\r\nenv = load_environment(\r\n    difficulty_filter=\"hard\",     # \"easy\" | \"medium\" | \"hard\" | \"all\"\r\n    difficulty_level=0.75,        # float [0,1], int [1,10], or (lo,hi) tuple — mutually exclusive with difficulty_filter\r\n    problem_type_filter=\"all\",    # any type name or \"all\"\r\n    seed=None,                    # override train seed\r\n    max_examples=-1,\r\n)\r\n```\r\n\r\n## Reward\r\n\r\nExact match → 1.0. Off by 1/2/5 → 0.7/0.4/0.2. Discrete log uses a modular verifier that accepts any valid x, not just the generator's canonical answer.\r\n\r\n## Baseline\r\n\r\ngpt-4o-mini, 150 rollouts, hard-ALL:\r\n\r\n| Type | n | Reward |\r\n|------|--:|-------:|\r\n| cross | 9 | 1.000 |\r\n| shifter_gap | 12 | 1.000 |\r\n| primality | 12 | 0.917 |\r\n| shifter_residue | 15 | 0.907 |\r\n| carmichael | 21 | 0.810 |\r\n| gap | 6 | 0.533 |\r\n| mandala | 33 | 0.491 |\r\n| counting | 9 | 0.311 |\r\n| hub | 12 | 0.000 |\r\n| sequence | 12 | 0.000 |\r\n| discrete_log | 9 | 0.000 |\r\n\r\nOverall: **0.565**\r\n","encoding":"utf-8","truncated":false,"total_bytes":2202},"status":null}