DLR-RM /stable-baselines3

PyTorch version of Stable Baselines, reliable implementations of reinforcement learning algorithms.

★ 14,015⑂ 2,183👁 68⑃ 666● 1,605▤ 33
PythonMITCreated 2020-05-05stable-baselines3.readthedocs.io
下载:v2.9.2: Bug fixes and doc improvementsv2.9.2 ↓2.9.22026-10-26
+3
日增长
+57
周增长
+114
月增长
14,015
stars
2,183
forks
68
watchers
666
prs
1,605
issues
33
releases

README

Stable Baselines3



Stable Baselines3 (SB3) is a set of reliable implementations of reinforcement learning algorithms in PyTorch. It is the next major version of Stable Baselines.

You can read a detailed presentation of Stable Baselines3 in the v1.0 blog post or our JMLR paper.


These algorithms will make it easier for the research community and industry to replicate, refine, and identify new ideas, and will create good baselines to build projects on top of. We expect these tools will be used as a base around which new ideas can be added, and as a tool for comparing a new approach against existing ones. We also hope that the simplicity of these tools will allow beginners to experiment with a more advanced toolset, without being buried in implementation details.

Note: Despite its simplicity of use, Stable Baselines3 (SB3) assumes you have some knowledge about Reinforcement Learning (RL). You should not utilize this library without some practice. To that extent, we provide good resources in the documentation to get started with RL.

 Main Features

The performance of each algorithm was tested (see Results section in their respective page).
You can take a look at the issues 48 and 49 for more details.

We also provide detailed logs and reports on the OpenRL Benchmark platform.


| Features                | Stable-Baselines3 |
| --------------------------- | ----------------------|
| State of the art RL methods | :heavy_check_mark: |
| Documentation               | :heavy_check_mark: |
| Custom environments         | :heavy_check_mark: |
| Custom policies             | :heavy_check_mark: |
| Common interface            | :heavy_check_mark: |
| Dict observation space support  | :heavy_check_mark: |
| Ipython / Notebook friendly | :heavy_check_mark: |
| Tensorboard support         | :heavy_check_mark: |
| PEP8 code style             | :heavy_check_mark: |
| Custom callback             | :heavy_check_mark: |
| High code coverage          | :heavy_check_mark: |
| Type hints                  | :heavy_check_mark: |


 Planned features

Since most of the features from the original roadmap have been implemented, there are no major changes planned for SB3; it is now stable.
If you want to contribute, you can search in the issues for the ones where help is welcomed and the other proposed enhancements.

While SB3 development is now focused on bug fixes and maintenance (doc update, user experience, ...), there is more active development going on in the associated repositories:
- newer algorithms are regularly added to the SB3 Contrib repository
- faster variants are developed in the SBX (SB3 + Jax) repository
- the training framework for SB3, the RL Zoo, has an active roadmap

 Migration guide: from Stable-Baselines (SB2) to Stable-Baselines3 (SB3)

A migration guide from SB2 to SB3 can be found in the documentation.

 Documentation

Documentation is available online: https://stable-baselines3.readthedocs.io/

 Integrations

Stable-Baselines3 has some integr

Top issues

Latest release

v2.9.2: Bug fixes and doc improvements v2.9.2 2026-10-26
[!WARNING]
 Stable-Baselines3 (SB3) v2.9.2 will be the last one supporting Python 3.10 (end of life in October 2026)
 We highly recommended you to upgrade to Python = 3.11.

SB3 Contrib (more algorithms): https://github.com/Stable-Baselines-Team/stable-baselines3-contrib
RL Zoo3 (training framework): https://github.com/DLR-RM/rl-baselines3-zoo
Stable-Baselines Jax (SBX): https://github.com/araffin/sbx

To upgrade:

pip install stable_baselines3 sb3_contrib rl_zoo3 --upgrade



 Bug Fixes:

- Fixed file descriptor leak in SubprocVecEnv.close() by closing parent-side pipes to pre

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON