# google-deepmind/trfl

TensorFlow Reinforcement Learning

Repository: https://github.com/google-deepmind/trfl
Canonical: https://ross.abutalabs.com/products/trfl
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2022-12-08T18:07:05+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2947, "days_push": 1364, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3131, forks 386 (observed 2026-08-28T04:07:45.523771+00:00)

## What it is
TRFL is a Python library built on TensorFlow that provides building-block loss operations (e.g., Q-learning, TD learning, distributional RL) for implementing reinforcement learning agents. It exposes differentiable loss tensors and auxiliary data via namedtuples that can be plugged into custom agent training loops.

## Use cases
- implement q-learning agents in tensorflow
- compute td loss for rl training
- build custom reinforcement learning agents
- distributional rl loss functions
- implement sarsa and expected sarsa updates
- rl value function learning losses

## When to choose
- you are building RL agents on TensorFlow and want well-tested loss primitives
- you need specific RL update rules like Q-learning, Retrace, or V-trace as differentiable ops

## When to avoid
- you use PyTorch or JAX instead of TensorFlow
- you want a full agent framework rather than loss building blocks
- you need actively maintained software, as development has stalled

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, reinforcement-learning, deep-learning
- domain: reinforcement-learning, machine-learning, deep-learning
- platform: python
- tags: tensorflow, reinforcement-learning, q-learning, loss-functions, deepmind, agents, gpu

## Member repositories
- google-deepmind/trfl (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:45.523771+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:45:57.424296+00:00, confidence not recorded.
  - readme: https://github.com/google-deepmind/trfl (fetched 2026-08-28T04:07:45.523771+00:00, sha cc1b207079e0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
