[Reinforcement Learning Theory] Dynamic Programming Algorithm

[Reinforcement Learning Theory] Dynamic Programming Algorithm

The following are some of my own conclusions, but not official conclusions.

Two representatives of dynamic programming algorithm

① Strategy iteration;

②Value iteration.

Application Conditions of Dynamic Programming Algorithm

① Have a complete MDP modeling, know a clear reward function rrr and the state transition functionppp . If you don't know, you can only let the agent interact with the environment to get the sequence and simulate it.

②The state space and action space are discrete and limited.

The difference between the two dynamic programming algorithms

① Policy iteration consists of two parts: policy evaluation (multiple times) + policy promotion (once), the two parts are used as a combination, and the cycle is repeated multiple times until the policy π τ − 1 = π τ \pi_{\tau-1} = \pi_{\tau }Piτ 1=Pit

Strategy evaluation may go through multiple rounds. This process is to calculate the optimal value of each state according to the current strategy, and get V π ( s ) V_{\pi}(s)Vp(s)

Then there is strategy promotion (one strategy promotion after multiple rounds of strategy evaluation), strategy promotion is by calculating q ( s , a ) q(s,a) in each stateq(s,a ) , and specify thatq ( s , a ) q(s,a)q(s,a ) The largest action is used as the currentsss action. This specified process is the process of policy promotion.

Principles used : Bellman expectation equation, relationship between state value function and action value function, strategy promotion theorem

Advantages : the process is easy to understand;

Disadvantages : Because it takes multiple rounds to improve, and then iterates multiple rounds to improve... If the state space and action space are relatively large, it will consume computing resources and time; an initial π \pi is required in advancePi

②Value iteration also includes two parts: strategy evaluation (one time) + strategy promotion (one time), the two parts are used as a combination, and the cycle is repeated multiple times until the strategy π τ − 1 = π τ \pi_{\tau-1} = \pi_{\tau }Piτ 1=Pit

In each calculation of the value of a certain state v ( s ) v(s)When v ( s ) , allq ( s , a ) q(s,a)q(s,a ) , and then directly specify the largestq ( s , a ) q(s,a)q(s,a ) as the updatedv ( s ) v(s)v(s)

The principle used : the Bellman optimality equation

Advantages : The number of iteration rounds is less than that of policy iteration; there is no need to know the initial π \pi in advanceπ (because the calculation process does not need to use the probability of the current state transitioning to an action)

Disadvantage : Finally, π \pi can be derived according to the value functionp .

Guess you like

Origin blog.csdn.net/Mocode/article/details/130591534