REINFORCE on Pixelcopter-PLE-v0

PyTorch Monte Carlo policy gradient for Unit 4 of the Hugging Face Deep RL Course. The policy samples actions from a categorical distribution. Training uses discounted reward-to-go with a variance-reduction baseline and Adam. The training configuration records the baseline and any training-only survival bonus. Evaluation uses the original environment reward.

Evaluation Result
Held-out episodes 200
Mean reward 87.56
Standard deviation 82.18
Course score (mean โˆ’ standard deviation) 5.37
Unit 4 threshold 5

Run the published policy

Download agent.py and install the runtime dependencies:

pip install torch "gymnasium[classic-control]==1.2.3" scipy safetensors imageio imageio-ffmpeg

PixelCopter runs in the original PyGame Learning Environment:

pip install "git+https://github.com/ntasfi/PyGame-Learning-Environment.git@3dbe79dc0c35559bb441b9359948aabf9bb3d331"
from agent import evaluate_combined, load_pretrained, make_env

policy = load_pretrained()
environments = [make_env(True) for _ in range(100)]
mean, std, score, episode_rewards = evaluate_combined(policy, environments, 10000, [60291, 781252])
print(mean, std, score)

agent.py includes the trained safetensors payload, the policy architecture, and the training code. The independent per-episode scores and two evaluation seeds are in results.json.

Downloads last month

-

Downloads are not tracked for this model. How to track
Video Preview
loading

Evaluation results

  • Mean reward on Pixelcopter-PLE-v0
    self-reported
    87.5550 +/- 82.1845