# Is A2C loss function taking smaller steps for larger mistakes?

A2C loss is usually defined as advantage * (-log(actor_predictions)) * target where target is a one-hot vector (with some clipping/noise/etc...) with the selected target.

Does this mean that we get larger losses for smaller mistakes?

If for example the agent has predicted $$\pi(a|s)=0.9$$ but the advantage is negative, this would mean a larger mistake than if the agent predicted that $$\pi(a|s)=0.1$$, however, putting the numbers in the formula means a larger loss for the 0.1 prediction.

Assuming advantage=-1, advantage * (-log(actor_predictions)) * target would mean:

$$-1 * (-log(0.9)) * 1 = log(0.9)=-0.045$$ $$-1 * (-log(0.1)) * 1 = log(0.1)=-1$$

Is my understanding correct?

When the advantage is positive, $$-log (p) * advantage$$ will be smaller if $$p$$ is growing, and when the advantage is negative, $$-log (p) * advantage$$ will be smaller if $$p$$ is decreasing.