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
-
Video Preview
loading

Evaluation results