policy
/ POL-uh-see /
A policy is the agent's strategy: a rule that, given whatever situation the agent finds itself in, says what to do. If the state is the question, the policy is the answer. It is the thing reinforcement learning is ultimately trying to learn — once you have a good policy, you can throw away all the trial and error and just follow it.
More precisely, a policy maps states to actions. A deterministic policy gives one fixed action for each state ('if the light is red, stop'). A stochastic policy instead gives probabilities ('70% chance go left, 30% go right') and rolls the dice — useful for keeping the agent unpredictable to opponents and for exploring during learning. Written with the Greek letter pi (π), the policy is the agent's whole behavior boiled down to one function.
The reason policy is such a central word is that everything else in reinforcement learning is in service of finding a good one. Value functions estimate how good a policy is; the Bellman equation describes how to improve it; policy-gradient methods adjust it directly. A subtlety worth holding onto: a policy can be excellent in the world it trained in and useless the moment the world changes, because it has memorized what to do, not understood why.
A simple traffic-light policy: state 'red' → action 'stop'; state 'green' → 'go'; state 'yellow' → 'slow'. A learned game policy is the same idea but vastly bigger — for every possible screen, it stores how likely it is to press each button.
A policy turns 'what situation am I in?' into 'what do I do?' — for every situation.
A common mix-up: the policy is the rule for acting; the value function is the estimate of how much reward that rule will earn. Some methods learn the value first and read off a policy from it (Q-learning); others learn the policy directly (policy gradient). Don't conflate the two.