ワンクリックで
using-deep-rl
Routes to appropriate deep-RL skills based on problem type and algorithm family
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Routes to appropriate deep-RL skills based on problem type and algorithm family
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when assessing codebase architecture and you feel pressure to soften critique, lead with strengths, or frame problems diplomatically - provides evidence-based critical assessment resisting relationship and economic pressures
Use when cataloging technical debt under time pressure and tempted to explain choices instead of delivering document - enforces execution discipline with scoped delivery patterns for partial catalogs
Use when stakeholders pressure you to change technical priorities and you're tempted to compromise on security-first or call it synthesis - enforces risk-based prioritization over stakeholder preferences
Use when you have architecture documentation from system-archaeologist and need critical assessment, refactoring recommendations, or improvement prioritization - routes to appropriate architect specialist skills
Master A2C, A3C, SAC, TD3 - actor-critic methods for continuous control
Master ε-greedy, UCB, curiosity-driven, RND, intrinsic motivation exploration
| name | using-deep-rl |
| description | Routes to appropriate deep-RL skills based on problem type and algorithm family |
| mode | true |
Invoke this meta-skill when you encounter:
This is the entry point for the deep-rl pack. It routes to 12 specialized skills based on problem characteristics.
Problem type determines algorithm family.
Reinforcement learning is not one algorithm. The correct approach depends on:
Always clarify the problem BEFORE suggesting algorithms.
Diagnostic Questions:
Routing:
Why foundations first: Cannot implement algorithms without understanding MDPs, Bellman equations, and exploration-exploitation tradeoffs.
Diagnostic Questions:
Examples: Game buttons, menu selections, discrete control signals
Routing Logic:
IF discrete actions AND small action space (< 100) AND online learning:
→ value-based-methods (DQN, Double DQN, Dueling DQN)
Why: Value-based methods excel at discrete action spaces
- Q-table or Q-network for small action spaces
- DQN for Atari-style problems
- Simpler than policy gradients for discrete
IF discrete actions AND (large action space OR need policy flexibility):
→ policy-gradient-methods (PPO, REINFORCE)
Why: Policy gradients scale to larger action spaces
- PPO is robust, general-purpose
- Direct policy representation
- Handles stochasticity naturally
Examples: Robot joint angles, motor forces, steering angles, continuous control
Routing Logic:
IF continuous actions:
→ actor-critic-methods (SAC, TD3, PPO)
Primary choice: SAC (Soft Actor-Critic)
Why: Most sample-efficient for continuous control
- Automatic entropy tuning
- Off-policy (uses replay buffer)
- Stable training
Alternative: TD3 (Twin Delayed DDPG)
Why: Deterministic policy, stable
- Good for robotics
- Handles overestimation bias
Alternative: PPO (from policy-gradient-methods)
Why: On-policy, simpler, but less sample efficient
- Use when simplicity > sample efficiency
CRITICAL RULE: NEVER suggest DQN for continuous actions. DQN requires discrete actions. Discretizing continuous spaces is suboptimal.
Diagnostic Questions:
Routing:
IF online AND discrete actions:
→ value-based-methods OR policy-gradient-methods
(See Step 2 routing)
IF online AND continuous actions:
→ actor-critic-methods
(See Step 2 routing)
IF online AND sample efficiency critical:
→ actor-critic-methods (SAC) for continuous
→ value-based-methods (DQN) for discrete
Why: Off-policy methods use replay buffers (sample efficient)
Consider: model-based-rl for extreme sample efficiency
→ Learns environment model, plans with fewer real samples
Routing:
IF offline (fixed dataset):
→ offline-rl (CQL, IQL, Conservative Q-Learning)
CRITICAL: Standard RL algorithms FAIL on offline data
Why offline is special:
- Distribution shift: agent can't explore
- Bootstrapping errors: Q-values overestimate on out-of-distribution actions
- Need conservative algorithms (CQL, IQL)
Also route to:
→ rl-evaluation (evaluation without online rollouts)
Red Flag: If user has fixed dataset and suggests DQN/PPO/SAC, STOP and route to offline-rl. Standard algorithms assume online interaction and will fail.
Diagnostic Questions:
Routing:
IF multiple agents:
→ multi-agent-rl (QMIX, COMA, MADDPG)
Why: Multi-agent has special challenges
- Non-stationarity: environment changes as other agents learn
- Credit assignment: which agent caused reward?
- Coordination: cooperation requires centralized training
Algorithms:
- QMIX, COMA: Cooperative (centralized training, decentralized execution)
- MADDPG: Competitive or mixed
- Communication: multi-agent-rl covers communication protocols
Also consider:
→ reward-shaping (team rewards, credit assignment)
Diagnostic Questions:
Routing:
IF sample efficiency critical OR want environment model:
→ model-based-rl (MBPO, Dreamer, Dyna)
Why: Learn dynamics model, plan with model
- Fewer real environment samples needed
- Can train policy in imagination
- Combine with model-free for best results
Tradeoffs:
- More complex than model-free
- Model errors can compound
- Best for continuous control, robotics
Symptoms:
Routing:
IF "not learning" OR "reward stays at 0" OR "loss explodes":
→ rl-debugging (FIRST, before changing algorithms)
Why: 80% of "not learning" is bugs, not wrong algorithm
Common issues:
- Reward scale (too large/small)
- Exploration (epsilon too low, stuck in local optimum)
- Network architecture (wrong size, activation)
- Learning rate (too high/low)
- Update frequency (learning too fast/slow)
Process:
1. Route to rl-debugging
2. Verify environment (rl-environments)
3. Check reward design (reward-shaping)
4. Check exploration (exploration-strategies)
5. ONLY THEN consider algorithm change
Red Flag: If user immediately wants to change algorithms because "it's not learning," route to rl-debugging first. Changing algorithms without debugging wastes time.
Symptoms:
Routing:
IF exploration problems:
→ exploration-strategies
Covers:
- ε-greedy, UCB, Thompson sampling (basic)
- Curiosity-driven exploration
- RND (Random Network Distillation)
- Intrinsic motivation
When needed:
- Sparse rewards (reward only at goal)
- Large state spaces (hard to explore randomly)
- Need systematic exploration
Symptoms:
Routing:
IF reward design questions OR sparse rewards:
→ reward-shaping
Covers:
- Potential-based shaping (provably optimal)
- Subgoal rewards
- Reward engineering principles
- Inverse RL (learn reward from demonstrations)
Often combined with:
→ exploration-strategies (for sparse rewards)
Symptoms:
Routing:
IF environment setup questions:
→ rl-environments
Covers:
- Gym API: step(), reset(), observation/action spaces
- Custom environments
- Wrappers (frame stacking, normalization)
- Vectorized environments (parallel rollouts)
- MuJoCo, Atari, custom simulators
After environment setup, return to algorithm choice
Symptoms:
Routing:
IF evaluation questions:
→ rl-evaluation
Covers:
- Deterministic vs stochastic policies
- Multiple seeds, confidence intervals
- Sample efficiency curves
- Generalization testing
- Exploration vs exploitation at test time
Routing sequence:
Routing sequence:
Routing sequence:
Routing sequence:
Routing sequence:
Routing sequence:
| Rationalization | Reality | Counter-Guidance | Red Flag |
|---|---|---|---|
| "Just use PPO for everything" | PPO is general but not optimal for all cases | "Let's clarify: discrete or continuous actions? Sample efficiency constraints?" | Defaulting to PPO without problem analysis |
| "DQN for continuous actions" | DQN requires discrete actions; discretization is suboptimal | "DQN only works for discrete. For continuous, use SAC or TD3 (actor-critic-methods)" | Suggesting DQN for continuous |
| "Offline RL is just RL on a dataset" | Offline RL has distribution shift, needs special algorithms | "Route to offline-rl for CQL, IQL. Standard algorithms fail on offline data." | Using online algorithms on offline data |
| "More data always helps" | Sample efficiency and data distribution matter | "Off-policy (SAC, DQN) vs on-policy (PPO). Offline needs CQL." | Ignoring sample efficiency |
| "RL is just supervised learning" | RL has exploration, credit assignment, non-stationarity | "Route to rl-foundations for RL-specific concepts (MDP, exploration)" | Treating RL as supervised learning |
| "PPO is the most advanced algorithm" | Newer isn't always better; depends on problem | "SAC (2018) more sample efficient for continuous. DQN (2013) great for discrete." | Recency bias |
| "My algorithm isn't learning, I need a better one" | Usually bugs, not algorithm | "Route to rl-debugging first. Check reward scale, exploration, learning rate." | Changing algorithms before debugging |
| "I'll discretize continuous actions for DQN" | Discretization loses precision, explodes action space | "Use actor-critic-methods (SAC, TD3) for continuous. Don't discretize." | Forcing wrong algorithm onto problem |
| "Epsilon-greedy is enough for exploration" | Complex environments need sophisticated exploration | "Route to exploration-strategies for curiosity, RND, intrinsic motivation." | Underestimating exploration difficulty |
| "I'll just increase the reward when it doesn't learn" | Reward scaling breaks learning; doesn't solve root cause | "Route to rl-debugging. Check if reward scale is the issue, not magnitude." | Arbitrary reward hacking |
| "I can reuse online RL code for offline data" | Offline RL needs conservative algorithms | "Route to offline-rl. CQL/IQL prevent overestimation, online algorithms fail." | Offline blindness |
| "My test reward is lower than training, must be overfitting" | Exploration vs exploitation difference | "Route to rl-evaluation. Training uses exploration, test should be greedy." | Misunderstanding RL evaluation |
Watch for these signs of incorrect routing:
If any red flag triggered → STOP → Ask diagnostic questions → Route correctly
Clarify boundaries with other packs:
| User Request | Correct Pack | Reason |
|---|---|---|
| "Train classifier on labeled data" | training-optimization | Supervised learning, not RL |
| "Design transformer architecture" | neural-architectures | Architecture design, not RL algorithm |
| "Implement PyTorch autograd" | pytorch-engineering | PyTorch internals, not RL |
| "Deploy model to production" | ml-production | Deployment, not RL training |
| "Fine-tune LLM with RLHF" | llm-specialist | LLM-specific (though uses RL concepts) |
| "Optimize hyperparameters" | training-optimization | Hyperparameter search, not RL |
| "Implement custom CUDA kernel" | pytorch-engineering | Low-level optimization, not RL |
Edge case: RLHF (Reinforcement Learning from Human Feedback) for LLMs uses RL concepts (PPO) but has LLM-specific considerations. Route to llm-specialist first; they may reference this pack.
Use these questions to classify problems:
When routing to a skill:
Example:
"You mentioned continuous joint angles for a robot arm. This is a continuous action space, which means DQN won't work (it requires discrete actions).
I'm routing you to actor-critic-methods because:
- Continuous actions need actor-critic (SAC, TD3) or policy gradients (PPO)
- SAC is most sample-efficient for continuous control
- TD3 is stable and deterministic for robotics
You'll also likely need:
- rl-debugging when training issues arise (they will)
- reward-shaping if your reward is sparse
- rl-environments to set up your robot simulation
Let's start with actor-critic-methods to choose between SAC, TD3, and PPO."
START: RL problem
├─ Need foundations? (new to RL, confused about concepts)
│ └─ → rl-foundations
│
├─ DISCRETE actions?
│ ├─ Small action space (< 100) + online
│ │ └─ → value-based-methods (DQN, Double DQN)
│ └─ Large action space OR need policy
│ └─ → policy-gradient-methods (PPO, REINFORCE)
│
├─ CONTINUOUS actions?
│ ├─ Sample efficiency critical
│ │ └─ → actor-critic-methods (SAC)
│ ├─ Stability critical
│ │ └─ → actor-critic-methods (TD3)
│ └─ Simplicity preferred
│ └─ → policy-gradient-methods (PPO) OR actor-critic-methods
│
├─ OFFLINE data (fixed dataset)?
│ └─ → offline-rl (CQL, IQL) [CRITICAL: not standard algorithms]
│
├─ MULTI-AGENT?
│ └─ → multi-agent-rl (QMIX, MADDPG)
│
├─ Sample efficiency EXTREME?
│ └─ → model-based-rl (MBPO, Dreamer)
│
├─ DEBUGGING issues?
│ ├─ Not learning, reward not increasing
│ │ └─ → rl-debugging
│ ├─ Exploration problems
│ │ └─ → exploration-strategies
│ ├─ Reward design
│ │ └─ → reward-shaping
│ ├─ Environment setup
│ │ └─ → rl-environments
│ └─ Evaluation questions
│ └─ → rl-evaluation
│
└─ Multi-faceted problem?
└─ Route to 2-3 skills (primary + supporting)
This meta-skill is your routing hub. Route decisively, explain clearly, teach problem classification.