4
$\begingroup$

As discussed in this thread, you can handle invalid moves in Reinforced Learning by re-setting the probabilities of all illegal moves to zero and renormalising the output vector.

In back-propagation, which probability matrix should we use? The raw output probabilities, or the post-processed vector?

$\endgroup$
1
$\begingroup$

I am also quite new to this field but I think you should use the normalized outputs for the backpropagation. In general you would want to backpropagate all the calculations you did in the forward pass, so why would you want to exclude the step of the normalization in your backward pass? This would essentially make the renormalization to have no effect (different loss values but no different model weight update).

For example:

In policy gradients you backpropagate through the log propability of the selected action. In the forward pass the sampling of the probability (that determines which action is selected) is not affected by the renormalization (you might just get different loss values in the end in your loss function). But compared to this in the backward pass you need the actual value of the log propability to calculate the gradient that updates the model weights.

So (I think) the normalization is mostly just done for the backpropagation to get "renormalized" gradients. And no unbalanced gradients between states with more/less allowed actions.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.