Proximal Policy Optimization (PPO) is an algorithm used for training reinforcement learning agents. It was introduced by John Schulman et al. in 2017 as a solution to some of the difficulties encountered with the earlier Trust Region Policy Optimization (TRPO) algorithm. PPO aims to balance the benefits of on-policy reinforcement learning, which tends to be stable and reliable, with the need for sample efficiency (how much experience is required to learn a good policy) and ease of implementation.
Reinforcement learning involves training an agent to make a sequence of decisions by having it interact with an environment. The agent learns a policy, which is a mapping from states of the environment to actions that the agent should take. The goal is to maximize some notion of cumulative reward over time.
Key concepts underpinning PPO include:
-
Policy Gradient: PPO is a policy gradient method, which means it directly adjusts the parameters of the policy by computing estimates of the gradient of expected rewards with respect to the policy parameters.
-
On-Policy Learning: PPO is an on-policy algorithm, meaning that it learns from the data generated by the current policy. This is in contrast to off-policy methods, which can learn from data generated by a different (often older) policy.
-
Surrogate Objective: PPO optimizes a "surrogate" objective function, which approximates the expected return while trying to keep the new policy close to the old policy. This is to prevent making updates that change the policy too drastically, which could lead to a decrease in performance.
-
Clipped Probability Ratios: To maintain the balance between exploration and exploitation and to avoid too large policy updates, PPO uses a technique known as clipping in the objective function. The algorithm computes the ratio of the new policy's probability of taking an action to the old policy's probability, and then clips this ratio to be within a certain range (1−ε, 1+ε), where ε is a hyperparameter usually set between 0.1 and 0.3. This prevents the updates from moving the policy too far from the previous one.
-
Multiple Epochs per Update: Unlike TRPO, which typically uses a single batch of data to perform one update, PPO can reuse the collected data for multiple epochs of minibatch updates. This increases sample efficiency by extracting more information from the data before collecting a new batch.
-
Simplified Trust Region: PPO simplifies the complex trust region optimization used in TRPO, which ensures that the policy does not change too much at each step, into a much simpler form that is easier to compute. The clipping in the objective function acts as a soft trust region.
PPO has proven to be effective across a variety of tasks and is widely used in practice due to its balance between simplicity, sample efficiency, stability, and performance. It has been successfully applied in both discrete and continuous action spaces, ranging from video games to robotic control tasks.