REINFORCE: logarithmic gradient for weighted actions

The strategic gradient adjusts the probability of action by the return of the sampling trajectory.

• Step by stepCollate in 1 diagram2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives . 1 first fix

Try to do it after reading

  • Explain REINFORCE: Mechanisms and premises for how the logarithmic gradients of the action are weighted in return
  • Positioning the mechanism ' s fault limits with fixed examples

Suggested first

  • Conditional probability and gradient

Issues and mechanisms

The strategic gradient adjusts the probability of action by the return of the sampling trajectory. Intuition is a movement opportunity to improve the delivery of better results, but what is really updated is the gradient of the probability of action logarithmics multiplied by returns or advantages, rather than using incentives directly as labels for ordinary returns. A high incentive may also come from environmental randomity, so margin control and baselines are important.

For a given state, minus a baseline unrelated to the current sampling action, without changing the desired strategy gradient under appropriate conditions, the variance can be reduced. Baselines can depend on state, but depending on action without correcting it may change the target. The realization usually takes advantage as a weight and does not allow tactical losses to be estimated through advantage to produce an unanticipated gradient.

A concrete example

Synthetic 2 action policy indicates the first probability p using logistic parameters, with the current p = 0.5. Sampling to the first, return three, baseline one, advantage two; This action log probabilities apply to logit to a minus p, or 0.5, with a gradient rising to one. If sampled to the second and with the advantage of negative one, the lead is negative p, i.e. negative 0.5, multiplied by 0.5, which also drives the first probability increase.

Local gradient contribution of two samplesIn the synthetic logistic strategy, both the first action of positive and the second action of negative advantage drive the first probability up, contributing one and one point five, respectively.Action One1 Gradient ContributionAction two0.5 Gradient Contribution
In the synthetic logistic strategy, both the first action of positive and the second action of negative advantage drive the first probability up, contributing one and one point five, respectively.

Borders and checks

This is a local arithmetic, which does not mean that the long-term return will rise after an update. Sampling distribution, return windows, terminations and discounts need to be defined. High margin incentives, delayed feedback and incompleteness can make estimates difficult; The training should record the distribution of returns, the measure of strengths and the version of the behaviour strategy, rather than just the value of the policy loss.

A method of verification

The direction of the strategic gradient can be verified with precision in the second action: two actions are calculated by multiplying their gradient contribution, and the check is consistent with the number of parsing guides expected to reward. A constant baseline was subsequently added, with the expectation that it would be maintained and that individual contributions would change. This test detects errors such as the upward-down sign inverted error of the probability gradient as the logarithmic probability gradient. The true trajectory also needs to be clear as to when the return begins, and the rewards that have already occurred and are not related to the current movement cannot be attributed to the action.

Check understanding

Can the baseline change with the status?

The expected gradient can be maintained under conditions that do not depend on the current sampling action. It is used to compare the relative good and bad results in that state, and it does not have to be a global constant.

Does the reduction of the loss of strategy automatically prove an increase in incentives?

Can't. It is a proxy objective based on sampling and advantage construction, and the real return requires an independent trajectory or a clear assessment; Changes in distribution and estimated noise may influence the outcome.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. OpenAI Spinning Up — Vanilla Policy Gradient
  2. Proximal Policy Optimization Algorithms

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.