A2C Agent playing PandaReachDense-v3

This is a trained model of an A2C (Advantage Actor-Critic) agent playing PandaReachDense-v3 using the stable-baselines3 and panda-gym libraries.

Evaluation Results

  • Environment: PandaReachDense-v3
  • Mean Reward: -0.2191
  • Standard Deviation: 0.1138
  • Certification Metric: -0.22 +/- 0.11
  • Certification Score (mean - std): -0.3329
  • Target Threshold: >= -3.5
  • Result: PASSED ✅

Agent Playing Replay

The video below shows the robotic arm successfully reaching the target coordinates:

Usage (with Stable-Baselines3 & Panda-Gym)

import gymnasium as gym
import panda_gym
from stable_baselines3 import A2C
from stable_baselines3.common.vec_env import DummyVecEnv, VecNormalize
from huggingface_sb3 import load_from_hub

# 1. Download and load the trained model & normalization stats
checkpoint = load_from_hub(
    repo_id="arjun80892/a2c-PandaReachDense-v3",
    filename="a2c-PandaReachDense-v3.zip",
)
vec_norm_path = load_from_hub(
    repo_id="arjun80892/a2c-PandaReachDense-v3",
    filename="vec_normalize.pkl",
)

# 2. Re-create the environment with VecNormalize stats
eval_env = DummyVecEnv([lambda: gym.make("PandaReachDense-v3")])
eval_env = VecNormalize.load(vec_norm_path, eval_env)
eval_env.training = False
eval_env.norm_reward = False

model = A2C.load(checkpoint)

# 3. Run inference
obs = eval_env.reset()
for _ in range(1000):
    action, _states = model.predict(obs, deterministic=True)
    obs, rewards, dones, info = eval_env.step(action)
    eval_env.render()

Panda Gym reference: arxiv.org/abs/2106.13687

Downloads last month
-
Video Preview
loading

Paper for arjun80892/a2c-PandaReachDense-v3

Evaluation results