Q-learning learns values, then acts greedily. Policy gradients optimize the policy directly via gradient ascent on expected return.
REINFORCE
The simplest policy gradient. For a parameterized policy , the gradient of the expected return is:
where is the discounted return from time . Update: , estimated from one or more trajectories.
The intuition: increase the log-probability of actions that led to high return; decrease the log-probability of those that led to low return.
Variance is the bottleneck
REINFORCE's gradient estimate has very high variance — the return depends on the entire future trajectory, much of which is unrelated to the action at time . Two standard variance reductions:
### Baselines
Subtract a state-dependent baseline from . Doesn't change the gradient in expectation but reduces variance:
The natural baseline is . Approximate it with a learned critic.
### Actor-critic
Train two networks: actor for the policy, critic for the baseline. Use the advantage in place of . Generalized Advantage Estimation (GAE) interpolates between high-bias short returns and high-variance Monte-Carlo returns.
PPO (Proximal Policy Optimization)
The workhorse of modern RL. Optimizes a clipped surrogate objective that prevents the policy from changing too much per update:
where . The clip prevents huge policy jumps on high-advantage transitions.
PPO is the default RL algorithm in 2024-2026 for continuous-control and language-model alignment. Stable, reasonably hyperparameter-robust, well-understood.
When policy gradients beat Q-learning
- Continuous action spaces — Q-learning needs argmax over actions, which is intractable continuous. Policy gradients output actions directly.
- Stochastic policies — exploration is built in; you sample from .
- Easier to incorporate priors via policy structure.
When Q-learning wins
- Discrete actions, off-policy learning desired.
- Large replay buffers / sample efficiency matters.
- Multi-task learning with shared value function.
Modern landscape
DDPG, TD3, SAC for continuous control. PPO for everything else by default. AlphaZero and successors for game-like discrete domains. Many production RL systems are actor-critic variants of PPO with domain-specific reward engineering.