I've been working on a bot for a game involving dice throws and chance. The architecture involved is similar to AlphaZero in the that it has Convolutions and MCTS. According to the current state achieved, there's a possibility that all actions might not be allowed, some might be invalid for that certain state.

How do I handle these actions? When the bot is trained, it can directly select the valid action with the highest score, but how do I handle it in training? Is it useful to teach the network which moves are valid and which aren't, or is it better to simply select the valid move with the highest score at every pass?

Is this answer here specific to the kind of game being proposed or is it something always observed, that it is better to not add penalties for invalid moves?
Also, what does it mean to set the probability of the invalid moves to zero, as mentioned here?

  • 1
    $\begingroup$ Hi AyushY. Your second link looks like an almost exact duplicate for your original question. The select answer "Just ignore the invalid moves." is what you want. If that does not answer your question, I think you are better editing this question to focus on what you do not understand about the answers there. As it stands, you are re-asking the same question then adding a note at the end about not understanding the closest matching question to yours. If you reverse that, and ask how to ignore invalid actions, there might be something - I cannot find a duplicate of that. $\endgroup$ – Neil Slater Sep 10 '19 at 16:24
  • $\begingroup$ Apologies. (Neil makes a strong case.) Closed provisionally pending revision. Feel free to edit and submit for reopening! $\endgroup$ – DukeZhou Sep 12 '19 at 21:39