Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

debugging-reinforcement-learning调试强化学习

Agent Skill

debugging-reinforcement-learning 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 OpenClaw 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,644

周安装

108

GitHub Stars

公开资料未说明

下载量

847
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:debugging-reinforcement-learning(调试强化学习)
来源仓库:https://github.com/roamer-remote/debugging-reinforcement-learning
安装命令:
openclaw skills install debugging-reinforcement-learning
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install debugging-reinforcement-learning

简介

控制强化学习中的随机性,确保实验可复现并分析奖励函数设计缺陷。

  • 适用于训练智能体过程中出现策略不稳定或收敛异常的研究人员。
  • 提供种子设置指南、奖励塑形技巧与行为可视化分析方法。
  • 输出为理论建议,实际效果取决于超参调优与仿真环境真实性。
  • debugging-reinforcement-learning 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Debugging Non-Deterministic Agent Behavior in Reinforcement Learning Environments

Overview

This 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.

Core Modules

1. Stochasticity Control

Strategies for controlling and isolating sources of randomness in RL pipelines:

  • Seed Management: Set and track seeds across all random sources (Python random, NumPy, PyTorch/TF, environment RNG, custom samplers).
  • Entropy Scheduling: Monitor and clamp policy entropy to detect exploration collapse or excessive randomness.
  • Action Distribution Inspection: Log full action distributions (not just sampled actions) to verify the policy is learning correctly.
  • Environment Stochasticity Toggle: Identify which environment transitions are stochastic vs. deterministic, and temporarily freeze stochastic dimensions for debugging.

2. Reproducibility Tools

Utilities for making RL experiments reproducible:

  • ReproWrapper: Wraps any env+agent pair to capture full episode trajectories (observations, actions, rewards, dones, seeds, RNG states).
  • Episode Replay: Replays a recorded episode step-by-step for comparison against expected behavior.
  • State Snapshot: Saves/restores complete training state (model weights, optimizer state, RNG state, env state).
  • Diff Replay: Compares two episode trajectories and highlights divergences with step-level granularity.
  • Seed Cascade: Generates deterministic seed sequences for parallel workers to avoid seed collisions.

3. Behavior Analysis

Techniques for understanding what the agent is actually doing:

  • Trajectory Clustering: Groups similar trajectories to identify behavioral modes (e.g., "agent always fails at corner cases").
  • Action Frequency Heatmap: Visualizes action distributions over state space regions.
  • Policy Consistency Check: Detects if the same state produces different action distributions across episodes (a sign of state encoding bugs or hidden state leakage).
  • Temporal Correlation Detector: Finds unintended correlations between consecutive actions that indicate the agent isn't respecting Markov assumptions.
  • Behavioral Mode Detection: Identifies distinct behavioral regimes the agent switches between (e.g., cautious vs. reckless).

4. Reward Debugging

Methods for diagnosing reward-related issues:

  • Reward Decomposition: Breaks multi-component rewards into individual signals to identify which component drives behavior.
  • Reward Shaping Validator: Checks if shaped rewards accidentally create local optima or reward cycling.
  • Sparse Reward Tracer: For sparse-reward environments, logs the full trajectory leading up to reward events for analysis.
  • Reward Scale Analyzer: Detects reward scale mismatches between components that cause gradient domination.
  • Episode Return Sanity Check: Verifies that discounted returns are computed correctly and that reward normalization isn't destroying the signal.
  • Reward Hacking Detector: Flags when the agent achieves high reward through unintended behavior (exploiting bugs in reward computation).

Usage Patterns

Quick Reproducibility Check

1. Set global seed via seedAll()
2. Run episode with EpisodeRecorder
3. Replay and compare

Diagnose Erratic Behavior

1. Run 50 episodes with fixed seeds
2. Cluster trajectories
3. Inspect divergent clusters
4. Use policyConsistencyCheck on divergent states

Reward Signal Investigation

1. Decompose reward into components
2. Run rewardScaleAnalyzer
3. Check for hacking via rewardHackingDetector
4. Validate return computation

Anti-Patterns to Watch For

  • Seed per episode but not per step: Environment internal RNG can diverge even with episode-level seeding.
  • Caching state without RNG: Replay buffers that store (s, a, r, s') without the RNG state cannot reproduce the exact transition.
  • Floating point mode differences: GPU non-determinism from reduced-precision ops. Use torch.backends.cudnn.deterministic = True during debug.
  • Hidden environment state: Some environments (e.g., Atari with frame-skipping) have internal state not exposed in the observation.
  • Reward normalization drift: Running mean/std normalization changes the effective reward over training, making early episodes non-reproducible.

Integration Tips

  • Works with Gym/Gymnasium, PettingZoo, and custom env wrappers.
  • Compatible with PyTorch, TensorFlow, and JAX-based agents.
  • Output formats: JSON trajectories, CSV logs, and structured debug reports.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

71.64%
按下载量换算607

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills