Artificial intelligence website defines off-policy and on-policy learning as follows:
"An off-policy learner learns the value of the optimal policy independently of the agent's actions. Q-learning is an off-policy learner. An on-policy learner learns the value of the policy being carried out by the agent including the exploration steps."
I would like to ask your clarification regarding this, because they don't seem to make any difference to me. Both the definitions seem like they are identical. What I actually understood are the model-free and model-based learning, and I don't know if they have anything to do with the ones in question.
How is it possible that the optimal policy is learned independently of the agent's actions? Isn't the policy learned when the agent performs the actions?