I've been reading some papers on reinforcement learning.
$$\Delta w=\frac{\partial ln\ \pi_w}{\partial w}r$$$$\Delta w=\frac{\partial ln\ p_w}{\partial w}r$$
I often see expressions, similar to the above one, where the weights (denoted by $w$) are updated following the partial derivative of the policy function (denoted by $\pi_w$$p_w$) with respect to its weights.
But why do we take the $\ln$ or $\log$? What is its purpose?