界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

cartpole-classic-control

cartpole-classic-control

【开发与工程】Operate DQN, A2C, and PPO CartPole-v1 training, testing, checkpoints, and smoke diagnostics for the reinforcement-learning repo.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: cartpole-classic-control description: "Operate DQN, A2C, and PPO CartPole-v1 training, testing, checkpoints, and smoke diagnostics for the reinforcement-learning repo." metadata: disco-role: operating disable-model-invocation: true license: MIT

CartPole Classic Control

Use this sub-skill when the task involves the repository's CartPole-v1 DQN, A2C, or PPO workflows: choosing the right algorithm script, explaining network/update behavior, running training or replay, diagnosing checkpoints, or doing a safe headless smoke check.

Do not use it for GridWorld dynamic programming or tabular control, standard Atari Breakout/Pong CNN workflows, hard-exploration Atari/RND/Go-Explore/robustification, or paper-level benchmark claims.

Fast route

Operating guardrails

  • Treat full CartPole training as a real run, not a smoke test. DQN can run up to 300 episodes, A2C up to 1000, and PPO up to 1500 update cycles with 1024 environment steps per update.
  • Avoid --render during training unless the user explicitly wants an interactive window; it slows learning and can fail on headless hosts.
  • --test also requests Gymnasium render_mode="human"; use it only when a display is available and a compatible checkpoint is present.
  • The bundled smoke script is intentionally standalone and does not require Gymnasium, Pygame, the training scripts, or a display. It proves tensor/API shape and update invariants, not training convergence.
  • Checkpoints are algorithm-specific: DQN and PPO save raw model state_dicts; A2C saves a dictionary with separate actor and critic entries.

Provenance labels

This sub-skill distills the CartPole workflows identified in the source material as 2-cartpole/1-dqn.py, 2-cartpole/2-a2c.py, 2-cartpole/3-ppo.py, and the shared CartPole environment helper 2-cartpole/env.py. Those names are provenance/workflow labels; the runtime guidance below is self-contained and does not require opening the original source files.

我的收藏