DLR-RM /stable-baselines3

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

★ 13,999⑂ 2,183
PythonCreated 2020-05-05stable-baselines3.readthedocs.io
13,999
stars
+41+42+118
2,183
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions

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

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON