thu-ml

    thu-ml/tianshou

    An elegant PyTorch deep reinforcement learning library.

    11.1K stars
    1.4K forks
    95 GitHub watchers
    Updated Nov 6, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    No releases in the last 90 days; the most recent was 217 days ago, with 78 contributors on GitHub.

    Peaked at #26 in the weekly ranking the week of Jan 25, its best in the past year.

    Use Cases & Benefits

    • Provides a modular PyTorch-based deep reinforcement learning library supporting online, offline, multi-agent, and model-based RL algorithms.
    • Delivers a high-performance, flexible, and user-friendly framework with clear separation of algorithms and policies, plus extensive documentation and type safety.
    • Use for developing and experimenting with new RL algorithms using a flexible procedural API with type-safe abstractions.
    • Use for training and evaluating state-of-the-art RL agents on custom or standard Gymnasium environments via a high-level declarative API.
    • Use for benchmarking and reproducing RL results on environments like Atari and MuJoCo with support for vectorized and multi-GPU training.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    MIT

    Permissive: commercial use, modification and redistribution are allowed with attribution.

    Community files

    • README: present
    • Contributing guide: present

    Watch-outs

    • No commits in the last six months (last push Apr 2026).

    General guidance from repository metadata, not legal advice. How we score

    From the README

    Tianshou (天授) is a reinforcement learning (RL) library based on pure PyTorch and Gymnasium. Tianshou's main features at a glance are:

    Unlike other reinforcement learning libraries, which may have complex codebases, unfriendly high-level APIs, or are not optimized for speed, Tianshou provides a high-performance, modularized framework and user-friendly interfaces for building deep reinforcement learning agents. One more aspect that sets Tianshou apart is its generality: it supports online and offline RL, multi-agent RL, and model-based algorithms.

    Tianshou aims at enabling concise implementations, both for researchers and practitioners, without sacrificing flexibility.

    In Chinese, Tianshou means divinely ordained, being derived to the gift of being born. Tianshou is a reinforcement learning platform, and the nature of RL is not learn from humans. So taking "Tianshou" means that there is no teacher to learn from, but rather to learn by oneself through constant interaction with the environment.

    “天授”意指上天所授,引申为与生具有的天赋。天授是强化学习平台,而强化学习算法并不是向人类学习的,所以取“天授”意思是没有老师来教,而是自己通过跟环境不断交互来进行学习。

    Tianshou is currently hosted on PyPI and conda-forge. It requires Python >= 3.11.

    For installing the most recent version of Tianshou, the best way is clone the repository and install it with poetry (which you need to install on your system first)

    Excerpt from the thu-ml/tianshou README on GitHub (MIT license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    1.4K+18

    Open issues

    149+13

    Compared with peers in Machine Learning

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 8, by 7-day star growth

    thu-ml/tianshou compared with Machine Learning repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    rohitg00/ai-engineering-from-scratch78.3K+1.6K751 day ago
    OpenBMB/VoxCPM42.2K+1.5K75183 days ago
    zeroclaw-labs/zeroclaw33.3K+1977514 days ago
    GeeeekExplorer/nano-vllm16.3K—12—
    omnigent-ai/omnigent11.2K—606 days ago
    thu-ml/tianshou11.1K—48217 days ago
    Category median33.3K+1.5K75—

    Discover Repositories

    Search across tracked repositories by name or description