Glossary · Reinforcement learning
Action clipping
Also called clipping, saturation, action bound
Cutting off actions that fall outside the allowed range. It's needed for safety, but it can hide drift in the policy's outputs.
A Gaussian policy can output any real number, but motors have limits. So the environment clips each action to its range before using it:
The hidden problem
Clipping is flat outside the range. If the policy’s mean drifts to 5, the action used is still 1. Moving from 5 to 4 changes nothing the environment can see, so there is no reward signal to bring it back. The mean can drift further and further, nothing pulls it back, and the joint stays pinned at its limit. Learning on that joint stops.
Fixes
- A bound penalty in the loss on the part of the mean outside the range:
- Squashing: pass the output through , so it can never leave . This changes the log-probability calculation and is common in other algorithms such as SAC.
In this project
In run survive2 the action means drifted to an average size of 17, against a clip at ±1. Every joint stuck at its limit and the policy collapsed (see training divergence). A loss on fixed it and has been part of training since.