# What is the discount factor in reinforcement learning?

Source: https://zilliz.com/ai-faq/what-is-the-discount-factor-in-reinforcement-learning
Author: zilliz

The discount factor (denoted as 𝛾) in reinforcement learning (RL) is a value between 0 and 1 that determines the agent’s preference for immediate versus future rewards. A discount factor closer to 1 indicates that the agent values future rewards nearly as much as immediate rewards, while a discount factor closer to 0 means the agent prioritizes immediate rewards.

The discount factor is used to calculate the present value of future rewards in an agent's decision-making process. For example, if an agent receives a reward of 10 in the next state, and the discount factor is 0.9, the agent would treat that reward as worth 9 in the current state. This is important for tasks where long-term planning and delayed rewards are crucial.

In practice, the discount factor helps balance short-term and long-term goals. A lower discount factor might be useful in tasks where immediate results are more important, such as in a fast-paced game, while a higher discount factor is useful in tasks like investment planning, where future outcomes are more significant.
