First, introduce
The previous control methods were value-based, and after the value function was defined, we identified a strategy (greed, ϵϵ-greed) based on the value function to find the action. So why don't we just use the policy function to control the action?
The benefits of doing this are more efficient in a continuous action space (or high-dimensional space), a strategy that can be randomized, and in some cases value functions can be difficult to compute, and policy functions are easier to implement. second, finite difference Policy gradient
First of all, for some parametric strategy πθπθ, we need to determine a target function of J (Theta) j (θ), which gives three kinds: Start value average value average reward per time-step
Because you want to maximize the objective function, you use the gradient rise method to optimize the parameter θθ.
So how do we calculate the strategy gradient, using a method called finite difference, which adds a very small value to each dimension k, and then computes a value near the partial derivative: ∂j (theta) ∂θ≈j (θ+ϵuk) −j (θ) ϵ∂j (theta) ∂θ≈j (Θ+ϵuk ) −j (theta) Ε
Likelihood ratio, such as the following formula: ∂θπ (s,a) =π (s,a) x∂θlogπ (s,a) ∂θπ (s,a) =π (s,a) x∂θlogπ (s,a)
Softmax Policy: A strategy to determine the probability of an action by using a linear combination of features to Softmax.
Gaussian Policy: The linear combination of features is used as the mean value μμ,π∼n (μ,σ2) π∼n (μ,σ2) of the distribution.
For any differentiable policy function