A deterministic task has two states, A and B. In state A the only action pays reward 1 and moves to B. In state B the only action pays reward 0 and moves to A. Take . Starting from the return recursion of section 23.2, derive the Bellman equations for and , solve them, and check against the infinite discounted sum of rewards along the path from A.
This tier asks for a derivation, so there is no automatic checker. Write your answer, then open the worked solution and compare.
Worked solution
Taking the expectation of the return recursion under the forced policy gives Substituting the second line into the first gives Moving the term to the left gives so The direct check starts at A and follows the path. The rewards are at steps , so The two routes agree because the return recursion and the Bellman equation are the same statement once the policy and the transitions are fixed. Section 23.2 supplies the recursion; section 23.4 turns it into one equation per state. The derivation also shows why the value is finite: the reward returns every two steps, and each return is discounted by .