Learn the policy directly, not the value of states.
🎯 Daily Micro-Learning Card
A network mapping state → action probabilities. Differentiable, so we can push gradients through it.
The objective we maximize: average total reward the policy earns over episodes.
Sample a full trajectory, compute the actual return Gt — no bootstrapping, unbiased but noisy.
Subtract a reference (e.g. average return) to cut variance without adding bias.
πθ for a full episode, recording states, actions, and rewards.Gt = discounted sum of rewards from each timestep to the end.b to center the returns and shrink gradient variance.θ ← θ + α Σ ∇ log π(a|s)(Gt−b) — gradient ascent toward more reward.