Agent skill · research science · k-dense-ai

stable-baselines3

Production-ready reinforcement learning algorithms (PPO, SAC, DQN, TD3, DDPG, A2C) with scikit-learn-like API. Use for standard RL experiments, quick prototyping, and well-documented algorithm implementations. Best for single-agent RL with Gymnasium environments. For high-performance parallel training, multi-agent systems, or custom vectorized environments, use pufferlib instead.

Why this skill is useful

Provides specific implementation patterns and training workflows for reinforcement learning that the AI wouldn't reliably generate on its own.

What it needs

Requires gymnasium, python, pytorch, stable-baselines3 installed locally. About 5k tokens when loaded. Last updated 2026-08-03. 32,849 stars on the source repository.

What this skill does

Stable Baselines3 Overview Stable Baselines3 (SB3) is a PyTorch-based library providing reliable implementations of reinforcement learning algorithms. This skill provides comprehensive guidance for training RL agents, creating custom environments, implementing callbacks, and optimizing training workflows using SB3's unified API. Current upstream: SB3 2.8.0 (April 2026). Docs: stable-baselines3.readthedocs.io. Installation Tested against stable-baselines3 2.8.0. Requires Python 3.10+ (3.9 dropped in 2.8.0) and PyTorch >= 2.3. On zsh, quote brackets: uv pip install 'stable-baselines3[extra]>=2.8'. For MuJoCo continuous-control benchmarks: Check your version: Related Projects SB3-Contrib: experimental algorithms (MaskablePPO, CrossQ, QR-DQN, RecurrentPPO) — separate sb3-contrib package RL Baselines3 Zoo: pre-trained agents, hyperparameters, training scripts SBX: SB3 + JAX implementations for users who prefer JAX over PyTorch Core Capabilities 1. Training RL Agents Basic Training Pattern: Important Notes: totaltimesteps is a lower bound; actual training may exceed this due to batch collection Use model.load() as a static method, not on an existing instance The replay buffer is NOT saved with the model to save space Algorithm Selection: Use references/algorithms.md for detailed algorithm characteristics and selection guidance. Quick reference: PPO/A2C: General-purpose, supports all action space types, good for multiprocessing SAC/TD3: Continuous control, off-policy, sample-efficient DQN: Discrete actions, off-policy HER: Goal-conditioned tasks See scripts/trainrlagent.py for a complete training template with best practices. 2. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills k-dense-ai/stable-baselines3

View the source on GitHub

Browse the @skills marketplace