AI State of the Art
Domains/Robotics & Embodied AI/25 min
Section 219

Reinforcement Learning for Robotics: PPO, SAC, TD3

Listen as a podcast →

Learning by Trial and Error: Like Learning to Walk by Falling

A child learns to walk by falling hundreds of times, getting back up, adjusting posture, trying again. They do not consult a biomechanics manual. They try, fail, and learn. A reinforcement learning (RL) agent does the same: it observes its state, attempts an action, receives a reward (or a penalty) and adjusts its behaviour to maximize future rewards.

This page assumes the general framework, explained on Reinforcement learning; it covers only what is specific to robotics.

What is specific to robotics is that attempts are expensive. A physical robot manages a few hundred a day; in simulation you run a million in a few hours. Do the arithmetic in the open: a million attempts against three hundred a day is roughly three thousand robot-days compressed into an evening of compute. That single ratio is why almost all robotic reinforcement learning happens in simulation, with the transfer problem that entails (Sim-to-real).

The RL Framework in Robotics

The agent observes the world state (images, position sensors, forces), executes an action (motor movements), receives a reward (task success, penalty for failure), and adjusts its policy to maximize cumulative long-term reward. In robotics, states are continuous and high-dimensional, actions are continuous, and rewards are often sparse: the robot is only rewarded at the end of the task.

The Three Dominant Algorithms in Robotics

Circular diagram of the reinforcement learning loop: an agent (policy), drawn as a robot, sends an Action to an Environment, which returns an Observation and a Reward.
The loop that defines all of RL: the agent picks an action, the environment returns a new observation and a reward, and the cycle repeats. Everything that follows (PPO, SAC, TD3) is just a different way of exploiting those exchanges to improve the policy.Source : Gymnasium documentation (Farama Foundation), agent-environment loop

PPO (Proximal Policy Optimization)

PPO stands for Proximal Policy Optimization. Developed by OpenAI in 2017, it is the reference algorithm for robotics in simulation. It is a policy gradient method: rather than estimating the value of every action and deducing what to do, it moves the policy's parameters directly in the direction that raises reward (Gradient methods).

Key mechanism: the "clipped" objective. At each update PPO computes the ratio rr between the probability the new policy assigns to the action already taken and the probability the old one assigned to it. The ratio is 1 when nothing has changed, above 1 when the new policy likes that action more, below 1 when it likes it less. PPO then forces the ratio to stay inside

[ 1−ϵ,  1+ϵ ][\,1-\epsilon,\; 1+\epsilon\,]

where ϵ\epsilon (the Greek letter epsilon) is the allowed width of the deviation, set by hand, typically 0.2. In plain words: the policy may not change its mind about any given action by more than 20% in a single update. That is where "proximal" in the name comes from, the new policy must stay close to the old one.

Why the precaution? Because the training data was produced by the old policy. If the new one drifts too far, that data no longer describes its behaviour and the estimate goes wrong. Clipping is the guardrail: past the threshold, the objective stops rewarding further deviation, so the gradient vanishes, so the policy stops drifting.

Two curves of the PPO clipped objective as a function of the probability ratio r: on the left, for a positive advantage, the curve rises then goes flat beyond 1 plus epsilon; on the right, for a negative advantage, the curve is flat until 1 minus epsilon then falls. A red dot marks the starting point where r equals 1.
Clipping seen up close. As soon as the ratio r leaves the allowed interval, the curve goes flat: the objective stops rewarding a larger deviation, so the gradient vanishes and the policy stops drifting away from the old one.Source : PPO paper (Schulman et al., 2017), figure 1, via Shivam Shakti blog

