Take one tabular Q-learning update
Keep each reward, discount and value next to its number. · 164 words
A museum robot has stored the value two for turning left at a junction. On one trip it turns left and immediately earns a reward of one. Its new junction is not terminal. The largest stored action value there is six, and the discount factor is one half. Q-learning uses the immediate reward plus the discounted best estimated next value as the target. In this case the target is one plus three, which equals four.
An update moves partway from the old estimate toward the target. With a learning rate of one quarter, the change is one quarter of four minus two, or one half. The new stored value is 2.5. The robot could actually choose a lower-valued action next while it explores the museum. That choice would leave this particular target unchanged because the maximum next value was already six. A trace of the calculation should record the old value, reward, discount, next maximum and learning rate so another learner can reproduce it.
Check your recall
What value replaces two after the update toward four at a learning rate of one quarter?
Check your answer
The updated value is 2.5, because one quarter of the two-unit gap adds one half to the old estimate.
Sources and credits
Original KeyTouch lesson. Background reading · UC Berkeley · Introduction to Artificial Intelligence.