# How do I choose a discount factor in Markov Decision Problems?

I'm referring to the gamma in the Value function:

Selecting the discount factor $\gamma$ depends on the problem. As explained by Sutton & Barto the value is always between 0 and 1: $0<=\gamma<=1.0$. If $\gamma=0$ the policy will be greedy, i.e. it will choose the best action only for the current state. And if $\gamma>0$ then (possible) future rewards will be taken into account. When ￼$\gamma<1$ then the infinite sum is finite as long as the reward sequence￼ is bounded.
As also commented in this related answers, with a higher $\gamma$ the policy is optimized for gains further in time, but will take more time to converge.