← Back to projects

PPO from scratch

Proximal Policy Optimization built from first principles in PyTorch.

Pythonopen source

Problem

Most PPO code people reuse hides the parts that actually matter behind framework abstractions. The goal here was to implement PPO end to end with nothing hidden, so every component - advantage estimation, the policy objective, the value loss and the entropy term - is visible and correct.

Approach

Tech

PyTorchNumPyGymnasiumPython

Status

Shipped and open source. It doubles as the reference implementation behind my blog post on implementing PPO from scratch.

Links