stable-baselines3

Train and evaluate Stable Baselines3 agents with custom Gymnasium environments.

74|5|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/dralkh/seerai --skill stable-baselines3-dralkh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stable-baselines3
Source: https://github.com/dralkh/seerai/tree/main/skills/stable-baselines3
Command: npx skills add https://github.com/dralkh/seerai --skill stable-baselines3-dralkh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gymnasium, numpy, stable-baselines3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Stable Baselines3 work can be time-consuming when you need to choose an algorithm, validate a custom Gymnasium environment, monitor training, save checkpoints, and evaluate results consistently. This Skill turns those repeated reinforcement learning setup tasks into a clear, reliable workflow for experimentation and prototyping.

Core Features & Use Cases

  • Algorithm Guidance: Helps select and configure PPO, A2C, SAC, TD3, DQN, and HER for the right action space and task type.
  • Environment and Training Support: Covers custom Gymnasium environments, vectorized environments, normalization, callbacks, and environment validation.
  • Evaluation and Persistence: Supports model saving and loading, evaluation, and video recording for training runs and benchmark comparisons.
  • Use Case: A researcher building a new navigation task can validate the environment, train with vectorized workers, checkpoint the best model, and compare results across algorithms.

Quick Start

Ask the Skill to help you design, validate, train, and evaluate a Stable Baselines3 reinforcement learning agent for your Gymnasium environment.

Frequently Asked Questions about stable-baselines3

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train a PPO reinforcement learning agent with a custom Gymnasium environment?

Train a PPO reinforcement learning agent by validating your custom Gymnasium environment's observation and action spaces, configuring the algorithm, and utilizing vectorized environments for parallel processing during the training workflow.

Can I use callbacks and checkpointing to monitor Stable Baselines3 training?

Yes, callbacks and checkpointing monitor Stable Baselines3 training by triggering model persistence at specific intervals, enabling you to save intermediate states and evaluate reinforcement learning results consistently across different algorithms.

What is the best way to choose between PPO, SAC, and DQN for my reinforcement learning task?

Choosing between PPO, SAC, DQN, and TD3 depends on your task's action space and type. Algorithm guidance helps select and configure the right reinforcement learning model by matching continuous or discrete action spaces to the appropriate Stable Baselines3 algorithm.

Does Stable Baselines3 support vectorized environments and observation normalization?

Yes, Stable Baselines3 supports vectorized environments and observation normalization. You can use SubprocVecEnv for parallel workers and VecNormalize to scale observations, ensuring efficient and stable reinforcement learning training across multiple environments.

How do I evaluate a trained reinforcement learning model and record video of its performance?

Evaluate a trained reinforcement learning model and record video by using evaluation utilities to test the agent against its Gymnasium environment, saving the model for persistence, and capturing video recordings of the training runs or benchmark comparisons.

Why does my custom Gymnasium environment fail validation before training?

Custom Gymnasium environment validation fails when the environment does not properly implement the required reset and step APIs, or when observation and action spaces are incorrectly defined, preventing the reinforcement learning agent from interacting correctly.