Install
openclaw skills install @roamer-remote/debugging-reinforcement-learningTools and methods for controlling randomness, ensuring reproducibility, analyzing agent behavior, and debugging reward issues in stochastic reinforcement lea...
openclaw skills install @roamer-remote/debugging-reinforcement-learningThis skill provides a comprehensive toolkit for debugging reinforcement learning (RL) agents that exhibit non-deterministic behavior — one of the most challenging aspects of RL development. Non-determinism arises from environment stochasticity, policy randomness, seed mismanagement, and subtle numerical issues, making bugs notoriously hard to reproduce and diagnose.
Strategies for controlling and isolating sources of randomness in RL pipelines:
Utilities for making RL experiments reproducible:
Techniques for understanding what the agent is actually doing:
Methods for diagnosing reward-related issues:
1. Set global seed via seedAll()
2. Run episode with EpisodeRecorder
3. Replay and compare
1. Run 50 episodes with fixed seeds
2. Cluster trajectories
3. Inspect divergent clusters
4. Use policyConsistencyCheck on divergent states
1. Decompose reward into components
2. Run rewardScaleAnalyzer
3. Check for hacking via rewardHackingDetector
4. Validate return computation
torch.backends.cudnn.deterministic = True during debug.