[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F8Z3V2ZNZ848Q9CVNEW6T3":3,"skill-same:01M7F8Z3V2ZNZ848Q9CVNEW6T3":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":47},"01M7F8Z3V2ZNZ848Q9CVNEW6T3","policy-evaluation",null,"Evaluate a trained TD3 actor for the Velodyne navigation environment with checkpoint, contract, simulator-readiness, and bounded-run gates.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fdrl-robot-navigation\u002Fsub-skills\u002Fpolicy-evaluation\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: policy-evaluation\ndescription: \"Evaluate a trained TD3 actor for the Velodyne navigation\n  environment with checkpoint, contract, simulator-readiness, and bounded-run\n  gates.\"\ndisable-model-invocation: true\nmetadata:\n  disco-role: operating\nlicense: MIT\n---\n\n# Policy evaluation\n\nUse this skill when the task is to evaluate an already-trained TD3 **actor** for the\nVelodyne navigation environment. It is an evaluation and artifact-safety guide, not a\ntraining or ROS setup guide.\n\n## Operating contract\n\n- **Input:** a model directory, a checkpoint base name (normally `TD3_velodyne`), and\n  an evaluation request with explicit episode and step bounds.\n- **Actor artifact:** `\u003Cbase>_actor.pth`, a PyTorch `state_dict` for the actor below.\n- **Optional companion:** `\u003Cbase>_critic.pth` is produced by training, but the test\n  policy needs only the actor. Treat a missing critic as an incomplete TD3 pair, not as\n  an actor failure.\n- **Output:** bounded episode records and aggregate metrics, plus the exact checkpoint,\n  device, state\u002Faction contract, and termination policy used.\n- **Hard safety rule:** never load an artifact merely to inspect its name. Run the\n  bundled `scripts\u002Fcheck_policy_artifacts.py` first; it does not deserialize tensors\n  unless `--load-state-dict` is explicitly requested.\n\n## Policy and environment contract\n\nThe evaluator's actor is `24 -> 800 -> 600 -> 2`: `Linear(24,800)`, ReLU,\n`Linear(800,600)`, ReLU, `Linear(600,2)`, and `tanh`. The 24-element observation is:\n\n1. 20 Velodyne distance bins (`environment_dim=20`), followed by\n2. distance to goal, relative heading, previous\u002Fcommanded linear velocity, and\n   previous\u002Fcommanded angular velocity (`robot_dim=4`).\n\nThe actor returns two normalized values in `[-1, 1]`. Before the environment step, map\nonly the first value to linear velocity with `(a[0] + 1) \u002F 2`; pass the second unchanged\nas angular velocity. Do not feed the environment's `[0, 1]`\u002F`[-1, 1]` command back into\nthe actor as a replacement for the normalized action. Assert finite numeric state of\nlength 24 and finite action of length 2 at every step.\n\nThe reference evaluator uses seed `0`, waits about five seconds after environment\nconstruction, and caps an episode at **500 transitions**. A simulator `done` must end an\nepisode earlier; the cap must also end it when the simulator fails to terminate. Reset\nbefore the next episode and reset the per-episode step counter. Preserve the distinction\nbetween a goal\u002Fcollision termination and a synthetic time-limit termination in metrics.\n\n## Checkpoint gates\n\n1. Resolve the requested model directory and base name without guessing another run.\n2. Run the bundled artifact check. Confirm the actor exists, is a regular file, and has\n   the exact expected name. Record critic presence separately.\n3. For a new or untrusted checkpoint, opt into the bounded `--load-state-dict` check.\n   It uses CPU mapping, `weights_only=True` when supported, a file-size limit, and shape\n   checks; it must not fall back to unrestricted pickle loading. A missing, corrupt,\n   non-tensor, extra-key, or shape-incompatible actor is a hard stop.\n4. If the artifact check reports only a critic, stop: a critic cannot produce actions.\n   If the critic is present but incompatible, stop the full-pair evaluation or label the\n   actor-only run explicitly; never silently substitute or rename it.\n5. Instantiate the actor on CPU unless CUDA availability and the requested device have\n   been independently checked. The reference `torch.load` call does not set\n   `map_location`, so a CUDA-origin checkpoint can fail on a CPU-only host; use the\n   safe CPU-mapped validation\u002Fload path and record any device remapping. Load the actor\n   state dict into the same architecture, call `eval()`, and use inference\u002Fno-grad\n   execution. Record the actual device.\n\nSee `references\u002Fcheckpoint-format.md` for key and shape expectations.\n\n## Simulator readiness gate\n\nA real run requires an operational ROS Noetic\u002FGazebo stack, a running ROS master,\nthe Velodyne and odometry topics, the navigation launch asset, and the services used by\nreset, pause, and unpause. The workspace must already be built and sourced by the run\nowner. Check readiness before constructing the environment; do not claim a simulator\nresult from a Python-only import or from a host without ROS\u002FGazebo\u002Fmessage modules.\n\nThe reference environment starts `roscore` and Gazebo in its constructor. The reference\ntest module constructs that environment at import time and then enters an unbounded\n`while True` loop. Therefore do **not** import that module for a smoke test, and do not\nstart an unconstrained production evaluation. Use a controlled runner that loads the\nactor and applies the same distilled contract, with an explicit episode count and a\nwall-clock\u002Fstep watchdog. A safe dry run can stop after artifact and architecture checks\nwithout touching ROS.\n\n## Bounded evaluation workflow\n\n1. **Plan:** choose `N >= 1` episodes, `max_steps \u003C= 500` per episode, a wall-clock\n   deadline, and a cleanup\u002Fabort action. State whether this is actor-only or a complete\n   TD3 artifact evaluation.\n2. **Preflight:** run `check_policy_artifacts.py --model-dir ... --name ...`; add\n   `--load-state-dict` only after the file-size and provenance decision. Verify simulator\n   readiness separately and record failures as blocked, not as poor policy scores.\n3. **Load:** build the exact actor, load only the validated actor state dict, switch to\n   evaluation mode, and initialize deterministic seeds if reproducibility is desired.\n4. **Run:** for each episode, reset the environment, validate the initial 24-value\n   state, call the actor without exploration noise, convert the action, step the\n   simulator, and record reward, collision\u002Fgoal flag, and step count. Stop on `done`,\n   500 steps, watchdog expiry, or operator abort.\n5. **Aggregate:** report per-episode return, length, termination reason, goal count,\n   collision count, time-limit count, invalid-state\u002Faction count, and timeout\u002Fabort\n   status. Do not call a truncated run a completed evaluation.\n6. **Clean up:** stop the controlled runner and simulator processes according to the\n   host's approved procedure. Preserve the checkpoint path\u002Fbase name and run bounds in\n   the result record.\n\nThe original program's continuous loop is useful evidence of intended repeated testing,\nnot an acceptable default for automation. Never omit the bound because the simulator\nusually terminates episodes.\n\n## Failure routing\n\n- Artifact or shape failure: fix\u002Fselect a compatible actor; do not enter ROS.\n- Missing ROS\u002FGazebo, topics, services, or launch asset: mark **environment blocked**;\n  do not report zero reward or policy failure.\n- State\u002Faction contract violation: abort the episode and mark the result invalid.\n- Watchdog or operator stop: preserve partial records and label the run incomplete.\n- A successful artifact check alone proves checkpoint compatibility only; it proves no\n  navigation quality and no simulator behavior.\n\nFor predictable cases and recovery actions, use `references\u002Ftroubleshooting.md`. The\nbundled script is the only practical helper in this skill and is intentionally independent\nof the original checkout.\n\n## Evidence boundary\n\nThis contract was distilled from `TD3\u002Ftest_velodyne_td3.py`, the actor\u002Fsave\u002Fload portions\nof `TD3\u002Ftrain_velodyne_td3.py`, `TD3\u002Fvelodyne_env.py`, and the README's test procedure.\nThose paths are provenance only. Runtime use should rely on this skill and its bundled\nscript rather than opening or executing source-checkout files.\n","# Policy evaluation\n\nUse this skill when the task is to evaluate an already-trained TD3 **actor** for the\nVelodyne navigation environment. It is an evaluation and artifact-safety guide, not a\ntraining or ROS setup guide.\n\n## Operating contract\n\n- **Input:** a model directory, a checkpoint base name (normally `TD3_velodyne`), and\n  an evaluation request with explicit episode and step bounds.\n- **Actor artifact:** `\u003Cbase>_actor.pth`, a PyTorch `state_dict` for the actor below.\n- **Optional companion:** `\u003Cbase>_critic.pth` is produced by training, but the test\n  policy needs only the actor. Treat a missing critic as an incomplete TD3 pair, not as\n  an actor failure.\n- **Output:** bounded episode records and aggregate metrics, plus the exact checkpoint,\n  device, state\u002Faction contract, and termination policy used.\n- **Hard safety rule:** never load an artifact merely to inspect its name. Run the\n  bundled `scripts\u002Fcheck_policy_artifacts.py` first; it does not deserialize tensors\n  unless `--load-state-dict` is explicitly requested.\n\n## Policy and environment contract\n\nThe evaluator's actor is `24 -> 800 -> 600 -> 2`: `Linear(24,800)`, ReLU,\n`Linear(800,600)`, ReLU, `Linear(600,2)`, and `tanh`. The 24-element observation is:\n\n1. 20 Velodyne distance bins (`environment_dim=20`), followed by\n2. distance to goal, relative heading, previous\u002Fcommanded linear velocity, and\n   previous\u002Fcommanded angular velocity (`robot_dim=4`).\n\nThe actor returns two normalized values in `[-1, 1]`. Before the environment step, map\nonly the first value to linear velocity with `(a[0] + 1) \u002F 2`; pass the second unchanged\nas angular velocity. Do not feed the environment's `[0, 1]`\u002F`[-1, 1]` command back into\nthe actor as a replacement for the normalized action. Assert finite numeric state of\nlength 24 and finite action of length 2 at every step.\n\nThe reference evaluator uses seed `0`, waits about five seconds after environment\nconstruction, and caps an episode at **500 transitions**. A simulator `done` must end an\nepisode earlier; the cap must also end it when the simulator fails to terminate. Reset\nbefore the next episode and reset the per-episode step counter. Preserve the distinction\nbetween a goal\u002Fcollision termination and a synthetic time-limit termination in metrics.\n\n## Checkpoint gates\n\n1. Resolve the requested model directory and base name without guessing another run.\n2. Run the bundled artifact check. Confirm the actor exists, is a regular file, and has\n   the exact expected name. Record critic presence separately.\n3. For a new or untrusted checkpoint, opt into the bounded `--load-state-dict` check.\n   It uses CPU mapping, `weights_only=True` when supported, a file-size limit, and shape\n   checks; it must not fall back to unrestricted pickle loading. A missing, corrupt,\n   non-tensor, extra-key, or shape-incompatible actor is a hard stop.\n4. If the artifact check reports only a critic, stop: a critic cannot produce actions.\n   If the critic is present but incompatible, stop the full-pair evaluation or label the\n   actor-only run explicitly; never silently substitute or rename it.\n5. Instantiate the actor on CPU unless CUDA availability and the requested device have\n   been independently checked. The reference `torch.load` call does not set\n   `map_location`, so a CUDA-origin checkpoint can fail on a CPU-only host; use the\n   safe CPU-mapped validation\u002Fload path and record any device remapping. Load the actor\n   state dict into the same architecture, call `eval()`, and use inference\u002Fno-grad\n   execution. Record the actual device.\n\nSee `references\u002Fcheckpoint-format.md` for key and shape expectations.\n\n## Simulator readiness gate\n\nA real run requires an operational ROS Noetic\u002FGazebo stack, a running ROS master,\nthe Velodyne and odometry topics, the navigation launch asset, and the services used by\nreset, pause, and unpause. The workspace must already be built and sourced by the run\nowner. Check readiness before constructing the environment; do not claim a simulator\nresult from a Python-only import or from a host without ROS\u002FGazebo\u002Fmessage modules.\n\nThe reference environment starts `roscore` and Gazebo in its constructor. The reference\ntest module constructs that environment at import time and then enters an unbounded\n`while True` loop. Therefore do **not** import that module for a smoke test, and do not\nstart an unconstrained production evaluation. Use a controlled runner that loads the\nactor and applies the same distilled contract, with an explicit episode count and a\nwall-clock\u002Fstep watchdog. A safe dry run can stop after artifact and architecture checks\nwithout touching ROS.\n\n## Bounded evaluation workflow\n\n1. **Plan:** choose `N >= 1` episodes, `max_steps \u003C= 500` per episode, a wall-clock\n   deadline, and a cleanup\u002Fabort action. State whether this is actor-only or a complete\n   TD3 artifact evaluation.\n2. **Preflight:** run `check_policy_artifacts.py --model-dir ... --name ...`; add\n   `--load-state-dict` only after the file-size and provenance decision. Verify simulator\n   readiness separately and record failures as blocked, not as poor policy scores.\n3. **Load:** build the exact actor, load only the validated actor state dict, switch to\n   evaluation mode, and initialize deterministic seeds if reproducibility is desired.\n4. **Run:** for each episode, reset the environment, validate the initial 24-value\n   state, call the actor without exploration noise, convert the action, step the\n   simulator, and record reward, collision\u002Fgoal flag, and step count. Stop on `done`,\n   500 steps, watchdog expiry, or operator abort.\n5. **Aggregate:** report per-episode return, length, termination reason, goal count,\n   collision count, time-limit count, invalid-state\u002Faction count, and timeout\u002Fabort\n   status. Do not call a truncated run a completed evaluation.\n6. **Clean up:** stop the controlled runner and simulator processes according to the\n   host's approved procedure. Preserve the checkpoint path\u002Fbase name and run bounds in\n   the result record.\n\nThe original program's continuous loop is useful evidence of intended repeated testing,\nnot an acceptable default for automation. Never omit the bound because the simulator\nusually terminates episodes.\n\n## Failure routing\n\n- Artifact or shape failure: fix\u002Fselect a compatible actor; do not enter ROS.\n- Missing ROS\u002FGazebo, topics, services, or launch asset: mark **environment blocked**;\n  do not report zero reward or policy failure.\n- State\u002Faction contract violation: abort the episode and mark the result invalid.\n- Watchdog or operator stop: preserve partial records and label the run incomplete.\n- A successful artifact check alone proves checkpoint compatibility only; it proves no\n  navigation quality and no simulator behavior.\n\nFor predictable cases and recovery actions, use `references\u002Ftroubleshooting.md`. The\nbundled script is the only practical helper in this skill and is intentionally independent\nof the original checkout.\n\n## Evidence boundary\n\nThis contract was distilled from `TD3\u002Ftest_velodyne_td3.py`, the actor\u002Fsave\u002Fload portions\nof `TD3\u002Ftrain_velodyne_td3.py`, `TD3\u002Fvelodyne_env.py`, and the README's test procedure.\nThose paths are provenance only. Runtime use should rely on this skill and its bundled\nscript rather than opening or executing source-checkout files.\n",{"name":5,"license":15,"metadata":24,"description":7,"disable-model-invocation":26},{"disco-role":25},"operating",true,"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","06-前端与设计\u002Fdrl-robot-navigation\u002Fsub-skills\u002Fpolicy-evaluation",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":26},[37,40,43],{"tool":38,"command":39},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill policy-evaluation",{"tool":41,"command":42},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill policy-evaluation",{"tool":44,"command":45},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill policy-evaluation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fdrl-robot-navigation\u002Fsub-skills\u002Fpolicy-evaluation\u002FSKILL.md",[48,54,58],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fcheckpoint-format.md","REFERENCE","参考文档",3425,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fdrl-robot-navigation\u002Fsub-skills\u002Fpolicy-evaluation\u002Freferences\u002Fcheckpoint-format.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Ftroubleshooting.md",5172,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fdrl-robot-navigation\u002Fsub-skills\u002Fpolicy-evaluation\u002Freferences\u002Ftroubleshooting.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fworkflows.md",4528,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fdrl-robot-navigation\u002Fsub-skills\u002Fpolicy-evaluation\u002Freferences\u002Fworkflows.md",[63,70,75,82,89,96],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":71,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]