Advantages for robotics:

  • Remarkable stability during training (few catastrophic divergences)
  • Works well with high-dimensional action spaces (a humanoid has 30+ motors)
  • Excellent in massively parallel simulation (NVIDIA's Isaac Gym)
  • Relatively simple to implement and tune

Applications: quadruped and bipedal locomotion, simple manipulation, high-level policies (planning).

Why PPO Dominates in Simulated Robotics

PPO has a weakness, it discards its data after each update, that stops mattering the moment data is free. NVIDIA's Isaac Gym runs several thousand simulation environments in parallel on a single graphics card. PPO's weakness then costs nothing, while its virtue, stability, remains. That meeting between a frugal algorithm and massively parallel simulation is what transformed robotic locomotion. The infrastructure side is covered on Agent training infrastructure.

SAC (Soft Actor-Critic)

SAC stands for Soft Actor-Critic. Developed by Tuomas Haarnoja at Berkeley in 2018, it introduces a subtle idea: maximize not only reward but also the entropy of the policy. Entropy measures how undecided a probability distribution is, maximal when all options are equally likely, zero when one wins outright (Entropy). Rewarding entropy therefore means paying the agent to stay undecided, which keeps it from freezing early on the first strategy that roughly works.

Architecture:

  • The actor: a neural network that picks actions. It is the policy itself
  • The critic: two networks estimating the value of actions, that is, the total reward one can expect after taking them. You keep the minimum. The reason is mechanical: a network that errs at random sometimes overestimates and sometimes underestimates, but since the algorithm always seeks the action of maximum value, it systematically selects the overestimates. Taking the more pessimistic of two critics cancels that bias
  • The entropy coefficient (alpha): the weight given to indecision relative to reward. It is adjusted automatically during training rather than set by hand
Actor-critic architecture diagram: state S_t enters the Actor (policy network) which picks action a_t, producing state S_t+1 and reward R_t+1; the Critic (value network) receives states and reward and predicts the advantage, which is used to reinforce the action chosen by the actor. Two neural networks are drawn above and below to represent actor and critic.
The actor-critic scheme shared by SAC and TD3: the actor decides the action, the critic judges how good that decision was, and its judgement becomes the signal used to correct the actor. SAC and TD3 each use two critics and keep the minimum, to avoid overestimating actions.Source : Deep Learning Bible, Reinforcement Learning chapter (Actor-Critic)

Advantages:

  • Data-efficient: SAC is off-policy, meaning it can learn from experience generated by an earlier version of itself, kept in a replay buffer. PPO is on-policy and must discard its data at every update. For a given number of attempts, SAC therefore extracts more
  • Natural exploration: the entropy bonus pushes it to try varied behaviours and avoids settling into a mediocre but comfortable solution
  • Robustness: a policy that explored widely withstands perturbations better
  • Real world: the algorithm of choice when training directly on physical hardware, precisely because every attempt there is costly

Applications: dexterous manipulation, tasks where exploration is crucial, learning directly on a real robot.

TD3 (Twin Delayed Deep Deterministic Policy Gradient)

TD3 stands for Twin Delayed Deep Deterministic policy gradient. Developed by Scott Fujimoto in 2018, it corrects three defects in its predecessor DDPG (Deep Deterministic Policy Gradient). The three corrections are the words in the name:

  1. Twin: two value networks whose minimum is taken, for the reason given above under SAC, since the algorithm always seeks the maximum, it preferentially selects errors that overestimate
  2. Delayed: the policy is updated less often than the critics, typically once every two. Correcting the actor from an evaluation that has not yet settled is taking advice from a judge who is still undecided
  3. Target smoothing: a little noise is added to the reference action when computing the target value. This stops the actor from exploiting a narrow, accidental spike in the critic's estimate, a spike with no counterpart in the real world

Advantages: more stable than DDPG, effective in continuous control, data-efficient thanks to being off-policy.

Applications: robotic arm control, relatively simple continuous control tasks.

Robotics-Specific Techniques

Reward shaping: in robotics, natural rewards are sparse, the robot only gets a positive signal on completing the whole task, which can take hundreds of actions. Such a rare signal teaches almost nothing: on a failed run the agent cannot tell which of its three hundred actions was the bad one. So intermediate rewards are added: closing the distance to the goal, aligning the gripper with the object, a bonus for first contact. It is putting signs all along the road instead of marking only the finish line.

Curriculum learning: training on tasks of increasing difficulty. Large objects first, smaller ones later; flat terrain first, then slopes and obstacles. Like a student: easy exercises, then exams.

Simulation and domain randomization: train in simulation then deploy on the real robot, varying the simulator's parameters widely so the agent does not learn its quirks. That is the whole subject of Sim-to-real, including what this fix does not solve.

The Reward Problem: Critical and Underestimated

Designing the reward function is the most decisive and most underestimated aspect of robotic reinforcement learning. A badly designed reward produces pathological behaviour: the agent finds a way to maximize the number without doing the task. That is reward hacking.

The textbook example, take it as an illustration of the mechanism, not as a published result: you reward a robot for horizontal displacement, believing you are asking it to walk; it discovers that a controlled forward fall maximizes displacement for less effort, and learns to fall. It did not cheat, it did exactly what was written.

The point transfers directly to reading any system's documentation: the reward function is the system's real specification, far more than the prose description that accompanies it. When the two disagree, the function wins.

Comparative Summary

PPO: on-policy, very stable, data-hungry but easy to parallelize on a graphics card. The default when simulation is abundant.

SAC: off-policy, data-efficient, explores naturally. The choice when every attempt costs, notably on real hardware.

TD3: off-policy, simple, stable. A good compromise in continuous control when SAC feels heavy.

  • Reinforcement learning from human feedback (RLHF): instead of programming the reward, it is learned from preferences expressed by people
  • Foundation models and reward: a large language model writes the reward function itself from a description of the task in ordinary language
  • Offline RL: learning purely from already-collected data, without interacting with the environment. Attractive in robotics, where interaction is expensive, but hard: the agent cannot check what would have happened had it acted otherwise
  • Multi-task RL: a single agent that learns many tasks and transfers skills between them
Language-Model Algorithms Are Arriving in Robotics

The most notable move of 2025–2026 is a crossover: GRPO variants developed for post-training large language models are now being applied to robot policies. Robostral Navigate is a direct example: after imitation training, the model is fine-tuned by reinforcement learning with CISPO, one of those variants, detailed on GRPO variants.

The problem this solves is the classic failing of behaviour cloning: a model that has only seen successful runs has never encountered the situation that follows a mistake, and so cannot recover from one. Reinforcement learning generates mistakes and learns to recover.

Check your understanding0 / 5

1. A robot is rewarded for its horizontal displacement, in the hope that it will learn to walk. Instead it learns to fall forward in a controlled way. What happened?

2. Why does PPO forbid the policy from changing its opinion about an action too much in a single update (the clipping)?

3. To train a policy directly on a physical robot, without a simulator, the page points to SAC rather than PPO. Why?

4. SAC and TD3 both use a pair of critic networks and keep the minimum of the two values. What problem does this trick solve?

5. After imitation training on successful runs, why add a reinforcement learning phase, as Robostral Navigate does with CISPO?