pufferlib
High-performance reinforcement learning framework optimized for speed and scale. Use when you need fast parallel training, vectorized environments, multi-agent systems, or integration with game environments (Atari, Procgen, NetHack). Achieves 2-10x speedups over standard
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
High-performance reinforcement learning framework optimized for speed and scale. Use when you need fast parallel training, vectorized environments, multi-agent systems, or integration with game environments (Atari, Procgen, NetHack). Achieves 2-10x speedups over standard implementations. For quick prototyping or standard algorithm implementations with extensive documentation, use stable-baselines3 instead.
How to use
- Zainstaluj PufferLib za pomocą pip, a następnie zaimportuj bibliotekę oraz moduł PuffeRL w swoim skrypcie Pythona. 2. Przygotuj środowisko treningowe — możesz użyć istniejącego ze zbiorów Gymnasium, PettingZoo lub Procgen, albo zdefiniować własne, korzystając z API PufferEnv. 3. Skonfiguruj parametry treningu, takie jak urządzenie (CPU/GPU), współczynnik uczenia i architekturę sieci (CNN, LSTM lub niestandardowa). 4. Uruchom trening z linii poleceń poleceniem puffer train z nazwą środowiska i parametrami, na przykład puffer train procgen-coinrun --train.device cuda --train.learning-rate 3e-4. 5. Dla treningu rozproszonego na wielu GPU użyj torchrun z parametrem --nproc_per_node, aby przyspieszyć eksperymentację na dużych zbiorach danych. 6. Monitoruj postęp treningu i dostosowuj hiperparametry w zależności od osiąganych wyników.