# pytorch/rl

A modular, primitive-first, python-first PyTorch library for Reinforcement Learning.

Repository: https://github.com/pytorch/rl
Canonical: https://ross.abutalabs.com/products/rl
Homepage: https://pytorch.org/rl
Language: Python
License: MIT
License Family: permissive
Topics: ai, control, decision-making, distributed-computing, machine-learning, marl, model-based-reinforcement-learning, multi-agent-reinforcement-learning, pytorch, reinforcement-learning, rl, robotics, torch
Last push: 2026-08-26T21:51:56+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 93, longevity 100
- inputs: {"age_days": 1674, "days_push": 7, "days_rel": 50, "gap_med": 27, "n_releases_24m": 18}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3538, forks 479 (observed 2026-08-28T04:08:09.144416+00:00)

## What it is
TorchRL is a PyTorch-native library of composable primitives for building reinforcement learning systems, including environments, policies, replay buffers, collectors, and loss modules. It scales from local prototypes to vectorized, multiprocess, and distributed training while staying close to the PyTorch programming model.

## Use cases
- train reinforcement learning agents in pytorch
- build multi-agent reinforcement learning experiments
- run RL for robotics control with MuJoCo
- implement custom replay buffers and data collectors
- prototype model-based reinforcement learning algorithms
- scale RL training across distributed workers

## When to choose
- you want a modular, primitive-first RL library integrated with PyTorch
- you need multi-agent or recurrent RL support
- you want to scale RL research from prototype to distributed training

## When to avoid
- you need a one-line prebuilt agent for a standard benchmark
- you work outside the PyTorch ecosystem, e.g. TensorFlow or JAX
- you only need lightweight bandit or simple tabular RL

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, reinforcement-learning, simulation, robotics
- domain: reinforcement-learning, machine-learning, robotics, artificial-intelligence
- platform: python, cross-platform
- tags: pytorch, torchrl, rl, multi-agent, model-based-rl, replay-buffers, decision-making, gpu

## Member repositories
- pytorch/rl (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:09.144416+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:35:01.686047+00:00, confidence not recorded.
  - readme: https://github.com/pytorch/rl (fetched 2026-08-28T04:08:09.144416+00:00, sha 632b0a5755fa)
  - homepage: https://pytorch.org/rl (fetched 2026-08-29T09:28:45.846183+00:00, sha 5478eabc0141)
- Data as of 2026-08-30T08:39:29.467469+00:00.
