Reinforcement Learning
stable-baselines3
deep-reinforcement-learning
sb3
CartPole-v1
Eval Results (legacy)
Instructions to use AntonDergunov/CartPole_PPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use AntonDergunov/CartPole_PPO with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="AntonDergunov/CartPole_PPO", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
AntonDergunov/CartPole_PPO
This is a reinforcement learning agent trained with PPO on CartPole-v1 using Stable-Baselines3.
Usage
import gymnasium as gym
from stable_baselines3 import PPO
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(repo_id="AntonDergunov/CartPole_PPO", filename="model.zip")
model = PPO.load(model_path, device="cpu")
env = gym.make("CartPole-v1")
obs, info = env.reset()
for _ in range(1000):
action, _ = model.predict(obs, deterministic=True)
obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, info = env.reset()
- Downloads last month
- -
Evaluation results
- Mean Reward on CartPole-v1self-reported442.700
- Std Reward on CartPole-v1self-reported87.030