Reward and Return
Topics: Reinforcement Learning
Reward
The reward in RL is a function that outputs a number that indicates to the agent how good/bad the action taken was. Reward is usually a function of current state , action taken and next state :
However, for simplification, reward is sometimes taken to be a function of current state only or current state-action pair .
Return
Return is the cumulative reward obtained by the agent over a trajectory of states, actions and next states. We distinguish between 2 types of returns:
Finite-Horizon Undiscounted Return
which is the sum of rewards obtained over a finite number of steps.
Infinite-Horizon Discounted Return
which is the sum of all the rewards ever obtained by the agent, discounted by a factor depending on how far they are in the future.
Why do we need a discount factor?
- Intuitively: cash now is better than cash later
- Mathematically: the discount factor makes the sum finite instead of infinite, which makes it easier to deal with in equations
References
Backlinks
Notes that reference this page.
Connections
Direct relationships to this note.