Returns, Value & Policy

stochastic policy

A stochastic policy does not commit to one action; it rolls a weighted die. In each state it gives a probability to every action and then samples from that distribution, so the same situation can produce different moves on different visits. Think of a poker player who bluffs a fixed fraction of the time — the randomness is deliberate, not confusion.

It is written pi of a given s, a probability distribution over actions for each state. Stochastic policies earn their keep in three ways: they build in exploration for free; they can be optimal when the environment is only partially observed or when opponents could exploit a predictable plan; and they are differentiable, which makes them the natural object for policy-gradient methods that nudge action probabilities up or down. As learning converges, such a policy often sharpens toward near-deterministic behaviour.