A large TD error produces a huge gradient, which can destabilize training. DQN clips the error to a fixed range so that a single surprising transition cannot dominate an update.
Implement clipped_td_error(td, c), clipping each error to [-c, c].
Use np.clip with bounds -c and c.
No results yet
Run your code to check it against the examples, or submit to run every test.