A reward signal is numerical feedback returned by an environment after an agent acts in an observed state. Reinforcement learning uses accumulated rewards to treat actions that usually yield higher values in a state as more valuable. Early exploration can be random: the agent probes actions and action sequences, then retains behavior associated with better rewards. section 11.1
The signal is supplied by the environment, not invented separately by the agent. A training step produces a new state, reward, and completion flag; the learner uses the reward to revise its estimate of the action's value. This makes reward the immediate feedback that connects an action to later choices. section 11.1.1
Frozen lake: success and failure feedback
In a 4-by-4 frozen-lake task, an agent moves up, down, left, or right. Reaching the bottom-right goal ends the journey with a reward. Falling into a hole also ends it, but returns a negative reward. During each episode, rewards are added into a total score while the Q-table is updated from each transition. section 11.1.1
Use the frozen-lake grid to inspect why terminal outcomes can return different reward values: a goal rewards progress, while a hole penalizes failure. section 11.1.1
Rewards can also evaluate candidates without directly training them. In a NEAT simulation, a genome's fitness is the sum of rewards collected across a run. Evolution then selects the genome with the strongest accumulated fitness; the agent itself does not learn to consume rewards through a Q-table update. section 11.3
Reward-driven approaches here differ in how they use the same environment feedback:
- Q-learning updates a state-action lookup table from each observed reward and future state value. section 11.1.1
- NEAT sums rewards into genome fitness and evolves higher-scoring candidates. section 11.3
- Deep Q-learning replaces the Q-table or policy with deep learning for more complex environments. section 11.6










