強化学習エージェントのトレーニングには、高性能な並列環境と効率的なアルゴリズムが必要です。PufferLibは、ベクトル化、共有メモリバッファ、マルチエージェントサポートにより、2〜10倍の高速化を実現した最適化されたPPO+LSTMトレーニングを提供します。
スキルZIPをダウンロード
Claudeでアップロード
設定 → 機能 → スキル → スキルをアップロードへ移動
オンにして利用開始
テストする
「pufferlib」を使用しています。 Train PPO on CartPole with pufferlib
期待される結果:
- 環境: gym-CartPole-v1(256並列環境)
- ポリシー: layer_init付き2層MLP(256隠れユニット)
- トレーニング: 10,000イテレーション、バッチサイズ32,768
- チェックポイント: checkpoints/checkpoint_1000.ptに保存
- 最終スループット: GPUで120万ステップ/秒
「pufferlib」を使用しています。 Create multi-agent environment
期待される結果:
- マルチエージェント構成: 協調ナビゲーショタスク内の4エージェント
- 観測空間: 位置、ゴール、他のエージェントの位置を含むDict
- 行動空間: 5つの離散行動(4方向+停止)
- 効率的な学習のための共有ポリシーバックボーン
- PuffeRLで80万ステップ/秒でのトレーニング
セキュリティ監査
安全All 331 static findings are FALSE POSITIVES. This is a legitimate open-source reinforcement learning library. The static analyzer incorrectly flagged bash command examples in markdown documentation (SKILL.md, references/*.md) as dangerous backtick execution. No actual command injection, credential exfiltration, or malicious patterns exist in the codebase. Verified via grep - no hashlib, subprocess, or actual dangerous execution patterns found.
リスク要因
品質スコア
作れるもの
高速ベンチマーキング
Ocean環境で1秒あたり数百万ステップのスループットで新アルゴリズムを быстроベンチマーク
ゲーム環境トレーニング
最適化されたベクトル化と効率的なPPOを使用して、Atari、Procgen、またはNetHackでエージェントをトレーニング
協調エージェントチーム
PettingZoo統合と共有ポリシーオプションでマルチエージェントシステムを構築およびトレーニング
これらのプロンプトを試す
Use pufferlib to train a PPO agent on the procgen-coinrun environment with 256 parallel envs. Show the training loop and how to save checkpoints.
Help me create a custom PufferEnv for a grid world task with 4 discrete actions. Show the reset, step, and observation space definitions.
Use pufferlib to train multiple agents on a PettingZoo environment. Show how to handle dict observations and shared policies.
Optimize my pufferlib training setup for maximum throughput. What vectorization settings and hyperparameters should I use for 4 GPUs?
ベストプラクティス
- カスタム環境を構築する前に、Ocean環境またはGymnasium統合から始める
- スケーリング前にボトルネックを特定するために、早期に1秒あたりのステップ数をプロファイリングする
- 最大のトレーニングスループットにはtorch.compileとCUDAを使用する
回避
- 大規模トレーニングにCPUを使用するのを避ける - 十分なVRAMのGPUを使用する
- 多くの並列環境にスケーリングする前に環境検証をスキップしない
- ハイパーパラメータをハードコーディングしない - 再現性のためにCLI引数を使用する