Reinforcement Learning
stable-baselines3
CartPole-v1
deep-reinforcement-learning
Eval Results (legacy)
Instructions to use DahuTimide/a2c-CartPole-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use DahuTimide/a2c-CartPole-v1 with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="DahuTimide/a2c-CartPole-v1", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
A2C Agent playing CartPole-v1
This is a trained model of a A2C agent playing CartPole-v1 using the stable-baselines3 library.
Usage (with Stable-baselines3)
TODO: Add your code
from stable_baselines3 import AC2
from huggingface_sb3 import load_from_hub
import gymnasium as gym
checkpoint = load_from_hub(
repo_id="DahuTimide/a2c-CartPole-v1",
filename="A2C_mso_3_4.zip",
)
model = A2C.load(checkpoint)
env = gym.make("CartPole-v1", render_mode="human")
obs, _info = env.reset()
for _ in range(1000):
action, _states = model.predict(obs, deterministic=True)
obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, _info = env.reset()
env.close()
- Downloads last month
- -
Evaluation results
- mean_reward on CartPole-v1self-reported165.90 +/- 17.08