First, introduce
This story is the real use of the algorithm in most cases, that is, in the case of ignorance of the environment, to learn a good strategy. First, introduce some concepts:
Model-free control, in the context of unknown environment, how to learn the strategy (value) to obtain the greatest rewards.
On-policy and Off-policy, two types of control, the former being policy-known, and the latter being unknown. The latter allows you to use other people's experience sequence to learn, and the former can only learn on the premise of knowing your strategy. If you are using the policy of GET data when you compute target, then it is the On-policy method, otherwise it is off-policy.
ϵϵ-greedy, every time when the action, to ϵϵ the probability of random execution of an action to 1−ϵ1−ϵ probability to perform the highest Q value action. The ϵϵ gradually decreases with the training. This allows you to explore as many strategies as possible and to achieve the goal of training. It is also easy to prove qπ′ (s) ≥qπ (s) qπ′ (s) ≥qπ (s). Second, Monte-carlo control
For each episode, the control process is divided into two steps: The Monte-carlo strategy evaluation process, after which q≈q (π) q≈q (π) is completed. ϵϵ-greedy strategy optimization process. Third, Sarsa
Td-control, using TD instead of MC for strategy evaluation. Then each step will update the evaluation of the value function, not each episode.
Sarsa, in each time-step, the strategy is evaluated in a sarsa manner, and the strategy is optimized in a ϵϵ-greedy manner.
Let's review TD (0) Update formula: V (ST) ←v (ST) Kit α (RT+1+ΓV (st+1) −v (ST))