concept divergence in category reinforcement learning

appears as: divergence
Grokking Deep Reinforcement Learning

This is an excerpt from Manning's book Grokking Deep Reinforcement Learning.

Miguel's Analogy

Humans also learn on-policy and off-policy

 

On-policy is learning about a policy that is being used to make decisions; you can think about it as “learning on the job.” Off-policy learning is learning about a policy different from the policy used for making decisions, you can think about it as “learning from others’ experiences,” or “learning to be great, without trying to be great.” Both are important ways of learning and perhaps vital for a solid decision-maker. Interestingly, you can see whether a person prefers to learn on-policy or off-policy pretty quickly.

My son, for instance, tends to prefer on-policy learning. Sometimes I see him struggle playing with a toy, I come over and try to show him how to use it, but then he complains until I leave him alone. He keeps trying and trying, and he eventually learns, but he prefers his own experience instead of others’. On-policy learning is a straightforward and stable way of learning.

My daughter, on the other hand, seems to be OK with learning off-policy. She can learn from my demonstrations before she even attempts a task. I show her how to draw a house, then she tries.

Now, beware; this is a stretch analogy. Imitation learning and off-policy learning are not the same. Off-policy learning is more about the learner using their experience at say running, to get better at something else, say playing soccer. In other words, you do something while learning about something else. I’m sure you think of instances when you have done that, when you have learned about painting, while cooking. It doesn’t matter where the experiences come from for doing off-policy learning; as long as the target policy and the behavior policy are different, then you can refer to that as off-policy learning.

Also, before you make conclusions about which one is “best,” know that in RL, both have pros and cons. On one hand, on-policy learning is very intuitive and stable. If you want to get good at playing the piano, why not practice the piano?

On the other hand, it seems useful to learn from sources other than your own hands-on experience; after all, there is only so much time in a day. Maybe meditation can teach you something about playing the piano, and help you get better at it. But, while off-policy learning helps you learn from multiple sources (and/or multiple skills), methods using off- policy learning are often of higher variance and, therefore, slower to converge.

Additionally, know that off-policy learning is one of the three elements that, when combined, have been proven to lead to divergence: off-policy learning, bootstrapping, and function approximation. These don’t play nice together. You’ve learned about the first two so far, and the third one is soon to come.

By using a target network to fix targets, we mitigate the issue of “chasing your own tail” by artificially creating several small supervised learning problems presented sequentially to the agent. Our targets are fixed for as many steps as we fix our target network. This improves our chances of convergence, not to the optimal values because such things don’t exist with non-linear function approximation, but convergence in general. But, more importantly, it substantially reduces the chances of divergence, which are not uncommon in value-based deep reinforcement learning methods.