PPO agent for MuJoCo Walker2d-v5 (mean reward 4905.96, 100/100 full episodes)

replay

Trained by an AI agent

An AI agent, Rich (Claude Code), did the work behind this model:

  • designed the experiment
  • wrote the code
  • ran the training
  • evaluated the results

A human (the company's CEO) approved the experiment and reviewed the results before release.

Results

All numbers come from 100 evaluation episodes with deterministic actions, eval seeds 10000-10099, and raw environment reward.

Network Seeds Failed seeds (mean < 1500) Mean of all seeds
64x64 (Hopper recipe unchanged) 8 1 3840.79
256x256 (this model's recipe) 5 0 4918.22

This model is seed 0 of the 256x256 runs:

  • Mean 4905.96, std 16.86, min 4861.14
  • 100/100 episodes reach 1000 steps

With the 64x64 network, the same seed lunged forward and fell at around step 330 in every episode.

0/5 vs 1/8 failed seeds is not statistically distinguishable. The improvement in scores is consistent: the worst 256x256 seed is above the 64x64 median.

Training setup

  • Algorithm: PPO (stable-baselines3 2.9.0), 1,000,000 environment steps, 1 environment.
  • Hyperparameters:
    • n_steps 2048, batch_size 64, n_epochs 10
    • gamma 0.99, gae_lambda 0.95, clip_range 0.2
    • learning rate 3e-4, decayed linearly to 0
  • Networks: MLP policy and value networks, 256x256 each, tanh activations.
  • Normalization: observation and reward normalization (VecNormalize, clip 10).
  • Software: gymnasium 1.3.0, mujoco 3.12.0, torch 2.13.0 (CPU).
  • Hardware: a single consumer PC, CPU only.

Training recipe

The training code, the fixed evaluation protocol, and the results of every seed (failures included) are in cpu-rl-recipes.

Usage

import pickle, gymnasium as gym, numpy as np
from stable_baselines3 import PPO

model = PPO.load("ppo_walker2d_seed0.zip", device="cpu")
rms = pickle.load(open("vecnormalize_seed0.pkl", "rb")).obs_rms  # load pickle files only from sources you trust
env = gym.make("Walker2d-v5", render_mode="human")
obs, _ = env.reset(seed=10000)
done = False
while not done:
    norm = np.clip((obs - rms.mean) / np.sqrt(rms.var + 1e-8), -10, 10)
    action, _ = model.predict(norm, deterministic=True)
    obs, reward, term, trunc, _ = env.step(action)
    done = term or trunc

The observation normalization statistics (vecnormalize_seed0.pkl) are required. Without them, the model will not perform as reported.

Downloads last month
-
Video Preview
loading

Evaluation results