# ZhiqingXiao/rl-book

Source codes for the book "Reinforcement Learning: Theory and Python Implementation"

Repository: https://github.com/ZhiqingXiao/rl-book
Canonical: https://ross.abutalabs.com/products/rl-book
Homepage: https://zhiqingxiao.github.io/rl-book
Language: HTML
License Family: other
Topics: reinforcement-learning, gym, openai-gym, tensorflow, tensorflow2, python, pytorch, deep-reinforcement-learning
Last push: 2025-10-26T15:22:03+00:00

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

## Adoption (not part of the score)
Stars 1030, forks 332 (observed 2026-08-28T04:03:17.811235+00:00)

## What it is
Source code repository for the book 'Reinforcement Learning: Theory and Python Implementation', providing Python implementations of RL algorithms from Bellman equations to PPO, RLHF, and AlphaZero using TensorFlow 2 and PyTorch. Each chapter includes Jupyter notebook code paired with Gym environments, runnable on a laptop.

## Use cases
- learn reinforcement learning from theory to implementation
- study RLHF and PPO algorithm implementations
- find example code for DQN, SARSA, and actor-critic methods
- compare TensorFlow and PyTorch implementations of RL algorithms
- get exercise answers for a reinforcement learning textbook
- run classic Gym environments like CartPole and LunarLander with RL agents

## When to choose
- you want a structured, book-based tutorial covering RL theory with runnable code
- you need side-by-side TensorFlow and PyTorch implementations of the same algorithms
- you want coverage of modern topics like RLHF and preference-based RL
- you are a student or self-learner working through RL on a laptop

## When to avoid
- you need a production-ready RL library or framework
- you want a maintained software package with a license for reuse
- you need scalable distributed RL training on clusters
- you are looking for a general-purpose deep learning toolkit

## Facets
- artifact type: learning-resource
- maturity: active
- function: machine-learning, reinforcement-learning, deep-learning
- domain: reinforcement-learning, machine-learning, tutorials, education
- platform: python, cross-platform, windows
- tags: reinforcement-learning, textbook, openai-gym, tensorflow, pytorch, jupyter-notebooks, rlhf, ppo, deep-reinforcement-learning, linux, macos

## Member repositories
- ZhiqingXiao/rl-book (main) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:17.811235+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-30T07:07:31.897070+00:00, confidence not recorded.
  - readme: https://github.com/ZhiqingXiao/rl-book (fetched 2026-08-28T04:03:17.811235+00:00, sha 3f0feb5d1c58)
  - homepage: https://zhiqingxiao.github.io/rl-book (fetched 2026-08-29T13:06:56.008894+00:00, sha e81a8e706bf4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
