OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Stable Baselines

Stable Baselines is a Python library of reinforcement-learning algorithm implementations based on OpenAI Baselines. It provides a common structure for experimenting with algorithms and building agents, including use with Gym environments. The repository describes the package as being in maintenance mode and directs users to Stable-Baselines3 for an up-to-date version.

Independent OpenViST project profile, based on linked sources.

Stable Baselines — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Stable Baselines when you need its existing Python implementations for a reinforcement-learning experiment or to work with a project already based on the library. For a current version, follow the repository’s recommendation to Stable-Baselines3 and review its migration guide.

Who it is for

  • Developers and researchers building or experimenting with reinforcement-learning agents.
  • Practitioners comparing algorithm implementations in Gym-compatible environments.
  • Developers maintaining older Stable Baselines projects who are considering the linked Stable-Baselines3 migration guide.

Documented uses

  • Train an agent with a provided reinforcement-learning algorithm.
  • Compare an algorithm against existing approaches in a Gym environment.
  • Extend experiments with supported custom environments or policies.
  • Review existing algorithm implementations when working on an older project.
Before you choose

Requirements & limits

The repository is public and identifies its license as MIT. Installation instructions use pip and list platform-specific system prerequisites for Ubuntu, macOS and Windows.

  • The project is in maintenance mode; its README recommends Stable-Baselines3 for an up-to-date version.
  • The documented TensorFlow range is 1.8.0 to 1.14.0; TensorFlow 2 API support is described as planned.
  • The optional MPI installation enables DDPG, GAIL, PPO1 and TRPO.
  • The README calls out custom environments and policies; callback support is listed for DQN, and TensorBoard support is described as rudimentary.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Stable Baselines with pip

Install the package after preparing the documented Python and system prerequisites.

Before you start

  • Python 3.5 or later with development headers
  • CMake, OpenMPI and zlib system packages
  • TensorFlow 1.8.0 to 1.14.0

Steps

  1. Install the listed system packages for your platform, following the repository instructions.

  2. Run the command below to include the optional MPI dependency.

    Documented command
    pip install stable-baselines[mpi]
  3. For an installation without MPI, run the command below instead.

    Documented command
    pip install stable-baselines

Expected outcome

The Stable Baselines Python package is installed; the MPI option enables DDPG, GAIL, PPO1 and TRPO.

Guide limitations

  • The README describes TensorFlow 1.8.0 to 1.14.0 support; TensorFlow 2 API support is described as planned.
  • The repository labels the package as being in maintenance mode.
Source-based practical guide

Train and run PPO2 on Gym CartPole

Use the repository’s documented Python example to train a PPO2 model and step it through CartPole-v1.

Before you start

  • Stable Baselines installed
  • Gym environment CartPole-v1

Steps

  1. Create the environment with gym.make('CartPole-v1').

  2. Construct a PPO2 model using MlpPolicy and the environment.

  3. Call model.learn(total_timesteps=10000).

  4. Reset the environment, predict actions with the model, and pass them to env.step.

Expected outcome

The example trains a PPO2 model and uses it to select actions in CartPole-v1.

Guide limitations

  • The example assumes familiarity with reinforcement learning.
  • The documented example does not establish compatibility with other Gym environments or policies.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
Stable-Baselines-Team/stable-baselines · Official homepage title · retained in its source language

Related options

Stable-Baselines3 — The repository recommends it as the up-to-date version and links to its migration guide. Migration compatibility and required changes are not specified here.