AGENT SKILL

discrete-control

Build, configure, troubleshoot, and lightly verify discrete-action keras-rl DQN, Double/Dueling DQN, SARSA, CEM, memories, policies, and Atari-style processor concepts.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
discrete-control
license
MIT
metadata
{ "disco-role": "operating" }
description
Build, configure, troubleshoot, and lightly verify discrete-action keras-rl DQN, Double/Dueling DQN, SARSA, CEM, memories, policies, and Atari-style processor concepts.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

discrete-control

Read when

Use this sub-skill for keras-rl workflows with discrete action spaces and language such as DQN, Double DQN, dueling DQN, SARSA, CEM, CartPole, Atari processor, SequentialMemory, EpisodeParameterMemory, EpsGreedyQPolicy, or BoltzmannQPolicy.

What this sub-skill owns

  • Building and compiling DQNAgent, including enable_double_dqn=True and enable_dueling_network=True with dueling_type avg, max, or naive.
  • Building and compiling SARSAAgent without replay memory.
  • Building and compiling CEMAgent with EpisodeParameterMemory and compile() without an optimizer.
  • Choosing SequentialMemory, EpisodeParameterMemory, and common discrete exploration policies.
  • Discrete-agent compile/build smoke checks with the bundled helper script.
  • Atari DQN preprocessing concepts as reference-only guidance; this sub-skill does not provide a full Atari runner.

Route elsewhere

  • Shared Agent.fit/Agent.test lifecycle details, callback wiring, Processor base-class implementation depth, FileLogger, WandbLogger, and log visualization belong to the core-extension-and-logging sub-skill.
  • DDPG, NAF, actor/critic models, random processes, MuJoCo, Pendulum, and continuous action spaces belong to the continuous-control sub-skill.

Backend stance

keras-rl is legacy Keras 2.x code. Prefer a Keras-2-compatible backend stack and run a compile-only smoke check before spending time on training. Some TensorFlow-backed legacy stacks fail when keras-rl inspects symbolic model outputs; if that happens, switch to a compatible legacy backend or patch the compatibility issue before using DQN-style agents.

Quick operating route

  1. Determine nb_actions from the environment's discrete action space.
  2. Build a Keras model whose final output has exactly nb_actions units. For replay-memory agents, include the memory window in the model input shape.
  3. Pick the agent family:
    • DQN / Double DQN / Dueling DQN: DQNAgent + SequentialMemory.
    • SARSA: SARSAAgent with no replay memory argument.
    • CEM: CEMAgent + EpisodeParameterMemory.
  4. Compile before any fit, test, load_weights/target-network usage, or smoke action checks.
  5. Run the bundled compile/build helper with --agent all or the specific agent before training.

Runtime references and helpers

  • API reference: constructors, compile signatures, memory/policy parameters, and gotchas.
  • Workflows: build/compile recipes for DQN, Double DQN, Dueling DQN, SARSA, and CEM.
  • Atari and processors: reference-only Atari preprocessing and processor concepts.
  • Troubleshooting: shape, compile, backend, memory, Atari, callbacks, and Gym compatibility failures.
  • Build discrete agents smoke helper: safe compile/build-only helper with optional tiny training disabled by default.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351