Policy

From 0dayInc/pwn · View interactive version

Policy is an AI agent skill from the GitHub repository 0dayInc/pwn. Drive PWN::AI::Agent::Policy from pwn_eval.

How to use this skill

Skill file

PWN::AI::Agent::Policy

PWN::AI::Agent::Policy is the LIVE tabular RL controller that pwn-ai did not have before R5. Everything else in the harness is retrieval-plus-policy: scores are written to disk and re-injected as prose, or exported later for optional LoRA. This module is the missing MDP: state s — discretized (kind, task, plan, completeness, usable, last, fail) action a — tool name, or "final" reward r — step: 0 (spam cost −0.01 after 8 tools); terminal: judge × confidence next s' — state after the tool result Each Loop turn is one episode. Trusted environment/prerequisite bins scope fallback history; independently evidenced terminal attribution uses isolated action targets, not future-return credit for busywork. Transitions land in ~/.pwn/policy_traj.jsonl. Q(s,a) and REINFORCE logits H(s,a) are updated from those tuples and persisted in ~/.pwn/policy.json. The learned Q values are an ADVISORY term in Registry.rank. They never replace TaskSummarizer planning, plan_first, or CORE_TOOLS. Disable with PWN::Env[:ai][:agent][:policy] = false.

When to use

Call PWN::AI::Agent::Policy from pwn_eval when the task needs this module.

Do not reimplement it in shell.

Methodologies

Generated from pwn/ai/agent/policy.rb. Prefer the public class methods below.

Class methods take (opts = {}) and read opts.

How to call

PWN::AI::Agent::Policy.help
PWN::AI::Agent::Policy.state(opts)

Public methods

Source

pwn/ai/agent/policy.rb

Verification

PWN::AI::Agent::Policy.respond_to?(:state) after the

module is loaded. Read the source for parameter names.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.