reasoning-gym
A library of procedural dataset generators for training reasoning models
What it is and what it does
Reasoning Gym is a Python library that generates procedural datasets and verifiable reasoning environments for training reinforcement learning models. It provides more than 100 tasks spanning algebra, arithmetic, computation, cognition, geometry, graph theory, logic, and games—each with adjustable complexity and built-in algorithmic verification of solutions. Some tasks have single correct answers; others like Rubik's Cube or Countdown have multiple valid solutions. The library generates virtually infinite training data on demand via a standard procedural interface, making it suitable for large-scale RL training without pre-generated dataset bottlenecks.
The package is designed for researchers and practitioners building reasoning models. It integrates with RL training frameworks (particularly the verifiers library) and supports both single-task and composite multi-task dataset creation with configurable weightings. Each dataset entry includes a question, answer, and metadata; scoring functions enable reward computation during training. The library is actively maintained, recently released, and already adopted by multiple research organizations including NVIDIA, Meta, and others for production reasoning model training.
Use it for:
- Generate infinite training data for reasoning model RL fine-tuning with procedurally controlled difficulty
- Benchmark and evaluate reasoning model performance across diverse task domains with algorithmic verification
- Create composite datasets combining multiple reasoning tasks with custom weightings for curriculum learning
- Build verifiable reward signals for RL training by calling task-specific scoring functions on model outputs
- Prototype new reasoning environments by extending the library's task generators for custom domains
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Reasoning Gym generates procedurally verifiable reasoning datasets and RL training environments across algebra, arithmetic, logic, games, and other domains, with adjustable complexity and algorithmic answer verification.
Yes. Reasoning Gym is actively maintained, has no known vulnerabilities, carries a permissive Apache-2.0 license, and requires only Python >= 3.10 with low install friction. It is purpose-built for RL reasoning model training and already adopted by major research labs. Install if you are training reasoning models or need procedurally verifiable reasoning datasets; skip if you need pre-generated static benchmarks or do not work with RL.
Install
reasoning-gym on PyPI
pip
pip install reasoning-gymuv
uv add reasoning-gympoetry
poetry add reasoning-gymInstalling reasoning-gym
Before you install
Low install friction with a pure-Python wheel and 11 runtime dependencies. Active maintenance with a recent release (2026-03-28) and 1485 repository stars. Requires Python >= 3.10.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions.
Quickstart
pip install reasoning-gym
import reasoning_gym
data = reasoning_gym.create_dataset('leg_counting', size=10, seed=42)
for entry in data:
score = data.score_answer(answer=entry['answer'], entry=entry)
print(f"Question: {entry['question']}, Score: {score}")
Requires Python >= 3.10
Verify before relying
- Whether all 100+ tasks are equally well-maintained or if some are experimental/unstable
- Performance characteristics and scalability limits for large dataset sizes
- Compatibility with specific RL frameworks beyond the mentioned verifiers library
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — arckit, bfi, cellpylib, magiccube, pycosat, pyfiglet, pytz, pyyaml, sympy, tabulate, zss |
| Maintenance | actively maintained — 139 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 345,015/month — #7,369 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: reasoning_gym-0.1.25-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
arckitLoad, visualize, and evaluate solutions on the…
permissive · top 15,000 on PyPI
nemo-gymNeMo Gym provides infrastructure for building,…
permissive · top 5,000 on PyPI
gem-llmGEM is a reinforcement learning environment…
permissive · top 15,000 on PyPI
gymnasiumGymnasium provides a standard Python API for…
permissive · top 5,000 on PyPI
verifiersVerifiers provides environments and evaluation…
permissive · top 15,000 on PyPI
rsl-rl-libRSL-RL is a GPU-accelerated reinforcement…
permissive · top 15,000 on PyPI
stable-baselines3Stable Baselines3 provides PyTorch…
permissive · top 5,000 on PyPI
TextArenaTextArena provides a framework of 100+…
permissive · top 15,000 on PyPI
tianshouTianshou is a PyTorch-based reinforcement…
permissive · top 15,000 on PyPI
skrlskrl is a modular reinforcement learning…
permissive · top 15,000 on PyPI