<p>TL;DR: It is absolutely okay to restrict actions.</p>
<p>The available actions can be state-dependent. This can be given by physical limitations (no possibility to enter the wall). A radical example of this is the application of RL to movement on a graph (see this: <a href="https://education.dellemc.com/content/dam/dell-emc/documents/en-us/2020KS_Nannapaneni-Optimal_path_routing_using_Reinforcement_Learning.pdf" rel="nofollow noreferrer">https://education.dellemc.com/content/dam/dell-emc/documents/en-us/2020KS_Nannapaneni-Optimal_path_routing_using_Reinforcement_Learning.pdf</a>).</p>
<p>Additionally, you can restrict your actions even if they are allowed (e.g. physically possible) by designing the policy. In case of probabilistic policy, you can set the &quot;fire&quot; actions to have a probability zero.</p>
<p>For deeper reading: <a href="https://arxiv.org/pdf/1906.01772.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1906.01772.pdf</a></p>
Can you limit the number of actions when using q learning?
<p>I am currently implementing q learning to solve a maze which contains fires which initiate randomly. Would it be considered proper for me to code the action to not be an option for the agent if there is a fire in that direction or should my reward be doing this instead?
Thanks</p>