AGENT SKILL

grid-world-dp-and-control

Use and adapt GridWorld dynamic programming, tabular control, Deep SARSA, and REINFORCE workflows distilled from the reinforcement-learning examples.

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

01 前言 Front Matter

name
grid-world-dp-and-control
license
MIT
metadata
{ "disco-role": "operating" }
description
Use and adapt GridWorld dynamic programming, tabular control, Deep SARSA, and REINFORCE workflows distilled from the reinforcement-learning examples.
disable-model-invocation
true

02 资源文件 3

03 SKILL.md 正文

GridWorld DP and Control

Use this sub-skill when the task is about the repository's 5x5 GridWorld workflows: policy iteration, value iteration, tabular SARSA, tabular Q-learning, Deep SARSA, or REINFORCE. It is self-contained; do not depend on the original checkout at runtime.

Route here for

  • Explaining, adapting, or debugging GridWorld dynamic programming (1-policy_iteration.py, 2-value_iteration.py) as provenance workflow labels.
  • Explaining, adapting, or debugging tabular control (3-sarsa.py, 4-q_learning.py) as provenance workflow labels.
  • Making tiny CPU checks for Deep SARSA and REINFORCE neural update logic (5-deep_sarsa.py, 6-reinforce.py) as provenance workflow labels.
  • Diagnosing row/column versus column/row coordinate mistakes, action-order mismatches, and render/headless behavior.

Route away from

  • Gymnasium CartPole DQN/A2C/PPO: use the CartPole sub-skill.
  • Atari Breakout/Pong DQN/PPO, preprocessing, ROMs, or W&B: use the standard Atari sub-skill.
  • Montezuma/Pitfall/PrivateEye hard-exploration, RND, Go-Explore, or robustification: use the hard Atari sub-skill.

Start here

  1. Read references/algorithm-guide.md for the MDP layout, coordinate conventions, formulas, API-shaped examples, and safe adaptation patterns.
  2. Read references/troubleshooting.md when a grid policy points in the wrong direction, rendering blocks on a server, tabular values do not update, or Torch neural checks fail.
  3. Run the bundled smoke script when you need a self-contained, non-rendering API check:
python scripts/grid_world_smoke.py --help
python scripts/grid_world_smoke.py
python scripts/grid_world_smoke.py --section dp
python scripts/grid_world_smoke.py --section neural --strict-torch

The smoke script intentionally reimplements tiny fixtures and update steps. It does not import source repository files, open Pygame, train to convergence, or require a display.

Critical facts to preserve

  • DP workflows use state as [row, col]; drawing helpers usually need (col, row), so swap before rendering arrows or markers.
  • Tabular Env-style workflows use state as [col, row] and actions 0=up, 1=down, 2=left, 3=right.
  • Dynamic DynamicEnv-style workflows also use [col, row], but actions are 0=up, 1=down, 2=right, 3=left; the distilled source agents expose a fifth network output/action that behaves as a no-op in the dynamic environment.
  • GUI examples are interactive and render-oriented. For validation or CI, use headless logic equivalent to render_mode=None rather than opening Pygame loops.

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