I have some questions about strategy to adopt regarding illagal action handling in reinforcement learning (Stable Baselines 3 / SAC algo). First is about reward shaping, second is about terminating / truncating episode when performing an illegal action.
What is the good practice for illegal action penality ? Game cumulates 1 if wins and -1 if loses. I apply a -100 penality for illegal action because the evaluation is done over 100 episodes so that an illegal action cannot be compensated by some wins. Is it the good way? Should i do
illegal_rew = -100
orillegal_rew = -100 - episode_cumulated_rew
?Should I stop the game when performs an illegal action ? If the answer is "yes", should i terminate or truncate the episode ?