April 2019
Intermediate to advanced
212 pages
5h 34m
English
You will recall that alpha ranges from 0 to 1. An alpha value of 0 will have an agent learn nothing, and an alpha value of 1 will have it learn policies completely specific to a deterministic environment.
It can sometimes be to our advantage to decay alpha as a task progresses, because there might be less that we need to learn about it as we progress. A high alpha value can, in some situations, lead to overfitting, or learning overly specific lessons about an environment, and decaying alpha can help to prevent that.
Here's our code from the previous section, updated with a new alpha value:
Q = np.zeros([env.observation_space.n, env.action_space.n])gamma = 0.1alpha = 0.1state = env.reset()count = 0reward = 0 ...
Read now
Unlock full access