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

pql_parallel_topology

pql_parallel_topology

【效率与协作】Build and validate the process topology for Parallel Q-Learning with actors, replay, policy learning, and value learning.

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

技能说明

GitHub

name: pql_parallel_topology description: Build and validate the process topology for Parallel Q-Learning with actors, replay, policy learning, and value learning.

PQL Parallel Topology

Use this skill when implementing or auditing a Parallel Q-Learning style recovery or experiment. It is appropriate when an off-policy learner should exploit many parallel simulation actors and separate data collection from policy and value updates. Do not use it for purely on-policy rollouts where learner updates must consume only the latest trajectories.

Inputs

  • num_envs: positive integer count of parallel actors or environments.
  • replay_capacity: positive integer replay capacity.
  • actor_steps_per_tick: positive integer rollout work per actor tick.
  • policy_updates_per_tick and value_updates_per_tick: non-negative update counts.
  • sync_interval: positive integer policy synchronization cadence.

Outputs

  • A topology JSON object with process roles, dataflow edges, and invariants.
  • Validation errors when the configuration cannot exercise the PQL mechanism.

Workflow

  1. Create an actor role that writes transition batches to replay.
  2. Create a replay role that stores off-policy transitions independently of the latest policy.
  3. Create a value learner role that samples replay and updates Q estimates.
  4. Create a policy learner role that improves actions using the value learner's Q estimates.
  5. Add synchronization edges from policy learner to actors and value learner to policy learner.
  6. Validate that the topology contains all required PQL roles before using it as recovery evidence.

Validation

Run:

python scripts/topology.py --num-envs 8 --replay-capacity 64 --actor-steps-per-tick 2 --policy-updates-per-tick 1 --value-updates-per-tick 2 --sync-interval 4
python tests/test_topology.py

Limitations

This skill defines the topology and invariants; it does not run an RL optimizer by itself. Pair it with a recovery harness or training skill for executable results.

我的收藏