Returns and State Values
A state contributes the outcome that follows its observation, not merely the state name itself. The first episode therefore supplies a return of 0 for A and also a return of 0 for its later observation of B.
From Episodes to Predictions
A completed episode tells us what happened after a state was observed. That later outcome is the return associated with the observation. By collecting the returns associated with a state, we can form an estimate of that state's value. In this exercise, the goal is to turn the episode record into predictions for V(A) and V(B).
Tracing the Recorded Episodes
There are eight episodes altogether. Only the first begins in A. That first episode moves from A to B with reward 0 and then terminates from B with reward 0. The other seven episodes begin in B and end immediately.
A state contributes the outcome that follows its observation, not merely the state name itself. The first episode therefore supplies a return of 0 for A and also a return of 0 for its later observation of B.
Counting Returns by State
Estimating V(A) and V(B)
Use the eight recorded episodes to determine the supported estimates for V(A) and V(B).
- 1Collect A's observations
Only the first episode begins in A. Its return is 0, so A has one observed return and that return is 0.
- 2Estimate A's value
Because the only observed episode beginning in A has return 0, the batch supports V(A) = 0.
- 3Collect B's observations
B is observed in the first episode after the transition from A and also at the beginning of the other seven episodes. This gives eight observations of B altogether.
- 4Count B's returns
Across those eight observations, B has six returns of 1 and two returns of 0.
- 5Estimate B's value
The supported estimate for B is 3/4 because three quarters of B's eight observed returns are successful: six of the eight returns are 1.
V(A) = 0 and V(B) = 3/4 for this batch of episodes.
Why B Equals Three Quarters
The value 3/4 comes directly from the eight recorded observations of B. Six observations are followed by a return of 1, while two are followed by a return of 0. Thus, the successful outcomes account for six of the eight observations, which is 3/4.
Do not count only the seven episodes that begin in B. The first episode also contains an observation of B after the move from A. Including that observation gives eight B observations in total.
Evidence Versus Guesswork
An observed state estimate must be tied to the returns recorded after that state. For A, the batch contains one observation and its return is 0, so V(A) = 0 is supported. For B, the batch contains eight observations with six returns of 1 and two returns of 0, so V(B) = 3/4 is supported. A different value with no corresponding observations in the episode record would be an unsupported guess.
Common mistake Counting only episodes that begin in B.
What it looks likeTreating B as having seven observations because seven episodes begin in B.
Why it failsThe first episode begins in A but later observes B before terminating. That observation also contributes a return for B.
Do this insteadCount every observation of B, including the B observation inside the first episode. There are eight B observations.
Common mistake Using the return for A as the return for every state in the episode.
What it looks likeAssigning only the first episode's return of 0 to A and then ignoring the later observation of B.
Why it failsEach observed state is connected to what happens after that observation. The first episode supplies a return of 0 for A and a return of 0 for B.
Do this insteadTrack the state observations separately and associate each with its later outcome.
Common mistake Choosing a value without evidence in the batch.
What it looks likeAssigning a value to a state even though the episode record contains no observation and no return for that state.
Why it failsThe exercise asks for estimates supported by completed episodes, not unsupported guesses.
Do this insteadBase each estimate on the returns recorded after observations of that state.
Check Your Estimate
Explain in your own words why the batch supports V(A) = 0 and V(B) = 3/4. In your explanation, state how many observations belong to A, how many belong to B, and how many of B's observations have return 1.
Hints
- Start with the only episode that begins in A.
- Remember that the first episode later observes B.
- For B, distinguish the six returns of 1 from the two returns of 0.
What do you think happens?
Before checking the episode record, how many observations of B should be included in the estimate for V(B)?
Reveal answer
Eight
Seven episodes begin in B, and the first episode also observes B after moving from A. The first episode's B observation must be included.
Key Takeaways
- 1Episode data records what happened after states were observed.
- 2Only the first episode begins in A, and its return is 0, so the batch supports V(A) = 0.
- 3B is observed eight times: once in the first episode and once at the beginning of each of the other seven episodes.
- 4B has six returns of 1 and two returns of 0, giving the supported estimate V(B) = 3/4.
- 5An estimate is supported when it is based on recorded returns; a value with no corresponding observations is an unsupported guess.
At a glance
- A return is the outcome associated with what happens after a state is observed in a completed episode.
- The only observed episode beginning in A has return 0, so V(A) = 0 for this batch.
- B has eight observations, with six returns of 1 and two returns of 0.
- Because six of eight B observations have return 1, the supported estimate is V(B) = 3/4.
- State estimates must be grounded in recorded episode evidence rather than unsupported guesses.