State-dependent action masking in tabular reinforcement learning: analytical and stochastic evaluation motivated by surgical robotics
Reinforcement learning (RL) has considerable potential to increase autonomy in surgical robotics, but its deployment in safety-critical settings requires mechanisms for restricting actions that violate specified safety rules. We study a tabular reinforcement learning formulation in which action selection and Bellman maximization are restricted to state-dependent admissible action sets, corresponding to a form of action-masking closely related to shielding. Classical results for discounted Markov decision processes and tabular Q-learning are recalled to clarify the conditions under which an optimal stationary policy exists and Q-learning converges for a fixed finite constrained decision process. A deliberately simple two-state environment is first used to illustrate the consequences of persistent ϵ -greedy exploration when an unsafe action remains available or is excluded by the specified action mask. In this setting, once the safe action is greedy, residual unsafe-action frequency is determined directly by the exploration schedule, so the example is interpreted analytically rather than as evidence of a new learning mechanism. We then use a stochastic 30-state navigation environment to examine hazard-exposure during learning under task-only learning; a tuned reward penalty; and correct, conservative, and deliberately misspecified action masks. The tuned penalty reduced but did not eliminate hazardous-state entries during learning, whereas a correctly specified mask excluded them. When the mask was deliberately misspecified, combining it with the tuned penalty substantially reduced hazard exposure and produced a violation-free final greedy policy. These results illustrate the distinction between structural constraint enforcement and reward-based discouragement and emphasize that the safety significance of action masking depends on the validity of the supplied constraint specification.
Authors
- Norman R. Williams (ORCID: https://orcid.org/0000-0001-6496-312X)
- Pramit Khetrapal (ORCID: https://orcid.org/0000-0001-8769-5797)
- Amar Ahmad
Institutions
- University College London (GB)
Publication Details
- Journal
- Frontiers in Robotics and AI
- Published
- 2026-11-23
- DOI
- https://doi.org/10.3389/frobt.2026.1953392
- Primary Topic
- Reinforcement Learning in Robotics
- Type
- article
- Field-Weighted Citation Impact
- 0.00