Five Now Or Twenty Later

From the start state of an episodic MDP an agent can commit to one of two policies. Rewards arrive at the steps shown and are 0 everywhere else.

policy reward stream from tt
A Rt+1=5R_{t+1} = 5, then 0 forever
B 0 for four steps, then Rt+5=20R_{t+5} = 20, then 0 forever

Using Gt=Rt+1+γRt+2+γ2Rt+3+⋯G_t = R_{t+1} + \gamma R_{t+2} + \gamma^2 R_{t+3} + \cdots, what are the two returns at γ=0.9\gamma = 0.9, and which policy is optimal?

A

GA=5G_A = 5 and GB=13.12G_B = 13.12, but A is optimal, because any γ<1\gamma < 1 makes the agent myopic and myopic agents maximise the immediate reward.

B

GA=5G_A = 5 and GB=0.94⋅20=13.12G_B = 0.9^4 \cdot 20 = 13.12, so B is optimal at γ=0.9\gamma = 0.9; at γ=0.5\gamma = 0.5 the same MDP gives GB=1.25G_B = 1.25 and A becomes optimal.

C

GA=5G_A = 5 and GB=20G_B = 20, so B is optimal at any γ\gamma: discounting only keeps infinite sums finite and does not change a comparison between two finite reward streams.

D

GA=4.5G_A = 4.5 and GB=0.95⋅20=11.81G_B = 0.9^5 \cdot 20 = 11.81, so B is optimal, since every reward in the return is discounted at least once.