{
  "format": "writing-sources-v1",
  "article": "terminal-rsi",
  "files": {
    "assets/diagram-reader.css": ":host { display:block; color:#30343a; font:14px/1.5 -apple-system,BlinkMacSystemFont,\"PingFang SC\",\"Hiragino Sans\",Arial,sans-serif; }\n* { box-sizing:border-box; }\n.tm-shell { border:1px solid #e2e5e8; border-radius:12px; overflow:hidden; background:#fff; }\n.tm-toolbar,.tm-tools,.tm-breadcrumb,.tm-replay { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }\n.tm-toolbar { justify-content:space-between; padding:12px 14px; border-bottom:1px solid #e2e5e8; }\nbutton,select { color:inherit; background:#fff; border:1px solid #dde2dc; border-radius:6px; padding:7px 10px; cursor:pointer; font:inherit; }\nbutton:hover,select:hover { background:#f2f5f0; border-color:#879d7f; }\nbutton:disabled { opacity:.4; cursor:default; }\nbutton:focus-visible,select:focus-visible,[tabindex]:focus-visible,input:focus-visible { outline:2px solid #69815e; outline-offset:3px; }\nselect { max-width:min(100%,420px); }\n.tm-scale { min-width:42px; color:#71767e; text-align:center; font-variant-numeric:tabular-nums; }\n.tm-breadcrumb { padding:9px 14px; min-height:48px; border-bottom:1px solid #e2e5e8; }\n.tm-breadcrumb button { border:0; padding:3px 0; background:transparent; }\n.tm-breadcrumb [aria-current] { font-weight:500; }\n.tm-breadcrumb[hidden],.tm-status[hidden] { display:none; }\n.canvas .tm-repeated-title { visibility:hidden; }\n.tm-body { display:flex; min-width:0; }\n.tm-viewport { flex:1; position:relative; min-width:0; height:600px; overflow:hidden; background:#fff; touch-action:pan-y pinch-zoom; cursor:grab; }\n.tm-viewport.is-dragging { cursor:grabbing; user-select:none; }\n.tm-world { position:absolute; transform-origin:0 0; }\n.diagram-root,.canvas { background:transparent; }\n.canvas { overflow:visible; }\n.canvas .node,.canvas .bundle,.canvas .checkpoint,.canvas .restore { border-radius:8px; box-shadow:none; }\n.canvas [role=\"button\"] { cursor:pointer; transition:opacity .15s,border-color .15s,background-color .15s; }\n.canvas [data-drill] { border-color:#a4b69b; }\n.canvas [data-drill]::after { content:'↗'; position:absolute; right:5px; top:1px; color:#819576; font:14px/1 Arial,sans-serif; }\n.canvas .connection { cursor:pointer; }\n.canvas .edge { pointer-events:auto; }\n.canvas .edge::before { content:''; position:absolute; inset:-8px 0; }\n.canvas .is-active:not(.connection) { outline:2px solid #6f885f; outline-offset:3px; }\n.canvas .connection.is-active .edge { border-top-color:#536f42; border-top-width:2.6px; }\n.canvas .connection.is-active .edge.arrow::after { border-left-color:#536f42; }\n.canvas .connection.is-active .wire { border-color:#536f42!important; }\n.canvas .connection.is-active .tip { border-color:#536f42!important; }\n.canvas .connection.is-active>g>path { stroke:#536f42!important; stroke-width:2px!important; }\n.vector-canvas svg { display:block; max-width:none; overflow:visible; }\n.vector-canvas [data-map-node].is-active { outline-offset:5px; }\n.tm-flowing .connection { animation:tm-emphasis 2.4s ease-in-out infinite; }\n@keyframes tm-emphasis { 50% { opacity:.35; } }\n.canvas .is-muted { opacity:.24; }\n.canvas .is-visited.event { border-left:3px solid #a7b49a; }\n.canvas .is-visited.failed { border-left-color:#c3955e; }\n.tm-replaying .connection.is-active .edge { border-top:0; height:2.5px; background:repeating-linear-gradient(90deg,#536f42 0 8px,transparent 8px 13px); animation:tm-flow .8s linear infinite; }\n@keyframes tm-flow { to { background-position:26px 0; } }\n.tm-aside { flex:0 0 280px; width:280px; max-height:720px; overflow-y:auto; padding:18px; border-left:1px solid #e2e5e8; background:#fff; }\n.tm-aside[hidden] { display:none; }\n.tm-aside h3 { margin:0 0 12px; font-size:16px; font-weight:500; line-height:1.5; }\n.tm-aside h3:not(:first-child) { margin-top:24px; }\n.tm-aside p { margin:8px 0 18px; font-size:13px; line-height:1.7; }\n.tm-aside .tm-node-detail { font-size:14px; white-space:pre-line; overflow-wrap:anywhere; }\n.tm-aside dl { margin:14px 0; }\n.tm-aside dt { color:#71767e; font-size:12px; margin:12px 0 3px; }\n.tm-aside dd { margin:0; font-size:14px; line-height:1.65; overflow-wrap:anywhere; }\n.tm-aside button { display:block; width:100%; text-align:left; margin-top:8px; }\n.tm-related { padding:10px; }\n.tm-aside small { color:#71767e; }\n.tm-status { padding:10px 14px; border-top:1px solid #e2e5e8; color:#71767e; font-size:12px; }\n.tm-replay { padding:10px 14px; border-bottom:1px solid #e2e5e8; }\n.tm-replay input { min-width:100px; flex:1; accent-color:#73876b; }\n.tm-replay output { font-variant-numeric:tabular-nums; white-space:nowrap; color:#64705e; }\n.tm-case .tm-viewport { overflow:auto; scrollbar-gutter:stable; touch-action:pan-x pan-y pinch-zoom; }\n.tm-case .tm-world { position:relative; }\n.tm-case .tm-world>.diagram-root { position:absolute; transform-origin:0 0; }\n.tm-case .canvas .is-muted { opacity:1; }\n.tm-navigator { flex:0 0 120px; width:120px; padding:14px 11px; border-right:1px solid #e2e5e8; background:#fff; }\n.tm-navigator-title { display:block; font-size:12px; margin-bottom:10px; }\n.tm-navigator small { display:block; color:#71767e; font-size:11px; margin-top:10px; }\n.tm-minimap { display:block; position:relative; width:96px; padding:0; border:0; border-radius:0; overflow:hidden; background:#fcfdfb; }\n.tm-minimap .tm-mini-canvas { position:absolute; left:0; top:0; transform-origin:0 0; pointer-events:none; }\n.tm-minimap-frame { position:absolute; border:1.5px solid #69815e; background:#69815e18; pointer-events:none; }\n:host([data-expanded]) .tm-shell { height:100%; display:flex; flex-direction:column; border:0; border-radius:0; }\n:host([data-expanded]) .tm-body { flex:1; min-height:0; }\n:host([data-expanded]) .tm-viewport { height:100% !important; touch-action:none; }\n:host([data-expanded]) .tm-case .tm-viewport { touch-action:pan-x pan-y pinch-zoom; }\n:host([data-expanded]) .tm-aside { max-height:100%; }\n@media(max-width:700px) {\n  .tm-toolbar { padding:10px; }\n  .tm-tools { gap:4px; }\n  button,select { font-size:12px; padding:7px 8px; }\n  .tm-body { flex-direction:column; }\n  .tm-viewport { flex:none; width:100%; }\n  .tm-aside { width:100%; max-height:260px; flex:none; border-left:0; border-top:1px solid #e2e5e8; }\n  :host([data-expanded]) .tm-viewport { flex:1; min-height:160px; }\n  :host([data-expanded]) .tm-aside { max-height:210px; }\n  .tm-case .tm-body { flex-direction:row; flex-wrap:wrap; }\n  .tm-case .tm-navigator { flex-basis:64px; width:64px; padding:10px 6px; }\n  .tm-case .tm-navigator small { display:none; }\n  .tm-case .tm-minimap { transform:scale(.52); transform-origin:top left; margin-right:-46px; margin-bottom:-118px; }\n  .tm-case .tm-viewport { flex:1; width:auto; }\n  .tm-case .tm-aside { flex-basis:100%; }\n  :host([data-expanded]) .tm-case .tm-body { display:grid; grid-template-columns:64px minmax(0,1fr); grid-template-rows:minmax(160px,1fr) auto; }\n  :host([data-expanded]) .tm-case .tm-aside { grid-column:1 / -1; }\n  :host([data-expanded]) .tm-case .tm-viewport { width:100%; }\n}\n@media(prefers-reduced-motion:reduce) { .canvas [role=\"button\"] { transition:none; } .tm-replaying .connection.is-active .edge,.tm-flowing .connection { animation:none; } }\n\n[data-diagram-style=\"openai-blog\"] {\n  --diagram-ink:#202020;\n  --diagram-muted:#62625e;\n  --diagram-line:#30332e;\n  --diagram-border:#3d403a;\n  --diagram-accent:#699c35;\n  --diagram-accent-ink:#4e7425;\n  --diagram-failure:#a07040;\n  --diagram-paper:#fff;\n  --diagram-soft:#f5faef;\n  --diagram-warm:#fcf5e9;\n  --diagram-grid:none;\n  --diagram-vector-stroke:1.3px;\n  --diagram-edge-width:1.8px;\n  --diagram-box-width:1.4px;\n}\n[data-diagram-style=\"engineering\"] {\n  --diagram-ink:#252525;\n  --diagram-muted:#626262;\n  --diagram-line:#454545;\n  --diagram-border:#555;\n  --diagram-accent:#52634a;\n  --diagram-accent-ink:#52634a;\n  --diagram-failure:#80604a;\n  --diagram-paper:#fff;\n  --diagram-soft:#fff;\n  --diagram-warm:#fff;\n  --diagram-grid:none;\n  --diagram-vector-stroke:1.2px;\n  --diagram-edge-width:1.6px;\n  --diagram-box-width:1.4px;\n}\n[data-diagram-style] .tm-viewport,[data-diagram-style] .am-viewport {\n  background-color:var(--diagram-paper);\n  background-image:var(--diagram-grid);\n  background-size:20px 20px;\n}\n[data-diagram-style] .canvas { color:var(--diagram-ink); background-color:var(--diagram-paper); }\n[data-diagram-style] .canvas :is(.node,.event,.checkpoint,.restore,.bundle) {\n  border-color:var(--diagram-border)!important;\n  color:var(--diagram-ink);\n}\n[data-diagram-kind=\"flow\"] :is(.node,.event,.checkpoint,.restore,.bundle) { border-width:var(--diagram-box-width); }\n[data-diagram-style] .canvas :is(.sub,.note,.edge-label,.label:not(.title),.key,.index,.legend) { color:var(--diagram-muted); }\n[data-diagram-style] .canvas :is(.node.soft,.node.accent,.node.output,.node.result,.event.repaired) { background-color:var(--diagram-soft)!important; border-color:var(--diagram-accent)!important; }\n[data-diagram-style] .canvas :is(.node.failed,.node.issue,.event.failed) { background-color:var(--diagram-warm)!important; border-color:var(--diagram-failure)!important; }\n[data-diagram-style] .canvas .edge { border-top-color:var(--diagram-line)!important; border-top-width:var(--diagram-edge-width); }\n[data-diagram-style] .canvas .edge.arrow::after { border-left-color:var(--diagram-line)!important; }\n[data-diagram-style] .canvas .edge:is(.feedback,.rewind,.retry,.handoff) { border-top-color:var(--diagram-accent)!important; }\n[data-diagram-style] .canvas .edge:is(.feedback,.rewind,.retry,.handoff).arrow::after { border-left-color:var(--diagram-accent)!important; }\n[data-diagram-style] .canvas .edge:is(.failure,.attempt) { border-top-color:var(--diagram-failure)!important; }\n[data-diagram-style] .canvas .edge:is(.failure,.attempt).arrow::after { border-left-color:var(--diagram-failure)!important; }\n[data-diagram-style] .canvas .wire { border-color:var(--diagram-line)!important; }\n[data-diagram-style] .canvas .tip { border-top-color:var(--diagram-line)!important; border-right-color:var(--diagram-line)!important; }\n[data-diagram-style] [data-diagram-stroke=\"neutral\"] { stroke:var(--diagram-line)!important; stroke-width:var(--diagram-vector-stroke)!important; }\n[data-diagram-style] [data-diagram-stroke=\"guide\"] { stroke:#e3e5df!important; }\n[data-diagram-style] [data-diagram-stroke=\"accent\"] { stroke:var(--diagram-accent)!important; stroke-width:var(--diagram-vector-stroke)!important; }\n[data-diagram-style] [data-diagram-fill=\"paper\"] { fill:var(--diagram-paper)!important; }\n[data-diagram-style] [data-diagram-fill=\"node\"] { fill:#fff!important; }\n[data-diagram-style] [data-diagram-fill=\"soft\"],\n[data-diagram-style] [data-diagram-fill=\"accent\"] { fill:var(--diagram-soft)!important; }\n[data-diagram-style=\"openai-blog\"][data-diagram-kind=\"flow\"] [data-diagram-fill=\"soft\"] { fill:url(#writing-dot-neutral)!important; }\n[data-diagram-style=\"openai-blog\"][data-diagram-kind=\"flow\"] [data-diagram-fill=\"accent\"] { fill:url(#writing-dot-accent)!important; }\n[data-diagram-style=\"openai-blog\"] rect[data-diagram-node] { rx:7.2px; }\n[data-diagram-style=\"engineering\"] rect[data-diagram-node] { rx:2px; }\n[data-diagram-style] [data-diagram-text=\"primary\"] { fill:var(--diagram-ink)!important; }\n[data-diagram-style] [data-diagram-text=\"secondary\"] { fill:var(--diagram-muted)!important; }\n[data-diagram-style] [data-diagram-text=\"accent\"] { fill:var(--diagram-accent-ink)!important; }\n[data-diagram-style] .canvas .connection.is-active .edge { border-top-color:var(--diagram-accent)!important; border-top-width:2.6px; }\n[data-diagram-style] .canvas .connection.is-active .edge.arrow::after { border-left-color:var(--diagram-accent)!important; }\n[data-diagram-style] .canvas.tm-replaying .connection.is-active .edge { border-top-width:0; }\n[data-diagram-style] .canvas .connection.is-active [data-diagram-stroke] { stroke:var(--diagram-accent)!important; stroke-width:2px!important; }\n[data-diagram-style] .automation-map,.automation-map[data-diagram-style] { --map-border:var(--diagram-border); --map-accent:var(--diagram-accent); --map-soft:var(--diagram-soft); }\n[data-diagram-style] .am-edge { stroke:var(--diagram-line); stroke-width:var(--diagram-edge-width); }\n[data-diagram-style] marker path { stroke:var(--diagram-line); }\n[data-diagram-style] .am-node { border-color:var(--diagram-border); border-width:var(--diagram-box-width); border-radius:8px; box-shadow:none; color:var(--diagram-ink); }\n[data-diagram-style] .am-node-note,[data-diagram-style] .am-label { color:var(--diagram-muted); }\n[data-diagram-style] .am-label { background:var(--diagram-paper); }\n[data-diagram-style] .am-edge.is-active { stroke:var(--diagram-accent); stroke-width:2.6px; }\n[data-diagram-style] .canvas :is(.arrow:not(.edge),.rule) { border-top-color:var(--diagram-line)!important; }\n[data-diagram-style] .canvas .arrow:not(.edge)::after { border-left-color:var(--diagram-line)!important; }\n[data-diagram-style] .canvas .vertical { border-left-color:var(--diagram-line)!important; }\n[data-diagram-style] .canvas .down::after { border-top-color:var(--diagram-line)!important; }\n[data-diagram-style] .canvas .up::after { border-bottom-color:var(--diagram-line)!important; }\n[data-diagram-style=\"openai-blog\"].tm-shell,\n[data-diagram-style=\"openai-blog\"].automation-map { border:1px solid transparent; border-radius:0; box-shadow:none; }\n[data-diagram-style=\"openai-blog\"] :is(.tm-toolbar,.am-toolbar) { border-bottom:1px solid #e4e8e0; padding:14px; background:#fff; }\n[data-diagram-style=\"openai-blog\"] :is(.tm-toolbar,.am-toolbar) :is(button,select) { border-color:transparent; border-radius:0; background:transparent; }\n[data-diagram-style=\"openai-blog\"] :is(.tm-toolbar,.am-toolbar) button:hover { background:#f2f5ec; }\n[data-diagram-style=\"openai-blog\"][data-diagram-kind=\"flow\"] .canvas :is(.node,.event,.checkpoint,.restore,.bundle),\n[data-diagram-style=\"openai-blog\"] .am-node { border-radius:12px!important; box-shadow:none!important; background-color:#fff; }\n[data-diagram-style=\"openai-blog\"][data-diagram-kind=\"flow\"] .canvas :is(.node,.event,.checkpoint,.restore,.bundle,.workspace),\n[data-diagram-style=\"openai-blog\"] .am-node { background-image:none; }\n[data-diagram-style=\"openai-blog\"][data-diagram-kind=\"flow\"] .canvas :is(.node.soft,.node.accent,.node.output,.node.result,.event.repaired,.restore),\n[data-diagram-style=\"openai-blog\"] .am-node:is([data-type=\"tool\"],[data-type=\"terminal\"]) { background-color:var(--diagram-soft); background-image:radial-gradient(#70a33d38 .5px,transparent .65px); background-size:5px 5px; }\n[data-diagram-style=\"openai-blog\"][data-diagram-kind=\"flow\"] .canvas :is(.node.failed,.node.issue,.event.failed) { background-image:none; }\n[data-diagram-style=\"openai-blog\"] .am-node { justify-content:center; text-align:center; }\n[data-diagram-style=\"openai-blog\"] .am-node-icon { display:none; }\n[data-diagram-style=\"openai-blog\"] .am-chevron { font-size:16px; }\n[data-diagram-style=\"openai-blog\"] :is(.tm-replay,.tm-navigator,.tm-aside,.am-aside) { background:#fff; border-color:#e4e8e0; }\n[data-diagram-style=\"openai-blog\"] .canvas :is(.group,.workspace) { border-color:#84897e!important; border-radius:5px; background-color:#fafaf8; background-image:radial-gradient(#7777702e .45px,transparent .6px); background-size:5px 5px; }\n[data-diagram-style=\"engineering\"].tm-shell,\n[data-diagram-style=\"engineering\"].automation-map { border:1px solid #d4d4d4; border-radius:4px; box-shadow:none; }\n[data-diagram-style=\"engineering\"] :is(.tm-toolbar,.am-toolbar) { background:#fff; border-bottom:1px solid #dedede; padding:14px; }\n[data-diagram-style=\"engineering\"] :is(.tm-toolbar,.am-toolbar) :is(button,select) { background:#fff; border-color:#d4d4d4; border-radius:3px; box-shadow:none; }\n[data-diagram-style=\"engineering\"] :is(.tm-breadcrumb,.am-breadcrumb,.tm-replay) { background:#fff; border-color:#dedede; }\n[data-diagram-style=\"engineering\"] .canvas { background-image:none; }\n[data-diagram-style=\"engineering\"] .canvas :is(.node,.event,.checkpoint,.restore,.bundle),\n[data-diagram-style=\"engineering\"] .am-node { background-color:#fff; background-image:none; border-radius:3px!important; box-shadow:none!important; }\n[data-diagram-style=\"engineering\"] .canvas :is(.group,.workspace) { background:#fff!important; border-color:#b0b0b0!important; border-radius:2px; box-shadow:none; }\n[data-diagram-style=\"engineering\"] .canvas :is(.label,.edge-label,.note) { background-color:#fff; }\n[data-diagram-style=\"engineering\"] .canvas .vector-canvas,\n[data-diagram-style=\"engineering\"] .vector-canvas { background:#fff; }\n[data-diagram-style=\"engineering\"] [data-diagram-node] { filter:none; }\n[data-diagram-style=\"engineering\"] :is(.tm-aside,.am-aside,.tm-navigator) { background:#fff; border-color:#dedede; }\n[data-diagram-style=\"engineering\"] .am-node-icon { border-radius:2px; border:1px solid #aaa; background:#fff; color:#454545; }\n[data-diagram-style=\"engineering\"] .am-node[data-type=\"condition\"] .am-node-icon,\n[data-diagram-style=\"engineering\"] .am-node[data-type=\"approval\"] .am-node-icon { background:#fff; color:#454545; }\n[data-diagram-style=\"engineering\"] .am-node[data-type=\"tool\"] .am-node-icon { background:#fff; color:#454545; }\n[data-diagram-style=\"engineering\"] .am-node[data-type=\"terminal\"] .am-node-icon { background:#fff; color:#52634a; }\n[data-diagram-style=\"engineering\"] .am-label { background:#fff; }\n\n/* Reading controls are quiet until a figure or contents panel is opened. */\nhtml.writing-reader { --reader-ease:cubic-bezier(.22,1,.36,1); }\n.writing-reader .report-site-nav { grid-template-columns:minmax(150px,1fr) auto minmax(230px,1fr); gap:12px 24px; }\n.writing-reader .writing-preferences { gap:14px; }\n.writing-reader .diagram-style-picker { display:none; }\n.wr-controls { display:flex; align-items:center; gap:16px; font-size:13px; }\n.wr-settings,.wr-contents { position:relative; }\n.wr-settings>summary,.wr-contents>summary { list-style:none; cursor:pointer; color:#666b68; padding:8px 0; white-space:nowrap; }\n.wr-settings>summary::-webkit-details-marker,.wr-contents>summary::-webkit-details-marker { display:none; }\n.wr-settings>summary::after,.wr-contents>summary::after { content:'⌄'; display:inline-block; margin-left:7px; transition:transform .2s var(--reader-ease); }\n.wr-settings[open]>summary::after,.wr-contents[open]>summary::after { transform:rotate(180deg); }\n.wr-popover { position:absolute; z-index:60; top:calc(100% + 8px); right:0; background:#fff; width:245px; padding:20px; border:1px solid #e3e5e1; box-shadow:0 8px 24px #252a2310; animation:wr-reveal .2s var(--reader-ease); }\n.wr-popover label { display:block; font-size:12px; color:#73776f; margin:0 0 10px; }\n.wr-popover select { width:100%; font:inherit; color:#30342f; background:#fff; padding:9px 8px; border:1px solid #daddd5; border-radius:0; }\n.wr-contents { display:none; }\n.wr-contents .wr-popover { width:min(360px,calc(100vw - 40px)); max-height:65dvh; overflow:auto; overscroll-behavior:contain; }\n.wr-contents ol { list-style:none; padding:0; margin:0; }\n.wr-contents li { margin:0; }\n.wr-contents a { display:block; padding:9px 0; line-height:1.6; font-size:14px; overflow-wrap:anywhere; text-decoration:none; }\n.wr-contents a[aria-current] { color:#272c24; text-decoration:underline; }\n.wr-contents :is(nav>p,h2,h3) { display:none; }\n.writing-reader :is(.wr-settings,.wr-contents) summary:focus-visible,.wr-image-enlarge:focus-visible { outline:2px solid #748269; outline-offset:4px; }\n.wr-footer { display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap; max-width:1264px; margin:90px auto 0; padding:22px 0 0; border-top:1px solid #e5e7e2; font-size:12px; line-height:1.5; color:#72776f; }\n.wr-footer a { color:inherit; text-decoration:none; }\n.wr-footer .site-analytics-link { position:static!important; inset:auto!important; display:inline!important; padding:0!important; border:0!important; background:none!important; box-shadow:none!important; font:inherit!important; }\n.wr-image-enlarge { display:block; margin:8px 0 0 auto; border:0; padding:7px 0; background:none; color:#67705f; font-family:inherit; font-size:13px; line-height:1.5; cursor:pointer; }\ndialog.wr-image-dialog { width:96vw; max-width:1800px; height:94dvh; max-height:94dvh; padding:0; border:0; background:#fff; overflow:hidden; }\ndialog.wr-image-dialog::backdrop { background:#242923a8; }\n.wr-image-bar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:12px 18px; border-bottom:1px solid #e3e5df; font:13px/1.5 -apple-system,BlinkMacSystemFont,\"PingFang SC\",sans-serif; }\n.wr-image-bar button { padding:8px 12px; border:1px solid #e3e5df; background:#fff; color:#30342d; font:inherit; cursor:pointer; }\n.wr-image-bar button:last-child { margin-left:auto; }\n.wr-image-stage { overflow:auto; height:calc(100% - 65px); padding:24px; overscroll-behavior:contain; background:#fbfbf8; }\n.wr-image-stage img { display:block; max-width:none; height:auto; margin:0 auto; }\n.wr-image-dialog[open] { animation:wr-reveal .22s var(--reader-ease); }\n@keyframes wr-reveal { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }\n@media(max-width:1199px) { .wr-contents { display:block; } }\n@media(max-width:1000px) {\n  .writing-reader .report-site-nav { grid-template-columns:minmax(0,1fr) auto; gap:8px 16px; }\n  .writing-reader .writing-back { grid-row:1; grid-column:1; }\n  .writing-reader .writing-preferences { display:contents; }\n  .writing-reader .languages { grid-row:1; grid-column:2; }\n  .writing-reader .edition-switch { grid-row:2; grid-column:1; min-width:0; }\n  .writing-reader .wr-controls { grid-row:2; grid-column:2; justify-self:end; gap:14px; }\n  .wr-contents .wr-popover { position:fixed; top:calc(var(--writing-nav-height,96px) + 12px); left:20px; right:20px; width:auto; }\n  .wr-settings .wr-popover { right:0; }\n}\n@media(max-width:480px) {\n  .writing-reader .report-site-nav { gap:8px 6px; margin-top:0; padding:10px 0; }\n  .writing-reader .writing-back { font-size:12px; }\n  .writing-reader .edition-switch { gap:4px; }\n  .writing-reader .report-site-nav .edition-switch a { padding:6px 4px; font-size:12px; }\n  .wr-controls { font-size:12px; }\n  .wr-footer { margin-top:56px; }\n  dialog.wr-image-dialog { width:100vw; height:100dvh; max-width:100vw; max-height:100dvh; margin:0; }\n}\n/* This sheet is also loaded in the existing open Shadow DOM of each diagram. */\n:host([data-reader-ready]) .tm-toolbar { gap:8px; padding:10px 0!important; }\n:host([data-reader-ready]:not([data-expanded])) .tm-toolbar { flex-wrap:nowrap; }\n:host([data-reader-ready]) .tm-toolbar>.tm-tools:first-child { flex:1; min-width:0; }\n:host([data-reader-ready]) .tm-toolbar select { max-width:100%; text-overflow:ellipsis; }\n:host([data-reader-ready]:not([data-expanded])) .tm-toolbar>.tm-tools:last-child>*:not([data-expand]) { display:none!important; }\n:host([data-reader-ready]:not([data-expanded])) :is(.tm-replay,.tm-navigator,.tm-breadcrumb,.tm-status) { display:none!important; }\n:host([data-reader-ready]:not([data-expanded])) .tm-viewport { pointer-events:none; }\n:host([data-reader-ready]:not([data-expanded])) .canvas .connection { animation:none!important; }\n:host([data-reader-ready]) [data-expand] { white-space:nowrap; color:#495442!important; }\n:host([data-reader-ready][data-expanded]) .tm-toolbar { padding:10px 14px!important; }\n:host([data-reader-ready][data-expanded]) [data-expand] { order:9; margin-left:8px; }\n.automation-map[data-reader-ready]:not(.am-expanded) .am-toolbar>.am-tools:last-child>*:not([data-reader-expand]) { display:none!important; }\n.automation-map[data-reader-ready]:not(.am-expanded) :is(.am-breadcrumb,.am-status) { display:none!important; }\n.automation-map[data-reader-ready]:not(.am-expanded) .am-viewport { pointer-events:none; }\n.automation-map[data-reader-ready]:not(.am-expanded) .am-toolbar { flex-wrap:nowrap; padding:10px 0!important; }\n.automation-map[data-reader-ready] .am-toolbar>.am-tools:first-child { flex:1; min-width:0; }\n.automation-map[data-reader-ready] .am-toolbar select { max-width:100%; text-overflow:ellipsis; }\n.automation-map[data-reader-ready].am-expanded .am-status { flex:none; height:64px; min-height:64px; overflow:auto; }\n@media(max-width:700px) {\n  :host([data-reader-ready]:not([data-expanded])) .tm-viewport { height:240px!important; }\n  :host([data-reader-ready]) .tm-toolbar select { font-size:13px; }\n  :host([data-reader-ready][data-expanded]) .tm-toolbar>.tm-tools:first-child { flex-basis:100%; }\n  :host([data-reader-ready][data-expanded]) .tm-toolbar>.tm-tools:last-child { gap:4px; }\n  :host([data-reader-ready][data-expanded]) .tm-toolbar button { padding:8px 7px; }\n  .automation-map[data-reader-ready]:not(.am-expanded) .am-viewport { max-height:260px; }\n}\n@media(prefers-reduced-motion:reduce) {\n  html.writing-reader { scroll-behavior:auto!important; }\n  .wr-popover,.wr-image-dialog[open] { animation:none!important; }\n  .wr-settings>summary::after,.wr-contents>summary::after { transition:none; }\n  :host([data-reader-ready]) .canvas *, .automation-map[data-reader-ready] * { animation:none!important; transition:none!important; }\n}\n@media print { .wr-controls,.wr-footer,.wr-image-enlarge,dialog.wr-image-dialog { display:none!important; } }\n\n/* The original image remains available on load failure, without JS, and in print.\n   map-ready is applied by the existing renderer only after its stylesheet loads. */\n@media screen { .writing-reader .map-ready > .trajectory-static { display:none; } }\n\n:host(:not([data-expanded])) .tm-case .tm-viewport {height:660px!important}\n:host([data-reader-ready]:not([data-expanded])) .tm-case .tm-viewport {pointer-events:auto;overscroll-behavior:auto;touch-action:pan-x pan-y pinch-zoom;cursor:auto}\n:host([data-reader-ready]:not([data-expanded])) .tm-case .tm-replay {display:flex!important;padding:10px 0;gap:10px;border-bottom:1px solid #e2e5e0}\n:host([data-reader-ready]:not([data-expanded])) .tm-case .tm-replay button {font-size:13px;padding:6px 7px}\n:host(:not([data-expanded])) .tm-case .canvas .is-active {outline:none}\n:host(:not([data-expanded])) .tm-case .canvas .connection.is-active .edge {border-top-width:1.8px}\n.tm-aside [hidden] {display:none}\n@media(max-width:700px){\n :host([data-reader-ready]:not([data-expanded])) .tm-inline-flow{height:var(--flow-height)!important;overflow:auto;pointer-events:auto;touch-action:pan-x pan-y pinch-zoom;overscroll-behavior:auto;cursor:auto}\n :host(:not([data-expanded])) .tm-inline-flow .tm-world{position:relative;transform:none!important}\n :host(:not([data-expanded])) .tm-inline-flow .diagram-root{position:absolute;transform-origin:0 0}\n :host([data-reader-ready]:not([data-expanded])) .tm-case .tm-viewport{height:min(68svh,620px)!important;min-height:360px;width:100%;flex:auto;overflow-x:hidden;touch-action:pan-y pinch-zoom}\n :host(:not([data-expanded])) .tm-case .tm-world,:host(:not([data-expanded])) .tm-case .diagram-root{position:relative!important;width:100%!important;height:auto!important;transform:none!important}\n :host(:not([data-expanded])) .tm-case .canvas.tm-inline-case{position:relative;width:100%!important;height:auto!important;overflow:visible;padding:10px 8px 24px;font-size:15px}\n :host(:not([data-expanded])) .tm-inline-case>*{position:relative!important;top:auto!important;left:auto!important;width:auto!important;height:auto!important}\n :host(:not([data-expanded])) .tm-inline-case .task{padding:15px 0;margin:0 5px 22px;font-size:15px;line-height:1.75}\n :host(:not([data-expanded])) .tm-inline-case .task span{font-size:12px;display:block;margin:0 0 6px}\n :host(:not([data-expanded])) .tm-inline-case .lane-heading{font-size:19px;line-height:1.5;margin:28px 5px 18px;padding-top:20px;border-top:1px solid #d7ded4}\n :host(:not([data-expanded])) .tm-inline-case .lane-heading small{display:block;margin:6px 0 0;font-size:13px}\n :host(:not([data-expanded])) .tm-inline-case .node{padding:18px 17px;margin:0 5px 20px;overflow-wrap:anywhere}\n :host(:not([data-expanded])) .tm-inline-case .node h3{font-size:18px;line-height:1.55;margin:0 0 10px}\n :host(:not([data-expanded])) .tm-inline-case .node .index{font-size:12px;line-height:1.5;margin-bottom:7px}\n :host(:not([data-expanded])) .tm-inline-case .node .node-line{font-size:15px;line-height:1.75;margin:5px 0 0}\n :host(:not([data-expanded])) .tm-inline-case .node .node-line .key{font-size:12px;margin-right:8px}\n :host(:not([data-expanded])) .tm-inline-case .node code{font-size:15px;white-space:normal}\n :host([data-reader-ready]:not([data-expanded])) .tm-case .tm-replay{gap:6px}\n :host([data-reader-ready]:not([data-expanded])) .tm-case .tm-replay input{order:2;flex-basis:calc(100% - 100px)}\n :host([data-reader-ready]:not([data-expanded])) .tm-case .tm-replay output{order:2;font-size:12px}\n}\n@media(max-width:700px){:host([data-expanded]) .tm-navigator{display:none}:host([data-expanded]) .tm-shell:not(.tm-case) .tm-viewport{touch-action:none}}\n@media(max-width:700px){\n :host([data-expanded]) .tm-case .tm-body{grid-template-columns:minmax(0,1fr)}\n :host([data-expanded]) .tm-case .tm-viewport{grid-column:1}\n :host([data-expanded]) .tm-toolbar{position:relative}\n :host([data-expanded]) .tm-toolbar>.tm-tools:first-child{padding-right:46px}\n :host([data-expanded]) [data-expand]{position:absolute;right:8px;top:10px;margin:0!important}\n}\n\n:host([data-theme=dark]){color:#dce0dc}\n:host([data-theme=dark]) :is(.tm-shell,.tm-toolbar,.tm-viewport,.tm-aside,.tm-breadcrumb,.tm-replay,.tm-status){background:#171d21;color:#dce0dc;border-color:#394448}\n:host([data-theme=dark]) :is(button,select){background:#20282d;color:#dce0dc;border-color:#46524d}\n:host([data-theme=dark]) :is(button,select):hover{background:#2d3833}\n:host([data-theme=dark]) .canvas{color:#dce0dc}\n:host([data-theme=dark]) :is(.canvas,.diagram-root){background:#171d21!important}\n:host([data-theme=dark]) .tm-toolbar button{color:#cbdac1!important}\n:host([data-theme=dark]) .canvas :is(.task span,.label.subtitle){color:#b3bfb4!important}\n:host([data-theme=dark]) .canvas :is(.case-subtitle,.subtitle,.note,.footer,.edge-label){color:#b3bfb4!important}\n:host([data-theme=dark]) .canvas :is(.edge-label,.milestone){background:#171d21!important}\n:host([data-theme=dark]) .canvas :is(.node,.task,.bundle,.checkpoint,.restore){background:#222c2b!important;border-color:#768575!important;color:#e1e6dd!important}\n:host([data-theme=dark]) .canvas :is(.retained,.success,.sft,.keep){background:#283628!important}\n:host([data-theme=dark]) .canvas :is(.failed,.discarded){background:#352e27!important}\n:host([data-theme=dark]) .canvas :is(.node-line,.node-line .key,.label,.lane-heading,.index,.caption,small,code,p,h3){color:inherit!important}\n:host([data-theme=dark]) .canvas :is(.wire,.edge){border-color:#9ca99b!important}\n:host([data-theme=dark]) .canvas .arrow::after{border-left-color:#9ca99b!important}\n:host([data-theme=dark]) :is(.tm-scale,.tm-status,.tm-replay output){color:#b4bdb6}\n:host([data-theme=dark]) [data-diagram-style]{--diagram-paper:#171d21;--diagram-ink:#e1e6dd;--diagram-muted:#b3bfb4;--diagram-line:#a0ada0;--diagram-border:#83917f;--diagram-accent:#b0c596;--diagram-accent-ink:#c0d6a5;--diagram-soft:#243226;--diagram-warm:#342d25}\n:host([data-theme=dark]) [data-diagram-style=engineering]{--diagram-soft:#171d21;--diagram-warm:#171d21;--diagram-border:#9ba59e}\n:host([data-theme=dark]) [data-diagram-style=engineering] .canvas :is(.node,.task,.bundle,.checkpoint,.restore){background:#171d21!important;background-image:none!important;border-color:#9ba59e!important}\n:host([data-theme=dark]) [data-diagram-style=openai-blog] .canvas :is(.node.soft,.node.accent,.node.output,.node.result,.retained,.success,.sft,.keep){background-color:#243226!important;background-image:radial-gradient(#b0c59638 .5px,transparent .65px)!important;background-size:5px 5px!important}\n:host([data-theme=dark]) .canvas .phase{color:var(--diagram-ink)!important}\n:host([data-theme=dark]) .canvas .phase-rule{border-color:#49564a!important}\n:host([data-theme=dark]) .canvas .note{background-color:var(--diagram-paper)!important}\n",
    "assets/trajectory-map.js": "(() => {\n  'use strict';\n  const data = window.WritingDiagramData || window.TrajectoryMapData;\n  if (!data) return;\n  const stylesheet = document.querySelector('script[src*=\"trajectory-map.js\"]').dataset.stylesheet;\n  const nodeSelector = data.generic ? '[data-map-node]' : '.node[id],.bundle[id],.workspace[id],.event[id],.checkpoint[id],.restore[id]';\n  const canonical = { O:'overview', S:'rsr', R:'reward', H:'handoff', G:'gae', C:'case', W:'rewrite' };\n  const element = (tag, className, content) => {\n    const node = document.createElement(tag);\n    if (className) node.className = className;\n    if (content) node.textContent = content;\n    return node;\n  };\n  const modalStyle = element('style');\n  modalStyle.textContent = 'dialog.trajectory-dialog{box-sizing:border-box;width:96vw;max-width:1800px;height:94dvh;max-height:94dvh;padding:0;border:0;background:#fff;overflow:hidden}dialog.trajectory-dialog::backdrop{background:#28302ab0}dialog.trajectory-dialog>.trajectory-map{height:100%}@media(max-width:700px){dialog.trajectory-dialog{width:98vw;max-width:98vw;height:96dvh;max-height:96dvh}}';\n  document.head.append(modalStyle);\n\n  function mount(host) {\n    if (host.shadowRoot) return;\n    const shadow = host.attachShadow({ mode:'open' });\n    const entry = host.dataset.entry;\n    const figure = host.closest('figure');\n    const panel = host.closest('.figure-panel') || figure;\n    const fallback = host.nextElementSibling?.matches('.trajectory-static') ? host.nextElementSibling : host.closest('figure').querySelector('.trajectory-static');\n    let language = host.closest('.lang-article').lang;\n    let viewId = entry;\n    let trail = [entry];\n    let scale = 1;\n    let cameraMode = 'width';\n    let offset = { x:0, y:0 };\n    let canvas;\n    let viewport;\n    let world;\n    let aside;\n    let status;\n    let scaleLabel;\n    let replayLabel;\n    let replayInput;\n    let playButton;\n    let selected = null;\n    let drag = null;\n    let observer;\n    let timer = null;\n    let cursor = 0;\n    let dialog = null;\n    let placeholder;\n    let flowing = false;\n    let minimap;\n    let minimapFrame;\n    let minimapScale = 1;\n    let detailsVisible = false;\n    let detailsButton;\n    const externalNames = new Map();\n    const translate = original => language === 'zh' ? original : data.strings[original]?.[language === 'ja' ? 1 : 0] || original;\n    const view = () => data.views[viewId];\n    const inlineCase = () => !dialog && viewId === 'case' && innerWidth <= 700;\n    const inlineFlow = () => !dialog && viewId !== 'case' && innerWidth <= 700;\n    const button = (label, action, glyph) => {\n      const control = element('button', '', glyph || translate(label));\n      control.type = 'button';\n      control.setAttribute('aria-label', translate(label));\n      control.addEventListener('click', action);\n      return control;\n    };\n    const activate = (node, action) => {\n      node.tabIndex = 0;\n      node.setAttribute('role','button');\n      node.addEventListener('click', action);\n      node.addEventListener('keydown', event => {\n        if (event.key !== 'Enter' && event.key !== ' ') return;\n        event.preventDefault();\n        action();\n      });\n    };\n    const casePadding = () => ({ x:Math.max(16,(viewport.clientWidth - view().width * scale) / 2), y:Math.max(16,(viewport.clientHeight - view().height * scale) / 2) });\n    const updateMinimap = () => {\n      if (viewId !== 'case' || !minimapFrame) return;\n      const left = Math.max(0,-offset.x / scale);\n      const top = Math.max(0,-offset.y / scale);\n      const width = Math.min(view().width - left, viewport.clientWidth / scale);\n      const height = Math.min(view().height - top, viewport.clientHeight / scale);\n      Object.assign(minimapFrame.style,{ left:`${left * minimapScale}px`,top:`${top * minimapScale}px`,width:`${width * minimapScale}px`,height:`${height * minimapScale}px` });\n    };\n    const applyTransform = () => {\n      if (inlineFlow()) {\n        scale = .72;\n        viewport.classList.add('tm-inline-flow');\n        viewport.style.setProperty('--flow-height', `${Math.min(620,view().height * scale + 32)}px`);\n        world.style.width = `${view().width * scale + 32}px`;\n        world.style.height = `${view().height * scale + 32}px`;\n        world.style.transform = 'none';\n        world.firstElementChild.style.transform = `translate(16px,16px) scale(${scale})`;\n        scaleLabel.textContent = '72%';\n        return;\n      }\n      if (inlineCase()) {\n        scale = 1;\n        world.style.width = '100%';\n        world.style.height = 'auto';\n        world.firstElementChild.style.transform = 'none';\n        scaleLabel.textContent = '100%';\n        return;\n      }\n      if (viewId === 'case') {\n        const padding = casePadding();\n        world.style.width = `${Math.max(viewport.clientWidth,view().width * scale + 32)}px`;\n        world.style.height = `${Math.max(viewport.clientHeight,view().height * scale + 32)}px`;\n        world.firstElementChild.style.transform = `translate(${padding.x}px,${padding.y}px) scale(${scale})`;\n        viewport.scrollLeft = Math.max(0,padding.x - offset.x);\n        viewport.scrollTop = Math.max(0,padding.y - offset.y);\n        offset = { x:padding.x - viewport.scrollLeft,y:padding.y - viewport.scrollTop };\n        updateMinimap();\n      } else world.style.transform = `translate(${offset.x}px,${offset.y}px) scale(${scale})`;\n      scaleLabel.textContent = `${Math.round(scale * 100)}%`;\n    };\n    const fit = (mode = 'width') => {\n      if (inlineCase() || inlineFlow()) { cameraMode = mode; applyTransform(); return; }\n      cameraMode = mode;\n      const width = viewport.clientWidth;\n      if (!width) return;\n      const fitWidth = Math.min(1, (width - 32) / view().width);\n      if (!dialog) viewport.style.height = viewId === 'case' ? `${Math.max(380,Math.min(760,window.innerHeight * .72))}px` : `${Math.max(320, view().height * fitWidth + 32)}px`;\n      scale = mode === 'all' ? Math.min(fitWidth, (viewport.clientHeight - 32) / view().height) : fitWidth;\n      offset = { x:(width - view().width * scale) / 2, y:Math.max(16, (viewport.clientHeight - view().height * scale) / 2) };\n      applyTransform();\n    };\n    const zoom = (factor, horizontal = viewport.clientWidth / 2, vertical = viewport.clientHeight / 2) => {\n      const next = Math.min(3, Math.max(.06, scale * factor));\n      offset = { x:horizontal - (horizontal - offset.x) * next / scale, y:vertical - (vertical - offset.y) * next / scale };\n      scale = next;\n      applyTransform();\n    };\n    const focusNode = id => {\n      if (inlineFlow()) {\n        const target = shadow.getElementById(id);\n        if (target) {\n          cameraMode = 'node';\n          viewport.scrollTo({left:Math.max(0,target.offsetLeft * .72),top:Math.max(0,target.offsetTop * .72),behavior:'auto'});\n        }\n        return;\n      }\n      if (inlineCase()) {\n        const target = shadow.getElementById(id);\n        if (target) {\n          cameraMode = 'node';\n          viewport.scrollTo({top:Math.max(0,target.offsetTop - 20), behavior:'auto'});\n        }\n        return;\n      }\n      const node = shadow.getElementById(id);\n      if (!node) return;\n      const bounds = node.getBoundingClientRect();\n      const original = canvas.getBoundingClientRect();\n      const left = (bounds.left - original.left) / scale;\n      const top = (bounds.top - original.top) / scale;\n      const width = bounds.width / scale;\n      const height = bounds.height / scale;\n      cameraMode = 'node';\n      scale = viewId === 'case' ? Math.max(dialog && innerWidth <= 700 ? .68 : 0, Math.min(1,(viewport.clientWidth - 32) / view().width)) : Math.min(1, (viewport.clientWidth - 48) / (width + 80), (viewport.clientHeight - 48) / (height + 100));\n      offset = { x:viewport.clientWidth / 2 - (left + width / 2) * scale, y:viewport.clientHeight / 2 - (top + height / 2) * scale };\n      offset.x = Math.max(Math.min(16, viewport.clientWidth - view().width * scale - 16), Math.min(16, offset.x));\n      applyTransform();\n    };\n    const relations = () => [...canvas.querySelectorAll('.connection')].map(connection => ({ element:connection, from:connection.dataset.from, to:connection.dataset.to }));\n    const nodeName = id => {\n      const local = shadow.getElementById(id);\n      if (local) return (local.dataset.mapLabel || local.querySelector('.action,.restore-title,h3')?.textContent || local.firstElementChild?.textContent || local.textContent).trim();\n      const key = `${language}:${id}`;\n      const graph = data.views[canonical[id[0]]];\n      if (!externalNames.has(key) && graph) {\n        const template = document.createElement('template');\n        template.innerHTML = graph.localized[language].html;\n        const node = template.content.getElementById(id);\n        if (node) externalNames.set(key,(node.firstElementChild?.textContent || node.textContent).trim());\n      }\n      return externalNames.get(key) || id;\n    };\n    const highlight = (nodeId, connection = null) => {\n      const edges = relations().filter(edge => connection ? edge.element === connection : nodeId && (edge.from === nodeId || edge.to === nodeId));\n      const nodes = new Set(edges.flatMap(edge => [edge.from, edge.to]));\n      if (nodeId) nodes.add(nodeId);\n      for (const node of canvas.querySelectorAll(nodeSelector)) {\n        node.classList.toggle('is-active', nodes.has(node.id));\n        node.classList.toggle('is-muted', !!(nodeId || connection) && !nodes.has(node.id));\n      }\n      for (const edge of relations()) {\n        edge.element.classList.toggle('is-active', edges.some(active => active.element === edge.element));\n        edge.element.classList.toggle('is-muted', !!(nodeId || connection) && !edges.some(active => active.element === edge.element));\n      }\n    };\n    const pause = () => {\n      clearInterval(timer);\n      timer = null;\n      canvas?.classList.remove('tm-replaying');\n      if (playButton) { playButton.textContent = translate('播放记录'); playButton.setAttribute('aria-label', translate('播放记录')); }\n    };\n    const navigate = (target, nextTrail = [...trail, target]) => {\n      pause();\n      viewId = target;\n      trail = nextTrail.slice(-12);\n      selected = null;\n      cameraMode = dialog ? 'all' : 'width';\n      render();\n    };\n    const related = () => {\n      aside.append(element('h3','',translate(data.generic ? '本篇图解' : '关联流程')));\n      for (const target of view().related) {\n        const control = button(data.views[target].title, () => navigate(target));\n        control.className = 'tm-related';\n        control.dataset.view = target;\n        control.textContent += ' ↗';\n        aside.append(control);\n      }\n    };\n    const openNode = (id, focus = false) => {\n      const node = shadow.getElementById(id);\n      if (!node) {\n        const target = canonical[id[0]];\n        if (target) { navigate(target); openNode(id, true); }\n        return;\n      }\n      selected = id;\n      aside.hidden = viewId === 'case' && !detailsVisible;\n      aside.replaceChildren(element('h3','',nodeName(id)));\n      const fields = element('dl');\n      if (node.matches('.event')) {\n        aside.append(element('small','',node.querySelector('.index').textContent + ' · ' + node.querySelector('.tool').textContent));\n        for (const [label, selector] of [['动作','.action'],['工具返回','.response'],['状态','.state']]) {\n          fields.append(element('dt','',translate(label)), element('dd','',node.querySelector(selector).textContent));\n        }\n        aside.append(element('p','',translate(node.dataset.disposition === 'discarded' ? '失败尝试 · 保留审计与成本' : '最终保留轮次')));\n      } else {\n        const detail = node.querySelector('[data-node-detail]');\n        const description = (detail?.textContent || node.textContent).trim();\n        if (description.replace(/\\s+/g,' ') !== nodeName(id).replace(/\\s+/g,' ')) aside.append(element('p',detail ? 'tm-node-detail' : '',description));\n        if (node.matches('.checkpoint,.restore')) aside.append(element('small','',translate('Harness 控制事件')));\n      }\n      aside.append(fields);\n      const jump = view().links[id];\n      if (jump) aside.append(button(data.views[jump].title, () => navigate(jump)));\n      for (const [label, incoming] of [['上游',true],['下游',false]]) {\n        const linked = [...new Set(relations().filter(edge => incoming ? edge.to === id : edge.from === id).map(edge => incoming ? edge.from : edge.to))].filter(target => !target.startsWith('connector-'));\n        if (!linked.length) continue;\n        aside.append(element('small','',translate(label)));\n        for (const target of linked) {\n          const control = button('查看详情', () => { pause(); selectNode(target); });\n          control.textContent = nodeName(target) + ' →';\n          aside.append(control);\n        }\n      }\n      related();\n      aside.append(button('关闭详情', () => {\n        aside.hidden = true;\n        if (viewId === 'case') {\n          detailsVisible = false;\n          detailsButton.setAttribute('aria-expanded','false');\n        } else { selected = null; highlight(null); fit(dialog ? 'all' : 'width'); }\n      }));\n      highlight(id);\n      if (focus) focusNode(id);\n    };\n    const selectNode = id => {\n      if (viewId !== 'case') { openNode(id, true); return; }\n      const indices = view().sequence.flatMap((node, index) => node === id ? [index] : []);\n      if (!indices.length) return;\n      replay(indices.reduce((nearest, index) => Math.abs(index - cursor) < Math.abs(nearest - cursor) ? index : nearest));\n    };\n    const replay = (next, focus = true) => {\n      cursor = Math.max(0, Math.min(view().sequence.length - 1, next));\n      const id = view().sequence[cursor];\n      openNode(id, focus);\n      replayInput.value = cursor;\n      replayLabel.textContent = `${translate('事件')} ${cursor + 1} / ${view().sequence.length}`;\n      const previous = view().sequence[cursor - 1];\n      const edge = relations().find(connection => connection.from === previous && connection.to === id);\n      highlight(id, edge?.element);\n      const visited = new Set(view().sequence.slice(0, cursor));\n      for (const node of canvas.querySelectorAll('.event')) node.classList.toggle('is-visited', visited.has(node.id));\n      shadow.querySelector('[data-replay=\"previous\"]').disabled = cursor === 0;\n      shadow.querySelector('[data-replay=\"next\"]').disabled = cursor === view().sequence.length - 1;\n      if (cursor === view().sequence.length - 1) pause();\n    };\n    const togglePlayback = () => {\n      if (timer) { pause(); return; }\n      if (cursor === view().sequence.length - 1) replay(0);\n      else replay(cursor);\n      canvas.classList.add('tm-replaying');\n      playButton.textContent = translate('暂停');\n      playButton.setAttribute('aria-label', translate('暂停'));\n      timer = setInterval(() => replay(cursor + 1), 2600);\n    };\n    const expand = () => {\n      if (dialog) { dialog.close(); return; }\n      pause();\n      placeholder = document.createComment('trajectory-map');\n      host.before(placeholder);\n      dialog = element('dialog','trajectory-dialog');\n      dialog.setAttribute('aria-label',translate(view().title));\n      document.body.append(dialog);\n      dialog.append(host);\n      host.dataset.expanded = '';\n      dialog.addEventListener('close', () => {\n        pause();\n        placeholder.replaceWith(host);\n        delete host.dataset.expanded;\n        dialog.remove();\n        dialog = null;\n        render();\n        shadow.querySelector('[data-expand]').focus({ preventScroll:true });\n      }, { once:true });\n      dialog.showModal();\n      render();\n      shadow.querySelector('[data-expand]').focus();\n    };\n    const bindCanvas = () => {\n      for (const node of canvas.querySelectorAll(nodeSelector)) {\n        const target = view().links[node.id];\n        const hasDetails = !!node.querySelector('[data-node-detail]');\n        if (target) node.dataset.drill = target;\n        node.setAttribute('aria-label', `${nodeName(node.id)} · ${translate(target && !hasDetails ? '查看内部流程' : '查看详情')}`);\n        activate(node, () => {\n          pause();\n          if (target && !hasDetails) navigate(target);\n          else selectNode(node.id);\n        });\n        node.addEventListener('pointerenter', () => { if (!timer) highlight(node.id); });\n        node.addEventListener('pointerleave', () => { if (!timer) highlight(selected); });\n        node.addEventListener('focus', () => { if (!timer) highlight(node.id); });\n      }\n      for (const edge of relations()) {\n        edge.element.setAttribute('aria-label', `${nodeName(edge.from)} → ${nodeName(edge.to)}`);\n        activate(edge.element, () => { pause(); selectNode(edge.to); });\n        edge.element.addEventListener('pointerenter', () => { if (!timer) highlight(null, edge.element); });\n        edge.element.addEventListener('pointerleave', () => { if (!timer) highlight(selected); });\n        edge.element.addEventListener('focus', () => highlight(null, edge.element));\n      }\n      for (const port of canvas.querySelectorAll('.port')) {\n        activate(port, () => {\n          pause();\n          const target = port.dataset.port === '2' ? 'BN' : 'BG';\n          if (viewId === 'offline') navigate('online');\n          openNode(target, true);\n        });\n      }\n    };\n    const bindViewport = () => {\n      // Hand an outward, single-finger gesture to the article when the inline\n      // scroller is already at its edge. Interior scrolling and pinch zoom\n      // remain native; horizontal diagram gestures never enter this branch.\n      let edgeTouch = null;\n      viewport.addEventListener('touchstart', event => {\n        edgeTouch = !dialog && (viewId === 'case' || inlineFlow()) && event.touches.length === 1\n          ? {x:event.touches[0].clientX,y:event.touches[0].clientY,lastY:event.touches[0].clientY,handed:false}\n          : null;\n      }, {passive:true});\n      viewport.addEventListener('touchmove', event => {\n        if (!edgeTouch || event.touches.length !== 1) { edgeTouch = null; return; }\n        const point = event.touches[0];\n        const x = point.clientX - edgeTouch.x;\n        const y = edgeTouch.y - point.clientY;\n        if (!edgeTouch.handed) {\n          if (Math.max(Math.abs(x),Math.abs(y)) < 8) return;\n          if (Math.abs(x) >= Math.abs(y)) { edgeTouch = null; return; }\n          const outward = y < 0 && viewport.scrollTop <= 1 || y > 0 && viewport.scrollTop >= viewport.scrollHeight - viewport.clientHeight - 1;\n          if (!outward || !event.cancelable) { edgeTouch = null; return; }\n          edgeTouch.handed = true;\n        }\n        if (event.cancelable) {\n          event.preventDefault();\n          pause();\n          window.scrollBy({top:edgeTouch.lastY - point.clientY,behavior:'instant'});\n        }\n        edgeTouch.lastY = point.clientY;\n      }, {passive:false});\n      for (const type of ['touchend','touchcancel']) viewport.addEventListener(type, () => { edgeTouch = null; }, {passive:true});\n      viewport.addEventListener('scroll', () => {\n        if (viewId !== 'case' || inlineCase()) return;\n        const padding = casePadding();\n        offset = { x:padding.x - viewport.scrollLeft,y:padding.y - viewport.scrollTop };\n        updateMinimap();\n      });\n      viewport.addEventListener('pointerdown', event => {\n        if (inlineCase() || inlineFlow()) { pause(); return; }\n        if (viewId === 'case' && event.pointerType === 'touch') { pause(); return; }\n        if (event.button > 0 || event.target.closest('[role=\"button\"]')) return;\n        const bounds = viewport.getBoundingClientRect();\n        if (event.clientX - bounds.left >= viewport.clientWidth || event.clientY - bounds.top >= viewport.clientHeight) return;\n        pause();\n        viewport.focus({ preventScroll:true });\n        drag = { id:event.pointerId, x:event.clientX, y:event.clientY, left:offset.x, top:offset.y };\n        viewport.setPointerCapture(event.pointerId);\n        viewport.classList.add('is-dragging');\n      });\n      viewport.addEventListener('pointermove', event => {\n        if (!drag || drag.id !== event.pointerId) return;\n        offset = { x:drag.left + event.clientX - drag.x, y:drag.top + event.clientY - drag.y };\n        applyTransform();\n      });\n      const stopDrag = () => { drag = null; viewport.classList.remove('is-dragging'); };\n      for (const type of ['pointerup','pointercancel','lostpointercapture']) viewport.addEventListener(type, stopDrag);\n      viewport.addEventListener('wheel', event => {\n        // Chromium can latch a continuous wheel gesture to the inner scroller\n        // even after it reaches its boundary. Hand only that remaining gesture\n        // to the article, without cancelling ordinary in-figure scrolling.\n        if (!dialog && (viewId === 'case' || inlineFlow()) && !event.ctrlKey && !event.metaKey && Math.abs(event.deltaY) > Math.abs(event.deltaX)) {\n          const atTop = viewport.scrollTop <= 1;\n          const atBottom = viewport.scrollTop >= viewport.scrollHeight - viewport.clientHeight - 1;\n          if (event.cancelable && (event.deltaY < 0 && atTop || event.deltaY > 0 && atBottom)) {\n            event.preventDefault();\n            pause();\n            const unit = event.deltaMode === 1 ? 16 : event.deltaMode === 2 ? viewport.clientHeight : 1;\n            window.scrollBy({top:event.deltaY * unit,behavior:'instant'});\n            return;\n          }\n        }\n        if (inlineCase() || inlineFlow()) { pause(); return; }\n        if (viewId === 'case' && !event.ctrlKey && !event.metaKey) { pause(); return; }\n        if (!event.ctrlKey && !event.metaKey && !dialog) return;\n        event.preventDefault();\n        pause();\n        if (event.ctrlKey || event.metaKey) {\n          const bounds = viewport.getBoundingClientRect();\n          zoom(Math.exp(-event.deltaY * .006), event.clientX - bounds.left, event.clientY - bounds.top);\n        } else { offset.x -= event.deltaX; offset.y -= event.deltaY; applyTransform(); }\n      }, { passive:false });\n      viewport.addEventListener('keydown', event => {\n        if (event.target !== viewport) return;\n        // Native scrolling can chain to the article at either boundary.\n        if ((viewId === 'case' || inlineFlow()) && ['ArrowLeft','ArrowRight','ArrowUp','ArrowDown','PageUp','PageDown','Home','End',' '].includes(event.key)) { pause(); return; }\n        const shift = { ArrowLeft:[60,0], ArrowRight:[-60,0], ArrowUp:[0,60], ArrowDown:[0,-60] }[event.key];\n        if (shift) { event.preventDefault(); pause(); offset.x += shift[0]; offset.y += shift[1]; applyTransform(); }\n        if (['+','=','-','0'].includes(event.key)) {\n          event.preventDefault(); pause();\n          if (event.key === '0') fit('all');\n          else zoom(event.key === '-' ? 1 / 1.2 : 1.2);\n        }\n      });\n    };\n    const render = () => {\n      observer?.disconnect();\n      const inlineCaseRendered = inlineCase();\n      const inlineFlowRendered = inlineFlow();\n      const storedSelection = selected;\n      const storedCameraMode = cameraMode;\n      // Keep the full-size canvas inside its host while the shadow stylesheet\n      // loads, including when a mobile expanded view returns to the article.\n      const original = element('style','',':host{display:block;min-width:0;max-width:100%;overflow:hidden}' + view().localized[language].css);\n      const theme = element('link');\n      theme.rel = 'stylesheet';\n      theme.href = stylesheet;\n      const shell = element('section',viewId === 'case' ? 'tm-shell tm-case' : 'tm-shell');\n      shell.dataset.diagramStyle = window.WritingDiagramStyle?.current() || 'openai-blog';\n      shell.dataset.diagramKind = view().kind === 'replay' ? 'flow' : view().kind;\n      const toolbar = element('div','tm-toolbar');\n      const select = element('select');\n      select.dataset.viewControl = '';\n      select.setAttribute('aria-label',translate('流程视图'));\n      for (const [id, graph] of Object.entries(data.views)) {\n        const option = element('option','',translate(graph.title));\n        option.value = id;\n        select.append(option);\n      }\n      select.value = viewId;\n      select.addEventListener('change', () => navigate(select.value, [data.generic ? Object.keys(data.views)[0] : 'overview',select.value].filter((value,index,list) => list.indexOf(value) === index)));\n      const controls = element('div','tm-tools');\n      scaleLabel = element('span','tm-scale');\n      const expanded = button(dialog ? '关闭' : '放大 ↗', expand);\n      expanded.dataset.expand = '';\n      controls.append(button('缩小', () => { pause(); zoom(1 / 1.2); }, '−'),scaleLabel,button('放大', () => { pause(); zoom(1.2); }, '+'),button('全图', () => { pause(); fit('all'); }),button('适合宽度', () => { pause(); fit('width'); }),expanded);\n      \n      const readable = button('清晰阅读', () => {\n        pause();\n        const first = selected || view().sequence?.[0] || canvas.querySelector('.node[id]')?.id;\n        if (first) { selected = first; focusNode(first); }\n        if (scale < .68) zoom(.68 / scale);\n        viewport.focus({preventScroll:true});\n      });\n      controls.insertBefore(readable, expanded);\n      const hasConnections = view().localized[language].html.includes('class=\"connection\"');\n      if (view().kind === 'flow' && hasConnections) {\n        const motion = button(flowing ? '停止动效' : '连线动效', () => {\n          flowing = !flowing;\n          canvas.classList.toggle('tm-flowing',flowing);\n          motion.textContent = translate(flowing ? '停止动效' : '连线动效');\n          motion.setAttribute('aria-label',motion.textContent);\n          motion.setAttribute('aria-pressed',String(flowing));\n        });\n        motion.setAttribute('aria-pressed',String(flowing));\n        controls.append(motion);\n      }\n      const viewControls = element('div','tm-tools');\n      viewControls.append(select);\n      toolbar.append(viewControls,controls);\n      const breadcrumb = element('nav','tm-breadcrumb');\n      breadcrumb.setAttribute('aria-label',translate('返回'));\n      breadcrumb.hidden = trail.length < 2;\n      const back = button('返回', () => navigate(trail.at(-2), trail.slice(0,-1)), '←');\n      back.disabled = trail.length < 2;\n      breadcrumb.append(back);\n      trail.slice(0,-1).forEach((id,index) => {\n        if (index) breadcrumb.append(element('span','','›'));\n        const crumb = button(data.views[id].title, () => navigate(id,trail.slice(0,index + 1)));\n        breadcrumb.append(crumb);\n      });\n      if (viewId !== entry) breadcrumb.append(button('回到本节', () => navigate(entry,[entry])));\n      shell.append(toolbar,breadcrumb);\n      const body = element('div','tm-body');\n      viewport = element('div','tm-viewport');\n      viewport.tabIndex = 0;\n      viewport.setAttribute('role','region');\n      viewport.setAttribute('aria-label',`${translate(view().title)} · ${translate('方向键平移，+ / − 缩放，0 查看全图。')}`);\n      world = element('div','tm-world');\n      const diagram = element('div','diagram-root');\n      const template = document.createElement('template');\n      template.innerHTML = view().localized[language].html;\n      diagram.append(template.content);\n      canvas = diagram.querySelector('.canvas');\n      if (inlineCaseRendered) {\n        canvas.classList.add('tm-inline-case');\n        const headings = [...canvas.querySelectorAll('.lane-heading')].sort((a,b) => parseFloat(a.style.top) - parseFloat(b.style.top));\n        const task = canvas.querySelector('.task');\n        const ordered = task ? [task] : [];\n        let previousHeading = null;\n        for (const id of view().sequence) {\n          const node = canvas.querySelector('#' + CSS.escape(id));\n          if (!node) continue;\n          const heading = headings.filter(h => parseFloat(h.style.top) <= parseFloat(node.style.top)).at(-1);\n          if (heading && heading !== previousHeading) { ordered.push(heading); previousHeading = heading; }\n          ordered.push(node);\n        }\n        canvas.replaceChildren(...ordered);\n      }\n      for (const title of canvas.querySelectorAll('.label.title')) {\n        if (title.textContent.trim() === translate(view().title)) title.classList.add('tm-repeated-title');\n      }\n      canvas.classList.toggle('tm-flowing',flowing && view().kind === 'flow');\n      world.append(diagram);\n      viewport.append(world);\n      aside = element('aside','tm-aside');\n      aside.hidden = true;\n      aside.setAttribute('aria-label',translate('查看详情'));\n      minimap = null;\n      minimapFrame = null;\n      if (viewId === 'case') {\n        const navigator = element('div','tm-navigator');\n        navigator.append(element('span','tm-navigator-title',translate('完整轨迹')));\n        minimap = button('在总览中定位',event => {\n          if (!event.detail) { pause(); fit('all'); return; }\n          pause();\n          const bounds = minimap.getBoundingClientRect();\n          const displayScale = bounds.width / view().width;\n          const horizontal = (event.clientX - bounds.left) / displayScale;\n          const vertical = (event.clientY - bounds.top) / displayScale;\n          cameraMode = 'width';\n          scale = Math.min(1,(viewport.clientWidth - 32) / view().width);\n          offset = { x:viewport.clientWidth / 2 - horizontal * scale,y:viewport.clientHeight / 2 - vertical * scale };\n          applyTransform();\n        });\n        minimap.className = 'tm-minimap';\n        const miniature = canvas.cloneNode(true);\n        miniature.className = 'tm-mini-canvas';\n        miniature.style.width = `${view().width}px`;\n        miniature.style.height = `${view().height}px`;\n        miniature.removeAttribute('id');\n        miniature.setAttribute('aria-hidden','true');\n        miniature.inert = true;\n        for (const node of miniature.querySelectorAll('[id]')) node.removeAttribute('id');\n        minimapScale = 96 / view().width;\n        miniature.style.transform = `scale(${minimapScale})`;\n        minimap.style.height = `${view().height * minimapScale}px`;\n        minimapFrame = element('span','tm-minimap-frame');\n        minimap.replaceChildren(miniature,minimapFrame);\n        navigator.append(minimap,element('small','',translate('框内为当前视野。点击定位。')));\n        body.append(navigator);\n      }\n      body.append(viewport,aside);\n      if (viewId === 'case') {\n        const replayControls = element('div','tm-replay');\n        const previous = button('上一步', () => { pause(); replay(cursor - 1); }, '←');\n        previous.dataset.replay = 'previous';\n        const next = button('下一步', () => { pause(); replay(cursor + 1); }, '→');\n        next.dataset.replay = 'next';\n        playButton = button('播放记录',togglePlayback);\n        replayInput = element('input');\n        replayInput.type = 'range'; replayInput.min = 0; replayInput.max = view().sequence.length - 1; replayInput.value = cursor;\n        replayInput.setAttribute('aria-label',translate('回放位置'));\n        replayInput.addEventListener('input', () => { pause(); replay(Number(replayInput.value)); });\n        replayLabel = element('output');\n        replayLabel.setAttribute('aria-live','polite');\n        detailsButton = button('事件详情', () => {\n          detailsVisible = !detailsVisible;\n          detailsButton.setAttribute('aria-expanded',String(detailsVisible));\n          replay(cursor);\n        });\n        detailsButton.setAttribute('aria-expanded',String(detailsVisible));\n        replayControls.append(previous,playButton,next,button('重新开始', () => { pause(); replay(0); }),replayInput,replayLabel,detailsButton);\n        shell.append(replayControls);\n      } else playButton = null;\n      const flowHint = hasConnections ? '悬停追踪连接，点击查看细节或关联图；动效仅辅助读图，不代表执行。' : '点击节点查看细节或关联图；拖动平移，Ctrl/⌘ + 滚轮缩放。';\n      const hint = data.generic ? (view().kind === 'flow' ? flowHint : '点击查看原图数据；拖动平移，Ctrl/⌘ + 滚轮缩放。') : (viewId === 'case' ? '按论文记录顺序查看选取的事件；左侧总览可定位。两条轨迹属于独立评测，回放只用于读图。' : '悬停追踪连线；点击模块展开；拖动平移，Ctrl/⌘ + 滚轮缩放。');\n      status = element('div','tm-status',translate(hint));\n      status.hidden = true;\n      const help = button('读图帮助', () => {\n        status.hidden = !status.hidden;\n        help.setAttribute('aria-expanded',String(!status.hidden));\n      }, '?');\n      help.setAttribute('aria-expanded','false');\n      controls.append(help);\n      shell.append(body,status);\n      shadow.replaceChildren(original,theme,shell);\n      window.WritingDiagramStyle?.apply(shadow);\n      bindCanvas(); bindViewport();\n      host.dataset.view = viewId;\n      const ready = () => {\n        if (theme !== shadow.querySelector('link') || !theme.sheet) return;\n        host.hidden = false;\n        panel?.classList.add('map-ready');\n        if (figure?.querySelectorAll('.trajectory-map').length === 1) figure.classList.add('map-ready');\n        fallback.open = false;\n        \n        viewport.inert = false;\n        viewport.tabIndex = 0;\n        fit(storedCameraMode === 'node' ? 'width' : storedCameraMode);\n        if (viewId === 'case') replay(cursor, storedCameraMode === 'node' || !!dialog && innerWidth <= 700);\n        \n        else if (storedSelection) openNode(storedSelection,storedCameraMode === 'node');\n        if (dialog && innerWidth <= 700 && viewId !== 'case' && scale < .68) readable.click();\n      };\n      theme.addEventListener('load',ready,{ once:true });\n      theme.addEventListener('error', () => {\n        if (theme !== shadow.querySelector('link')) return;\n        pause();\n        host.hidden = true;\n        panel?.classList.remove('map-ready');\n        figure?.classList.remove('map-ready');\n        fallback.open = true;\n      }, { once:true });\n      requestAnimationFrame(ready);\n      let previousWidth = viewport.clientWidth;\n      let previousHeight = viewport.clientHeight;\n      observer = new ResizeObserver(() => {\n        if (inlineCaseRendered !== inlineCase() || inlineFlowRendered !== inlineFlow()) { render(); return; }\n        const width = viewport.clientWidth;\n        const height = viewport.clientHeight;\n        if (width === previousWidth && (!dialog || height === previousHeight)) return;\n        previousWidth = width; previousHeight = height;\n        const mode = cameraMode;\n        fit(mode === 'node' ? 'width' : mode);\n        if (mode === 'node' && selected) focusNode(selected);\n      });\n      observer.observe(viewport);\n    };\n    render();\n    window.addEventListener('writing-diagram-style-change',() => window.WritingDiagramStyle?.apply(shadow));\n    document.addEventListener('visibilitychange', () => { if (document.hidden) pause(); });\n    let wasOpen;\n    window.addEventListener('beforeprint', () => { pause(); wasOpen = fallback.open; fallback.open = true; });\n    window.addEventListener('afterprint', () => { fallback.open = wasOpen; });\n  }\n\n  function refresh(){\n    const lang=document.documentElement.lang;\n    document.querySelectorAll('.trajectory-map[data-entry]').forEach(host=>{\n      host.dataset.theme=document.documentElement.dataset.theme||'light';\n      if(host.closest('.lang-article')?.lang===lang)mount(host);\n    });\n  }\n  refresh();new MutationObserver(refresh).observe(document.documentElement,{attributes:true,attributeFilter:['lang','data-theme']});\n})();\n",
    "diagram-data.json": "{\n  \"views\": {\n    \"overview\": {\n      \"title\": \"Terminal-RSI：RSR 与 RPR 的完整循环\",\n      \"kind\": \"flow\",\n      \"width\": 1200,\n      \"height\": 770,\n      \"links\": {\n        \"O-rewrite\": \"rsr\",\n        \"O-sft\": \"rsr\",\n        \"O-rollout\": \"reward\",\n        \"O-reward\": \"reward\",\n        \"O-gae\": \"gae\",\n        \"O-critic\": \"handoff\",\n        \"O-policy\": \"handoff\",\n        \"O-valueupdate\": \"handoff\"\n      },\n      \"related\": [\n        \"rsr\",\n        \"reward\",\n        \"gae\",\n        \"handoff\"\n      ],\n      \"localized\": {\n        \"zh\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;overflow:hidden;background:#fff;color:#202020;font:24px/1.45 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;text-align:left}\\n.canvas .node{position:absolute;z-index:3;border:1.35px solid #464b43;border-radius:8px;padding:14px 16px;background:#fff;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.canvas .node .action{font-size:25px;line-height:1.32;font-weight:400;margin:0}\\n.canvas .node .sub{font-size:20px;line-height:1.45;color:#65695f;margin-top:8px}\\n.canvas .node.soft{background:#f4f7ef;border-color:#7f9664}\\n.canvas .node.data{border-style:dashed}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.6px solid #41483e;transform-origin:left center;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #41483e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.canvas .edge.preserve{border-top-style:dashed;border-top-color:#7f8578}\\n.canvas .edge.preserve.arrow:after{border-left-color:#7f8578}\\n.canvas .edge.cycle{border-top-color:#7f9664}\\n.canvas .edge.cycle.arrow:after{border-left-color:#7f9664}\\n.canvas .edge-label{position:absolute;z-index:2;padding:2px 6px;background:#fff;color:#61665b;font-size:20px;line-height:1.4;text-align:center}\\n.canvas .phase{position:absolute;font-size:27px;line-height:1.4;color:#30372c;font-weight:400}\\n.canvas .phase-rule{position:absolute;border-top:1px solid #dce1d6}\\n.canvas .note{position:absolute;font-size:20px;line-height:1.5;color:#65695f}\\n.canvas .boundary{position:absolute;border:1px solid #dde2d7;border-radius:9px;z-index:0}\\n\\n.canvas{height:770px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"O-actor\\\" data-to=\\\"O-success\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:225px;top:147px;width:50.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-success\\\" data-to=\\\"O-rewrite\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:455px;top:147px;width:55.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-rewrite\\\" data-to=\\\"O-sft\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:730px;top:147px;width:60.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-sft\\\" data-to=\\\"O-rollout\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:890px;top:195px;width:40.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:890px;top:235px;width:872.00px;transform:rotate(180.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:18px;top:235px;width:165.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:18px;top:400px;width:22.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-rollout\\\" data-to=\\\"O-reward\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:260px;top:400px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-reward\\\" data-to=\\\"O-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:525px;top:400px;width:125.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-critic\\\" data-to=\\\"O-values\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:260px;top:627px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-rollout\\\" data-to=\\\"O-values\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:150px;top:450px;width:60.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:150px;top:510px;width:275.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:425px;top:510px;width:70.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-values\\\" data-to=\\\"O-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:525px;top:627px;width:55.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:580px;top:627px;width:142.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:580px;top:485px;width:170.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:750px;top:485px;width:35.00px;transform:rotate(-90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-gae\\\" data-to=\\\"O-policy\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:855px;top:385px;width:55.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:910px;top:385px;width:50.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:910px;top:335px;width:60.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-gae\\\" data-to=\\\"O-valueupdate\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:855px;top:415px;width:50.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:905px;top:415px;width:185.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:905px;top:600px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-policy\\\" data-to=\\\"O-actor\\\" data-relation=\\\"cycle\\\"><div class=\\\"edge cycle \\\" style=\\\"left:1165px;top:335px;width:20.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:1185px;top:335px;width:315.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:1185px;top:20px;width:1167.00px;transform:rotate(180.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:18px;top:20px;width:127.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge cycle arrow\\\" style=\\\"left:18px;top:147px;width:22.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-valueupdate\\\" data-to=\\\"O-critic\\\" data-relation=\\\"cycle\\\"><div class=\\\"edge cycle \\\" style=\\\"left:1067px;top:650px;width:85.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:1067px;top:735px;width:917.00px;transform:rotate(180.00deg)\\\"></div><div class=\\\"edge cycle arrow\\\" style=\\\"left:150px;top:735px;width:60.00px;transform:rotate(-90.00deg)\\\"></div></div><section class=\\\"node \\\" id=\\\"O-actor\\\" data-map-node data-map-label=\\\"当前 Actor\\\" style=\\\"left:40px;top:100px;width:185px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">当前 Actor</h3><div class=\\\"sub\\\">发现成功执行</div></section><section class=\\\"node \\\" id=\\\"O-success\\\" data-map-node data-map-label=\\\"成功轨迹\\\" style=\\\"left:275px;top:100px;width:180px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">成功轨迹</h3><div class=\\\"sub\\\">任务验收通过</div></section><section class=\\\"node \\\" id=\\\"O-rewrite\\\" data-map-node data-map-label=\\\"重写与再验证\\\" style=\\\"left:510px;top:100px;width:220px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">重写与再验证</h3><div class=\\\"sub\\\">计划 → 重做</div></section><section class=\\\"node soft\\\" id=\\\"O-sft\\\" data-map-node data-map-label=\\\"监督微调\\\" style=\\\"left:790px;top:100px;width:200px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">监督微调</h3><div class=\\\"sub\\\">只更新 Actor</div></section><section class=\\\"node \\\" id=\\\"O-rollout\\\" data-map-node data-map-label=\\\"Actor ↔ 终端\\\" style=\\\"left:40px;top:350px;width:220px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor ↔ 终端</h3><div class=\\\"sub\\\">采样新轨迹</div></section><section class=\\\"node \\\" id=\\\"O-reward\\\" data-map-node data-map-label=\\\"验证器 → 奖励\\\" style=\\\"left:325px;top:350px;width:200px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">验证器 → 奖励</h3><div class=\\\"sub\\\">FDR / SPR · R</div></section><section class=\\\"node \\\" id=\\\"O-gae\\\" data-map-node data-map-label=\\\"GAE / TB-GAE\\\" style=\\\"left:650px;top:350px;width:205px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">GAE / TB-GAE</h3><div class=\\\"sub\\\">沿生成位置递推</div></section><section class=\\\"node soft\\\" id=\\\"O-policy\\\" data-map-node data-map-label=\\\"Actor 更新\\\" style=\\\"left:970px;top:285px;width:195px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor 更新</h3><div class=\\\"sub\\\">PPO · 优势 A</div></section><section class=\\\"node \\\" id=\\\"O-critic\\\" data-map-node data-map-label=\\\"继承 Critic\\\" style=\\\"left:40px;top:580px;width:220px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">继承 Critic</h3><div class=\\\"sub\\\">保留 RSR 前的权重</div></section><section class=\\\"node \\\" id=\\\"O-values\\\" data-map-node data-map-label=\\\"价值预测 V\\\" style=\\\"left:325px;top:580px;width:200px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">价值预测 V</h3><div class=\\\"sub\\\">每个生成前缀</div></section><section class=\\\"node soft\\\" id=\\\"O-valueupdate\\\" data-map-node data-map-label=\\\"Critic 更新\\\" style=\\\"left:970px;top:550px;width:195px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Critic 更新</h3><div class=\\\"sub\\\">拟合目标 Ĝ</div></section><div class=\\\"phase\\\" style=\\\"left:40px;top:55px;width:950px\\\">A · RSR：成功经验 → 新示范</div><div class=\\\"phase\\\" style=\\\"left:40px;top:275px;width:750px\\\">B · RPR：执行结果 → 参数更新</div><div class=\\\"edge-label\\\" style=\\\"left:390px;top:214px;width:360px\\\">微调后的 Actor</div><div class=\\\"edge-label\\\" style=\\\"left:533px;top:365px;width:105px\\\">奖励 R</div><div class=\\\"edge-label\\\" style=\\\"left:195px;top:485px;width:300px\\\">轨迹中的生成前缀</div><div class=\\\"edge-label\\\" style=\\\"left:564px;top:540px;width:66px\\\">V</div><div class=\\\"edge-label\\\" style=\\\"left:867px;top:320px;width:92px\\\">A</div><div class=\\\"edge-label\\\" style=\\\"left:862px;top:510px;width:77px\\\">Ĝ</div><div class=\\\"edge-label\\\" style=\\\"left:360px;top:7px;width:430px\\\">保留 Actor，开始下一轮 RSR</div><div class=\\\"edge-label\\\" style=\\\"left:380px;top:718px;width:445px\\\">保留 Critic，交给下一轮 RPR</div><div class=\\\"note\\\" style=\\\"left:600px;top:670px;width:565px\\\">每个 RPR 阶段：先只更新 Critic 4 次，再联合训练</div></div>\"\n        },\n        \"en\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;overflow:hidden;background:#fff;color:#202020;font:24px/1.45 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;text-align:left}\\n.canvas .node{position:absolute;z-index:3;border:1.35px solid #464b43;border-radius:8px;padding:14px 16px;background:#fff;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.canvas .node .action{font-size:25px;line-height:1.32;font-weight:400;margin:0}\\n.canvas .node .sub{font-size:20px;line-height:1.45;color:#65695f;margin-top:8px}\\n.canvas .node.soft{background:#f4f7ef;border-color:#7f9664}\\n.canvas .node.data{border-style:dashed}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.6px solid #41483e;transform-origin:left center;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #41483e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.canvas .edge.preserve{border-top-style:dashed;border-top-color:#7f8578}\\n.canvas .edge.preserve.arrow:after{border-left-color:#7f8578}\\n.canvas .edge.cycle{border-top-color:#7f9664}\\n.canvas .edge.cycle.arrow:after{border-left-color:#7f9664}\\n.canvas .edge-label{position:absolute;z-index:2;padding:2px 6px;background:#fff;color:#61665b;font-size:20px;line-height:1.4;text-align:center}\\n.canvas .phase{position:absolute;font-size:27px;line-height:1.4;color:#30372c;font-weight:400}\\n.canvas .phase-rule{position:absolute;border-top:1px solid #dce1d6}\\n.canvas .note{position:absolute;font-size:20px;line-height:1.5;color:#65695f}\\n.canvas .boundary{position:absolute;border:1px solid #dde2d7;border-radius:9px;z-index:0}\\n\\n.canvas{height:770px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"O-actor\\\" data-to=\\\"O-success\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:225px;top:147px;width:50.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-success\\\" data-to=\\\"O-rewrite\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:455px;top:147px;width:55.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-rewrite\\\" data-to=\\\"O-sft\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:730px;top:147px;width:60.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-sft\\\" data-to=\\\"O-rollout\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:890px;top:195px;width:40.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:890px;top:235px;width:872.00px;transform:rotate(180.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:18px;top:235px;width:165.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:18px;top:400px;width:22.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-rollout\\\" data-to=\\\"O-reward\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:260px;top:400px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-reward\\\" data-to=\\\"O-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:525px;top:400px;width:125.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-critic\\\" data-to=\\\"O-values\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:260px;top:627px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-rollout\\\" data-to=\\\"O-values\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:150px;top:450px;width:60.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:150px;top:510px;width:275.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:425px;top:510px;width:70.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-values\\\" data-to=\\\"O-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:525px;top:627px;width:55.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:580px;top:627px;width:142.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:580px;top:485px;width:170.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:750px;top:485px;width:35.00px;transform:rotate(-90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-gae\\\" data-to=\\\"O-policy\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:855px;top:385px;width:55.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:910px;top:385px;width:50.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:910px;top:335px;width:60.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-gae\\\" data-to=\\\"O-valueupdate\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:855px;top:415px;width:50.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:905px;top:415px;width:185.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:905px;top:600px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-policy\\\" data-to=\\\"O-actor\\\" data-relation=\\\"cycle\\\"><div class=\\\"edge cycle \\\" style=\\\"left:1165px;top:335px;width:20.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:1185px;top:335px;width:315.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:1185px;top:20px;width:1167.00px;transform:rotate(180.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:18px;top:20px;width:127.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge cycle arrow\\\" style=\\\"left:18px;top:147px;width:22.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-valueupdate\\\" data-to=\\\"O-critic\\\" data-relation=\\\"cycle\\\"><div class=\\\"edge cycle \\\" style=\\\"left:1067px;top:650px;width:85.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:1067px;top:735px;width:917.00px;transform:rotate(180.00deg)\\\"></div><div class=\\\"edge cycle arrow\\\" style=\\\"left:150px;top:735px;width:60.00px;transform:rotate(-90.00deg)\\\"></div></div><section class=\\\"node \\\" id=\\\"O-actor\\\" data-map-node data-map-label=\\\"Actor\\\" style=\\\"left:40px;top:100px;width:185px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor</h3><div class=\\\"sub\\\">Policy θ</div></section><section class=\\\"node \\\" id=\\\"O-success\\\" data-map-node data-map-label=\\\"Successes\\\" style=\\\"left:275px;top:100px;width:180px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Successes</h3><div class=\\\"sub\\\">Verified</div></section><section class=\\\"node \\\" id=\\\"O-rewrite\\\" data-map-node data-map-label=\\\"Rewrite &amp; verify\\\" style=\\\"left:510px;top:100px;width:220px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Rewrite &amp; verify</h3><div class=\\\"sub\\\">Fresh execution</div></section><section class=\\\"node soft\\\" id=\\\"O-sft\\\" data-map-node data-map-label=\\\"SFT\\\" style=\\\"left:790px;top:100px;width:200px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">SFT</h3><div class=\\\"sub\\\">Actor only</div></section><section class=\\\"node \\\" id=\\\"O-rollout\\\" data-map-node data-map-label=\\\"Rollouts\\\" style=\\\"left:40px;top:350px;width:220px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Rollouts</h3><div class=\\\"sub\\\">Actor ↔ terminal</div></section><section class=\\\"node \\\" id=\\\"O-reward\\\" data-map-node data-map-label=\\\"Verification\\\" style=\\\"left:325px;top:350px;width:200px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Verification</h3><div class=\\\"sub\\\">FDR / SPR → R</div></section><section class=\\\"node \\\" id=\\\"O-gae\\\" data-map-node data-map-label=\\\"GAE / TB-GAE\\\" style=\\\"left:650px;top:350px;width:205px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">GAE / TB-GAE</h3><div class=\\\"sub\\\">From R and V</div></section><section class=\\\"node soft\\\" id=\\\"O-policy\\\" data-map-node data-map-label=\\\"Actor update\\\" style=\\\"left:970px;top:285px;width:195px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor update</h3><div class=\\\"sub\\\">PPO with A</div></section><section class=\\\"node \\\" id=\\\"O-critic\\\" data-map-node data-map-label=\\\"Critic\\\" style=\\\"left:40px;top:580px;width:220px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Critic</h3><div class=\\\"sub\\\">Retained weights</div></section><section class=\\\"node \\\" id=\\\"O-values\\\" data-map-node data-map-label=\\\"Values V\\\" style=\\\"left:325px;top:580px;width:200px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Values V</h3><div class=\\\"sub\\\">At each prefix</div></section><section class=\\\"node soft\\\" id=\\\"O-valueupdate\\\" data-map-node data-map-label=\\\"Critic update\\\" style=\\\"left:970px;top:550px;width:195px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Critic update</h3><div class=\\\"sub\\\">Regress to Ĝ</div></section><div class=\\\"phase\\\" style=\\\"left:40px;top:55px;width:950px\\\">A · RSR: successful experience → new demonstrations</div><div class=\\\"phase\\\" style=\\\"left:40px;top:275px;width:750px\\\">B · RPR: execution outcomes → parameter updates</div><div class=\\\"edge-label\\\" style=\\\"left:390px;top:214px;width:360px\\\">Actor after supervised tuning</div><div class=\\\"edge-label\\\" style=\\\"left:533px;top:365px;width:105px\\\">Reward R</div><div class=\\\"edge-label\\\" style=\\\"left:195px;top:485px;width:300px\\\">Generated prefixes in each trajectory</div><div class=\\\"edge-label\\\" style=\\\"left:564px;top:540px;width:66px\\\">V</div><div class=\\\"edge-label\\\" style=\\\"left:867px;top:320px;width:92px\\\">A</div><div class=\\\"edge-label\\\" style=\\\"left:862px;top:510px;width:77px\\\">Ĝ</div><div class=\\\"edge-label\\\" style=\\\"left:360px;top:7px;width:430px\\\">Retain Actor for the next RSR round</div><div class=\\\"edge-label\\\" style=\\\"left:380px;top:718px;width:445px\\\">Retain Critic for the next RPR phase</div><div class=\\\"note\\\" style=\\\"left:600px;top:670px;width:565px\\\">Each RPR phase: 4 Critic-only updates, then joint training</div></div>\"\n        },\n        \"ja\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;overflow:hidden;background:#fff;color:#202020;font:24px/1.45 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;text-align:left}\\n.canvas .node{position:absolute;z-index:3;border:1.35px solid #464b43;border-radius:8px;padding:14px 16px;background:#fff;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.canvas .node .action{font-size:25px;line-height:1.32;font-weight:400;margin:0}\\n.canvas .node .sub{font-size:20px;line-height:1.45;color:#65695f;margin-top:8px}\\n.canvas .node.soft{background:#f4f7ef;border-color:#7f9664}\\n.canvas .node.data{border-style:dashed}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.6px solid #41483e;transform-origin:left center;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #41483e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.canvas .edge.preserve{border-top-style:dashed;border-top-color:#7f8578}\\n.canvas .edge.preserve.arrow:after{border-left-color:#7f8578}\\n.canvas .edge.cycle{border-top-color:#7f9664}\\n.canvas .edge.cycle.arrow:after{border-left-color:#7f9664}\\n.canvas .edge-label{position:absolute;z-index:2;padding:2px 6px;background:#fff;color:#61665b;font-size:20px;line-height:1.4;text-align:center}\\n.canvas .phase{position:absolute;font-size:27px;line-height:1.4;color:#30372c;font-weight:400}\\n.canvas .phase-rule{position:absolute;border-top:1px solid #dce1d6}\\n.canvas .note{position:absolute;font-size:20px;line-height:1.5;color:#65695f}\\n.canvas .boundary{position:absolute;border:1px solid #dde2d7;border-radius:9px;z-index:0}\\n\\n.canvas{height:770px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"O-actor\\\" data-to=\\\"O-success\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:225px;top:147px;width:50.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-success\\\" data-to=\\\"O-rewrite\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:455px;top:147px;width:55.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-rewrite\\\" data-to=\\\"O-sft\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:730px;top:147px;width:60.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-sft\\\" data-to=\\\"O-rollout\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:890px;top:195px;width:40.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:890px;top:235px;width:872.00px;transform:rotate(180.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:18px;top:235px;width:165.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:18px;top:400px;width:22.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-rollout\\\" data-to=\\\"O-reward\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:260px;top:400px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-reward\\\" data-to=\\\"O-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:525px;top:400px;width:125.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-critic\\\" data-to=\\\"O-values\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:260px;top:627px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-rollout\\\" data-to=\\\"O-values\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:150px;top:450px;width:60.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:150px;top:510px;width:275.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:425px;top:510px;width:70.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-values\\\" data-to=\\\"O-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:525px;top:627px;width:55.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:580px;top:627px;width:142.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:580px;top:485px;width:170.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:750px;top:485px;width:35.00px;transform:rotate(-90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-gae\\\" data-to=\\\"O-policy\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:855px;top:385px;width:55.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:910px;top:385px;width:50.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:910px;top:335px;width:60.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-gae\\\" data-to=\\\"O-valueupdate\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:855px;top:415px;width:50.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:905px;top:415px;width:185.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:905px;top:600px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-policy\\\" data-to=\\\"O-actor\\\" data-relation=\\\"cycle\\\"><div class=\\\"edge cycle \\\" style=\\\"left:1165px;top:335px;width:20.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:1185px;top:335px;width:315.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:1185px;top:20px;width:1167.00px;transform:rotate(180.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:18px;top:20px;width:127.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge cycle arrow\\\" style=\\\"left:18px;top:147px;width:22.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"O-valueupdate\\\" data-to=\\\"O-critic\\\" data-relation=\\\"cycle\\\"><div class=\\\"edge cycle \\\" style=\\\"left:1067px;top:650px;width:85.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge cycle \\\" style=\\\"left:1067px;top:735px;width:917.00px;transform:rotate(180.00deg)\\\"></div><div class=\\\"edge cycle arrow\\\" style=\\\"left:150px;top:735px;width:60.00px;transform:rotate(-90.00deg)\\\"></div></div><section class=\\\"node \\\" id=\\\"O-actor\\\" data-map-node data-map-label=\\\"Actor\\\" style=\\\"left:40px;top:100px;width:185px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor</h3><div class=\\\"sub\\\">方策 θ</div></section><section class=\\\"node \\\" id=\\\"O-success\\\" data-map-node data-map-label=\\\"成功軌跡\\\" style=\\\"left:275px;top:100px;width:180px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">成功軌跡</h3><div class=\\\"sub\\\">検証済み</div></section><section class=\\\"node \\\" id=\\\"O-rewrite\\\" data-map-node data-map-label=\\\"再構成・再検証\\\" style=\\\"left:510px;top:100px;width:220px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">再構成・再検証</h3><div class=\\\"sub\\\">計画 → 再実行</div></section><section class=\\\"node soft\\\" id=\\\"O-sft\\\" data-map-node data-map-label=\\\"SFT\\\" style=\\\"left:790px;top:100px;width:200px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">SFT</h3><div class=\\\"sub\\\">Actor のみ更新</div></section><section class=\\\"node \\\" id=\\\"O-rollout\\\" data-map-node data-map-label=\\\"Actor ↔ 端末\\\" style=\\\"left:40px;top:350px;width:220px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor ↔ 端末</h3><div class=\\\"sub\\\">新軌跡を生成</div></section><section class=\\\"node \\\" id=\\\"O-reward\\\" data-map-node data-map-label=\\\"検証器 → 報酬\\\" style=\\\"left:325px;top:350px;width:200px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">検証器 → 報酬</h3><div class=\\\"sub\\\">FDR / SPR · R</div></section><section class=\\\"node \\\" id=\\\"O-gae\\\" data-map-node data-map-label=\\\"GAE / TB-GAE\\\" style=\\\"left:650px;top:350px;width:205px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">GAE / TB-GAE</h3><div class=\\\"sub\\\">生成位置を遡る</div></section><section class=\\\"node soft\\\" id=\\\"O-policy\\\" data-map-node data-map-label=\\\"Actor 更新\\\" style=\\\"left:970px;top:285px;width:195px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor 更新</h3><div class=\\\"sub\\\">PPO · A</div></section><section class=\\\"node \\\" id=\\\"O-critic\\\" data-map-node data-map-label=\\\"継承した Critic\\\" style=\\\"left:40px;top:580px;width:220px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">継承した Critic</h3><div class=\\\"sub\\\">RSR 前の重み</div></section><section class=\\\"node \\\" id=\\\"O-values\\\" data-map-node data-map-label=\\\"価値予測 V\\\" style=\\\"left:325px;top:580px;width:200px;height:95px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">価値予測 V</h3><div class=\\\"sub\\\">各生成前の履歴</div></section><section class=\\\"node soft\\\" id=\\\"O-valueupdate\\\" data-map-node data-map-label=\\\"Critic 更新\\\" style=\\\"left:970px;top:550px;width:195px;height:100px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Critic 更新</h3><div class=\\\"sub\\\">目標 Ĝ に回帰</div></section><div class=\\\"phase\\\" style=\\\"left:40px;top:55px;width:950px\\\">A · RSR：成功経験 → 新しい手本</div><div class=\\\"phase\\\" style=\\\"left:40px;top:275px;width:750px\\\">B · RPR：実行結果 → パラメータ更新</div><div class=\\\"edge-label\\\" style=\\\"left:390px;top:214px;width:360px\\\">教師あり調整後の Actor</div><div class=\\\"edge-label\\\" style=\\\"left:533px;top:365px;width:105px\\\">報酬 R</div><div class=\\\"edge-label\\\" style=\\\"left:195px;top:485px;width:300px\\\">軌跡の各生成前の履歴</div><div class=\\\"edge-label\\\" style=\\\"left:564px;top:540px;width:66px\\\">V</div><div class=\\\"edge-label\\\" style=\\\"left:867px;top:320px;width:92px\\\">A</div><div class=\\\"edge-label\\\" style=\\\"left:862px;top:510px;width:77px\\\">Ĝ</div><div class=\\\"edge-label\\\" style=\\\"left:360px;top:7px;width:430px\\\">Actor を継承し、次の RSR へ</div><div class=\\\"edge-label\\\" style=\\\"left:380px;top:718px;width:445px\\\">Critic を継承し、次の RPR へ</div><div class=\\\"note\\\" style=\\\"left:600px;top:670px;width:565px\\\">各 RPR 段階：Critic のみ 4 回更新後、共同学習</div></div>\"\n        }\n      }\n    },\n    \"rsr\": {\n      \"title\": \"RSR：重写、验收与监督微调\",\n      \"kind\": \"flow\",\n      \"width\": 1200,\n      \"height\": 610,\n      \"links\": {\n        \"S-source\": \"rewrite\",\n        \"S-rerun\": \"rewrite\"\n      },\n      \"related\": [\n        \"overview\",\n        \"rewrite\"\n      ],\n      \"localized\": {\n        \"zh\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;overflow:hidden;background:#fff;color:#202020;font:24px/1.45 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;text-align:left}\\n.canvas .node{position:absolute;z-index:3;border:1.35px solid #464b43;border-radius:8px;padding:14px 16px;background:#fff;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.canvas .node .action{font-size:25px;line-height:1.32;font-weight:400;margin:0}\\n.canvas .node .sub{font-size:20px;line-height:1.45;color:#65695f;margin-top:8px}\\n.canvas .node.soft{background:#f4f7ef;border-color:#7f9664}\\n.canvas .node.data{border-style:dashed}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.6px solid #41483e;transform-origin:left center;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #41483e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.canvas .edge.preserve{border-top-style:dashed;border-top-color:#7f8578}\\n.canvas .edge.preserve.arrow:after{border-left-color:#7f8578}\\n.canvas .edge.cycle{border-top-color:#7f9664}\\n.canvas .edge.cycle.arrow:after{border-left-color:#7f9664}\\n.canvas .edge-label{position:absolute;z-index:2;padding:2px 6px;background:#fff;color:#61665b;font-size:20px;line-height:1.4;text-align:center}\\n.canvas .phase{position:absolute;font-size:27px;line-height:1.4;color:#30372c;font-weight:400}\\n.canvas .phase-rule{position:absolute;border-top:1px solid #dce1d6}\\n.canvas .note{position:absolute;font-size:20px;line-height:1.5;color:#65695f}\\n.canvas .boundary{position:absolute;border:1px solid #dde2d7;border-radius:9px;z-index:0}\\n\\n.canvas{height:610px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"S-source\\\" data-to=\\\"S-plan\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:235px;top:185px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-plan\\\" data-to=\\\"S-rerun\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:520px;top:185px;width:70.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-rerun\\\" data-to=\\\"S-verify\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:830px;top:185px;width:70.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-verify\\\" data-to=\\\"S-clean\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:1025px;top:240px;width:150.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-clean\\\" data-to=\\\"S-data\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:900px;top:445px;width:70.00px;transform:rotate(180.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-data\\\" data-to=\\\"S-sft\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:590px;top:445px;width:70.00px;transform:rotate(180.00deg)\\\"></div></div><section class=\\\"node \\\" id=\\\"S-source\\\" data-map-node data-map-label=\\\"成功轨迹\\\" style=\\\"left:40px;top:130px;width:195px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">成功轨迹</h3><div class=\\\"sub\\\">源环境中的真实执行</div></section><section class=\\\"node \\\" id=\\\"S-plan\\\" data-map-node data-map-label=\\\"整理并审查计划\\\" style=\\\"left:300px;top:130px;width:220px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">整理并审查计划</h3><div class=\\\"sub\\\">公开任务 + 执行经验</div></section><section class=\\\"node \\\" id=\\\"S-rerun\\\" data-map-node data-map-label=\\\"重新执行\\\" style=\\\"left:590px;top:130px;width:240px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">重新执行</h3><div class=\\\"sub\\\">目标环境 · 真实工具返回</div></section><section class=\\\"node \\\" id=\\\"S-verify\\\" data-map-node data-map-label=\\\"验收与泄漏检查\\\" style=\\\"left:900px;top:130px;width:250px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">验收与泄漏检查</h3><div class=\\\"sub\\\">逐条检查新轨迹</div></section><section class=\\\"node \\\" id=\\\"S-clean\\\" data-map-node data-map-label=\\\"整理训练样本\\\" style=\\\"left:900px;top:390px;width:250px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">整理训练样本</h3><div class=\\\"sub\\\">移除私有计划与审查对话</div></section><section class=\\\"node data\\\" id=\\\"S-data\\\" data-map-node data-map-label=\\\"公开任务 + 交互\\\" style=\\\"left:590px;top:390px;width:240px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">公开任务 + 交互</h3><div class=\\\"sub\\\">监督目标：生成动作</div></section><section class=\\\"node soft\\\" id=\\\"S-sft\\\" data-map-node data-map-label=\\\"SFT → 新 Actor\\\" style=\\\"left:300px;top:390px;width:220px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">SFT → 新 Actor</h3><div class=\\\"sub\\\">提高示范动作概率</div></section><div class=\\\"phase\\\" style=\\\"left:40px;top:40px;width:1100px\\\">A · RSR：从一次成功执行，得到可学习的示范</div><div class=\\\"edge-label\\\" style=\\\"left:940px;top:300px;width:175px\\\">通过</div><div class=\\\"note\\\" style=\\\"left:300px;top:540px;width:840px\\\">工具返回进入上下文；训练损失落在模型生成的位置。</div></div>\"\n        },\n        \"en\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;overflow:hidden;background:#fff;color:#202020;font:24px/1.45 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;text-align:left}\\n.canvas .node{position:absolute;z-index:3;border:1.35px solid #464b43;border-radius:8px;padding:14px 16px;background:#fff;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.canvas .node .action{font-size:25px;line-height:1.32;font-weight:400;margin:0}\\n.canvas .node .sub{font-size:20px;line-height:1.45;color:#65695f;margin-top:8px}\\n.canvas .node.soft{background:#f4f7ef;border-color:#7f9664}\\n.canvas .node.data{border-style:dashed}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.6px solid #41483e;transform-origin:left center;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #41483e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.canvas .edge.preserve{border-top-style:dashed;border-top-color:#7f8578}\\n.canvas .edge.preserve.arrow:after{border-left-color:#7f8578}\\n.canvas .edge.cycle{border-top-color:#7f9664}\\n.canvas .edge.cycle.arrow:after{border-left-color:#7f9664}\\n.canvas .edge-label{position:absolute;z-index:2;padding:2px 6px;background:#fff;color:#61665b;font-size:20px;line-height:1.4;text-align:center}\\n.canvas .phase{position:absolute;font-size:27px;line-height:1.4;color:#30372c;font-weight:400}\\n.canvas .phase-rule{position:absolute;border-top:1px solid #dce1d6}\\n.canvas .note{position:absolute;font-size:20px;line-height:1.5;color:#65695f}\\n.canvas .boundary{position:absolute;border:1px solid #dde2d7;border-radius:9px;z-index:0}\\n\\n.canvas{height:610px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"S-source\\\" data-to=\\\"S-plan\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:235px;top:185px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-plan\\\" data-to=\\\"S-rerun\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:520px;top:185px;width:70.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-rerun\\\" data-to=\\\"S-verify\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:830px;top:185px;width:70.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-verify\\\" data-to=\\\"S-clean\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:1025px;top:240px;width:150.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-clean\\\" data-to=\\\"S-data\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:900px;top:445px;width:70.00px;transform:rotate(180.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-data\\\" data-to=\\\"S-sft\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:590px;top:445px;width:70.00px;transform:rotate(180.00deg)\\\"></div></div><section class=\\\"node \\\" id=\\\"S-source\\\" data-map-node data-map-label=\\\"Success\\\" style=\\\"left:40px;top:130px;width:195px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Success</h3><div class=\\\"sub\\\">Recorded run</div></section><section class=\\\"node \\\" id=\\\"S-plan\\\" data-map-node data-map-label=\\\"Plan &amp; review\\\" style=\\\"left:300px;top:130px;width:220px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Plan &amp; review</h3><div class=\\\"sub\\\">Public task + experience</div></section><section class=\\\"node \\\" id=\\\"S-rerun\\\" data-map-node data-map-label=\\\"Execute again\\\" style=\\\"left:590px;top:130px;width:240px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Execute again</h3><div class=\\\"sub\\\">Target harness · real tools</div></section><section class=\\\"node \\\" id=\\\"S-verify\\\" data-map-node data-map-label=\\\"Verify &amp; screen\\\" style=\\\"left:900px;top:130px;width:250px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Verify &amp; screen</h3><div class=\\\"sub\\\">Each fresh run</div></section><section class=\\\"node \\\" id=\\\"S-clean\\\" data-map-node data-map-label=\\\"Prepare samples\\\" style=\\\"left:900px;top:390px;width:250px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Prepare samples</h3><div class=\\\"sub\\\">Strip private guidance</div></section><section class=\\\"node data\\\" id=\\\"S-data\\\" data-map-node data-map-label=\\\"Task + interaction\\\" style=\\\"left:590px;top:390px;width:240px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Task + interaction</h3><div class=\\\"sub\\\">Targets: actions</div></section><section class=\\\"node soft\\\" id=\\\"S-sft\\\" data-map-node data-map-label=\\\"SFT → Actor\\\" style=\\\"left:300px;top:390px;width:220px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">SFT → Actor</h3><div class=\\\"sub\\\">Learn actions</div></section><div class=\\\"phase\\\" style=\\\"left:40px;top:40px;width:1100px\\\">A · RSR: from one successful execution to a training example</div><div class=\\\"edge-label\\\" style=\\\"left:940px;top:300px;width:175px\\\">Accepted</div><div class=\\\"note\\\" style=\\\"left:300px;top:540px;width:840px\\\">Tool outputs remain context; training loss applies to model-generated positions.</div></div>\"\n        },\n        \"ja\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;overflow:hidden;background:#fff;color:#202020;font:24px/1.45 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;text-align:left}\\n.canvas .node{position:absolute;z-index:3;border:1.35px solid #464b43;border-radius:8px;padding:14px 16px;background:#fff;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.canvas .node .action{font-size:25px;line-height:1.32;font-weight:400;margin:0}\\n.canvas .node .sub{font-size:20px;line-height:1.45;color:#65695f;margin-top:8px}\\n.canvas .node.soft{background:#f4f7ef;border-color:#7f9664}\\n.canvas .node.data{border-style:dashed}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.6px solid #41483e;transform-origin:left center;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #41483e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.canvas .edge.preserve{border-top-style:dashed;border-top-color:#7f8578}\\n.canvas .edge.preserve.arrow:after{border-left-color:#7f8578}\\n.canvas .edge.cycle{border-top-color:#7f9664}\\n.canvas .edge.cycle.arrow:after{border-left-color:#7f9664}\\n.canvas .edge-label{position:absolute;z-index:2;padding:2px 6px;background:#fff;color:#61665b;font-size:20px;line-height:1.4;text-align:center}\\n.canvas .phase{position:absolute;font-size:27px;line-height:1.4;color:#30372c;font-weight:400}\\n.canvas .phase-rule{position:absolute;border-top:1px solid #dce1d6}\\n.canvas .note{position:absolute;font-size:20px;line-height:1.5;color:#65695f}\\n.canvas .boundary{position:absolute;border:1px solid #dde2d7;border-radius:9px;z-index:0}\\n\\n.canvas{height:610px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"S-source\\\" data-to=\\\"S-plan\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:235px;top:185px;width:65.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-plan\\\" data-to=\\\"S-rerun\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:520px;top:185px;width:70.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-rerun\\\" data-to=\\\"S-verify\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:830px;top:185px;width:70.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-verify\\\" data-to=\\\"S-clean\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:1025px;top:240px;width:150.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-clean\\\" data-to=\\\"S-data\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:900px;top:445px;width:70.00px;transform:rotate(180.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"S-data\\\" data-to=\\\"S-sft\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:590px;top:445px;width:70.00px;transform:rotate(180.00deg)\\\"></div></div><section class=\\\"node \\\" id=\\\"S-source\\\" data-map-node data-map-label=\\\"成功軌跡\\\" style=\\\"left:40px;top:130px;width:195px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">成功軌跡</h3><div class=\\\"sub\\\">元環境での実行記録</div></section><section class=\\\"node \\\" id=\\\"S-plan\\\" data-map-node data-map-label=\\\"計画・レビュー\\\" style=\\\"left:300px;top:130px;width:220px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">計画・レビュー</h3><div class=\\\"sub\\\">公開課題 + 実行経験</div></section><section class=\\\"node \\\" id=\\\"S-rerun\\\" data-map-node data-map-label=\\\"再実行\\\" style=\\\"left:590px;top:130px;width:240px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">再実行</h3><div class=\\\"sub\\\">対象環境・実際のツール応答</div></section><section class=\\\"node \\\" id=\\\"S-verify\\\" data-map-node data-map-label=\\\"検証・漏洩検査\\\" style=\\\"left:900px;top:130px;width:250px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">検証・漏洩検査</h3><div class=\\\"sub\\\">新しい軌跡を個別検査</div></section><section class=\\\"node \\\" id=\\\"S-clean\\\" data-map-node data-map-label=\\\"学習サンプルを作成\\\" style=\\\"left:900px;top:390px;width:250px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">学習サンプルを作成</h3><div class=\\\"sub\\\">非公開の指示を除去</div></section><section class=\\\"node data\\\" id=\\\"S-data\\\" data-map-node data-map-label=\\\"学習サンプル\\\" style=\\\"left:590px;top:390px;width:240px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">学習サンプル</h3><div class=\\\"sub\\\">教師信号：生成行動</div></section><section class=\\\"node soft\\\" id=\\\"S-sft\\\" data-map-node data-map-label=\\\"SFT → 新 Actor\\\" style=\\\"left:300px;top:390px;width:220px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">SFT → 新 Actor</h3><div class=\\\"sub\\\">手本の行動を学習</div></section><div class=\\\"phase\\\" style=\\\"left:40px;top:40px;width:1100px\\\">A · RSR：成功した実行から学習用の手本へ</div><div class=\\\"edge-label\\\" style=\\\"left:940px;top:300px;width:175px\\\">合格</div><div class=\\\"note\\\" style=\\\"left:300px;top:540px;width:840px\\\">ツール応答は入力に残し、モデル生成位置を学習対象にする。</div></div>\"\n        }\n      }\n    },\n    \"rewrite\": {\n      \"title\": \"RSR：同一计划，两次重新执行\",\n      \"kind\": \"flow\",\n      \"width\": 1200,\n      \"height\": 1280,\n      \"links\": {},\n      \"related\": [\n        \"rsr\",\n        \"overview\"\n      ],\n      \"localized\": {\n        \"zh\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;height:1280px;background:white;color:#202020;font:24px/1.42 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;overflow:hidden}\\n.canvas .figure-title{position:absolute;left:48px;top:26px;font-size:29px;font-weight:400;line-height:1.4}\\n.canvas .figure-intro{position:absolute;left:48px;top:72px;color:#62625e;font-size:22px;line-height:1.5}\\n.canvas .node{position:absolute;z-index:2;border:1.4px solid #3d403a;border-radius:12px;background:#fff;padding:17px 22px;display:flex;flex-direction:column;justify-content:center;gap:5px;font-size:24px;line-height:1.4;text-align:left;box-shadow:none}\\n.canvas .node .label{font-size:20px;color:#62625e;line-height:1.3}\\n.canvas .node .name{font-size:27px;font-weight:400;line-height:1.32}\\n.canvas .node .sub{font-size:23px;line-height:1.42;color:#62625e}\\n.canvas .node .mono{font-size:21px;font-family:ui-monospace,Consolas,monospace;letter-spacing:-.025em;color:#30332e}\\n.canvas .node.soft,.canvas .node.result{background-color:#f5faef;border-color:#699c35;background-image:radial-gradient(#70a33d38 .5px,transparent .65px);background-size:5px 5px}\\n.canvas .node.failed{background:#fcf5e9;border-color:#a07040}\\n.canvas .node.runbook{padding:21px 27px;gap:13px}\\n.canvas .runbook .plan{display:flex;justify-content:space-between;align-items:center;font-size:25px;line-height:1.5}\\n.canvas .runbook .sep{color:#62625e;font-size:21px}\\n.canvas .node[data-node-detail],.canvas [data-node-detail]{display:none}\\n.canvas .connection{position:static;z-index:1}\\n.canvas .edge{position:absolute;height:0;border-top:1.8px solid #30332e;transform-origin:0 0;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5.4px;border-left:9px solid #30332e;border-top:4.5px solid transparent;border-bottom:4.5px solid transparent}\\n.canvas .edge.feedback{border-top-color:#699c35}\\n.canvas .edge.feedback.arrow:after{border-left-color:#699c35}\\n.canvas .edge.failure{border-top-color:#a07040}\\n.canvas .edge.failure.arrow:after{border-left-color:#a07040}\\n.canvas .branch-title{position:absolute;top:568px;font-size:25px;line-height:1.4}\\n.canvas .edge-label{position:absolute;z-index:3;background:#fff;padding:2px 8px;color:#62625e;font-size:21px;line-height:1.4}\\n.canvas .footer{position:absolute;left:48px;top:1170px;width:1104px;border-top:1px solid #e4e8e0;padding-top:21px;color:#62625e;font-size:22px;line-height:1.6}\\n.canvas .footer strong{color:#30332e;font-weight:400}\\n\",\n          \"html\": \"<main class=\\\"canvas\\\" data-fixed-type>\\n<div class=\\\"figure-title\\\">同一份计划，重新执行仍会走向不同结果</div>\\n<div class=\\\"figure-intro\\\">Markdown 行内语法解析 · RSR 前置论文中的真实重写案例</div>\\n<div class=\\\"connection\\\" data-from=\\\"source-generate\\\" data-to=\\\"source-prebuilt\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:374px;top:206px;width:64px;transform:rotate(0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"source-prebuilt\\\" data-to=\\\"source-pass\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:764px;top:206px;width:64px;transform:rotate(0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"source-pass\\\" data-to=\\\"shared-plan\\\" data-relation=\\\"extract\\\"><div class=\\\"edge \\\" style=\\\"left:990px;top:284px;width:36px;transform:rotate(90deg)\\\"></div><div class=\\\"edge \\\" style=\\\"left:990px;top:320px;width:390px;transform:rotate(180deg)\\\"></div><div class=\\\"edge  arrow\\\" style=\\\"left:600px;top:320px;width:42px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"shared-plan\\\" data-to=\\\"a-parser\\\" data-relation=\\\"independent-reexecution\\\"><div class=\\\"edge \\\" style=\\\"left:600px;top:504px;width:38px;transform:rotate(90deg)\\\"></div><div class=\\\"edge \\\" style=\\\"left:600px;top:542px;width:292px;transform:rotate(180deg)\\\"></div><div class=\\\"edge  arrow\\\" style=\\\"left:308px;top:542px;width:80px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"shared-plan\\\" data-to=\\\"b-inspect\\\" data-relation=\\\"independent-reexecution\\\"><div class=\\\"edge \\\" style=\\\"left:600px;top:504px;width:38px;transform:rotate(90deg)\\\"></div><div class=\\\"edge \\\" style=\\\"left:600px;top:542px;width:292px;transform:rotate(0deg)\\\"></div><div class=\\\"edge  arrow\\\" style=\\\"left:892px;top:542px;width:80px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"a-parser\\\" data-to=\\\"a-feedback\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:308px;top:764px;width:62px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"b-inspect\\\" data-to=\\\"b-feedback\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:892px;top:764px;width:62px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"a-feedback\\\" data-to=\\\"a-pass\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge feedback arrow\\\" style=\\\"left:308px;top:968px;width:62px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"b-feedback\\\" data-to=\\\"b-fail\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge failure arrow\\\" style=\\\"left:892px;top:968px;width:62px;transform:rotate(90deg)\\\"></div></div><div id=\\\"source-generate\\\" class=\\\"node \\\" style=\\\"left:48px;top:128px;width:326px;height:156px\\\"><div class=\\\"label\\\">源执行 · 第 26 轮</div><div class=\\\"name\\\">尝试生成解析器</div><div class=\\\"sub\\\">先准备文本解析工具</div><span hidden data-node-detail>源成功轨迹在第26轮尝试 tree-sitter generate。tree-sitter 是生成和使用语法解析器的一套工具；解析器将 Markdown 文本转为可供程序处理的结构。图中展示论文选摘的关键事件。</span></div><div id=\\\"source-prebuilt\\\" class=\\\"node \\\" style=\\\"left:438px;top:128px;width:326px;height:156px\\\"><div class=\\\"label\\\">源执行 · 第 51 轮</div><div class=\\\"name\\\">用预编译解析器</div><div class=\\\"sub\\\">直接加载已编译的组件</div><span hidden data-node-detail>预编译解析器是已经编译好的解析组件，在兼容环境下可直接加载。源轨迹在第51轮使用它。论文命令缩略为 tree-sitter parse -l ...node --lang-name markdown /tmp/test.md。</span></div><div id=\\\"source-pass\\\" class=\\\"node result\\\" style=\\\"left:828px;top:128px;width:324px;height:156px\\\"><div class=\\\"label\\\">源执行 · 最终验证</div><div class=\\\"name\\\">64 轮，通过</div><div class=\\\"sub\\\">成功经验成为计划来源</div><span hidden data-node-detail>这条源执行共 64 轮，最终验证通过。它的成功经验被提炼为执行计划，指导模型在新环境中重新完成任务。</span></div><div id=\\\"shared-plan\\\" class=\\\"node runbook\\\" style=\\\"left:180px;top:362px;width:840px;height:142px\\\"><div class=\\\"label\\\">从成功经验提炼的同一份执行计划</div><div class=\\\"plan\\\"><span>兼容的解析器</span><span class=\\\"sep\\\">→</span><span>对齐输出摘要</span><span class=\\\"sep\\\">→</span><span>表格处理参数</span></div><span hidden data-node-detail>执行计划也叫runbook，记录关键做法、检查和恢复步骤。此计划来自成功源执行的经验，概括为找到兼容解析器、对齐输出摘要、检查表格处理参数。下面A和B在各自新环境中独立执行。</span></div><div id=\\\"a-parser\\\" class=\\\"node \\\" style=\\\"left:48px;top:622px;width:520px;height:142px\\\"><div class=\\\"label\\\">新执行 A · 第 9 轮</div><div class=\\\"name\\\">使用预编译解析器</div><div class=\\\"sub\\\">较早进入可用解析路径</div><span hidden data-node-detail>新执行 A 在第9轮使用预编译解析器。它与右侧 B 共享计划，各自在独立新环境中运行。源轨迹的第51轮摘录也记录了这一操作。</span></div><div id=\\\"b-inspect\\\" class=\\\"node failed\\\" style=\\\"left:632px;top:622px;width:520px;height:142px\\\"><div class=\\\"label\\\">新执行 B · 第 26 轮</div><div class=\\\"name\\\">检查解析产物</div><div class=\\\"sub\\\">终端返回：文件检查工具不存在</div><span hidden data-node-detail>新执行 B 尝试 xxd .../parse.txt | head -20，终端返回 bash: xxd: command not found。xxd 是查看或转换文件十六进制内容的命令行工具，此处记录一次工具调用失败。</span></div><div id=\\\"a-feedback\\\" class=\\\"node \\\" style=\\\"left:48px;top:826px;width:520px;height:142px\\\"><div class=\\\"label\\\">新执行 A · 第 21 轮</div><div class=\\\"name\\\">检查重建结果</div><div class=\\\"sub\\\">运行结果检查脚本</div><span hidden data-node-detail>第21轮使用 python3 /app/tools/feedback 检查重建结果；feedback 是这里的结果检查脚本。</span></div><div id=\\\"b-feedback\\\" class=\\\"node \\\" style=\\\"left:632px;top:826px;width:520px;height:142px\\\"><div class=\\\"label\\\">新执行 B · 第 36 轮</div><div class=\\\"name\\\">修改后再次检查</div><div class=\\\"sub\\\">再次运行结果检查脚本</div><span hidden data-node-detail>新执行 B 在修改之后，于第36轮再次运行结果检查脚本 feedback。此处与第26轮分别展示论文选摘的两个执行事件。</span></div><div id=\\\"a-pass\\\" class=\\\"node result\\\" style=\\\"left:48px;top:1030px;width:520px;height:104px\\\"><div class=\\\"label\\\">新执行 A · 最终验证</div><div class=\\\"name\\\">32 轮，通过</div><span hidden data-node-detail>新执行 A 共 32 轮，最终验证通过。成功轨迹继续接受质量与泄漏筛查，合格后成为训练示范。</span></div><div id=\\\"b-fail\\\" class=\\\"node failed\\\" style=\\\"left:632px;top:1030px;width:520px;height:104px\\\"><div class=\\\"label\\\">新执行 B · 最终验证</div><div class=\\\"name\\\">38 轮，失败</div><span hidden data-node-detail>新执行 B 共 38 轮，最终验证失败。这次重做在最终验收环节被筛除；图中选摘展示其工具检查和结果检查过程。</span></div>\\n<div class=\\\"edge-label\\\" style=\\\"left:706px;top:297px\\\">提炼成功经验</div>\\n<div class=\\\"branch-title\\\" style=\\\"left:48px\\\">A · 独立新环境</div>\\n<div class=\\\"branch-title\\\" style=\\\"left:632px\\\">B · 独立新环境</div>\\n<div class=\\\"footer\\\">全部 <strong>12 次重写中，7 次通过</strong>；成功重写的中位数为 <strong>32 轮</strong>。<br>图中两支为独立采样；通过后仍需质量过滤，再决定是否作为训练示范。</div>\\n</main>\"\n        },\n        \"en\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;height:1280px;background:white;color:#202020;font:24px/1.42 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;overflow:hidden}\\n.canvas .figure-title{position:absolute;left:48px;top:26px;font-size:29px;font-weight:400;line-height:1.4}\\n.canvas .figure-intro{position:absolute;left:48px;top:72px;color:#62625e;font-size:22px;line-height:1.5}\\n.canvas .node{position:absolute;z-index:2;border:1.4px solid #3d403a;border-radius:12px;background:#fff;padding:17px 22px;display:flex;flex-direction:column;justify-content:center;gap:5px;font-size:24px;line-height:1.4;text-align:left;box-shadow:none}\\n.canvas .node .label{font-size:20px;color:#62625e;line-height:1.3}\\n.canvas .node .name{font-size:27px;font-weight:400;line-height:1.32}\\n.canvas .node .sub{font-size:23px;line-height:1.42;color:#62625e}\\n.canvas .node .mono{font-size:21px;font-family:ui-monospace,Consolas,monospace;letter-spacing:-.025em;color:#30332e}\\n.canvas .node.soft,.canvas .node.result{background-color:#f5faef;border-color:#699c35;background-image:radial-gradient(#70a33d38 .5px,transparent .65px);background-size:5px 5px}\\n.canvas .node.failed{background:#fcf5e9;border-color:#a07040}\\n.canvas .node.runbook{padding:21px 27px;gap:13px}\\n.canvas .runbook .plan{display:flex;justify-content:space-between;align-items:center;font-size:25px;line-height:1.5}\\n.canvas .runbook .sep{color:#62625e;font-size:21px}\\n.canvas .node[data-node-detail],.canvas [data-node-detail]{display:none}\\n.canvas .connection{position:static;z-index:1}\\n.canvas .edge{position:absolute;height:0;border-top:1.8px solid #30332e;transform-origin:0 0;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5.4px;border-left:9px solid #30332e;border-top:4.5px solid transparent;border-bottom:4.5px solid transparent}\\n.canvas .edge.feedback{border-top-color:#699c35}\\n.canvas .edge.feedback.arrow:after{border-left-color:#699c35}\\n.canvas .edge.failure{border-top-color:#a07040}\\n.canvas .edge.failure.arrow:after{border-left-color:#a07040}\\n.canvas .branch-title{position:absolute;top:568px;font-size:25px;line-height:1.4}\\n.canvas .edge-label{position:absolute;z-index:3;background:#fff;padding:2px 8px;color:#62625e;font-size:21px;line-height:1.4}\\n.canvas .footer{position:absolute;left:48px;top:1170px;width:1104px;border-top:1px solid #e4e8e0;padding-top:21px;color:#62625e;font-size:22px;line-height:1.6}\\n.canvas .footer strong{color:#30332e;font-weight:400}\\n\",\n          \"html\": \"<main class=\\\"canvas\\\" data-fixed-type>\\n<div class=\\\"figure-title\\\">One plan; fresh runs can still diverge</div>\\n<div class=\\\"figure-intro\\\">Markdown inline parsing · A recorded rewrite case from the preceding RSR paper</div>\\n<div class=\\\"connection\\\" data-from=\\\"source-generate\\\" data-to=\\\"source-prebuilt\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:374px;top:206px;width:64px;transform:rotate(0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"source-prebuilt\\\" data-to=\\\"source-pass\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:764px;top:206px;width:64px;transform:rotate(0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"source-pass\\\" data-to=\\\"shared-plan\\\" data-relation=\\\"extract\\\"><div class=\\\"edge \\\" style=\\\"left:990px;top:284px;width:36px;transform:rotate(90deg)\\\"></div><div class=\\\"edge \\\" style=\\\"left:990px;top:320px;width:390px;transform:rotate(180deg)\\\"></div><div class=\\\"edge  arrow\\\" style=\\\"left:600px;top:320px;width:42px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"shared-plan\\\" data-to=\\\"a-parser\\\" data-relation=\\\"independent-reexecution\\\"><div class=\\\"edge \\\" style=\\\"left:600px;top:504px;width:38px;transform:rotate(90deg)\\\"></div><div class=\\\"edge \\\" style=\\\"left:600px;top:542px;width:292px;transform:rotate(180deg)\\\"></div><div class=\\\"edge  arrow\\\" style=\\\"left:308px;top:542px;width:80px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"shared-plan\\\" data-to=\\\"b-inspect\\\" data-relation=\\\"independent-reexecution\\\"><div class=\\\"edge \\\" style=\\\"left:600px;top:504px;width:38px;transform:rotate(90deg)\\\"></div><div class=\\\"edge \\\" style=\\\"left:600px;top:542px;width:292px;transform:rotate(0deg)\\\"></div><div class=\\\"edge  arrow\\\" style=\\\"left:892px;top:542px;width:80px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"a-parser\\\" data-to=\\\"a-feedback\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:308px;top:764px;width:62px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"b-inspect\\\" data-to=\\\"b-feedback\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:892px;top:764px;width:62px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"a-feedback\\\" data-to=\\\"a-pass\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge feedback arrow\\\" style=\\\"left:308px;top:968px;width:62px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"b-feedback\\\" data-to=\\\"b-fail\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge failure arrow\\\" style=\\\"left:892px;top:968px;width:62px;transform:rotate(90deg)\\\"></div></div><div id=\\\"source-generate\\\" class=\\\"node \\\" style=\\\"left:48px;top:128px;width:326px;height:156px\\\"><div class=\\\"label\\\">Source · Turn 26</div><div class=\\\"name\\\">Try parser generation</div><div class=\\\"sub\\\">Prepare a text parser</div><span hidden data-node-detail>The successful source trajectory tries tree-sitter generate at turn 26. tree-sitter is a toolkit for generating and using parsers, which turn Markdown text into structures a program can process. The diagram shows key events selected in the paper.</span></div><div id=\\\"source-prebuilt\\\" class=\\\"node \\\" style=\\\"left:438px;top:128px;width:326px;height:156px\\\"><div class=\\\"label\\\">Source · Turn 51</div><div class=\\\"name\\\">Use a prebuilt parser</div><div class=\\\"sub\\\">Load a compiled component</div><span hidden data-node-detail>A prebuilt parser is an already compiled parsing component that can be loaded directly in a compatible environment. The source trajectory uses it at turn 51. The paper abbreviates the command as tree-sitter parse -l ...node --lang-name markdown /tmp/test.md.</span></div><div id=\\\"source-pass\\\" class=\\\"node result\\\" style=\\\"left:828px;top:128px;width:324px;height:156px\\\"><div class=\\\"label\\\">Source · Final check</div><div class=\\\"name\\\">64 turns, passed</div><div class=\\\"sub\\\">Success informs the plan</div><span hidden data-node-detail>The source run takes 64 turns and passes final verification. Its successful experience is distilled into a plan that guides the model through the task again in a fresh environment.</span></div><div id=\\\"shared-plan\\\" class=\\\"node runbook\\\" style=\\\"left:180px;top:362px;width:840px;height:142px\\\"><div class=\\\"label\\\">The same runbook, distilled from success</div><div class=\\\"plan\\\"><span>Compatible parser</span><span class=\\\"sep\\\">→</span><span>Match output summaries</span><span class=\\\"sep\\\">→</span><span>Table-handling options</span></div><span hidden data-node-detail>A runbook records key procedures, checks, and recovery steps. This plan distills the successful source run into finding a compatible parser, matching output summaries, and checking table-handling options. A and B below execute independently in separate fresh environments.</span></div><div id=\\\"a-parser\\\" class=\\\"node \\\" style=\\\"left:48px;top:622px;width:520px;height:142px\\\"><div class=\\\"label\\\">Rerun A · Turn 9</div><div class=\\\"name\\\">Use a prebuilt parser</div><div class=\\\"sub\\\">Reach a working parser early</div><span hidden data-node-detail>Rerun A uses a prebuilt parser at turn 9. It shares the plan with B on the right, but each runs in its own fresh environment. The source excerpt at turn 51 records this operation too.</span></div><div id=\\\"b-inspect\\\" class=\\\"node failed\\\" style=\\\"left:632px;top:622px;width:520px;height:142px\\\"><div class=\\\"label\\\">Rerun B · Turn 26</div><div class=\\\"name\\\">Inspect parse output</div><div class=\\\"sub\\\">Terminal: inspection tool not found</div><span hidden data-node-detail>Rerun B tries xxd .../parse.txt | head -20; the terminal returns bash: xxd: command not found. xxd is a command-line tool for viewing or converting hexadecimal file contents. This event records a failed tool call.</span></div><div id=\\\"a-feedback\\\" class=\\\"node \\\" style=\\\"left:48px;top:826px;width:520px;height:142px\\\"><div class=\\\"label\\\">Rerun A · Turn 21</div><div class=\\\"name\\\">Check rebuilt output</div><div class=\\\"sub\\\">Run the feedback script</div><span hidden data-node-detail>Turn 21 checks the rebuilt output with python3 /app/tools/feedback; feedback is the result-checking script used here.</span></div><div id=\\\"b-feedback\\\" class=\\\"node \\\" style=\\\"left:632px;top:826px;width:520px;height:142px\\\"><div class=\\\"label\\\">Rerun B · Turn 36</div><div class=\\\"name\\\">Recheck after edits</div><div class=\\\"sub\\\">Run feedback again</div><span hidden data-node-detail>After making changes, rerun B runs the feedback result-checking script again at turn 36. This and turn 26 are two execution events selected in the paper.</span></div><div id=\\\"a-pass\\\" class=\\\"node result\\\" style=\\\"left:48px;top:1030px;width:520px;height:104px\\\"><div class=\\\"label\\\">Rerun A · Final check</div><div class=\\\"name\\\">32 turns, passed</div><span hidden data-node-detail>Rerun A takes 32 turns and passes final verification. The successful trajectory then undergoes quality and leakage screening before it can become a training demonstration.</span></div><div id=\\\"b-fail\\\" class=\\\"node failed\\\" style=\\\"left:632px;top:1030px;width:520px;height:104px\\\"><div class=\\\"label\\\">Rerun B · Final check</div><div class=\\\"name\\\">38 turns, failed</div><span hidden data-node-detail>Rerun B takes 38 turns and fails final verification. It is filtered out at the final check; the excerpts show its tool-inspection and result-checking steps.</span></div>\\n<div class=\\\"edge-label\\\" style=\\\"left:706px;top:297px\\\">Distill successful experience</div>\\n<div class=\\\"branch-title\\\" style=\\\"left:48px\\\">A · Separate fresh environment</div>\\n<div class=\\\"branch-title\\\" style=\\\"left:632px\\\">B · Separate fresh environment</div>\\n<div class=\\\"footer\\\">Of <strong>12 rewrites, 7 passed</strong>; median among successes: <strong>32 turns</strong>.<br>Two independent samples. Passing runs still need quality filtering before use as training demos.</div>\\n</main>\"\n        },\n        \"ja\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;height:1280px;background:white;color:#202020;font:24px/1.42 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;overflow:hidden}\\n.canvas .figure-title{position:absolute;left:48px;top:26px;font-size:29px;font-weight:400;line-height:1.4}\\n.canvas .figure-intro{position:absolute;left:48px;top:72px;color:#62625e;font-size:22px;line-height:1.5}\\n.canvas .node{position:absolute;z-index:2;border:1.4px solid #3d403a;border-radius:12px;background:#fff;padding:17px 22px;display:flex;flex-direction:column;justify-content:center;gap:5px;font-size:24px;line-height:1.4;text-align:left;box-shadow:none}\\n.canvas .node .label{font-size:20px;color:#62625e;line-height:1.3}\\n.canvas .node .name{font-size:27px;font-weight:400;line-height:1.32}\\n.canvas .node .sub{font-size:23px;line-height:1.42;color:#62625e}\\n.canvas .node .mono{font-size:21px;font-family:ui-monospace,Consolas,monospace;letter-spacing:-.025em;color:#30332e}\\n.canvas .node.soft,.canvas .node.result{background-color:#f5faef;border-color:#699c35;background-image:radial-gradient(#70a33d38 .5px,transparent .65px);background-size:5px 5px}\\n.canvas .node.failed{background:#fcf5e9;border-color:#a07040}\\n.canvas .node.runbook{padding:21px 27px;gap:13px}\\n.canvas .runbook .plan{display:flex;justify-content:space-between;align-items:center;font-size:25px;line-height:1.5}\\n.canvas .runbook .sep{color:#62625e;font-size:21px}\\n.canvas .node[data-node-detail],.canvas [data-node-detail]{display:none}\\n.canvas .connection{position:static;z-index:1}\\n.canvas .edge{position:absolute;height:0;border-top:1.8px solid #30332e;transform-origin:0 0;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5.4px;border-left:9px solid #30332e;border-top:4.5px solid transparent;border-bottom:4.5px solid transparent}\\n.canvas .edge.feedback{border-top-color:#699c35}\\n.canvas .edge.feedback.arrow:after{border-left-color:#699c35}\\n.canvas .edge.failure{border-top-color:#a07040}\\n.canvas .edge.failure.arrow:after{border-left-color:#a07040}\\n.canvas .branch-title{position:absolute;top:568px;font-size:25px;line-height:1.4}\\n.canvas .edge-label{position:absolute;z-index:3;background:#fff;padding:2px 8px;color:#62625e;font-size:21px;line-height:1.4}\\n.canvas .footer{position:absolute;left:48px;top:1170px;width:1104px;border-top:1px solid #e4e8e0;padding-top:21px;color:#62625e;font-size:22px;line-height:1.6}\\n.canvas .footer strong{color:#30332e;font-weight:400}\\n\",\n          \"html\": \"<main class=\\\"canvas\\\" data-fixed-type>\\n<div class=\\\"figure-title\\\">同じ計画でも、再実行の結果は分かれる</div>\\n<div class=\\\"figure-intro\\\">Markdown のインライン構文解析 · RSR の先行論文にある再構成事例</div>\\n<div class=\\\"connection\\\" data-from=\\\"source-generate\\\" data-to=\\\"source-prebuilt\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:374px;top:206px;width:64px;transform:rotate(0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"source-prebuilt\\\" data-to=\\\"source-pass\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:764px;top:206px;width:64px;transform:rotate(0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"source-pass\\\" data-to=\\\"shared-plan\\\" data-relation=\\\"extract\\\"><div class=\\\"edge \\\" style=\\\"left:990px;top:284px;width:36px;transform:rotate(90deg)\\\"></div><div class=\\\"edge \\\" style=\\\"left:990px;top:320px;width:390px;transform:rotate(180deg)\\\"></div><div class=\\\"edge  arrow\\\" style=\\\"left:600px;top:320px;width:42px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"shared-plan\\\" data-to=\\\"a-parser\\\" data-relation=\\\"independent-reexecution\\\"><div class=\\\"edge \\\" style=\\\"left:600px;top:504px;width:38px;transform:rotate(90deg)\\\"></div><div class=\\\"edge \\\" style=\\\"left:600px;top:542px;width:292px;transform:rotate(180deg)\\\"></div><div class=\\\"edge  arrow\\\" style=\\\"left:308px;top:542px;width:80px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"shared-plan\\\" data-to=\\\"b-inspect\\\" data-relation=\\\"independent-reexecution\\\"><div class=\\\"edge \\\" style=\\\"left:600px;top:504px;width:38px;transform:rotate(90deg)\\\"></div><div class=\\\"edge \\\" style=\\\"left:600px;top:542px;width:292px;transform:rotate(0deg)\\\"></div><div class=\\\"edge  arrow\\\" style=\\\"left:892px;top:542px;width:80px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"a-parser\\\" data-to=\\\"a-feedback\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:308px;top:764px;width:62px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"b-inspect\\\" data-to=\\\"b-feedback\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:892px;top:764px;width:62px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"a-feedback\\\" data-to=\\\"a-pass\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge feedback arrow\\\" style=\\\"left:308px;top:968px;width:62px;transform:rotate(90deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"b-feedback\\\" data-to=\\\"b-fail\\\" data-relation=\\\"sequence\\\"><div class=\\\"edge failure arrow\\\" style=\\\"left:892px;top:968px;width:62px;transform:rotate(90deg)\\\"></div></div><div id=\\\"source-generate\\\" class=\\\"node \\\" style=\\\"left:48px;top:128px;width:326px;height:156px\\\"><div class=\\\"label\\\">元の実行 · ターン 26</div><div class=\\\"name\\\">パーサー生成を試す</div><div class=\\\"sub\\\">テキスト解析ツールを準備</div><span hidden data-node-detail>成功した元の軌跡はターン 26 で tree-sitter generate を試した。tree-sitter はパーサーの生成・利用ツール群であり、パーサーは Markdown をプログラムで扱える構造へ変換する。図は論文で抜粋された主要イベントを示す。</span></div><div id=\\\"source-prebuilt\\\" class=\\\"node \\\" style=\\\"left:438px;top:128px;width:326px;height:156px\\\"><div class=\\\"label\\\">元の実行 · ターン 51</div><div class=\\\"name\\\">既成パーサーを使用</div><div class=\\\"sub\\\">コンパイル済み部品を読込</div><span hidden data-node-detail>既成パーサーはコンパイル済みの解析部品で、互換環境では直接読み込める。元の軌跡はターン 51 でこれを使った。論文中のコマンドは tree-sitter parse -l ...node --lang-name markdown /tmp/test.md と略記されている。</span></div><div id=\\\"source-pass\\\" class=\\\"node result\\\" style=\\\"left:828px;top:128px;width:324px;height:156px\\\"><div class=\\\"label\\\">元の実行 · 最終検証</div><div class=\\\"name\\\">64 ターン、合格</div><div class=\\\"sub\\\">成功経験を計画に活用</div><span hidden data-node-detail>元の実行は全 64 ターンで最終検証に合格した。その成功経験を実行計画にまとめ、新しい環境でモデルが課題をやり直す際の指針とする。</span></div><div id=\\\"shared-plan\\\" class=\\\"node runbook\\\" style=\\\"left:180px;top:362px;width:840px;height:142px\\\"><div class=\\\"label\\\">成功経験から抽出した同じ実行計画</div><div class=\\\"plan\\\"><span>互換パーサー</span><span class=\\\"sep\\\">→</span><span>出力要約を一致</span><span class=\\\"sep\\\">→</span><span>表の処理設定</span></div><span hidden data-node-detail>runbook は主要な手順、確認、復旧方法を記す実行計画である。この計画は成功した元の実行から、互換パーサーの発見、出力要約の一致、表の処理設定の確認を抽出したもの。下の A と B はそれぞれ別の新しい環境で独立に実行する。</span></div><div id=\\\"a-parser\\\" class=\\\"node \\\" style=\\\"left:48px;top:622px;width:520px;height:142px\\\"><div class=\\\"label\\\">再実行 A · ターン 9</div><div class=\\\"name\\\">既成パーサーを使用</div><div class=\\\"sub\\\">早期に有効な解析経路へ</div><span hidden data-node-detail>再実行 A はターン 9 で既成パーサーを使った。右の B と計画は共有するが、別々の新しい環境で動く。元の軌跡のターン 51 の抜粋にも同じ操作が記録されている。</span></div><div id=\\\"b-inspect\\\" class=\\\"node failed\\\" style=\\\"left:632px;top:622px;width:520px;height:142px\\\"><div class=\\\"label\\\">再実行 B · ターン 26</div><div class=\\\"name\\\">解析結果を確認</div><div class=\\\"sub\\\">端末：ファイル確認ツールなし</div><span hidden data-node-detail>再実行 B は xxd .../parse.txt | head -20 を試し、端末は bash: xxd: command not found を返した。xxd はファイルの 16 進数表示・変換を行うコマンドラインツールで、ここではツール呼び出しの失敗を記録している。</span></div><div id=\\\"a-feedback\\\" class=\\\"node \\\" style=\\\"left:48px;top:826px;width:520px;height:142px\\\"><div class=\\\"label\\\">再実行 A · ターン 21</div><div class=\\\"name\\\">再構築の結果を確認</div><div class=\\\"sub\\\">結果確認スクリプトを実行</div><span hidden data-node-detail>ターン 21 では python3 /app/tools/feedback で再構築の結果を確認した。feedback はここで用いる結果確認スクリプトである。</span></div><div id=\\\"b-feedback\\\" class=\\\"node \\\" style=\\\"left:632px;top:826px;width:520px;height:142px\\\"><div class=\\\"label\\\">再実行 B · ターン 36</div><div class=\\\"name\\\">修正後に再確認</div><div class=\\\"sub\\\">結果確認スクリプトを再実行</div><span hidden data-node-detail>再実行 B は修正後のターン 36 で、結果確認スクリプト feedback を再び実行した。この箇所とターン 26 は、論文から抜粋された 2 つの実行イベントである。</span></div><div id=\\\"a-pass\\\" class=\\\"node result\\\" style=\\\"left:48px;top:1030px;width:520px;height:104px\\\"><div class=\\\"label\\\">再実行 A · 最終検証</div><div class=\\\"name\\\">32 ターン、合格</div><span hidden data-node-detail>再実行 A は全 32 ターンで最終検証に合格した。成功軌跡はさらに品質・漏洩検査を受け、合格すれば学習用デモになる。</span></div><div id=\\\"b-fail\\\" class=\\\"node failed\\\" style=\\\"left:632px;top:1030px;width:520px;height:104px\\\"><div class=\\\"label\\\">再実行 B · 最終検証</div><div class=\\\"name\\\">38 ターン、失敗</div><span hidden data-node-detail>再実行 B は全 38 ターンで最終検証に失敗した。この再実行は最終検証で除外される。図の抜粋はツールの確認と結果の検査を示す。</span></div>\\n<div class=\\\"edge-label\\\" style=\\\"left:706px;top:297px\\\">成功経験を抽出</div>\\n<div class=\\\"branch-title\\\" style=\\\"left:48px\\\">A · 独立した新環境</div>\\n<div class=\\\"branch-title\\\" style=\\\"left:632px\\\">B · 独立した新環境</div>\\n<div class=\\\"footer\\\">全 <strong>12 回の再構成中、7 回が合格</strong>。成功した再構成の中央値は <strong>32 ターン</strong>。<br>2 つの分岐は独立なサンプル。合格後も品質検査を経て、学習デモとして採用するかを判断する。</div>\\n</main>\"\n        }\n      }\n    },\n    \"reward\": {\n      \"title\": \"RPR：验证奖励如何进入训练\",\n      \"kind\": \"flow\",\n      \"width\": 1200,\n      \"height\": 720,\n      \"links\": {\n        \"R-run\": \"case\",\n        \"R-gae\": \"gae\",\n        \"R-regress\": \"handoff\"\n      },\n      \"related\": [\n        \"overview\",\n        \"gae\",\n        \"case\"\n      ],\n      \"localized\": {\n        \"zh\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;overflow:hidden;background:#fff;color:#202020;font:24px/1.45 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;text-align:left}\\n.canvas .node{position:absolute;z-index:3;border:1.35px solid #464b43;border-radius:8px;padding:14px 16px;background:#fff;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.canvas .node .action{font-size:25px;line-height:1.32;font-weight:400;margin:0}\\n.canvas .node .sub{font-size:20px;line-height:1.45;color:#65695f;margin-top:8px}\\n.canvas .node.soft{background:#f4f7ef;border-color:#7f9664}\\n.canvas .node.data{border-style:dashed}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.6px solid #41483e;transform-origin:left center;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #41483e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.canvas .edge.preserve{border-top-style:dashed;border-top-color:#7f8578}\\n.canvas .edge.preserve.arrow:after{border-left-color:#7f8578}\\n.canvas .edge.cycle{border-top-color:#7f9664}\\n.canvas .edge.cycle.arrow:after{border-left-color:#7f9664}\\n.canvas .edge-label{position:absolute;z-index:2;padding:2px 6px;background:#fff;color:#61665b;font-size:20px;line-height:1.4;text-align:center}\\n.canvas .phase{position:absolute;font-size:27px;line-height:1.4;color:#30372c;font-weight:400}\\n.canvas .phase-rule{position:absolute;border-top:1px solid #dce1d6}\\n.canvas .note{position:absolute;font-size:20px;line-height:1.5;color:#65695f}\\n.canvas .boundary{position:absolute;border:1px solid #dde2d7;border-radius:9px;z-index:0}\\n\\n.canvas{height:720px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"R-run\\\" data-to=\\\"R-check\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:265px;top:200px;width:80.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-check\\\" data-to=\\\"R-score\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:565px;top:200px;width:95.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-score\\\" data-to=\\\"R-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:775px;top:255px;width:175.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-run\\\" data-to=\\\"R-value\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:150px;top:255px;width:230.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:150px;top:485px;width:195.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-value\\\" data-to=\\\"R-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:565px;top:485px;width:95.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-gae\\\" data-to=\\\"R-policy\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:890px;top:460px;width:40.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:930px;top:460px;width:68.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:930px;top:392px;width:45.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-gae\\\" data-to=\\\"R-regress\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:890px;top:515px;width:40.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:930px;top:515px;width:97.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:930px;top:612px;width:45.00px;transform:rotate(0.00deg)\\\"></div></div><section class=\\\"node \\\" id=\\\"R-run\\\" data-map-node data-map-label=\\\"Actor ↔ 终端\\\" style=\\\"left:40px;top:145px;width:225px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor ↔ 终端</h3><div class=\\\"sub\\\">命令与工具返回</div></section><section class=\\\"node \\\" id=\\\"R-check\\\" data-map-node data-map-label=\\\"最终验收\\\" style=\\\"left:345px;top:145px;width:220px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">最终验收</h3><div class=\\\"sub\\\">通过 P · 成功 S</div></section><section class=\\\"node \\\" id=\\\"R-score\\\" data-map-node data-map-label=\\\"FDR 或 SPR\\\" style=\\\"left:660px;top:145px;width:230px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">FDR 或 SPR</h3><div class=\\\"sub\\\">报告 → 终点奖励 R</div></section><section class=\\\"node \\\" id=\\\"R-gae\\\" data-map-node data-map-label=\\\"GAE / TB-GAE\\\" style=\\\"left:660px;top:430px;width:230px;height:115px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">GAE / TB-GAE</h3><div class=\\\"sub\\\">奖励 R + 价值 V</div></section><section class=\\\"node \\\" id=\\\"R-value\\\" data-map-node data-map-label=\\\"Critic\\\" style=\\\"left:345px;top:430px;width:220px;height:115px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Critic</h3><div class=\\\"sub\\\">前缀 → 价值预测 V</div></section><section class=\\\"node soft\\\" id=\\\"R-policy\\\" data-map-node data-map-label=\\\"Actor\\\" style=\\\"left:975px;top:340px;width:195px;height:105px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor</h3><div class=\\\"sub\\\">用 A 做 PPO 更新</div></section><section class=\\\"node soft\\\" id=\\\"R-regress\\\" data-map-node data-map-label=\\\"Critic\\\" style=\\\"left:975px;top:560px;width:195px;height:105px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Critic</h3><div class=\\\"sub\\\">回归 Ĝ = A + V</div></section><div class=\\\"phase\\\" style=\\\"left:40px;top:45px;width:1120px\\\">B · RPR：一条轨迹生成两类训练目标</div><div class=\\\"edge-label\\\" style=\\\"left:65px;top:340px;width:180px\\\">每个生成前缀</div><div class=\\\"edge-label\\\" style=\\\"left:582px;top:450px;width:60px\\\">V</div><div class=\\\"edge-label\\\" style=\\\"left:733px;top:325px;width:83px\\\">R</div><div class=\\\"edge-label\\\" style=\\\"left:898px;top:360px;width:65px\\\">A</div><div class=\\\"edge-label\\\" style=\\\"left:892px;top:564px;width:72px\\\">Ĝ</div><div class=\\\"note\\\" style=\\\"left:40px;top:625px;width:800px\\\">分数由任务验证器计算；Critic 学习预测从当前历史继续执行的回报。</div></div>\"\n        },\n        \"en\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;overflow:hidden;background:#fff;color:#202020;font:24px/1.45 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;text-align:left}\\n.canvas .node{position:absolute;z-index:3;border:1.35px solid #464b43;border-radius:8px;padding:14px 16px;background:#fff;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.canvas .node .action{font-size:25px;line-height:1.32;font-weight:400;margin:0}\\n.canvas .node .sub{font-size:20px;line-height:1.45;color:#65695f;margin-top:8px}\\n.canvas .node.soft{background:#f4f7ef;border-color:#7f9664}\\n.canvas .node.data{border-style:dashed}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.6px solid #41483e;transform-origin:left center;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #41483e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.canvas .edge.preserve{border-top-style:dashed;border-top-color:#7f8578}\\n.canvas .edge.preserve.arrow:after{border-left-color:#7f8578}\\n.canvas .edge.cycle{border-top-color:#7f9664}\\n.canvas .edge.cycle.arrow:after{border-left-color:#7f9664}\\n.canvas .edge-label{position:absolute;z-index:2;padding:2px 6px;background:#fff;color:#61665b;font-size:20px;line-height:1.4;text-align:center}\\n.canvas .phase{position:absolute;font-size:27px;line-height:1.4;color:#30372c;font-weight:400}\\n.canvas .phase-rule{position:absolute;border-top:1px solid #dce1d6}\\n.canvas .note{position:absolute;font-size:20px;line-height:1.5;color:#65695f}\\n.canvas .boundary{position:absolute;border:1px solid #dde2d7;border-radius:9px;z-index:0}\\n\\n.canvas{height:720px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"R-run\\\" data-to=\\\"R-check\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:265px;top:200px;width:80.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-check\\\" data-to=\\\"R-score\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:565px;top:200px;width:95.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-score\\\" data-to=\\\"R-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:775px;top:255px;width:175.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-run\\\" data-to=\\\"R-value\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:150px;top:255px;width:230.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:150px;top:485px;width:195.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-value\\\" data-to=\\\"R-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:565px;top:485px;width:95.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-gae\\\" data-to=\\\"R-policy\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:890px;top:460px;width:40.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:930px;top:460px;width:68.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:930px;top:392px;width:45.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-gae\\\" data-to=\\\"R-regress\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:890px;top:515px;width:40.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:930px;top:515px;width:97.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:930px;top:612px;width:45.00px;transform:rotate(0.00deg)\\\"></div></div><section class=\\\"node \\\" id=\\\"R-run\\\" data-map-node data-map-label=\\\"Actor ↔ terminal\\\" style=\\\"left:40px;top:145px;width:225px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor ↔ terminal</h3><div class=\\\"sub\\\">Commands &amp; tools</div></section><section class=\\\"node \\\" id=\\\"R-check\\\" data-map-node data-map-label=\\\"Final verification\\\" style=\\\"left:345px;top:145px;width:220px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Final verification</h3><div class=\\\"sub\\\">Checks P · S</div></section><section class=\\\"node \\\" id=\\\"R-score\\\" data-map-node data-map-label=\\\"FDR or SPR\\\" style=\\\"left:660px;top:145px;width:230px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">FDR or SPR</h3><div class=\\\"sub\\\">Terminal reward R</div></section><section class=\\\"node \\\" id=\\\"R-gae\\\" data-map-node data-map-label=\\\"GAE / TB-GAE\\\" style=\\\"left:660px;top:430px;width:230px;height:115px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">GAE / TB-GAE</h3><div class=\\\"sub\\\">Reward R + values V</div></section><section class=\\\"node \\\" id=\\\"R-value\\\" data-map-node data-map-label=\\\"Critic\\\" style=\\\"left:345px;top:430px;width:220px;height:115px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Critic</h3><div class=\\\"sub\\\">Prefix → V</div></section><section class=\\\"node soft\\\" id=\\\"R-policy\\\" data-map-node data-map-label=\\\"Actor\\\" style=\\\"left:975px;top:340px;width:195px;height:105px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor</h3><div class=\\\"sub\\\">PPO with A</div></section><section class=\\\"node soft\\\" id=\\\"R-regress\\\" data-map-node data-map-label=\\\"Critic\\\" style=\\\"left:975px;top:560px;width:195px;height:105px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Critic</h3><div class=\\\"sub\\\">Fit Ĝ = A + V</div></section><div class=\\\"phase\\\" style=\\\"left:40px;top:45px;width:1120px\\\">B · RPR: one trajectory supplies two training targets</div><div class=\\\"edge-label\\\" style=\\\"left:65px;top:340px;width:180px\\\">Each generated prefix</div><div class=\\\"edge-label\\\" style=\\\"left:582px;top:450px;width:60px\\\">V</div><div class=\\\"edge-label\\\" style=\\\"left:733px;top:325px;width:83px\\\">R</div><div class=\\\"edge-label\\\" style=\\\"left:898px;top:360px;width:65px\\\">A</div><div class=\\\"edge-label\\\" style=\\\"left:892px;top:564px;width:72px\\\">Ĝ</div><div class=\\\"note\\\" style=\\\"left:40px;top:625px;width:800px\\\">The verifier computes the score; the Critic learns expected returns from each history.</div></div>\"\n        },\n        \"ja\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;overflow:hidden;background:#fff;color:#202020;font:24px/1.45 Arial,\\\"Microsoft YaHei\\\",\\\"PingFang SC\\\",sans-serif;text-align:left}\\n.canvas .node{position:absolute;z-index:3;border:1.35px solid #464b43;border-radius:8px;padding:14px 16px;background:#fff;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.canvas .node .action{font-size:25px;line-height:1.32;font-weight:400;margin:0}\\n.canvas .node .sub{font-size:20px;line-height:1.45;color:#65695f;margin-top:8px}\\n.canvas .node.soft{background:#f4f7ef;border-color:#7f9664}\\n.canvas .node.data{border-style:dashed}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.6px solid #41483e;transform-origin:left center;z-index:1}\\n.canvas .edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #41483e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.canvas .edge.preserve{border-top-style:dashed;border-top-color:#7f8578}\\n.canvas .edge.preserve.arrow:after{border-left-color:#7f8578}\\n.canvas .edge.cycle{border-top-color:#7f9664}\\n.canvas .edge.cycle.arrow:after{border-left-color:#7f9664}\\n.canvas .edge-label{position:absolute;z-index:2;padding:2px 6px;background:#fff;color:#61665b;font-size:20px;line-height:1.4;text-align:center}\\n.canvas .phase{position:absolute;font-size:27px;line-height:1.4;color:#30372c;font-weight:400}\\n.canvas .phase-rule{position:absolute;border-top:1px solid #dce1d6}\\n.canvas .note{position:absolute;font-size:20px;line-height:1.5;color:#65695f}\\n.canvas .boundary{position:absolute;border:1px solid #dde2d7;border-radius:9px;z-index:0}\\n\\n.canvas{height:720px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"R-run\\\" data-to=\\\"R-check\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:265px;top:200px;width:80.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-check\\\" data-to=\\\"R-score\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:565px;top:200px;width:95.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-score\\\" data-to=\\\"R-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:775px;top:255px;width:175.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-run\\\" data-to=\\\"R-value\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:150px;top:255px;width:230.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:150px;top:485px;width:195.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-value\\\" data-to=\\\"R-gae\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:565px;top:485px;width:95.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-gae\\\" data-to=\\\"R-policy\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:890px;top:460px;width:40.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:930px;top:460px;width:68.00px;transform:rotate(-90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:930px;top:392px;width:45.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"R-gae\\\" data-to=\\\"R-regress\\\" data-relation=\\\"main\\\"><div class=\\\"edge main \\\" style=\\\"left:890px;top:515px;width:40.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"edge main \\\" style=\\\"left:930px;top:515px;width:97.00px;transform:rotate(90.00deg)\\\"></div><div class=\\\"edge main arrow\\\" style=\\\"left:930px;top:612px;width:45.00px;transform:rotate(0.00deg)\\\"></div></div><section class=\\\"node \\\" id=\\\"R-run\\\" data-map-node data-map-label=\\\"Actor ↔ 端末\\\" style=\\\"left:40px;top:145px;width:225px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor ↔ 端末</h3><div class=\\\"sub\\\">コマンド・ツール応答</div></section><section class=\\\"node \\\" id=\\\"R-check\\\" data-map-node data-map-label=\\\"最終検証\\\" style=\\\"left:345px;top:145px;width:220px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">最終検証</h3><div class=\\\"sub\\\">合格 P・成功 S</div></section><section class=\\\"node \\\" id=\\\"R-score\\\" data-map-node data-map-label=\\\"FDR または SPR\\\" style=\\\"left:660px;top:145px;width:230px;height:110px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">FDR または SPR</h3><div class=\\\"sub\\\">報告 → 終端報酬 R</div></section><section class=\\\"node \\\" id=\\\"R-gae\\\" data-map-node data-map-label=\\\"GAE / TB-GAE\\\" style=\\\"left:660px;top:430px;width:230px;height:115px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">GAE / TB-GAE</h3><div class=\\\"sub\\\">報酬 R + 価値 V</div></section><section class=\\\"node \\\" id=\\\"R-value\\\" data-map-node data-map-label=\\\"Critic\\\" style=\\\"left:345px;top:430px;width:220px;height:115px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Critic</h3><div class=\\\"sub\\\">履歴 → 価値予測 V</div></section><section class=\\\"node soft\\\" id=\\\"R-policy\\\" data-map-node data-map-label=\\\"Actor\\\" style=\\\"left:975px;top:340px;width:195px;height:105px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Actor</h3><div class=\\\"sub\\\">A による PPO 更新</div></section><section class=\\\"node soft\\\" id=\\\"R-regress\\\" data-map-node data-map-label=\\\"Critic\\\" style=\\\"left:975px;top:560px;width:195px;height:105px\\\" tabindex=\\\"0\\\" role=\\\"button\\\"><h3 class=\\\"action\\\">Critic</h3><div class=\\\"sub\\\">Ĝ = A + V に回帰</div></section><div class=\\\"phase\\\" style=\\\"left:40px;top:45px;width:1120px\\\">B · RPR：一つの軌跡から二種類の学習目標へ</div><div class=\\\"edge-label\\\" style=\\\"left:65px;top:340px;width:180px\\\">各生成前の履歴</div><div class=\\\"edge-label\\\" style=\\\"left:582px;top:450px;width:60px\\\">V</div><div class=\\\"edge-label\\\" style=\\\"left:733px;top:325px;width:83px\\\">R</div><div class=\\\"edge-label\\\" style=\\\"left:898px;top:360px;width:65px\\\">A</div><div class=\\\"edge-label\\\" style=\\\"left:892px;top:564px;width:72px\\\">Ĝ</div><div class=\\\"note\\\" style=\\\"left:40px;top:625px;width:800px\\\">検証器が得点を計算し、Critic は各履歴から先のリターンを学習する。</div></div>\"\n        }\n      }\n    },\n    \"gae\": {\n      \"title\": \"TB-GAE：沿轮次回传反馈\",\n      \"kind\": \"flow\",\n      \"width\": 1200,\n      \"height\": 1460,\n      \"links\": {},\n      \"related\": [\n        \"reward\",\n        \"overview\",\n        \"handoff\"\n      ],\n      \"localized\": {\n        \"zh\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;height:1460px;overflow:hidden;background:white;color:#20231f;font:26px/1.5 -apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',Arial,sans-serif}\\n.node{position:absolute;z-index:2;border:1.4px solid #454a40;border-radius:9px;background:white;padding:12px 14px;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.node .action{font-size:28px;line-height:1.3;font-weight:400}\\n.node .sub{font-size:23px;line-height:1.45;color:#686c62;margin-top:7px}\\n.node.token{padding:8px 3px;border-radius:7px}\\n.node.observation{border:1px dashed #b5bcae;background:#fafbf7;color:#7c8476}\\n.node.soft{background-color:#f7faef;border-color:#82a65b;background-image:radial-gradient(#79a4433d .6px,transparent .75px);background-size:6px 6px}\\n.node.reward{border-color:#83a461;background:#f7faef;padding:8px 4px}\\n.node.reward .action{font-size:27px;white-space:nowrap}\\n.node sub{font-size:65%;line-height:0}\\n#G-input-observation .action{line-height:1.6}\\n[data-node-detail]{display:none}\\n.label{position:absolute;z-index:3;font-size:22px;line-height:1.5;color:#646b5e;background:white;padding:0 6px}\\n.label.heading{font-size:32px;color:#20231f;padding:0}\\n.label.section{font-size:27px;color:#30372a;padding:0}\\n.label.row{font-size:27px;color:#20231f;padding:0}\\n.label.row span{display:block;font-size:22px;color:#72796a;line-height:1.5;margin-top:5px}\\n.label.weight{font-size:23px;color:#6c7562}\\n.label.hop{font:24px/1.2 Georgia,serif;color:#363e2e;padding:0 7px}\\n.edge{position:absolute;height:0;border-top:1.6px solid #444b3b;transform-origin:left center;z-index:1}\\n.edge.arrow:after{content:'';position:absolute;right:-1px;top:-5px;border-left:8px solid #444b3b;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.edge.soft{border-top-color:#82a65b}.edge.soft.arrow:after{border-left-color:#82a65b}\\n.edge.context{border-top-style:dashed;border-top-color:#8c9980}.edge.context.arrow:after{border-left-color:#8c9980}\\n.rule{position:absolute;height:0;border-top:1px solid #dce0d6}\\n.value-card{padding:16px 0 0;justify-content:flex-start;border-color:#c9d2be;border-radius:8px}\\n.value-card .action{font-size:25px}\\n.value-card .matrix{margin-top:10px;display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:53px;font-size:27px;line-height:53px}\\n.value-card .matrix .token-name{font:27px/53px Georgia,serif;color:#747c6a}\\n.value-card .matrix .target{background:#f2f7e8;color:#4b652f}\\n.value-card .matrix .advantage{color:#263a16}\\n\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"label heading\\\" style=\\\"left:42px;top:27px;\\\">TB-GAE：沿交互轮次传回终点反馈</div><div class=\\\"label \\\" style=\\\"left:42px;top:83px;width:1110px;\\\">设 γ = 0.9，λ = 0.8，q = γλ = 0.72；仅终点奖励为 1。</div><div class=\\\"label row\\\" style=\\\"left:42px;top:186px;\\\">实际交互</div><div class=\\\"label \\\" style=\\\"left:318px;top:128px;\\\">第 1 轮</div><div class=\\\"label \\\" style=\\\"left:836px;top:128px;\\\">第 2 轮</div><div class=\\\"node token\\\" id=\\\"G-input1\\\" data-map-node style=\\\"left:300px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>第1轮命令的第1个示意生成位置。实际命令通常由更多token组成。</div></div><div class=\\\"node token\\\" id=\\\"G-input2\\\" data-map-node style=\\\"left:425px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>第1轮命令的最后一个示意生成位置；工具调用完成后，环境返回观察。</div></div><div class=\\\"node observation\\\" id=\\\"G-input-observation\\\" data-map-node style=\\\"left:550px;top:171px;width:210px;height:76px\\\"><div class=\\\"action\\\">o₁ … o<sub>L</sub></div><div data-node-detail>环境返回L个观察token。它们仍进入下一轮的模型上下文；下面仅在优势递推链中跳过这些位置。比较图为可读性取L=3。</div></div><div class=\\\"node token\\\" id=\\\"G-input3\\\" data-map-node style=\\\"left:815px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>第2轮的首个生成位置。策略和Critic的输入仍包含上一轮工具返回。</div></div><div class=\\\"node token\\\" id=\\\"G-input4\\\" data-map-node style=\\\"left:940px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>第2轮最后一个生成位置。示例在这里真正结束任务，并把终点奖励放置一次。</div></div><div class=\\\"node reward\\\" id=\\\"G-inputR\\\" data-map-node style=\\\"left:1070px;top:171px;width:90px;height:76px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>设终点奖励 R=1。任务真正结束后，后继价值与优势递推量取 0。</div></div><div class=\\\"connection\\\" data-from=\\\"G-input1\\\" data-to=\\\"G-input2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:370px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input2\\\" data-to=\\\"G-input-observation\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:495px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input-observation\\\" data-to=\\\"G-input3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:760px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input3\\\" data-to=\\\"G-input4\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:885px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input4\\\" data-to=\\\"G-inputR\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:1010px;top:209px;width:60.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"label \\\" style=\\\"left:300px;top:267px;width:840px;\\\">观察仍参与下一次判断；“跳过”只改变下面的 GAE 递推。</div><div class=\\\"rule\\\" style=\\\"left:42px;top:321px;width:1118px\\\"></div><div class=\\\"label section\\\" style=\\\"left:42px;top:342px;\\\">同一条执行，三种信用回传时钟</div><div class=\\\"label row\\\" style=\\\"left:42px;top:419px;width:220px;\\\">全 token 链<span>生成与观察都递推</span></div><div class=\\\"node token \\\" id=\\\"GA-g1\\\" data-map-node style=\\\"left:300px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>生成位置g1。混合文本链中，生成与观察位置都参加优势递推。观察位置即使在训练损失中被掩蔽，仍会在这条递推链上产生衰减。</div></div><div class=\\\"node token \\\" id=\\\"GA-g2\\\" data-map-node style=\\\"left:425px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>生成位置g2。混合文本链中，生成与观察位置都参加优势递推。观察位置即使在训练损失中被掩蔽，仍会在这条递推链上产生衰减。</div></div><div class=\\\"node token \\\" id=\\\"GA-g3\\\" data-map-node style=\\\"left:815px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>生成位置g3。混合文本链中，生成与观察位置都参加优势递推。观察位置即使在训练损失中被掩蔽，仍会在这条递推链上产生衰减。</div></div><div class=\\\"node token \\\" id=\\\"GA-g4\\\" data-map-node style=\\\"left:940px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>生成位置g4。混合文本链中，生成与观察位置都参加优势递推。观察位置即使在训练损失中被掩蔽，仍会在这条递推链上产生衰减。</div></div><div class=\\\"node reward\\\" id=\\\"GA-reward\\\" data-map-node style=\\\"left:1070px;top:416px;width:90px;height:72px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>奖励在最后一个生成位置注入一次，形成终点 TD 残差；随后沿生成位置向前递推。</div></div><div class=\\\"connection\\\" data-from=\\\"GA-reward\\\" data-to=\\\"GA-g4\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:1070px;top:452px;width:60.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"node observation token\\\" id=\\\"GA-o1\\\" data-map-node style=\\\"left:550px;top:424px;width:50px;height:56px\\\"><div class=\\\"action\\\">o₁</div><div data-node-detail>一个工具观察位置。在混合文本链中，它仍参与 GAE 递推，额外经过一次衰减；策略损失对该位置取 0。</div></div><div class=\\\"node observation token\\\" id=\\\"GA-o2\\\" data-map-node style=\\\"left:630px;top:424px;width:50px;height:56px\\\"><div class=\\\"action\\\">o₂</div><div data-node-detail>一个工具观察位置。在混合文本链中，它仍参与 GAE 递推，额外经过一次衰减；策略损失对该位置取 0。</div></div><div class=\\\"node observation token\\\" id=\\\"GA-o3\\\" data-map-node style=\\\"left:710px;top:424px;width:50px;height:56px\\\"><div class=\\\"action\\\">o₃</div><div data-node-detail>一个工具观察位置。在混合文本链中，它仍参与 GAE 递推，额外经过一次衰减；策略损失对该位置取 0。</div></div><div class=\\\"connection\\\" data-from=\\\"GA-g2\\\" data-to=\\\"GA-g1\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:425px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:383.5px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-o1\\\" data-to=\\\"GA-g2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:550px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:508.5px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-o2\\\" data-to=\\\"GA-o1\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:630px;top:452px;width:30.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:601.0px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-o3\\\" data-to=\\\"GA-o2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:710px;top:452px;width:30.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:681.0px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-g3\\\" data-to=\\\"GA-o3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:815px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:773.5px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-g4\\\" data-to=\\\"GA-g3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:940px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:898.5px;top:385px;\\\">q</div><div class=\\\"label weight\\\" style=\\\"left:300px;top:507px;\\\">终点残差权重：q⁶ ≈ 0.1393（此处日志取 3 个 token）</div><div class=\\\"label row\\\" style=\\\"left:42px;top:598px;width:235px;\\\">SAO · 跳过观察<span>生成位置每跳 ×q</span></div><div class=\\\"node token \\\" id=\\\"GS-g1\\\" data-map-node style=\\\"left:300px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>生成位置g1。只跳过观察的示意递推，生成位置之间仍每条边乘q。这里用于区分“跳过观察”和“跨轮时钟”两个步骤。</div></div><div class=\\\"node token \\\" id=\\\"GS-g2\\\" data-map-node style=\\\"left:425px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>生成位置g2。只跳过观察的示意递推，生成位置之间仍每条边乘q。这里用于区分“跳过观察”和“跨轮时钟”两个步骤。</div></div><div class=\\\"node token \\\" id=\\\"GS-g3\\\" data-map-node style=\\\"left:815px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>生成位置g3。只跳过观察的示意递推，生成位置之间仍每条边乘q。这里用于区分“跳过观察”和“跨轮时钟”两个步骤。</div></div><div class=\\\"node token \\\" id=\\\"GS-g4\\\" data-map-node style=\\\"left:940px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>生成位置g4。只跳过观察的示意递推，生成位置之间仍每条边乘q。这里用于区分“跳过观察”和“跨轮时钟”两个步骤。</div></div><div class=\\\"node reward\\\" id=\\\"GS-reward\\\" data-map-node style=\\\"left:1070px;top:595px;width:90px;height:72px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>奖励在最后一个生成位置注入一次，形成终点 TD 残差；随后沿生成位置向前递推。</div></div><div class=\\\"connection\\\" data-from=\\\"GS-reward\\\" data-to=\\\"GS-g4\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:1070px;top:631px;width:60.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"GS-g2\\\" data-to=\\\"GS-g1\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:425px;top:631px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:383.5px;top:564px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GS-g3\\\" data-to=\\\"GS-g2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:815px;top:631px;width:320.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:641.0px;top:564px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GS-g4\\\" data-to=\\\"GS-g3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:940px;top:631px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:898.5px;top:564px;\\\">q</div><div class=\\\"label \\\" style=\\\"left:574px;top:642px;width:190px;\\\">跳过观察位置</div><div class=\\\"label weight\\\" style=\\\"left:300px;top:686px;\\\">终点残差权重：q³ ≈ 0.3732</div><div class=\\\"label row\\\" style=\\\"left:42px;top:777px;width:225px;\\\">TB · 轮次时钟<span>跨轮才 ×q</span></div><div class=\\\"node token soft\\\" id=\\\"GT-g1\\\" data-map-node style=\\\"left:300px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>生成位置g1。TB-GAE保留这个位置自己的pre-token价值基线；同轮目标可相同，优势依然可以不同。</div></div><div class=\\\"node token soft\\\" id=\\\"GT-g2\\\" data-map-node style=\\\"left:425px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>生成位置g2。TB-GAE保留这个位置自己的pre-token价值基线；同轮目标可相同，优势依然可以不同。</div></div><div class=\\\"node token soft\\\" id=\\\"GT-g3\\\" data-map-node style=\\\"left:815px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>生成位置g3。TB-GAE保留这个位置自己的pre-token价值基线；同轮目标可相同，优势依然可以不同。</div></div><div class=\\\"node token soft\\\" id=\\\"GT-g4\\\" data-map-node style=\\\"left:940px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>生成位置g4。TB-GAE保留这个位置自己的pre-token价值基线；同轮目标可相同，优势依然可以不同。</div></div><div class=\\\"node reward\\\" id=\\\"GT-reward\\\" data-map-node style=\\\"left:1070px;top:774px;width:90px;height:72px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>奖励在最后一个生成位置注入一次，形成终点 TD 残差；随后沿生成位置向前递推。</div></div><div class=\\\"connection\\\" data-from=\\\"GT-reward\\\" data-to=\\\"GT-g4\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:1070px;top:810px;width:60.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"GT-g2\\\" data-to=\\\"GT-g1\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:425px;top:810px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:383.5px;top:743px;\\\">1</div><div class=\\\"connection\\\" data-from=\\\"GT-g3\\\" data-to=\\\"GT-g2\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:815px;top:810px;width:320.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:641.0px;top:743px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GT-g4\\\" data-to=\\\"GT-g3\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:940px;top:810px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:898.5px;top:743px;\\\">1</div><div class=\\\"label \\\" style=\\\"left:574px;top:821px;width:190px;\\\">跳过观察位置</div><div class=\\\"label weight\\\" style=\\\"left:300px;top:865px;\\\">终点残差权重：q = 0.72；同轮不衰减</div><div class=\\\"rule\\\" style=\\\"left:42px;top:920px;width:1118px\\\"></div><div class=\\\"label section\\\" style=\\\"left:42px;top:946px;\\\">同轮共享目标；每个前缀仍有自己的优势</div><div id=\\\"GT-turn1\\\" class=\\\"node value-card\\\" data-map-node style=\\\"left:300px;top:1006px;width:350px;height:280px\\\"><div class=\\\"action\\\">第 1 轮</div><div class=\\\"matrix\\\"><div class=\\\"token-name\\\">g₁</div><div class=\\\"token-name\\\">g₂</div><div class=\\\"\\\">0.20</div><div class=\\\"\\\">0.40</div><div class=\\\"target\\\">0.81</div><div class=\\\"target\\\">0.81</div><div class=\\\"advantage\\\">0.61</div><div class=\\\"advantage\\\">0.41</div></div><div data-node-detail>下一轮起点的V=0.5、A=0.5。共同目标U₁=0.9×(0.5+0.8×0.5)=0.81。两个prefix分别减去自己的V，得到A₁=0.81−0.2=0.61，A₂=0.81−0.4=0.41。</div></div><div id=\\\"GT-turn2\\\" class=\\\"node value-card\\\" data-map-node style=\\\"left:790px;top:1006px;width:350px;height:280px\\\"><div class=\\\"action\\\">第 2 轮</div><div class=\\\"matrix\\\"><div class=\\\"token-name\\\">g₃</div><div class=\\\"token-name\\\">g₄</div><div class=\\\"\\\">0.50</div><div class=\\\"\\\">0.80</div><div class=\\\"target\\\">1.00</div><div class=\\\"target\\\">1.00</div><div class=\\\"advantage\\\">0.50</div><div class=\\\"advantage\\\">0.20</div></div><div data-node-detail>第2轮结束时真正终止，只有终点奖励1，因此两个生成位置的共同目标都为1；各自减去V，优势为0.5与0.2。</div></div><div class=\\\"label row\\\" style=\\\"left:42px;top:1125px;\\\">生成前的价值 V</div><div class=\\\"label row\\\" style=\\\"left:42px;top:1178px;\\\">共同目标 U</div><div class=\\\"label row\\\" style=\\\"left:42px;top:1231px;\\\">优势 A = U − V</div><div class=\\\"label \\\" style=\\\"left:300px;top:1302px;width:840px;\\\">U₁ = 0.9 × (0.5 + 0.8 × 0.5) = 0.81</div><div class=\\\"label \\\" style=\\\"left:42px;top:1374px;width:1100px;\\\">上图比较末端残差的传播系数，下图计算回报目标与优势。</div><div class=\\\"label \\\" style=\\\"left:42px;top:1412px;width:1110px;\\\">γ = λ = 1 时三条链的系数均为 1；RPR-1 使用标准 GAE 与该配置。</div></div>\"\n        },\n        \"en\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;height:1460px;overflow:hidden;background:white;color:#20231f;font:26px/1.5 -apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',Arial,sans-serif}\\n.node{position:absolute;z-index:2;border:1.4px solid #454a40;border-radius:9px;background:white;padding:12px 14px;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.node .action{font-size:28px;line-height:1.3;font-weight:400}\\n.node .sub{font-size:23px;line-height:1.45;color:#686c62;margin-top:7px}\\n.node.token{padding:8px 3px;border-radius:7px}\\n.node.observation{border:1px dashed #b5bcae;background:#fafbf7;color:#7c8476}\\n.node.soft{background-color:#f7faef;border-color:#82a65b;background-image:radial-gradient(#79a4433d .6px,transparent .75px);background-size:6px 6px}\\n.node.reward{border-color:#83a461;background:#f7faef;padding:8px 4px}\\n.node.reward .action{font-size:27px;white-space:nowrap}\\n.node sub{font-size:65%;line-height:0}\\n#G-input-observation .action{line-height:1.6}\\n[data-node-detail]{display:none}\\n.label{position:absolute;z-index:3;font-size:22px;line-height:1.5;color:#646b5e;background:white;padding:0 6px}\\n.label.heading{font-size:32px;color:#20231f;padding:0}\\n.label.section{font-size:27px;color:#30372a;padding:0}\\n.label.row{font-size:27px;color:#20231f;padding:0}\\n.label.row span{display:block;font-size:22px;color:#72796a;line-height:1.5;margin-top:5px}\\n.label.weight{font-size:23px;color:#6c7562}\\n.label.hop{font:24px/1.2 Georgia,serif;color:#363e2e;padding:0 7px}\\n.edge{position:absolute;height:0;border-top:1.6px solid #444b3b;transform-origin:left center;z-index:1}\\n.edge.arrow:after{content:'';position:absolute;right:-1px;top:-5px;border-left:8px solid #444b3b;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.edge.soft{border-top-color:#82a65b}.edge.soft.arrow:after{border-left-color:#82a65b}\\n.edge.context{border-top-style:dashed;border-top-color:#8c9980}.edge.context.arrow:after{border-left-color:#8c9980}\\n.rule{position:absolute;height:0;border-top:1px solid #dce0d6}\\n.value-card{padding:16px 0 0;justify-content:flex-start;border-color:#c9d2be;border-radius:8px}\\n.value-card .action{font-size:25px}\\n.value-card .matrix{margin-top:10px;display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:53px;font-size:27px;line-height:53px}\\n.value-card .matrix .token-name{font:27px/53px Georgia,serif;color:#747c6a}\\n.value-card .matrix .target{background:#f2f7e8;color:#4b652f}\\n.value-card .matrix .advantage{color:#263a16}\\n\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"label heading\\\" style=\\\"left:42px;top:27px;\\\">TB-GAE: terminal feedback across turns</div><div class=\\\"label \\\" style=\\\"left:42px;top:83px;width:1110px;\\\">Let γ = 0.9, λ = 0.8, q = γλ = 0.72; only the terminal reward is 1.</div><div class=\\\"label row\\\" style=\\\"left:42px;top:186px;\\\">Interaction</div><div class=\\\"label \\\" style=\\\"left:318px;top:128px;\\\">Turn 1</div><div class=\\\"label \\\" style=\\\"left:836px;top:128px;\\\">Turn 2</div><div class=\\\"node token\\\" id=\\\"G-input1\\\" data-map-node style=\\\"left:300px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>The 1st illustrative generated position in the turn-1 command. Real commands usually contain more tokens.</div></div><div class=\\\"node token\\\" id=\\\"G-input2\\\" data-map-node style=\\\"left:425px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>The last illustrative generated position in the turn-1 command. After the tool call finishes, the environment returns observations.</div></div><div class=\\\"node observation\\\" id=\\\"G-input-observation\\\" data-map-node style=\\\"left:550px;top:171px;width:210px;height:76px\\\"><div class=\\\"action\\\">o₁ … o<sub>L</sub></div><div data-node-detail>The environment returns L observation tokens. They remain in the next turn’s model context; only the advantage recursion below skips these positions. The comparison uses L=3 for readability.</div></div><div class=\\\"node token\\\" id=\\\"G-input3\\\" data-map-node style=\\\"left:815px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>The first generated position of turn 2. The policy and Critic inputs still include the previous turn’s tool output.</div></div><div class=\\\"node token\\\" id=\\\"G-input4\\\" data-map-node style=\\\"left:940px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>The last generated position of turn 2. The example truly terminates the task here and applies the terminal reward once.</div></div><div class=\\\"node reward\\\" id=\\\"G-inputR\\\" data-map-node style=\\\"left:1070px;top:171px;width:90px;height:76px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>Set terminal reward R=1. At true termination, the successor value and recursive advantage term are 0.</div></div><div class=\\\"connection\\\" data-from=\\\"G-input1\\\" data-to=\\\"G-input2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:370px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input2\\\" data-to=\\\"G-input-observation\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:495px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input-observation\\\" data-to=\\\"G-input3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:760px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input3\\\" data-to=\\\"G-input4\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:885px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input4\\\" data-to=\\\"G-inputR\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:1010px;top:209px;width:60.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"label \\\" style=\\\"left:300px;top:267px;width:840px;\\\">Observations stay in context; only GAE recursion skips them.</div><div class=\\\"rule\\\" style=\\\"left:42px;top:321px;width:1118px\\\"></div><div class=\\\"label section\\\" style=\\\"left:42px;top:342px;\\\">One run, three clocks for credit assignment</div><div class=\\\"label row\\\" style=\\\"left:42px;top:419px;width:220px;\\\">All-token chain<span>Both token types</span></div><div class=\\\"node token \\\" id=\\\"GA-g1\\\" data-map-node style=\\\"left:300px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>Generated position g1. In the mixed-text chain, both generated and observed positions enter the advantage recursion. Even when observation positions are masked in the training loss, they still cause decay along this recursion.</div></div><div class=\\\"node token \\\" id=\\\"GA-g2\\\" data-map-node style=\\\"left:425px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>Generated position g2. In the mixed-text chain, both generated and observed positions enter the advantage recursion. Even when observation positions are masked in the training loss, they still cause decay along this recursion.</div></div><div class=\\\"node token \\\" id=\\\"GA-g3\\\" data-map-node style=\\\"left:815px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>Generated position g3. In the mixed-text chain, both generated and observed positions enter the advantage recursion. Even when observation positions are masked in the training loss, they still cause decay along this recursion.</div></div><div class=\\\"node token \\\" id=\\\"GA-g4\\\" data-map-node style=\\\"left:940px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>Generated position g4. In the mixed-text chain, both generated and observed positions enter the advantage recursion. Even when observation positions are masked in the training loss, they still cause decay along this recursion.</div></div><div class=\\\"node reward\\\" id=\\\"GA-reward\\\" data-map-node style=\\\"left:1070px;top:416px;width:90px;height:72px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>Reward is injected once at the final generated position, forming a terminal TD residual; recursion then proceeds backward through generated positions.</div></div><div class=\\\"connection\\\" data-from=\\\"GA-reward\\\" data-to=\\\"GA-g4\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:1070px;top:452px;width:60.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"node observation token\\\" id=\\\"GA-o1\\\" data-map-node style=\\\"left:550px;top:424px;width:50px;height:56px\\\"><div class=\\\"action\\\">o₁</div><div data-node-detail>A tool-observation position. In the mixed-text chain it still enters GAE recursion, adding one decay step; the policy loss is 0 at this position.</div></div><div class=\\\"node observation token\\\" id=\\\"GA-o2\\\" data-map-node style=\\\"left:630px;top:424px;width:50px;height:56px\\\"><div class=\\\"action\\\">o₂</div><div data-node-detail>A tool-observation position. In the mixed-text chain it still enters GAE recursion, adding one decay step; the policy loss is 0 at this position.</div></div><div class=\\\"node observation token\\\" id=\\\"GA-o3\\\" data-map-node style=\\\"left:710px;top:424px;width:50px;height:56px\\\"><div class=\\\"action\\\">o₃</div><div data-node-detail>A tool-observation position. In the mixed-text chain it still enters GAE recursion, adding one decay step; the policy loss is 0 at this position.</div></div><div class=\\\"connection\\\" data-from=\\\"GA-g2\\\" data-to=\\\"GA-g1\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:425px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:383.5px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-o1\\\" data-to=\\\"GA-g2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:550px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:508.5px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-o2\\\" data-to=\\\"GA-o1\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:630px;top:452px;width:30.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:601.0px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-o3\\\" data-to=\\\"GA-o2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:710px;top:452px;width:30.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:681.0px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-g3\\\" data-to=\\\"GA-o3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:815px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:773.5px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-g4\\\" data-to=\\\"GA-g3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:940px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:898.5px;top:385px;\\\">q</div><div class=\\\"label weight\\\" style=\\\"left:300px;top:507px;\\\">Terminal residual weight: q⁶ ≈ 0.1393 (3 log tokens here)</div><div class=\\\"label row\\\" style=\\\"left:42px;top:598px;width:235px;\\\">SAO · Skip obs.<span>Generated hops ×q</span></div><div class=\\\"node token \\\" id=\\\"GS-g1\\\" data-map-node style=\\\"left:300px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>Generated position g1. This illustrative recursion skips only observations; every edge between generated positions still multiplies by q. It separates skipping observations from using a cross-turn clock.</div></div><div class=\\\"node token \\\" id=\\\"GS-g2\\\" data-map-node style=\\\"left:425px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>Generated position g2. This illustrative recursion skips only observations; every edge between generated positions still multiplies by q. It separates skipping observations from using a cross-turn clock.</div></div><div class=\\\"node token \\\" id=\\\"GS-g3\\\" data-map-node style=\\\"left:815px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>Generated position g3. This illustrative recursion skips only observations; every edge between generated positions still multiplies by q. It separates skipping observations from using a cross-turn clock.</div></div><div class=\\\"node token \\\" id=\\\"GS-g4\\\" data-map-node style=\\\"left:940px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>Generated position g4. This illustrative recursion skips only observations; every edge between generated positions still multiplies by q. It separates skipping observations from using a cross-turn clock.</div></div><div class=\\\"node reward\\\" id=\\\"GS-reward\\\" data-map-node style=\\\"left:1070px;top:595px;width:90px;height:72px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>Reward is injected once at the final generated position, forming a terminal TD residual; recursion then proceeds backward through generated positions.</div></div><div class=\\\"connection\\\" data-from=\\\"GS-reward\\\" data-to=\\\"GS-g4\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:1070px;top:631px;width:60.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"GS-g2\\\" data-to=\\\"GS-g1\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:425px;top:631px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:383.5px;top:564px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GS-g3\\\" data-to=\\\"GS-g2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:815px;top:631px;width:320.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:641.0px;top:564px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GS-g4\\\" data-to=\\\"GS-g3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:940px;top:631px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:898.5px;top:564px;\\\">q</div><div class=\\\"label \\\" style=\\\"left:574px;top:642px;width:190px;\\\">Skip obs.</div><div class=\\\"label weight\\\" style=\\\"left:300px;top:686px;\\\">Terminal residual weight: q³ ≈ 0.3732</div><div class=\\\"label row\\\" style=\\\"left:42px;top:777px;width:225px;\\\">TB · Turn clock<span>Only across turns ×q</span></div><div class=\\\"node token soft\\\" id=\\\"GT-g1\\\" data-map-node style=\\\"left:300px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>Generated position g1. TB-GAE retains this position’s own pre-token value baseline. Targets can be shared within a turn while advantages remain different.</div></div><div class=\\\"node token soft\\\" id=\\\"GT-g2\\\" data-map-node style=\\\"left:425px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>Generated position g2. TB-GAE retains this position’s own pre-token value baseline. Targets can be shared within a turn while advantages remain different.</div></div><div class=\\\"node token soft\\\" id=\\\"GT-g3\\\" data-map-node style=\\\"left:815px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>Generated position g3. TB-GAE retains this position’s own pre-token value baseline. Targets can be shared within a turn while advantages remain different.</div></div><div class=\\\"node token soft\\\" id=\\\"GT-g4\\\" data-map-node style=\\\"left:940px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>Generated position g4. TB-GAE retains this position’s own pre-token value baseline. Targets can be shared within a turn while advantages remain different.</div></div><div class=\\\"node reward\\\" id=\\\"GT-reward\\\" data-map-node style=\\\"left:1070px;top:774px;width:90px;height:72px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>Reward is injected once at the final generated position, forming a terminal TD residual; recursion then proceeds backward through generated positions.</div></div><div class=\\\"connection\\\" data-from=\\\"GT-reward\\\" data-to=\\\"GT-g4\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:1070px;top:810px;width:60.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"GT-g2\\\" data-to=\\\"GT-g1\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:425px;top:810px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:383.5px;top:743px;\\\">1</div><div class=\\\"connection\\\" data-from=\\\"GT-g3\\\" data-to=\\\"GT-g2\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:815px;top:810px;width:320.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:641.0px;top:743px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GT-g4\\\" data-to=\\\"GT-g3\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:940px;top:810px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:898.5px;top:743px;\\\">1</div><div class=\\\"label \\\" style=\\\"left:574px;top:821px;width:190px;\\\">Skip obs.</div><div class=\\\"label weight\\\" style=\\\"left:300px;top:865px;\\\">Terminal residual weight: q = 0.72; no within-turn decay</div><div class=\\\"rule\\\" style=\\\"left:42px;top:920px;width:1118px\\\"></div><div class=\\\"label section\\\" style=\\\"left:42px;top:946px;\\\">Shared turn targets; a distinct advantage for each prefix</div><div id=\\\"GT-turn1\\\" class=\\\"node value-card\\\" data-map-node style=\\\"left:300px;top:1006px;width:350px;height:280px\\\"><div class=\\\"action\\\">Turn 1</div><div class=\\\"matrix\\\"><div class=\\\"token-name\\\">g₁</div><div class=\\\"token-name\\\">g₂</div><div class=\\\"\\\">0.20</div><div class=\\\"\\\">0.40</div><div class=\\\"target\\\">0.81</div><div class=\\\"target\\\">0.81</div><div class=\\\"advantage\\\">0.61</div><div class=\\\"advantage\\\">0.41</div></div><div data-node-detail>At the next turn’s start, V=0.5 and A=0.5. The shared target is U₁=0.9×(0.5+0.8×0.5)=0.81. Each prefix subtracts its own V, giving A₁=0.81−0.2=0.61 and A₂=0.81−0.4=0.41.</div></div><div id=\\\"GT-turn2\\\" class=\\\"node value-card\\\" data-map-node style=\\\"left:790px;top:1006px;width:350px;height:280px\\\"><div class=\\\"action\\\">Turn 2</div><div class=\\\"matrix\\\"><div class=\\\"token-name\\\">g₃</div><div class=\\\"token-name\\\">g₄</div><div class=\\\"\\\">0.50</div><div class=\\\"\\\">0.80</div><div class=\\\"target\\\">1.00</div><div class=\\\"target\\\">1.00</div><div class=\\\"advantage\\\">0.50</div><div class=\\\"advantage\\\">0.20</div></div><div data-node-detail>Turn 2 ends in true termination, with only terminal reward 1. Both generated positions therefore share target 1; subtracting their own V gives advantages 0.5 and 0.2.</div></div><div class=\\\"label row\\\" style=\\\"left:42px;top:1125px;\\\">Pre-token value V</div><div class=\\\"label row\\\" style=\\\"left:42px;top:1178px;\\\">Shared target U</div><div class=\\\"label row\\\" style=\\\"left:42px;top:1231px;\\\">Adv. A = U − V</div><div class=\\\"label \\\" style=\\\"left:300px;top:1302px;width:840px;\\\">U₁ = 0.9 × (0.5 + 0.8 × 0.5) = 0.81</div><div class=\\\"label \\\" style=\\\"left:42px;top:1374px;width:1100px;\\\">Above: terminal-residual propagation weights. Below: return targets and advantages.</div><div class=\\\"label \\\" style=\\\"left:42px;top:1412px;width:1110px;\\\">With γ = λ = 1, all three chains have coefficient 1; RPR-1 uses standard GAE with this setting.</div></div>\"\n        },\n        \"ja\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;height:1460px;overflow:hidden;background:white;color:#20231f;font:26px/1.5 -apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',Arial,sans-serif}\\n.node{position:absolute;z-index:2;border:1.4px solid #454a40;border-radius:9px;background:white;padding:12px 14px;display:flex;flex-direction:column;justify-content:center;text-align:center}\\n.node .action{font-size:28px;line-height:1.3;font-weight:400}\\n.node .sub{font-size:23px;line-height:1.45;color:#686c62;margin-top:7px}\\n.node.token{padding:8px 3px;border-radius:7px}\\n.node.observation{border:1px dashed #b5bcae;background:#fafbf7;color:#7c8476}\\n.node.soft{background-color:#f7faef;border-color:#82a65b;background-image:radial-gradient(#79a4433d .6px,transparent .75px);background-size:6px 6px}\\n.node.reward{border-color:#83a461;background:#f7faef;padding:8px 4px}\\n.node.reward .action{font-size:27px;white-space:nowrap}\\n.node sub{font-size:65%;line-height:0}\\n#G-input-observation .action{line-height:1.6}\\n[data-node-detail]{display:none}\\n.label{position:absolute;z-index:3;font-size:22px;line-height:1.5;color:#646b5e;background:white;padding:0 6px}\\n.label.heading{font-size:32px;color:#20231f;padding:0}\\n.label.section{font-size:27px;color:#30372a;padding:0}\\n.label.row{font-size:27px;color:#20231f;padding:0}\\n.label.row span{display:block;font-size:22px;color:#72796a;line-height:1.5;margin-top:5px}\\n.label.weight{font-size:23px;color:#6c7562}\\n.label.hop{font:24px/1.2 Georgia,serif;color:#363e2e;padding:0 7px}\\n.edge{position:absolute;height:0;border-top:1.6px solid #444b3b;transform-origin:left center;z-index:1}\\n.edge.arrow:after{content:'';position:absolute;right:-1px;top:-5px;border-left:8px solid #444b3b;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.edge.soft{border-top-color:#82a65b}.edge.soft.arrow:after{border-left-color:#82a65b}\\n.edge.context{border-top-style:dashed;border-top-color:#8c9980}.edge.context.arrow:after{border-left-color:#8c9980}\\n.rule{position:absolute;height:0;border-top:1px solid #dce0d6}\\n.value-card{padding:16px 0 0;justify-content:flex-start;border-color:#c9d2be;border-radius:8px}\\n.value-card .action{font-size:25px}\\n.value-card .matrix{margin-top:10px;display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:53px;font-size:27px;line-height:53px}\\n.value-card .matrix .token-name{font:27px/53px Georgia,serif;color:#747c6a}\\n.value-card .matrix .target{background:#f2f7e8;color:#4b652f}\\n.value-card .matrix .advantage{color:#263a16}\\n\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"label heading\\\" style=\\\"left:42px;top:27px;\\\">TB-GAE：対話ターンを越えて終端報酬を伝える</div><div class=\\\"label \\\" style=\\\"left:42px;top:83px;width:1110px;\\\">γ = 0.9、λ = 0.8、q = γλ = 0.72。終端報酬のみ 1 とする。</div><div class=\\\"label row\\\" style=\\\"left:42px;top:186px;\\\">実際の対話</div><div class=\\\"label \\\" style=\\\"left:318px;top:128px;\\\">ターン 1</div><div class=\\\"label \\\" style=\\\"left:836px;top:128px;\\\">ターン 2</div><div class=\\\"node token\\\" id=\\\"G-input1\\\" data-map-node style=\\\"left:300px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>ターン 1 のコマンドの 1 番目の模式的な生成位置。実際のコマンドは通常、より多くのトークンを含む。</div></div><div class=\\\"node token\\\" id=\\\"G-input2\\\" data-map-node style=\\\"left:425px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>ターン 1 のコマンドの最後の模式的な生成位置。ツール呼び出し完了後、環境が観測を返す。</div></div><div class=\\\"node observation\\\" id=\\\"G-input-observation\\\" data-map-node style=\\\"left:550px;top:171px;width:210px;height:76px\\\"><div class=\\\"action\\\">o₁ … o<sub>L</sub></div><div data-node-detail>環境は L 個の観測トークンを返す。次のターンのモデル文脈には引き続き含まれ、下のアドバンテージ再帰でのみこれらの位置を飛ばす。比較図では読みやすさのため L=3 とする。</div></div><div class=\\\"node token\\\" id=\\\"G-input3\\\" data-map-node style=\\\"left:815px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>ターン 2 の最初の生成位置。方策と Critic の入力には、前のターンのツール出力が引き続き含まれる。</div></div><div class=\\\"node token\\\" id=\\\"G-input4\\\" data-map-node style=\\\"left:940px;top:171px;width:70px;height:76px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>ターン 2 の最後の生成位置。この例では課題がここで実際に終端し、終端報酬を 1 度だけ置く。</div></div><div class=\\\"node reward\\\" id=\\\"G-inputR\\\" data-map-node style=\\\"left:1070px;top:171px;width:90px;height:76px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>終端報酬を R=1 とする。課題が実際に終端した後の後続価値と再帰アドバンテージ項は 0 とする。</div></div><div class=\\\"connection\\\" data-from=\\\"G-input1\\\" data-to=\\\"G-input2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:370px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input2\\\" data-to=\\\"G-input-observation\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:495px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input-observation\\\" data-to=\\\"G-input3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:760px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input3\\\" data-to=\\\"G-input4\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:885px;top:209px;width:55.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"G-input4\\\" data-to=\\\"G-inputR\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:1010px;top:209px;width:60.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"label \\\" style=\\\"left:300px;top:267px;width:840px;\\\">観測は次の判断にも使う。「スキップ」は下の GAE 再帰だけを変える。</div><div class=\\\"rule\\\" style=\\\"left:42px;top:321px;width:1118px\\\"></div><div class=\\\"label section\\\" style=\\\"left:42px;top:342px;\\\">同じ実行、信用を遡る 3 つの時計</div><div class=\\\"label row\\\" style=\\\"left:42px;top:419px;width:220px;\\\">全トークン列<span>生成・観測とも再帰</span></div><div class=\\\"node token \\\" id=\\\"GA-g1\\\" data-map-node style=\\\"left:300px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>生成位置 g1。混合テキスト列では生成位置と観測位置の両方がアドバンテージ再帰に入る。学習損失で観測位置をマスクしても、この再帰経路では減衰が生じる。</div></div><div class=\\\"node token \\\" id=\\\"GA-g2\\\" data-map-node style=\\\"left:425px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>生成位置 g2。混合テキスト列では生成位置と観測位置の両方がアドバンテージ再帰に入る。学習損失で観測位置をマスクしても、この再帰経路では減衰が生じる。</div></div><div class=\\\"node token \\\" id=\\\"GA-g3\\\" data-map-node style=\\\"left:815px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>生成位置 g3。混合テキスト列では生成位置と観測位置の両方がアドバンテージ再帰に入る。学習損失で観測位置をマスクしても、この再帰経路では減衰が生じる。</div></div><div class=\\\"node token \\\" id=\\\"GA-g4\\\" data-map-node style=\\\"left:940px;top:416px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>生成位置 g4。混合テキスト列では生成位置と観測位置の両方がアドバンテージ再帰に入る。学習損失で観測位置をマスクしても、この再帰経路では減衰が生じる。</div></div><div class=\\\"node reward\\\" id=\\\"GA-reward\\\" data-map-node style=\\\"left:1070px;top:416px;width:90px;height:72px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>最後の生成位置で報酬を 1 度だけ与え、終端 TD 残差を作る。その後、生成位置を遡って再帰する。</div></div><div class=\\\"connection\\\" data-from=\\\"GA-reward\\\" data-to=\\\"GA-g4\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:1070px;top:452px;width:60.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"node observation token\\\" id=\\\"GA-o1\\\" data-map-node style=\\\"left:550px;top:424px;width:50px;height:56px\\\"><div class=\\\"action\\\">o₁</div><div data-node-detail>ツール観測の位置。混合テキスト列では GAE 再帰に入り、減衰が 1 回増える。この位置の方策損失は 0 である。</div></div><div class=\\\"node observation token\\\" id=\\\"GA-o2\\\" data-map-node style=\\\"left:630px;top:424px;width:50px;height:56px\\\"><div class=\\\"action\\\">o₂</div><div data-node-detail>ツール観測の位置。混合テキスト列では GAE 再帰に入り、減衰が 1 回増える。この位置の方策損失は 0 である。</div></div><div class=\\\"node observation token\\\" id=\\\"GA-o3\\\" data-map-node style=\\\"left:710px;top:424px;width:50px;height:56px\\\"><div class=\\\"action\\\">o₃</div><div data-node-detail>ツール観測の位置。混合テキスト列では GAE 再帰に入り、減衰が 1 回増える。この位置の方策損失は 0 である。</div></div><div class=\\\"connection\\\" data-from=\\\"GA-g2\\\" data-to=\\\"GA-g1\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:425px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:383.5px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-o1\\\" data-to=\\\"GA-g2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:550px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:508.5px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-o2\\\" data-to=\\\"GA-o1\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:630px;top:452px;width:30.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:601.0px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-o3\\\" data-to=\\\"GA-o2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:710px;top:452px;width:30.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:681.0px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-g3\\\" data-to=\\\"GA-o3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:815px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:773.5px;top:385px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GA-g4\\\" data-to=\\\"GA-g3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:940px;top:452px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:898.5px;top:385px;\\\">q</div><div class=\\\"label weight\\\" style=\\\"left:300px;top:507px;\\\">終端残差の重み：q⁶ ≈ 0.1393（ここではログを 3 トークンとする）</div><div class=\\\"label row\\\" style=\\\"left:42px;top:598px;width:235px;\\\">SAO · 観測スキップ<span>生成位置の各遷移 ×q</span></div><div class=\\\"node token \\\" id=\\\"GS-g1\\\" data-map-node style=\\\"left:300px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>生成位置 g1。観測だけを飛ばす模式的な再帰であり、生成位置間の各辺では引き続き q を掛ける。「観測のスキップ」と「ターン間の時計」という 2 つの手順を区別するための図である。</div></div><div class=\\\"node token \\\" id=\\\"GS-g2\\\" data-map-node style=\\\"left:425px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>生成位置 g2。観測だけを飛ばす模式的な再帰であり、生成位置間の各辺では引き続き q を掛ける。「観測のスキップ」と「ターン間の時計」という 2 つの手順を区別するための図である。</div></div><div class=\\\"node token \\\" id=\\\"GS-g3\\\" data-map-node style=\\\"left:815px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>生成位置 g3。観測だけを飛ばす模式的な再帰であり、生成位置間の各辺では引き続き q を掛ける。「観測のスキップ」と「ターン間の時計」という 2 つの手順を区別するための図である。</div></div><div class=\\\"node token \\\" id=\\\"GS-g4\\\" data-map-node style=\\\"left:940px;top:595px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>生成位置 g4。観測だけを飛ばす模式的な再帰であり、生成位置間の各辺では引き続き q を掛ける。「観測のスキップ」と「ターン間の時計」という 2 つの手順を区別するための図である。</div></div><div class=\\\"node reward\\\" id=\\\"GS-reward\\\" data-map-node style=\\\"left:1070px;top:595px;width:90px;height:72px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>最後の生成位置で報酬を 1 度だけ与え、終端 TD 残差を作る。その後、生成位置を遡って再帰する。</div></div><div class=\\\"connection\\\" data-from=\\\"GS-reward\\\" data-to=\\\"GS-g4\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:1070px;top:631px;width:60.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"GS-g2\\\" data-to=\\\"GS-g1\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:425px;top:631px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:383.5px;top:564px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GS-g3\\\" data-to=\\\"GS-g2\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:815px;top:631px;width:320.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:641.0px;top:564px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GS-g4\\\" data-to=\\\"GS-g3\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:940px;top:631px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:898.5px;top:564px;\\\">q</div><div class=\\\"label \\\" style=\\\"left:574px;top:642px;width:190px;\\\">観測位置を飛ばす</div><div class=\\\"label weight\\\" style=\\\"left:300px;top:686px;\\\">終端残差の重み：q³ ≈ 0.3732</div><div class=\\\"label row\\\" style=\\\"left:42px;top:777px;width:225px;\\\">TB · ターン時計<span>ターン間のみ ×q</span></div><div class=\\\"node token soft\\\" id=\\\"GT-g1\\\" data-map-node style=\\\"left:300px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₁</div><div data-node-detail>生成位置 g1。TB-GAE はこの位置固有の生成前の価値ベースラインを保つ。同じターンの目標は共通でも、アドバンテージは異なり得る。</div></div><div class=\\\"node token soft\\\" id=\\\"GT-g2\\\" data-map-node style=\\\"left:425px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₂</div><div data-node-detail>生成位置 g2。TB-GAE はこの位置固有の生成前の価値ベースラインを保つ。同じターンの目標は共通でも、アドバンテージは異なり得る。</div></div><div class=\\\"node token soft\\\" id=\\\"GT-g3\\\" data-map-node style=\\\"left:815px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₃</div><div data-node-detail>生成位置 g3。TB-GAE はこの位置固有の生成前の価値ベースラインを保つ。同じターンの目標は共通でも、アドバンテージは異なり得る。</div></div><div class=\\\"node token soft\\\" id=\\\"GT-g4\\\" data-map-node style=\\\"left:940px;top:774px;width:70px;height:72px\\\"><div class=\\\"action\\\">g₄</div><div data-node-detail>生成位置 g4。TB-GAE はこの位置固有の生成前の価値ベースラインを保つ。同じターンの目標は共通でも、アドバンテージは異なり得る。</div></div><div class=\\\"node reward\\\" id=\\\"GT-reward\\\" data-map-node style=\\\"left:1070px;top:774px;width:90px;height:72px\\\"><div class=\\\"action\\\">R = 1</div><div data-node-detail>最後の生成位置で報酬を 1 度だけ与え、終端 TD 残差を作る。その後、生成位置を遡って再帰する。</div></div><div class=\\\"connection\\\" data-from=\\\"GT-reward\\\" data-to=\\\"GT-g4\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:1070px;top:810px;width:60.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"GT-g2\\\" data-to=\\\"GT-g1\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:425px;top:810px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:383.5px;top:743px;\\\">1</div><div class=\\\"connection\\\" data-from=\\\"GT-g3\\\" data-to=\\\"GT-g2\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:815px;top:810px;width:320.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:641.0px;top:743px;\\\">q</div><div class=\\\"connection\\\" data-from=\\\"GT-g4\\\" data-to=\\\"GT-g3\\\" data-relation=\\\"soft\\\"><div class=\\\"edge soft arrow\\\" style=\\\"left:940px;top:810px;width:55.0px;transform:rotate(180.0deg)\\\"></div></div><div class=\\\"label hop\\\" style=\\\"left:898.5px;top:743px;\\\">1</div><div class=\\\"label \\\" style=\\\"left:574px;top:821px;width:190px;\\\">観測位置を飛ばす</div><div class=\\\"label weight\\\" style=\\\"left:300px;top:865px;\\\">終端残差の重み：q = 0.72。同じターン内では減衰なし</div><div class=\\\"rule\\\" style=\\\"left:42px;top:920px;width:1118px\\\"></div><div class=\\\"label section\\\" style=\\\"left:42px;top:946px;\\\">同じターンは目標を共有し、各接頭辞は固有のアドバンテージを持つ</div><div id=\\\"GT-turn1\\\" class=\\\"node value-card\\\" data-map-node style=\\\"left:300px;top:1006px;width:350px;height:280px\\\"><div class=\\\"action\\\">ターン 1</div><div class=\\\"matrix\\\"><div class=\\\"token-name\\\">g₁</div><div class=\\\"token-name\\\">g₂</div><div class=\\\"\\\">0.20</div><div class=\\\"\\\">0.40</div><div class=\\\"target\\\">0.81</div><div class=\\\"target\\\">0.81</div><div class=\\\"advantage\\\">0.61</div><div class=\\\"advantage\\\">0.41</div></div><div data-node-detail>次のターンの始点では V=0.5、A=0.5。共通目標は U₁=0.9×(0.5+0.8×0.5)=0.81。各接頭辞が自分の V を引き、A₁=0.81−0.2=0.61、A₂=0.81−0.4=0.41 となる。</div></div><div id=\\\"GT-turn2\\\" class=\\\"node value-card\\\" data-map-node style=\\\"left:790px;top:1006px;width:350px;height:280px\\\"><div class=\\\"action\\\">ターン 2</div><div class=\\\"matrix\\\"><div class=\\\"token-name\\\">g₃</div><div class=\\\"token-name\\\">g₄</div><div class=\\\"\\\">0.50</div><div class=\\\"\\\">0.80</div><div class=\\\"target\\\">1.00</div><div class=\\\"target\\\">1.00</div><div class=\\\"advantage\\\">0.50</div><div class=\\\"advantage\\\">0.20</div></div><div data-node-detail>ターン 2 の終了で実際に終端し、報酬は終端の 1 だけである。そのため 2 つの生成位置の共通目標はいずれも 1。各自の V を引くとアドバンテージは 0.5 と 0.2 になる。</div></div><div class=\\\"label row\\\" style=\\\"left:42px;top:1125px;\\\">生成前の価値 V</div><div class=\\\"label row\\\" style=\\\"left:42px;top:1178px;\\\">共通目標 U</div><div class=\\\"label row\\\" style=\\\"left:42px;top:1231px;\\\">優位性 A = U − V</div><div class=\\\"label \\\" style=\\\"left:300px;top:1302px;width:840px;\\\">U₁ = 0.9 × (0.5 + 0.8 × 0.5) = 0.81</div><div class=\\\"label \\\" style=\\\"left:42px;top:1374px;width:1100px;\\\">上段は終端残差の伝播係数、下段はリターン目標とアドバンテージの計算。</div><div class=\\\"label \\\" style=\\\"left:42px;top:1412px;width:1110px;\\\">γ = λ = 1 なら 3 列とも係数は 1。RPR-1 はこの設定の標準 GAE を用いる。</div></div>\"\n        }\n      }\n    },\n    \"handoff\": {\n      \"title\": \"RSR 与 RPR 中的参数更新\",\n      \"kind\": \"flow\",\n      \"width\": 1200,\n      \"height\": 445,\n      \"links\": {},\n      \"related\": [\n        \"overview\",\n        \"reward\"\n      ],\n      \"localized\": {\n        \"zh\": {\n          \"css\": \"\\n*{box-sizing:border-box}.canvas{position:relative;width:1200px;background:#fff;color:#202020;font:26px/1.5 -apple-system,BlinkMacSystemFont,\\\"PingFang SC\\\",\\\"Microsoft YaHei\\\",Arial,sans-serif}\\n.node{position:absolute;z-index:2;border:1.4px solid #3d403a;border-radius:12px;background:white;padding:20px 24px;display:flex;flex-direction:column;justify-content:center}\\n.action{font-size:28px;line-height:1.45;font-weight:400}.sub{font-size:23px;line-height:1.5;color:#62625e;margin-top:7px}\\n[data-node-detail]{display:none}.label{position:absolute;z-index:3;font-size:22px;line-height:1.5;color:#62625e;background:#fff;padding:0 6px}\\n.label.heading{font-size:30px;color:#202020;padding:0}.label.eyebrow{font-size:22px;color:#62625e}\\n.edge{position:absolute;height:0;border-top:1.8px solid #30332e;transform-origin:left center;z-index:1}\\n.edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #30332e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.edge.feedback{border-top-color:#699c35}.edge.feedback.arrow:after{border-left-color:#699c35}\\n.edge.handoff{border-top-style:dashed}.group{position:absolute;border:1px dashed #b3b8ac;background:#fafbf8;border-radius:12px}\\n.rule{position:absolute;border-top:1px solid #d9ddd4}\\n.node.soft{background:#f5faef;border-color:#699c35;background-image:radial-gradient(#70a33d38 .5px,transparent .65px);background-size:5px 5px}\\n.node.failed{background:#fcf5e9;border-color:#a07040}\\n.canvas{height:445px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"H-sft\\\" data-to=\\\"H-freeze\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:490px;top:156px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"H-freeze\\\" data-to=\\\"H-policy\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:825px;top:156px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"H-inherit\\\" data-to=\\\"H-calibrate\\\" data-relation=\\\"handoff\\\"><div class=\\\"edge handoff arrow\\\" style=\\\"left:490px;top:296px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"H-calibrate\\\" data-to=\\\"H-value\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:825px;top:296px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"node soft\\\" id=\\\"H-sft\\\" style=\\\"left:230px;top:115px;width:260px;height:82px\\\"><div class=\\\"action\\\">SFT 更新</div><div class=\\\"sub\\\"></div><div data-node-detail>RSR 用验证通过并移除私有指导的公开轨迹，仅更新 Actor。</div></div><div class=\\\"node \\\" id=\\\"H-freeze\\\" style=\\\"left:565px;top:115px;width:260px;height:82px\\\"><div class=\\\"action\\\">冻结参数</div><div class=\\\"sub\\\"></div><div data-node-detail>每个 RPR 阶段最初 4 次更新期间，Actor 参数固定，执行当前任务供 Critic 校准。</div></div><div class=\\\"node soft\\\" id=\\\"H-policy\\\" style=\\\"left:900px;top:115px;width:260px;height:82px\\\"><div class=\\\"action\\\">PPO 更新</div><div class=\\\"sub\\\"></div><div data-node-detail>校准结束后，Actor 使用优势做 PPO 更新，同时 Critic 继续拟合回报目标。</div></div><div class=\\\"node \\\" id=\\\"H-inherit\\\" style=\\\"left:230px;top:255px;width:260px;height:82px\\\"><div class=\\\"action\\\">保留权重</div><div class=\\\"sub\\\"></div><div data-node-detail>Critic 权重在 RSR 期间保持不变，直接交接到下一 RPR 阶段。</div></div><div class=\\\"node soft\\\" id=\\\"H-calibrate\\\" style=\\\"left:565px;top:255px;width:260px;height:82px\\\"><div class=\\\"action\\\">价值回归</div><div class=\\\"sub\\\"></div><div data-node-detail>先做 4 次 Critic-only 更新，以当前 Actor 的轨迹适应策略与奖励。首次进入 RPR-1 前另有一轮 SWR 价值预热。</div></div><div class=\\\"node soft\\\" id=\\\"H-value\\\" style=\\\"left:900px;top:255px;width:260px;height:82px\\\"><div class=\\\"action\\\">价值回归</div><div class=\\\"sub\\\"></div><div data-node-detail>联合训练中继续拟合回报目标，每个 RPR 阶段只在开头做一次 4 更新的校准。</div></div><div class=\\\"label eyebrow\\\" style=\\\"left:260px;top:35px;\\\">RSR · 监督微调</div><div class=\\\"label eyebrow\\\" style=\\\"left:590px;top:35px;\\\">RPR · 校准 4 次</div><div class=\\\"label eyebrow\\\" style=\\\"left:930px;top:35px;\\\">RPR · 联合训练</div><div class=\\\"label \\\" style=\\\"left:55px;top:144px;\\\">Actor</div><div class=\\\"label \\\" style=\\\"left:55px;top:284px;\\\">Critic</div><div class=\\\"label eyebrow\\\" style=\\\"left:230px;top:382px;\\\">绿色：更新参数　　白色：保持参数</div></div>\"\n        },\n        \"en\": {\n          \"css\": \"\\n*{box-sizing:border-box}.canvas{position:relative;width:1200px;background:#fff;color:#202020;font:26px/1.5 -apple-system,BlinkMacSystemFont,\\\"PingFang SC\\\",\\\"Microsoft YaHei\\\",Arial,sans-serif}\\n.node{position:absolute;z-index:2;border:1.4px solid #3d403a;border-radius:12px;background:white;padding:20px 24px;display:flex;flex-direction:column;justify-content:center}\\n.action{font-size:28px;line-height:1.45;font-weight:400}.sub{font-size:23px;line-height:1.5;color:#62625e;margin-top:7px}\\n[data-node-detail]{display:none}.label{position:absolute;z-index:3;font-size:22px;line-height:1.5;color:#62625e;background:#fff;padding:0 6px}\\n.label.heading{font-size:30px;color:#202020;padding:0}.label.eyebrow{font-size:22px;color:#62625e}\\n.edge{position:absolute;height:0;border-top:1.8px solid #30332e;transform-origin:left center;z-index:1}\\n.edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #30332e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.edge.feedback{border-top-color:#699c35}.edge.feedback.arrow:after{border-left-color:#699c35}\\n.edge.handoff{border-top-style:dashed}.group{position:absolute;border:1px dashed #b3b8ac;background:#fafbf8;border-radius:12px}\\n.rule{position:absolute;border-top:1px solid #d9ddd4}\\n.node.soft{background:#f5faef;border-color:#699c35;background-image:radial-gradient(#70a33d38 .5px,transparent .65px);background-size:5px 5px}\\n.node.failed{background:#fcf5e9;border-color:#a07040}\\n.canvas{height:445px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"H-sft\\\" data-to=\\\"H-freeze\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:490px;top:156px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"H-freeze\\\" data-to=\\\"H-policy\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:825px;top:156px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"H-inherit\\\" data-to=\\\"H-calibrate\\\" data-relation=\\\"handoff\\\"><div class=\\\"edge handoff arrow\\\" style=\\\"left:490px;top:296px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"H-calibrate\\\" data-to=\\\"H-value\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:825px;top:296px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"node soft\\\" id=\\\"H-sft\\\" style=\\\"left:230px;top:115px;width:260px;height:82px\\\"><div class=\\\"action\\\">SFT update</div><div class=\\\"sub\\\"></div><div data-node-detail>RSR updates only the Actor, using verified public trajectories with private guidance removed.</div></div><div class=\\\"node \\\" id=\\\"H-freeze\\\" style=\\\"left:565px;top:115px;width:260px;height:82px\\\"><div class=\\\"action\\\">Frozen</div><div class=\\\"sub\\\"></div><div data-node-detail>During the first 4 updates of each RPR stage, Actor parameters are fixed. The Actor runs current tasks to calibrate the Critic.</div></div><div class=\\\"node soft\\\" id=\\\"H-policy\\\" style=\\\"left:900px;top:115px;width:260px;height:82px\\\"><div class=\\\"action\\\">PPO update</div><div class=\\\"sub\\\"></div><div data-node-detail>After calibration, the Actor performs PPO updates using advantages while the Critic continues to fit return targets.</div></div><div class=\\\"node \\\" id=\\\"H-inherit\\\" style=\\\"left:230px;top:255px;width:260px;height:82px\\\"><div class=\\\"action\\\">Retain weights</div><div class=\\\"sub\\\"></div><div data-node-detail>Critic weights remain unchanged during RSR and pass directly to the next RPR stage.</div></div><div class=\\\"node soft\\\" id=\\\"H-calibrate\\\" style=\\\"left:565px;top:255px;width:260px;height:82px\\\"><div class=\\\"action\\\">Value fitting</div><div class=\\\"sub\\\"></div><div data-node-detail>First, 4 Critic-only updates adapt to the policy and reward using current Actor trajectories. A separate one-epoch SWR value warm-up precedes the first entry into RPR-1.</div></div><div class=\\\"node soft\\\" id=\\\"H-value\\\" style=\\\"left:900px;top:255px;width:260px;height:82px\\\"><div class=\\\"action\\\">Value fitting</div><div class=\\\"sub\\\"></div><div data-node-detail>Return-target fitting continues during joint training. Each RPR stage has one calibration period of 4 updates, at its start.</div></div><div class=\\\"label eyebrow\\\" style=\\\"left:260px;top:35px;\\\">RSR · SFT</div><div class=\\\"label eyebrow\\\" style=\\\"left:590px;top:35px;\\\">RPR · 4-step calibration</div><div class=\\\"label eyebrow\\\" style=\\\"left:930px;top:35px;\\\">RPR · Joint training</div><div class=\\\"label \\\" style=\\\"left:55px;top:144px;\\\">Actor</div><div class=\\\"label \\\" style=\\\"left:55px;top:284px;\\\">Critic</div><div class=\\\"label eyebrow\\\" style=\\\"left:230px;top:382px;\\\">Green: update parameters    White: retain parameters</div></div>\"\n        },\n        \"ja\": {\n          \"css\": \"\\n*{box-sizing:border-box}.canvas{position:relative;width:1200px;background:#fff;color:#202020;font:26px/1.5 -apple-system,BlinkMacSystemFont,\\\"PingFang SC\\\",\\\"Microsoft YaHei\\\",Arial,sans-serif}\\n.node{position:absolute;z-index:2;border:1.4px solid #3d403a;border-radius:12px;background:white;padding:20px 24px;display:flex;flex-direction:column;justify-content:center}\\n.action{font-size:28px;line-height:1.45;font-weight:400}.sub{font-size:23px;line-height:1.5;color:#62625e;margin-top:7px}\\n[data-node-detail]{display:none}.label{position:absolute;z-index:3;font-size:22px;line-height:1.5;color:#62625e;background:#fff;padding:0 6px}\\n.label.heading{font-size:30px;color:#202020;padding:0}.label.eyebrow{font-size:22px;color:#62625e}\\n.edge{position:absolute;height:0;border-top:1.8px solid #30332e;transform-origin:left center;z-index:1}\\n.edge.arrow:after{content:\\\"\\\";position:absolute;right:-1px;top:-5px;border-left:8px solid #30332e;border-top:4px solid transparent;border-bottom:4px solid transparent}\\n.edge.feedback{border-top-color:#699c35}.edge.feedback.arrow:after{border-left-color:#699c35}\\n.edge.handoff{border-top-style:dashed}.group{position:absolute;border:1px dashed #b3b8ac;background:#fafbf8;border-radius:12px}\\n.rule{position:absolute;border-top:1px solid #d9ddd4}\\n.node.soft{background:#f5faef;border-color:#699c35;background-image:radial-gradient(#70a33d38 .5px,transparent .65px);background-size:5px 5px}\\n.node.failed{background:#fcf5e9;border-color:#a07040}\\n.canvas{height:445px}\",\n          \"html\": \"<div class=\\\"canvas\\\"><div class=\\\"connection\\\" data-from=\\\"H-sft\\\" data-to=\\\"H-freeze\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:490px;top:156px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"H-freeze\\\" data-to=\\\"H-policy\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:825px;top:156px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"H-inherit\\\" data-to=\\\"H-calibrate\\\" data-relation=\\\"handoff\\\"><div class=\\\"edge handoff arrow\\\" style=\\\"left:490px;top:296px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"H-calibrate\\\" data-to=\\\"H-value\\\" data-relation=\\\"main\\\"><div class=\\\"edge main arrow\\\" style=\\\"left:825px;top:296px;width:75.0px;transform:rotate(0.0deg)\\\"></div></div><div class=\\\"node soft\\\" id=\\\"H-sft\\\" style=\\\"left:230px;top:115px;width:260px;height:82px\\\"><div class=\\\"action\\\">SFT 更新</div><div class=\\\"sub\\\"></div><div data-node-detail>RSR は、検証済みで非公開の指示を除いた公開軌跡を使い、Actor だけを更新する。</div></div><div class=\\\"node \\\" id=\\\"H-freeze\\\" style=\\\"left:565px;top:115px;width:260px;height:82px\\\"><div class=\\\"action\\\">パラメータ固定</div><div class=\\\"sub\\\"></div><div data-node-detail>各 RPR 段階の最初の 4 回の更新では Actor のパラメータを固定し、現在の課題を実行して Critic を校正する。</div></div><div class=\\\"node soft\\\" id=\\\"H-policy\\\" style=\\\"left:900px;top:115px;width:260px;height:82px\\\"><div class=\\\"action\\\">PPO 更新</div><div class=\\\"sub\\\"></div><div data-node-detail>校正後、Actor はアドバンテージを用いて PPO 更新を行い、Critic は引き続きリターン目標に適合させる。</div></div><div class=\\\"node \\\" id=\\\"H-inherit\\\" style=\\\"left:230px;top:255px;width:260px;height:82px\\\"><div class=\\\"action\\\">重みを保持</div><div class=\\\"sub\\\"></div><div data-node-detail>Critic の重みは RSR 中には変えず、そのまま次の RPR 段階へ引き継ぐ。</div></div><div class=\\\"node soft\\\" id=\\\"H-calibrate\\\" style=\\\"left:565px;top:255px;width:260px;height:82px\\\"><div class=\\\"action\\\">価値回帰</div><div class=\\\"sub\\\"></div><div data-node-detail>まず現在の Actor の軌跡で Critic のみを 4 回更新し、方策と報酬に適応させる。初めて RPR-1 に入る前には、別途 1 エポックの SWR 価値ウォームアップを行う。</div></div><div class=\\\"node soft\\\" id=\\\"H-value\\\" style=\\\"left:900px;top:255px;width:260px;height:82px\\\"><div class=\\\"action\\\">価値回帰</div><div class=\\\"sub\\\"></div><div data-node-detail>共同学習中もリターン目標への適合を続ける。各 RPR 段階で 4 回更新の校正を行うのは、開始時の 1 度だけである。</div></div><div class=\\\"label eyebrow\\\" style=\\\"left:260px;top:35px;\\\">RSR · 教師あり調整</div><div class=\\\"label eyebrow\\\" style=\\\"left:590px;top:35px;\\\">RPR · 4 回の校正</div><div class=\\\"label eyebrow\\\" style=\\\"left:930px;top:35px;\\\">RPR · 共同学習</div><div class=\\\"label \\\" style=\\\"left:55px;top:144px;\\\">Actor</div><div class=\\\"label \\\" style=\\\"left:55px;top:284px;\\\">Critic</div><div class=\\\"label eyebrow\\\" style=\\\"left:230px;top:382px;\\\">緑：パラメータ更新　　白：パラメータ保持</div></div>\"\n        }\n      }\n    },\n    \"case\": {\n      \"title\": \"Rust–C：两条真实执行轨迹\",\n      \"kind\": \"replay\",\n      \"width\": 1200,\n      \"height\": 2370,\n      \"links\": {},\n      \"related\": [\n        \"reward\",\n        \"overview\"\n      ],\n      \"sequence\": [\n        \"base-arithmetic\",\n        \"base-build\",\n        \"base-wrapper\",\n        \"base-fuzz\",\n        \"rpr-tools\",\n        \"rpr-toolchain\",\n        \"rpr-build\",\n        \"rpr-probes\",\n        \"rpr-wrapper\",\n        \"rpr-fuzz\"\n      ],\n      \"localized\": {\n        \"zh\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;height:2370px;overflow:hidden;background:#fff;color:#303b36;font-family:Arial,'Microsoft YaHei','PingFang SC',sans-serif;text-align:left}\\n.canvas .case-title{position:absolute;left:60px;top:32px;margin:0;font-size:34px;line-height:1.35;font-weight:500;letter-spacing:.2px}\\n.canvas .case-subtitle{position:absolute;left:60px;top:89px;width:1080px;font-size:24px;line-height:1.5;color:#657267}\\n.canvas .task{position:absolute;left:60px;top:151px;width:1080px;border-top:1px solid #d7ded4;border-bottom:1px solid #d7ded4;padding:21px 0;font-size:25px;line-height:1.55}\\n.canvas .task span{display:inline-block;margin-right:24px;font-size:22px;color:#72806f}\\n.canvas .lane-heading{position:absolute;left:60px;margin:0;font-size:29px;font-weight:500;line-height:1.4}\\n.canvas .lane-heading small{margin-left:22px;font-size:22px;color:#72806f;font-weight:400}\\n.canvas .node{position:absolute;padding:19px 23px;background:#fff;border:1.3px solid #d3dbd0;border-radius:5px;z-index:3;outline-offset:5px}\\n.canvas .node h3{font-size:28px;line-height:1.35;font-weight:500;margin:0 0 12px}\\n.canvas .node .index{display:block;font-size:22px;line-height:1.3;color:#75816f;margin-bottom:6px;letter-spacing:.2px}\\n.canvas .node .node-line{font-size:24px;line-height:1.48;margin:4px 0 0}\\n.canvas .node .node-line .key{font-size:22px;color:#74816f;margin-right:12px}\\n.canvas .node code{font-family:Consolas,'SFMono-Regular',monospace;font-size:25px;white-space:nowrap}\\n.canvas .node.success{border-color:#aebda1;background-color:#f6f8f1;background-image:radial-gradient(#b8c6a84d .8px,transparent .8px);background-size:7px 7px}\\n.canvas .node.failure{border-color:#d1b391;background:#fcf4e9}\\n.canvas .node.failure .index{color:#9d774b}\\n.canvas .node[data-map-node]{cursor:pointer}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.55px solid #8d9b85;transform-origin:0 0;z-index:1}\\n.canvas .edge.arrow:after{content:'';position:absolute;right:-1px;top:-5.4px;border-left:8px solid #8d9b85;border-top:4.6px solid transparent;border-bottom:4.6px solid transparent}\\n.canvas .edge.failure{border-color:#b98f61}\\n.canvas .edge.failure.arrow:after{border-left-color:#b98f61}\\n.canvas .milestone{position:absolute;width:13px;height:13px;border:1.8px solid #93a184;border-radius:50%;background:#fff;z-index:4}\\n.canvas .note{position:absolute;font-size:23px;line-height:1.6;color:#64725e}\\n.canvas .edge-label{position:absolute;font-size:22px;line-height:1.4;color:#72806f;background:#fff;padding:3px 7px;z-index:2}\\n.canvas .divider{position:absolute;left:60px;width:1080px;border-top:1px solid #d8ded5}\\n.canvas .footer{position:absolute;left:60px;width:1080px;font-size:22px;line-height:1.55;color:#73806d}\\n.canvas .verdict{font-size:27px;letter-spacing:1px;line-height:1.5;margin-top:10px}\\n.canvas .verdict strong{font-weight:500}\\n.canvas .verdict .bad{color:#a5753d}\\n.canvas .node:focus-visible{outline:2px solid #607755}\\n\",\n          \"html\": \"<div class=\\\"canvas\\\"><h2 class=\\\"case-title\\\">Rust–C：两条真实执行轨迹</h2><div class=\\\"case-subtitle\\\">同一道任务，两次独立评测。先看执行，再看最终验收。</div><div class=\\\"task\\\"><span>任务</span>交付能自动构建的计算器，输出须逐字匹配隐藏参考实现。</div><h3 class=\\\"lane-heading\\\" style=\\\"top:278px\\\">Base<small>独立执行 A · 局部成功，最终未通过</small></h3><div class=\\\"edge-label\\\" style=\\\"left:789px;top:487px\\\">最终验收</div><div class=\\\"divider\\\" style=\\\"top:1017px\\\"></div><h3 class=\\\"lane-heading\\\" style=\\\"top:1064px\\\">RPR-2<small>独立执行 B · Terminal-RSI-27B</small></h3><div class=\\\"edge-label\\\" style=\\\"left:789px;top:1720px\\\">最终验收</div><section id=\\\"base-arithmetic\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"测试嵌套表达式与大整数\\\" style=\\\"left:160px;top:344px;width:510px;height:190px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"测试嵌套表达式与大整数\\\"><span class=\\\"index\\\">E60 · 本地测试</span><h3>测试嵌套表达式与大整数</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">观察</span>本地算术检查通过</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">状态</span>能算出结果；尚未最终验收</div><div data-node-detail>Base 的 E60 测试了嵌套表达式和大整数；一次加法输出 1000000001。本地算术测试通过后，最终验收还要检查隐藏输入下的逐字输出。</div></section><section id=\\\"base-build\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"删除构建产物，再调用入口\\\" style=\\\"left:160px;top:570px;width:510px;height:185px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"删除构建产物，再调用入口\\\"><span class=\\\"index\\\">E62 · 清理后重建</span><h3>删除构建产物，再调用入口</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">观察</span>自动编译成功</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">状态</span>本地入口脚本检查通过</div><div data-node-detail>Base 的 E62 删除构建产物，检验入口能否自行编译。该本地 wrapper 检查成功，说明构建路径已能运行。</div></section><section id=\\\"base-wrapper\\\" class=\\\"node success\\\" data-map-node data-map-label=\\\"自动构建通过\\\" style=\\\"left:800px;top:542px;width:340px;height:159px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"自动构建通过\\\"><span class=\\\"index\\\">验收 1 · 入口脚本</span><h3>自动构建通过</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">结果</span>可执行入口可用</div><div data-node-detail>最终验证器的 wrapper 门通过。构建验收和输出等价验收是两个不同检查。</div></section><section id=\\\"base-fuzz\\\" class=\\\"node failure\\\" data-map-node data-map-label=\\\"逐字比对失败\\\" style=\\\"left:800px;top:790px;width:340px;height:195px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"逐字比对失败\\\"><span class=\\\"index\\\">验收 2 · 隐藏输入</span><h3>逐字比对失败</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">实际</span><code>23</code></div><div class=\\\"node-line\\\"><span class=\\\"key\\\">参考</span><code>23.0</code></div><div data-node-detail>论文 Figure 16 明确给出整数值除法输出 23 而参考输出 23.0。数值意义接近仍未满足精确字符串输出契约，隐藏 fuzz 等价验收失败。</div></section><div class=\\\"note\\\" style=\\\"left:160px;top:806px;width:510px\\\">程序能运行，局部算术也通过。<br>最后仍因输出格式未对齐而失败。</div><div class=\\\"milestone\\\" data-node=\\\"base-arithmetic\\\" style=\\\"left:103.5px;top:402.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:409px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"base-build\\\" style=\\\"left:103.5px;top:628.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:635px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"connection\\\" data-from=\\\"base-arithmetic\\\" data-to=\\\"base-build\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:416px;width:212.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"base-build\\\" data-to=\\\"base-wrapper\\\" data-relation=\\\"verification\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:670px;top:621px;width:130.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"base-wrapper\\\" data-to=\\\"base-fuzz\\\" data-relation=\\\"verification\\\"><div class=\\\"edge failure arrow\\\" style=\\\"left:970px;top:701px;width:89.00px;transform:rotate(90.00deg)\\\"></div></div><section id=\\\"rpr-tools\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"查找音频处理工具\\\" style=\\\"left:160px;top:1132px;width:510px;height:157px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"查找音频处理工具\\\"><span class=\\\"index\\\">E1–2 · 查找工具</span><h3>查找音频处理工具</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">状态</span>为读取任务信息做准备</div><div data-node-detail>RPR-2 第一条执行记录在 E1–2 发现音频处理工具。图中按论文选摘的事件展示这条执行。</div></section><section id=\\\"rpr-toolchain\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"检查编译工具链\\\" style=\\\"left:160px;top:1333px;width:510px;height:157px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"检查编译工具链\\\"><span class=\\\"index\\\">E10 · 检查环境</span><h3>检查编译工具链</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">状态</span>随后进入新实现的构建</div><div data-node-detail>E10 检查工具链。该记录与 E11 的新实现文件、E16 的本地构建检查来自同一条 RPR-2 执行。</div></section><section id=\\\"rpr-build\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"创建 C / Rust 构建组件\\\" style=\\\"left:160px;top:1534px;width:510px;height:187px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"创建 C / Rust 构建组件\\\"><span class=\\\"index\\\">E11 · 写入文件</span><h3>创建 C / Rust 构建组件</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">实现</span>C 代码与 Rust 调用接口</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">入口</span>编译成可运行程序</div><div data-node-detail>E11 写入 C AST（抽象语法树，把表达式组织成运算符与运算对象的结构）、递归求值与释放函数，以及 Rust 外部函数声明（Rust 调用 C 的接口）。C 归档使用 -fPIC（生成位置无关代码的编译选项），入口脚本请求 musl（一个 C 标准库实现）目标。后续表达式求值通过 Python 调用完成。</div></section><section id=\\\"rpr-probes\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"检查跨语言调用，再用 Python 求值\\\" style=\\\"left:160px;top:1776px;width:510px;height:224px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"检查跨语言调用，再用 Python 求值\\\"><span class=\\\"index\\\">E11–16 · 检查并运行</span><h3>检查跨语言调用，再用 Python 求值</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">观察</span>本地测试输出 14、256</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">状态</span>原样返回 Python 计算结果</div><div data-node-detail>第一条 RPR-2 执行先做 C 链接冒烟测试（快速检查跨语言组件能否连接并运行），再由 Rust 入口调用 Python 计算表达式并原样输出。E16 显示 static-pie（可重定位的静态链接可执行文件）链接，表达式求值依赖 Python 运行时。</div></section><section id=\\\"rpr-wrapper\\\" class=\\\"node success\\\" data-map-node data-map-label=\\\"自动构建通过\\\" style=\\\"left:800px;top:1776px;width:340px;height:159px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"自动构建通过\\\"><span class=\\\"index\\\">验收 1 · 入口脚本</span><h3>自动构建通过</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">结果</span>可执行入口可用</div><div data-node-detail>RPR-2 的受保护 wrapper 检查通过。两次 RPR-2 评测均独立通过这道检查。</div></section><section id=\\\"rpr-fuzz\\\" class=\\\"node success\\\" data-map-node data-map-label=\\\"输出等价通过\\\" style=\\\"left:800px;top:2024px;width:340px;height:159px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"输出等价通过\\\"><span class=\\\"index\\\">验收 2 · 隐藏输入</span><h3>输出等价通过</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">结果</span>匹配隐藏参考实现</div><div data-node-detail>该 RPR-2 执行通过隐藏输入的 fuzz 等价检查。两次 RPR-2 独立评测都通过自动构建与输出等价验收；这里展示第一条执行的选摘事件。</div></section><div class=\\\"milestone\\\" data-node=\\\"rpr-tools\\\" style=\\\"left:103.5px;top:1190.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1197px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"rpr-toolchain\\\" style=\\\"left:103.5px;top:1391.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1398px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"rpr-build\\\" style=\\\"left:103.5px;top:1592.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1599px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"rpr-probes\\\" style=\\\"left:103.5px;top:1834.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1841px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"connection\\\" data-from=\\\"rpr-tools\\\" data-to=\\\"rpr-toolchain\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:1204px;width:187.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-toolchain\\\" data-to=\\\"rpr-build\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:1405px;width:187.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-build\\\" data-to=\\\"rpr-probes\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:1606px;width:228.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-probes\\\" data-to=\\\"rpr-wrapper\\\" data-relation=\\\"verification\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:670px;top:1855px;width:130.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-wrapper\\\" data-to=\\\"rpr-fuzz\\\" data-relation=\\\"verification\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:970px;top:1935px;width:89.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"note\\\" style=\\\"left:160px;top:2054px;width:520px\\\">两道验收都通过。<br>这条执行仍保留 Python 运行时依赖。</div><div class=\\\"divider\\\" style=\\\"top:2230px\\\"></div><div class=\\\"footer\\\" style=\\\"top:2260px\\\">E 为论文选摘事件编号。图中分别展示 Base 与 RPR-2 的独立执行。<br>来源：Terminal-RSI，附录 H / Figure 16。绿色表示通过相应检查，橙色表示失败。</div></div>\"\n        },\n        \"en\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;height:2370px;overflow:hidden;background:#fff;color:#303b36;font-family:Arial,'Microsoft YaHei','PingFang SC',sans-serif;text-align:left}\\n.canvas .case-title{position:absolute;left:60px;top:32px;margin:0;font-size:34px;line-height:1.35;font-weight:500;letter-spacing:.2px}\\n.canvas .case-subtitle{position:absolute;left:60px;top:89px;width:1080px;font-size:24px;line-height:1.5;color:#657267}\\n.canvas .task{position:absolute;left:60px;top:151px;width:1080px;border-top:1px solid #d7ded4;border-bottom:1px solid #d7ded4;padding:21px 0;font-size:25px;line-height:1.55}\\n.canvas .task span{display:inline-block;margin-right:24px;font-size:22px;color:#72806f}\\n.canvas .lane-heading{position:absolute;left:60px;margin:0;font-size:29px;font-weight:500;line-height:1.4}\\n.canvas .lane-heading small{margin-left:22px;font-size:22px;color:#72806f;font-weight:400}\\n.canvas .node{position:absolute;padding:19px 23px;background:#fff;border:1.3px solid #d3dbd0;border-radius:5px;z-index:3;outline-offset:5px}\\n.canvas .node h3{font-size:28px;line-height:1.35;font-weight:500;margin:0 0 12px}\\n.canvas .node .index{display:block;font-size:22px;line-height:1.3;color:#75816f;margin-bottom:6px;letter-spacing:.2px}\\n.canvas .node .node-line{font-size:24px;line-height:1.48;margin:4px 0 0}\\n.canvas .node .node-line .key{font-size:22px;color:#74816f;margin-right:12px}\\n.canvas .node code{font-family:Consolas,'SFMono-Regular',monospace;font-size:25px;white-space:nowrap}\\n.canvas .node.success{border-color:#aebda1;background-color:#f6f8f1;background-image:radial-gradient(#b8c6a84d .8px,transparent .8px);background-size:7px 7px}\\n.canvas .node.failure{border-color:#d1b391;background:#fcf4e9}\\n.canvas .node.failure .index{color:#9d774b}\\n.canvas .node[data-map-node]{cursor:pointer}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.55px solid #8d9b85;transform-origin:0 0;z-index:1}\\n.canvas .edge.arrow:after{content:'';position:absolute;right:-1px;top:-5.4px;border-left:8px solid #8d9b85;border-top:4.6px solid transparent;border-bottom:4.6px solid transparent}\\n.canvas .edge.failure{border-color:#b98f61}\\n.canvas .edge.failure.arrow:after{border-left-color:#b98f61}\\n.canvas .milestone{position:absolute;width:13px;height:13px;border:1.8px solid #93a184;border-radius:50%;background:#fff;z-index:4}\\n.canvas .note{position:absolute;font-size:23px;line-height:1.6;color:#64725e}\\n.canvas .edge-label{position:absolute;font-size:22px;line-height:1.4;color:#72806f;background:#fff;padding:3px 7px;z-index:2}\\n.canvas .divider{position:absolute;left:60px;width:1080px;border-top:1px solid #d8ded5}\\n.canvas .footer{position:absolute;left:60px;width:1080px;font-size:22px;line-height:1.55;color:#73806d}\\n.canvas .verdict{font-size:27px;letter-spacing:1px;line-height:1.5;margin-top:10px}\\n.canvas .verdict strong{font-weight:500}\\n.canvas .verdict .bad{color:#a5753d}\\n.canvas .node:focus-visible{outline:2px solid #607755}\\n\",\n          \"html\": \"<div class=\\\"canvas\\\"><h2 class=\\\"case-title\\\">Rust–C: two recorded runs</h2><div class=\\\"case-subtitle\\\">One task, two independent evaluations: execution first, final verification next.</div><div class=\\\"task\\\"><span>Task</span>Deliver an auto-building calculator whose output exactly matches the hidden reference.</div><h3 class=\\\"lane-heading\\\" style=\\\"top:278px\\\">Base<small>Independent run A · Local success, final failure</small></h3><div class=\\\"edge-label\\\" style=\\\"left:789px;top:487px\\\">Final checks</div><div class=\\\"divider\\\" style=\\\"top:1017px\\\"></div><h3 class=\\\"lane-heading\\\" style=\\\"top:1064px\\\">RPR-2<small>Independent run B · Terminal-RSI-27B</small></h3><div class=\\\"edge-label\\\" style=\\\"left:789px;top:1720px\\\">Final checks</div><section id=\\\"base-arithmetic\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"Test nesting and large integers\\\" style=\\\"left:160px;top:344px;width:510px;height:190px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"Test nesting and large integers\\\"><span class=\\\"index\\\">E60 · Local tests</span><h3>Test nesting and large integers</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">Observed</span>Local arithmetic passes</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">State</span>Computes; final checks pending</div><div data-node-detail>Base event E60 tests nested expressions and large integers; one addition returns 1000000001. After local arithmetic passes, final verification still checks exact output on hidden inputs.</div></section><section id=\\\"base-build\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"Clean build outputs; run entry\\\" style=\\\"left:160px;top:570px;width:510px;height:185px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"Clean build outputs; run entry\\\"><span class=\\\"index\\\">E62 · Clean rebuild</span><h3>Clean build outputs; run entry</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">Observed</span>Automatic compilation succeeds</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">State</span>Local wrapper check passes</div><div data-node-detail>Base event E62 deletes build outputs to test whether the entry point can compile automatically. This local wrapper check succeeds, showing that the build path works.</div></section><section id=\\\"base-wrapper\\\" class=\\\"node success\\\" data-map-node data-map-label=\\\"Auto-build passes\\\" style=\\\"left:800px;top:542px;width:340px;height:159px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"Auto-build passes\\\"><span class=\\\"index\\\">Check 1 · Wrapper</span><h3>Auto-build passes</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">Result</span>Entry point works</div><div data-node-detail>The final verifier’s wrapper gate passes. Build verification and output-equivalence verification are separate checks.</div></section><section id=\\\"base-fuzz\\\" class=\\\"node failure\\\" data-map-node data-map-label=\\\"Exact match fails\\\" style=\\\"left:800px;top:790px;width:340px;height:195px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"Exact match fails\\\"><span class=\\\"index\\\">Check 2 · Hidden inputs</span><h3>Exact match fails</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">Actual</span><code>23</code></div><div class=\\\"node-line\\\"><span class=\\\"key\\\">Reference</span><code>23.0</code></div><div data-node-detail>Figure 16 explicitly shows division with an integer-valued result returning 23, versus the reference output 23.0. Numerically similar values still violate the exact-string output contract, so the hidden fuzz equivalence check fails.</div></section><div class=\\\"note\\\" style=\\\"left:160px;top:806px;width:510px\\\">It runs and passes local arithmetic.<br>Output formatting still causes final failure.</div><div class=\\\"milestone\\\" data-node=\\\"base-arithmetic\\\" style=\\\"left:103.5px;top:402.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:409px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"base-build\\\" style=\\\"left:103.5px;top:628.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:635px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"connection\\\" data-from=\\\"base-arithmetic\\\" data-to=\\\"base-build\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:416px;width:212.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"base-build\\\" data-to=\\\"base-wrapper\\\" data-relation=\\\"verification\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:670px;top:621px;width:130.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"base-wrapper\\\" data-to=\\\"base-fuzz\\\" data-relation=\\\"verification\\\"><div class=\\\"edge failure arrow\\\" style=\\\"left:970px;top:701px;width:89.00px;transform:rotate(90.00deg)\\\"></div></div><section id=\\\"rpr-tools\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"Find audio tools\\\" style=\\\"left:160px;top:1132px;width:510px;height:157px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"Find audio tools\\\"><span class=\\\"index\\\">E1–2 · Find tools</span><h3>Find audio tools</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">State</span>Prepare to read task information</div><div data-node-detail>In the first RPR-2 run, events E1–2 discover audio-processing tools. This diagram follows the events selected in the paper.</div></section><section id=\\\"rpr-toolchain\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"Check the toolchain\\\" style=\\\"left:160px;top:1333px;width:510px;height:157px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"Check the toolchain\\\"><span class=\\\"index\\\">E10 · Inspect environment</span><h3>Check the toolchain</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">State</span>Then build the new implementation</div><div data-node-detail>E10 checks the toolchain. This event, the new implementation files in E11, and the local build check in E16 belong to the same RPR-2 run.</div></section><section id=\\\"rpr-build\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"Create C / Rust components\\\" style=\\\"left:160px;top:1534px;width:510px;height:187px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"Create C / Rust components\\\"><span class=\\\"index\\\">E11 · Write files</span><h3>Create C / Rust components</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">Code</span>C code with a Rust interface</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">Entry</span>Compile an executable</div><div data-node-detail>E11 writes a C AST (an abstract syntax tree organizing expressions into operators and operands), recursive evaluation and deallocation functions, and Rust foreign-function declarations (the interface for calling C). The C archive uses -fPIC (position-independent code), and the entry script requests a musl target (a C standard-library implementation). Subsequent expression evaluation is performed through Python calls.</div></section><section id=\\\"rpr-probes\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"Check linking; evaluate with Python\\\" style=\\\"left:160px;top:1776px;width:510px;height:224px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"Check linking; evaluate with Python\\\"><span class=\\\"index\\\">E11–16 · Check and run</span><h3>Check linking; evaluate with Python</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">Observed</span>Local tests return 14, 256</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">State</span>Return Python output unchanged</div><div data-node-detail>The first RPR-2 run performs a C-linking smoke test (a quick check that cross-language components connect and run), then calls Python from the Rust entry point to evaluate expressions and print the output unchanged. E16 shows static-pie linking (a relocatable, statically linked executable); expression evaluation depends on the Python runtime.</div></section><section id=\\\"rpr-wrapper\\\" class=\\\"node success\\\" data-map-node data-map-label=\\\"Auto-build passes\\\" style=\\\"left:800px;top:1776px;width:340px;height:159px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"Auto-build passes\\\"><span class=\\\"index\\\">Check 1 · Wrapper</span><h3>Auto-build passes</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">Result</span>Entry point works</div><div data-node-detail>The protected RPR-2 wrapper check passes. Both RPR-2 evaluations independently pass this check.</div></section><section id=\\\"rpr-fuzz\\\" class=\\\"node success\\\" data-map-node data-map-label=\\\"Equivalence passes\\\" style=\\\"left:800px;top:2024px;width:340px;height:159px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"Equivalence passes\\\"><span class=\\\"index\\\">Check 2 · Hidden inputs</span><h3>Equivalence passes</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">Result</span>Hidden ref. matched</div><div data-node-detail>This RPR-2 run passes the fuzz equivalence check on hidden inputs. Both independent RPR-2 evaluations pass auto-build and output-equivalence checks; the diagram shows selected events from the first run.</div></section><div class=\\\"milestone\\\" data-node=\\\"rpr-tools\\\" style=\\\"left:103.5px;top:1190.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1197px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"rpr-toolchain\\\" style=\\\"left:103.5px;top:1391.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1398px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"rpr-build\\\" style=\\\"left:103.5px;top:1592.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1599px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"rpr-probes\\\" style=\\\"left:103.5px;top:1834.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1841px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"connection\\\" data-from=\\\"rpr-tools\\\" data-to=\\\"rpr-toolchain\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:1204px;width:187.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-toolchain\\\" data-to=\\\"rpr-build\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:1405px;width:187.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-build\\\" data-to=\\\"rpr-probes\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:1606px;width:228.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-probes\\\" data-to=\\\"rpr-wrapper\\\" data-relation=\\\"verification\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:670px;top:1855px;width:130.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-wrapper\\\" data-to=\\\"rpr-fuzz\\\" data-relation=\\\"verification\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:970px;top:1935px;width:89.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"note\\\" style=\\\"left:160px;top:2054px;width:520px\\\">Both checks pass.<br>This run still depends on Python.</div><div class=\\\"divider\\\" style=\\\"top:2230px\\\"></div><div class=\\\"footer\\\" style=\\\"top:2260px\\\">E denotes event IDs selected in the paper. Base and RPR-2 are independent runs.<br>Source: Terminal-RSI, Appendix H / Figure 16. Green: check passed; orange: failed.</div></div>\"\n        },\n        \"ja\": {\n          \"css\": \"\\n*{box-sizing:border-box}\\n.canvas{position:relative;width:1200px;height:2370px;overflow:hidden;background:#fff;color:#303b36;font-family:Arial,'Microsoft YaHei','PingFang SC',sans-serif;text-align:left}\\n.canvas .case-title{position:absolute;left:60px;top:32px;margin:0;font-size:34px;line-height:1.35;font-weight:500;letter-spacing:.2px}\\n.canvas .case-subtitle{position:absolute;left:60px;top:89px;width:1080px;font-size:24px;line-height:1.5;color:#657267}\\n.canvas .task{position:absolute;left:60px;top:151px;width:1080px;border-top:1px solid #d7ded4;border-bottom:1px solid #d7ded4;padding:21px 0;font-size:25px;line-height:1.55}\\n.canvas .task span{display:inline-block;margin-right:24px;font-size:22px;color:#72806f}\\n.canvas .lane-heading{position:absolute;left:60px;margin:0;font-size:29px;font-weight:500;line-height:1.4}\\n.canvas .lane-heading small{margin-left:22px;font-size:22px;color:#72806f;font-weight:400}\\n.canvas .node{position:absolute;padding:19px 23px;background:#fff;border:1.3px solid #d3dbd0;border-radius:5px;z-index:3;outline-offset:5px}\\n.canvas .node h3{font-size:28px;line-height:1.35;font-weight:500;margin:0 0 12px}\\n.canvas .node .index{display:block;font-size:22px;line-height:1.3;color:#75816f;margin-bottom:6px;letter-spacing:.2px}\\n.canvas .node .node-line{font-size:24px;line-height:1.48;margin:4px 0 0}\\n.canvas .node .node-line .key{font-size:22px;color:#74816f;margin-right:12px}\\n.canvas .node code{font-family:Consolas,'SFMono-Regular',monospace;font-size:25px;white-space:nowrap}\\n.canvas .node.success{border-color:#aebda1;background-color:#f6f8f1;background-image:radial-gradient(#b8c6a84d .8px,transparent .8px);background-size:7px 7px}\\n.canvas .node.failure{border-color:#d1b391;background:#fcf4e9}\\n.canvas .node.failure .index{color:#9d774b}\\n.canvas .node[data-map-node]{cursor:pointer}\\n.canvas [data-node-detail]{display:none}\\n.canvas .edge{position:absolute;height:0;border-top:1.55px solid #8d9b85;transform-origin:0 0;z-index:1}\\n.canvas .edge.arrow:after{content:'';position:absolute;right:-1px;top:-5.4px;border-left:8px solid #8d9b85;border-top:4.6px solid transparent;border-bottom:4.6px solid transparent}\\n.canvas .edge.failure{border-color:#b98f61}\\n.canvas .edge.failure.arrow:after{border-left-color:#b98f61}\\n.canvas .milestone{position:absolute;width:13px;height:13px;border:1.8px solid #93a184;border-radius:50%;background:#fff;z-index:4}\\n.canvas .note{position:absolute;font-size:23px;line-height:1.6;color:#64725e}\\n.canvas .edge-label{position:absolute;font-size:22px;line-height:1.4;color:#72806f;background:#fff;padding:3px 7px;z-index:2}\\n.canvas .divider{position:absolute;left:60px;width:1080px;border-top:1px solid #d8ded5}\\n.canvas .footer{position:absolute;left:60px;width:1080px;font-size:22px;line-height:1.55;color:#73806d}\\n.canvas .verdict{font-size:27px;letter-spacing:1px;line-height:1.5;margin-top:10px}\\n.canvas .verdict strong{font-weight:500}\\n.canvas .verdict .bad{color:#a5753d}\\n.canvas .node:focus-visible{outline:2px solid #607755}\\n\",\n          \"html\": \"<div class=\\\"canvas\\\"><h2 class=\\\"case-title\\\">Rust–C：2 本の実行記録</h2><div class=\\\"case-subtitle\\\">同じ課題を独立に 2 回評価。まず実行を追い、次に最終検証を見る。</div><div class=\\\"task\\\"><span>課題</span>自動ビルド可能な計算機を作り、非公開の参照実装と出力を完全一致させる。</div><h3 class=\\\"lane-heading\\\" style=\\\"top:278px\\\">Base<small>独立実行 A · 局所では成功、最終検証は失敗</small></h3><div class=\\\"edge-label\\\" style=\\\"left:789px;top:487px\\\">最終検証</div><div class=\\\"divider\\\" style=\\\"top:1017px\\\"></div><h3 class=\\\"lane-heading\\\" style=\\\"top:1064px\\\">RPR-2<small>独立実行 B · Terminal-RSI-27B</small></h3><div class=\\\"edge-label\\\" style=\\\"left:789px;top:1720px\\\">最終検証</div><section id=\\\"base-arithmetic\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"入れ子式と大整数をテスト\\\" style=\\\"left:160px;top:344px;width:510px;height:190px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"入れ子式と大整数をテスト\\\"><span class=\\\"index\\\">E60 · ローカルテスト</span><h3>入れ子式と大整数をテスト</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">観測</span>ローカル算術テスト合格</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">状態</span>計算可能。最終検証は未実施</div><div data-node-detail>Base の E60 は入れ子式と大整数をテストし、ある加算で 1000000001 を出力した。ローカル算術テストの合格後も、最終検証では非公開入力に対する出力の完全一致を調べる。</div></section><section id=\\\"base-build\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"ビルド成果物を削除して起動\\\" style=\\\"left:160px;top:570px;width:510px;height:185px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"ビルド成果物を削除して起動\\\"><span class=\\\"index\\\">E62 · 削除後に再ビルド</span><h3>ビルド成果物を削除して起動</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">観測</span>自動コンパイル成功</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">状態</span>ローカル起動スクリプト合格</div><div data-node-detail>Base の E62 はビルド成果物を削除し、起動時に自動コンパイルできるかを調べた。このローカル wrapper 検査は成功し、ビルド経路が動作することを確認した。</div></section><section id=\\\"base-wrapper\\\" class=\\\"node success\\\" data-map-node data-map-label=\\\"自動ビルド合格\\\" style=\\\"left:800px;top:542px;width:340px;height:159px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"自動ビルド合格\\\"><span class=\\\"index\\\">検証 1 · 起動スクリプト</span><h3>自動ビルド合格</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">結果</span>起動口は動作</div><div data-node-detail>最終検証器の wrapper ゲートに合格した。ビルド検証と出力等価性の検証は別々の検査である。</div></section><section id=\\\"base-fuzz\\\" class=\\\"node failure\\\" data-map-node data-map-label=\\\"完全一致は失敗\\\" style=\\\"left:800px;top:790px;width:340px;height:195px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"完全一致は失敗\\\"><span class=\\\"index\\\">検証 2 · 非公開入力</span><h3>完全一致は失敗</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">実際</span><code>23</code></div><div class=\\\"node-line\\\"><span class=\\\"key\\\">参照</span><code>23.0</code></div><div data-node-detail>論文の Figure 16 では、結果が整数値になる除算の出力が 23、参照出力が 23.0 であることが明示されている。数値的に近くても厳密な文字列出力の契約を満たさず、非公開 fuzz 等価性検査は失敗した。</div></section><div class=\\\"note\\\" style=\\\"left:160px;top:806px;width:510px\\\">プログラムは動き、局所の算術も合格。<br>出力形式の不一致で最終的に失敗。</div><div class=\\\"milestone\\\" data-node=\\\"base-arithmetic\\\" style=\\\"left:103.5px;top:402.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:409px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"base-build\\\" style=\\\"left:103.5px;top:628.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:635px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"connection\\\" data-from=\\\"base-arithmetic\\\" data-to=\\\"base-build\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:416px;width:212.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"base-build\\\" data-to=\\\"base-wrapper\\\" data-relation=\\\"verification\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:670px;top:621px;width:130.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"base-wrapper\\\" data-to=\\\"base-fuzz\\\" data-relation=\\\"verification\\\"><div class=\\\"edge failure arrow\\\" style=\\\"left:970px;top:701px;width:89.00px;transform:rotate(90.00deg)\\\"></div></div><section id=\\\"rpr-tools\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"音声処理ツールを探す\\\" style=\\\"left:160px;top:1132px;width:510px;height:157px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"音声処理ツールを探す\\\"><span class=\\\"index\\\">E1–2 · ツール探索</span><h3>音声処理ツールを探す</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">状態</span>課題情報の読み取りを準備</div><div data-node-detail>RPR-2 の最初の実行では E1–2 で音声処理ツールを見つけた。図は論文が抜粋したイベントに沿って、この実行を示す。</div></section><section id=\\\"rpr-toolchain\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"コンパイラ環境を確認\\\" style=\\\"left:160px;top:1333px;width:510px;height:157px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"コンパイラ環境を確認\\\"><span class=\\\"index\\\">E10 · 環境確認</span><h3>コンパイラ環境を確認</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">状態</span>続いて新実装をビルド</div><div data-node-detail>E10 はツールチェーンを確認する。この記録、E11 の新実装ファイル、E16 のローカルビルド検査は、同じ RPR-2 実行に属する。</div></section><section id=\\\"rpr-build\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"C / Rust のビルド部品を作成\\\" style=\\\"left:160px;top:1534px;width:510px;height:187px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"C / Rust のビルド部品を作成\\\"><span class=\\\"index\\\">E11 · ファイル作成</span><h3>C / Rust のビルド部品を作成</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">実装</span>C コードと Rust 呼び出し口</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">起動口</span>実行可能ファイルにコンパイル</div><div data-node-detail>E11 は C の AST（演算子と被演算子で式を構造化する抽象構文木）、再帰評価・解放関数、Rust の外部関数宣言（C を呼び出すインターフェース）を作成した。C アーカイブは -fPIC（位置独立コード）を使い、起動スクリプトは musl（C 標準ライブラリ実装）ターゲットを指定する。その後の式評価は Python の呼び出しで行う。</div></section><section id=\\\"rpr-probes\\\" class=\\\"node \\\" data-map-node data-map-label=\\\"言語間の連携を確認し Python で評価\\\" style=\\\"left:160px;top:1776px;width:510px;height:224px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"言語間の連携を確認し Python で評価\\\"><span class=\\\"index\\\">E11–16 · 確認して実行</span><h3>言語間の連携を確認し Python で評価</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">観測</span>ローカル出力は 14、256</div><div class=\\\"node-line\\\"><span class=\\\"key\\\">状態</span>Python の結果をそのまま返す</div><div data-node-detail>最初の RPR-2 実行は C リンクのスモークテスト（言語間の部品を接続して実行できるかの簡易検査）を行い、Rust の起動口から Python を呼んで式を評価し、その出力をそのまま返した。E16 は static-pie（再配置可能な静的リンク実行ファイル）でのリンクを示すが、式評価は Python ランタイムに依存する。</div></section><section id=\\\"rpr-wrapper\\\" class=\\\"node success\\\" data-map-node data-map-label=\\\"自動ビルド合格\\\" style=\\\"left:800px;top:1776px;width:340px;height:159px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"自動ビルド合格\\\"><span class=\\\"index\\\">検証 1 · 起動スクリプト</span><h3>自動ビルド合格</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">結果</span>起動口は動作</div><div data-node-detail>RPR-2 は保護された wrapper 検査に合格した。2 回の RPR-2 評価はそれぞれ独立にこの検査に合格している。</div></section><section id=\\\"rpr-fuzz\\\" class=\\\"node success\\\" data-map-node data-map-label=\\\"出力等価性に合格\\\" style=\\\"left:800px;top:2024px;width:340px;height:159px\\\" tabindex=\\\"0\\\" role=\\\"button\\\" aria-label=\\\"出力等価性に合格\\\"><span class=\\\"index\\\">検証 2 · 非公開入力</span><h3>出力等価性に合格</h3><div class=\\\"node-line\\\"><span class=\\\"key\\\">結果</span>非公開参照と一致</div><div data-node-detail>この RPR-2 実行は非公開入力の fuzz 等価性検査に合格した。独立した 2 回の RPR-2 評価はいずれも自動ビルドと出力等価性に合格しており、ここでは最初の実行から抜粋したイベントを示す。</div></section><div class=\\\"milestone\\\" data-node=\\\"rpr-tools\\\" style=\\\"left:103.5px;top:1190.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1197px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"rpr-toolchain\\\" style=\\\"left:103.5px;top:1391.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1398px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"rpr-build\\\" style=\\\"left:103.5px;top:1592.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1599px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"milestone\\\" data-node=\\\"rpr-probes\\\" style=\\\"left:103.5px;top:1834.5px\\\"></div><div class=\\\"edge  \\\" style=\\\"left:117px;top:1841px;width:43.00px;transform:rotate(0.00deg)\\\"></div><div class=\\\"connection\\\" data-from=\\\"rpr-tools\\\" data-to=\\\"rpr-toolchain\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:1204px;width:187.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-toolchain\\\" data-to=\\\"rpr-build\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:1405px;width:187.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-build\\\" data-to=\\\"rpr-probes\\\" data-relation=\\\"main\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:110px;top:1606px;width:228.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-probes\\\" data-to=\\\"rpr-wrapper\\\" data-relation=\\\"verification\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:670px;top:1855px;width:130.00px;transform:rotate(0.00deg)\\\"></div></div><div class=\\\"connection\\\" data-from=\\\"rpr-wrapper\\\" data-to=\\\"rpr-fuzz\\\" data-relation=\\\"verification\\\"><div class=\\\"edge  arrow\\\" style=\\\"left:970px;top:1935px;width:89.00px;transform:rotate(90.00deg)\\\"></div></div><div class=\\\"note\\\" style=\\\"left:160px;top:2054px;width:520px\\\">両方の検証に合格。<br>この実行は Python への依存を残す。</div><div class=\\\"divider\\\" style=\\\"top:2230px\\\"></div><div class=\\\"footer\\\" style=\\\"top:2260px\\\">E は論文で抜粋されたイベント番号。Base と RPR-2 は別々の独立実行である。<br>出典：Terminal-RSI、付録 H / Figure 16。緑は該当検査の合格、橙は失敗を示す。</div></div>\"\n        }\n      }\n    }\n  },\n  \"strings\": {\n    \"RSR 与 RPR：经验进入下一轮训练\": [\n      \"RSR and RPR: experience feeds the next training round\",\n      \"RSR と RPR：経験を次の学習へ\"\n    ],\n    \"RSR 与 RPR 中的参数更新\": [\n      \"Parameter updates in RSR and RPR\",\n      \"RSR と RPR のパラメータ更新\"\n    ],\n    \"Rust–C：两条真实执行轨迹\": [\n      \"Rust–C: two recorded runs\",\n      \"Rust–C：2 本の実行記録\"\n    ],\n    \"RSR：同一计划，两次重新执行\": [\n      \"RSR: one plan, two fresh runs\",\n      \"RSR：同じ計画で 2 回再実行\"\n    ],\n    \"TB-GAE：沿轮次回传反馈\": [\n      \"TB-GAE: feedback across turns\",\n      \"TB-GAE：ターンを越えて報酬を伝える\"\n    ],\n    \"RSR · 重写示范\": [\n      \"RSR · Rewrite demonstrations\",\n      \"RSR · デモを再構成\"\n    ],\n    \"RPR · 交互训练\": [\n      \"RPR · Interactive RL\",\n      \"RPR · 対話的に学習\"\n    ],\n    \"从成功执行中整理训练数据\": [\n      \"Build training data from successful runs\",\n      \"成功した実行から学習データを作る\"\n    ],\n    \"执行新任务，按结果训练\": [\n      \"Run new tasks; learn from outcomes\",\n      \"新たな課題を実行し、結果から学ぶ\"\n    ],\n    \"当前模型\": [\n      \"Current model\",\n      \"現在のモデル\"\n    ],\n    \"保留的 Actor 负责发现成功执行；Critic 保存已有的回报预测。第一轮 RPR 从 RSR-1 Actor 和准备好的价值网络出发，随后继续交替 RSR 与 RPR。\": [\n      \"The retained Actor discovers successful runs; the Critic retains its return predictions. The first RPR round starts from the RSR-1 Actor and a prepared value network, then RSR and RPR continue to alternate.\",\n      \"引き継いだ Actor が成功する実行を探索し、Critic は既存のリターン予測を保持する。最初の RPR は RSR-1 の Actor と準備済みの価値ネットワークから始まり、その後も RSR と RPR を交互に行う。\"\n    ],\n    \"成功轨迹\": [\n      \"Success\",\n      \"成功軌跡\"\n    ],\n    \"探索并验收\": [\n      \"Run & test\",\n      \"探索・検証\"\n    ],\n    \"当前 Actor 在不同 harness 下执行任务，只有通过受保护验证器的成功轨迹才成为重写来源。\": [\n      \"The current Actor runs tasks under different harnesses. Only successful trajectories that pass the protected verifier become sources for rewriting.\",\n      \"現在の Actor が異なる harness で課題を実行する。保護された検証器に合格した成功軌跡だけが再構成の元になる。\"\n    ],\n    \"重写与验证\": [\n      \"Rewrite\",\n      \"再構成\"\n    ],\n    \"计划 → 重做\": [\n      \"Plan → rerun\",\n      \"計画 → 再実行\"\n    ],\n    \"从源轨迹提炼 runbook，经审查后在新的干净环境重新执行。只有再次通过验证与泄漏筛查的公开执行记录被接受；私有计划和审查对话随后移除。\": [\n      \"A runbook is distilled from the source trajectory, reviewed, and executed again in a fresh, clean environment. Only public execution records that pass verification again and leakage screening are accepted; private plans and review conversations are then removed.\",\n      \"元の軌跡から runbook を抽出し、レビュー後に新しいクリーンな環境で再実行する。再検証と漏洩検査に合格した公開実行記録だけを採用し、非公開の計画とレビュー対話は取り除く。\"\n    ],\n    \"监督微调\": [\n      \"SFT\",\n      \"SFT\"\n    ],\n    \"只更新 Actor\": [\n      \"Actor only\",\n      \"Actorのみ\"\n    ],\n    \"Actor 学习合格重执行轨迹中的示范动作；SFT 的直接学习损失落在选中的模型生成位置。Critic 权重保持不变。\": [\n      \"The Actor learns demonstrated actions from accepted rerun trajectories. The direct SFT loss is applied at selected model-generated positions. Critic weights remain unchanged.\",\n      \"Actor は採用された再実行軌跡の模範行動を学習する。SFT の直接の学習損失は、選択されたモデル生成位置に適用する。Critic の重みは変えない。\"\n    ],\n    \"采样与验收\": [\n      \"Rollouts\",\n      \"生成・検証\"\n    ],\n    \"新轨迹与奖励\": [\n      \"Runs + reward\",\n      \"新軌跡と報酬\"\n    ],\n    \"更新后的 Actor 执行新任务。验证器的检查结果经阶段固定的 FDR 或 SPR 公式变成奖励，Critic 为生成位置预测后续回报。\": [\n      \"The updated Actor runs new tasks. Verifier results become rewards through the FDR or SPR formula fixed for that stage; the Critic predicts future returns at generated positions.\",\n      \"更新後の Actor が新たな課題を実行する。検証結果を、段階ごとに固定された FDR または SPR の式で報酬に変換し、Critic が生成位置で以後のリターンを予測する。\"\n    ],\n    \"联合 PPO\": [\n      \"Joint PPO\",\n      \"共同 PPO\"\n    ],\n    \"阶段校准完成后，Actor 用优势更新动作概率，Critic 拟合回报目标。论文提出 TB-GAE；披露的 RPR-1 配置使用标准 GAE，γ=λ=1。\": [\n      \"After stage calibration, the Actor uses advantages to update action probabilities while the Critic fits return targets. The paper proposes TB-GAE; the disclosed RPR-1 configuration uses standard GAE with γ=λ=1.\",\n      \"段階の校正後、Actor はアドバンテージで行動確率を更新し、Critic はリターン目標に適合させる。論文は TB-GAE を提案しているが、公開された RPR-1 の設定は標準 GAE、γ=λ=1 である。\"\n    ],\n    \"先校准 4 次\": [\n      \"Calibrate ×4\",\n      \"先に 4 回校正\"\n    ],\n    \"仅更新 Critic\": [\n      \"Critic only\",\n      \"Critic のみ更新\"\n    ],\n    \"每个 RPR 阶段开始，以固定 Actor 的轨迹更新 Critic 四次，再进入联合训练。首次准备 Critic 的一轮 SWR 训练是更早的独立步骤。\": [\n      \"At the start of each RPR stage, the Critic is updated four times using trajectories from a fixed Actor, before joint training begins. The initial one-epoch SWR preparation of the Critic is an earlier, separate step.\",\n      \"各 RPR 段階の開始時に、固定した Actor の軌跡で Critic を 4 回更新してから共同学習に入る。Critic を最初に準備する 1 エポックの SWR 学習は、それより前の独立した手順である。\"\n    ],\n    \"策略\": [\n      \"Policy\",\n      \"方策\"\n    ],\n    \"示范\": [\n      \"Demos\",\n      \"デモ\"\n    ],\n    \"Critic 权重沿用\": [\n      \"Retain Critic weights\",\n      \"Critic の重みを継承\"\n    ],\n    \"固定 Actor 采样\": [\n      \"Sample with fixed Actor\",\n      \"Actor を固定して生成\"\n    ],\n    \"保留模型，进入下一轮\": [\n      \"Retain models for the next round\",\n      \"モデルを次のラウンドへ継承\"\n    ],\n    \"SFT 更新\": [\n      \"SFT update\",\n      \"SFT 更新\"\n    ],\n    \"RSR 用验证通过并移除私有指导的公开轨迹，仅更新 Actor。\": [\n      \"RSR updates only the Actor, using verified public trajectories with private guidance removed.\",\n      \"RSR は、検証済みで非公開の指示を除いた公開軌跡を使い、Actor だけを更新する。\"\n    ],\n    \"冻结参数\": [\n      \"Frozen\",\n      \"パラメータ固定\"\n    ],\n    \"每个 RPR 阶段最初 4 次更新期间，Actor 参数固定，执行当前任务供 Critic 校准。\": [\n      \"During the first 4 updates of each RPR stage, Actor parameters are fixed. The Actor runs current tasks to calibrate the Critic.\",\n      \"各 RPR 段階の最初の 4 回の更新では Actor のパラメータを固定し、現在の課題を実行して Critic を校正する。\"\n    ],\n    \"PPO 更新\": [\n      \"PPO update\",\n      \"PPO 更新\"\n    ],\n    \"校准结束后，Actor 使用优势做 PPO 更新，同时 Critic 继续拟合回报目标。\": [\n      \"After calibration, the Actor performs PPO updates using advantages while the Critic continues to fit return targets.\",\n      \"校正後、Actor はアドバンテージを用いて PPO 更新を行い、Critic は引き続きリターン目標に適合させる。\"\n    ],\n    \"保留权重\": [\n      \"Retain weights\",\n      \"重みを保持\"\n    ],\n    \"Critic 权重在 RSR 期间保持不变，直接交接到下一 RPR 阶段。\": [\n      \"Critic weights remain unchanged during RSR and pass directly to the next RPR stage.\",\n      \"Critic の重みは RSR 中には変えず、そのまま次の RPR 段階へ引き継ぐ。\"\n    ],\n    \"价值回归\": [\n      \"Value fitting\",\n      \"価値回帰\"\n    ],\n    \"先做 4 次 Critic-only 更新，以当前 Actor 的轨迹适应策略与奖励。首次进入 RPR-1 前另有一轮 SWR 价值预热。\": [\n      \"First, 4 Critic-only updates adapt to the policy and reward using current Actor trajectories. A separate one-epoch SWR value warm-up precedes the first entry into RPR-1.\",\n      \"まず現在の Actor の軌跡で Critic のみを 4 回更新し、方策と報酬に適応させる。初めて RPR-1 に入る前には、別途 1 エポックの SWR 価値ウォームアップを行う。\"\n    ],\n    \"联合训练中继续拟合回报目标，每个 RPR 阶段只在开头做一次 4 更新的校准。\": [\n      \"Return-target fitting continues during joint training. Each RPR stage has one calibration period of 4 updates, at its start.\",\n      \"共同学習中もリターン目標への適合を続ける。各 RPR 段階で 4 回更新の校正を行うのは、開始時の 1 度だけである。\"\n    ],\n    \"RSR · 监督微调\": [\n      \"RSR · SFT\",\n      \"RSR · 教師あり調整\"\n    ],\n    \"RPR · 校准 4 次\": [\n      \"RPR · 4-step calibration\",\n      \"RPR · 4 回の校正\"\n    ],\n    \"RPR · 联合训练\": [\n      \"RPR · Joint training\",\n      \"RPR · 共同学習\"\n    ],\n    \"绿色：更新参数　　白色：保持参数\": [\n      \"Green: update parameters    White: retain parameters\",\n      \"緑：パラメータ更新　　白：パラメータ保持\"\n    ],\n    \"同一道任务，两次独立评测。先看执行，再看最终验收。\": [\n      \"One task, two independent evaluations: execution first, final verification next.\",\n      \"同じ課題を独立に 2 回評価。まず実行を追い、次に最終検証を見る。\"\n    ],\n    \"任务\": [\n      \"Task\",\n      \"課題\"\n    ],\n    \"交付能自动构建的计算器，输出须逐字匹配隐藏参考实现。\": [\n      \"Deliver an auto-building calculator whose output exactly matches the hidden reference.\",\n      \"自動ビルド可能な計算機を作り、非公開の参照実装と出力を完全一致させる。\"\n    ],\n    \"独立执行 A · 局部成功，最终未通过\": [\n      \"Independent run A · Local success, final failure\",\n      \"独立実行 A · 局所では成功、最終検証は失敗\"\n    ],\n    \"最终验收\": [\n      \"Final checks\",\n      \"最終検証\"\n    ],\n    \"独立执行 B · Terminal-RSI-27B\": [\n      \"Independent run B · Terminal-RSI-27B\",\n      \"独立実行 B · Terminal-RSI-27B\"\n    ],\n    \"E60 · 本地测试\": [\n      \"E60 · Local tests\",\n      \"E60 · ローカルテスト\"\n    ],\n    \"测试嵌套表达式与大整数\": [\n      \"Test nesting and large integers\",\n      \"入れ子式と大整数をテスト\"\n    ],\n    \"观察\": [\n      \"Observed\",\n      \"観測\"\n    ],\n    \"本地算术检查通过\": [\n      \"Local arithmetic passes\",\n      \"ローカル算術テスト合格\"\n    ],\n    \"状态\": [\n      \"State\",\n      \"状態\"\n    ],\n    \"能算出结果；尚未最终验收\": [\n      \"Computes; final checks pending\",\n      \"計算可能。最終検証は未実施\"\n    ],\n    \"Base 的 E60 测试了嵌套表达式和大整数；一次加法输出 1000000001。本地算术测试通过后，最终验收还要检查隐藏输入下的逐字输出。\": [\n      \"Base event E60 tests nested expressions and large integers; one addition returns 1000000001. After local arithmetic passes, final verification still checks exact output on hidden inputs.\",\n      \"Base の E60 は入れ子式と大整数をテストし、ある加算で 1000000001 を出力した。ローカル算術テストの合格後も、最終検証では非公開入力に対する出力の完全一致を調べる。\"\n    ],\n    \"E62 · 清理后重建\": [\n      \"E62 · Clean rebuild\",\n      \"E62 · 削除後に再ビルド\"\n    ],\n    \"删除构建产物，再调用入口\": [\n      \"Clean build outputs; run entry\",\n      \"ビルド成果物を削除して起動\"\n    ],\n    \"自动编译成功\": [\n      \"Automatic compilation succeeds\",\n      \"自動コンパイル成功\"\n    ],\n    \"本地入口脚本检查通过\": [\n      \"Local wrapper check passes\",\n      \"ローカル起動スクリプト合格\"\n    ],\n    \"Base 的 E62 删除构建产物，检验入口能否自行编译。该本地 wrapper 检查成功，说明构建路径已能运行。\": [\n      \"Base event E62 deletes build outputs to test whether the entry point can compile automatically. This local wrapper check succeeds, showing that the build path works.\",\n      \"Base の E62 はビルド成果物を削除し、起動時に自動コンパイルできるかを調べた。このローカル wrapper 検査は成功し、ビルド経路が動作することを確認した。\"\n    ],\n    \"验收 1 · 入口脚本\": [\n      \"Check 1 · Wrapper\",\n      \"検証 1 · 起動スクリプト\"\n    ],\n    \"自动构建通过\": [\n      \"Auto-build passes\",\n      \"自動ビルド合格\"\n    ],\n    \"结果\": [\n      \"Result\",\n      \"結果\"\n    ],\n    \"可执行入口可用\": [\n      \"Entry point works\",\n      \"起動口は動作\"\n    ],\n    \"最终验证器的 wrapper 门通过。构建验收和输出等价验收是两个不同检查。\": [\n      \"The final verifier’s wrapper gate passes. Build verification and output-equivalence verification are separate checks.\",\n      \"最終検証器の wrapper ゲートに合格した。ビルド検証と出力等価性の検証は別々の検査である。\"\n    ],\n    \"验收 2 · 隐藏输入\": [\n      \"Check 2 · Hidden inputs\",\n      \"検証 2 · 非公開入力\"\n    ],\n    \"逐字比对失败\": [\n      \"Exact match fails\",\n      \"完全一致は失敗\"\n    ],\n    \"实际\": [\n      \"Actual\",\n      \"実際\"\n    ],\n    \"参考\": [\n      \"Reference\",\n      \"参照\"\n    ],\n    \"论文 Figure 16 明确给出整数值除法输出 23 而参考输出 23.0。数值意义接近仍未满足精确字符串输出契约，隐藏 fuzz 等价验收失败。\": [\n      \"Figure 16 explicitly shows division with an integer-valued result returning 23, versus the reference output 23.0. Numerically similar values still violate the exact-string output contract, so the hidden fuzz equivalence check fails.\",\n      \"論文の Figure 16 では、結果が整数値になる除算の出力が 23、参照出力が 23.0 であることが明示されている。数値的に近くても厳密な文字列出力の契約を満たさず、非公開 fuzz 等価性検査は失敗した。\"\n    ],\n    \"程序能运行，局部算术也通过。\": [\n      \"It runs and passes local arithmetic.\",\n      \"プログラムは動き、局所の算術も合格。\"\n    ],\n    \"最后仍因输出格式未对齐而失败。\": [\n      \"Output formatting still causes final failure.\",\n      \"出力形式の不一致で最終的に失敗。\"\n    ],\n    \"E1–2 · 查找工具\": [\n      \"E1–2 · Find tools\",\n      \"E1–2 · ツール探索\"\n    ],\n    \"查找音频处理工具\": [\n      \"Find audio tools\",\n      \"音声処理ツールを探す\"\n    ],\n    \"为读取任务信息做准备\": [\n      \"Prepare to read task information\",\n      \"課題情報の読み取りを準備\"\n    ],\n    \"RPR-2 第一条执行记录在 E1–2 发现音频处理工具。图中按论文选摘的事件展示这条执行。\": [\n      \"In the first RPR-2 run, events E1–2 discover audio-processing tools. This diagram follows the events selected in the paper.\",\n      \"RPR-2 の最初の実行では E1–2 で音声処理ツールを見つけた。図は論文が抜粋したイベントに沿って、この実行を示す。\"\n    ],\n    \"E10 · 检查环境\": [\n      \"E10 · Inspect environment\",\n      \"E10 · 環境確認\"\n    ],\n    \"检查编译工具链\": [\n      \"Check the toolchain\",\n      \"コンパイラ環境を確認\"\n    ],\n    \"随后进入新实现的构建\": [\n      \"Then build the new implementation\",\n      \"続いて新実装をビルド\"\n    ],\n    \"E10 检查工具链。该记录与 E11 的新实现文件、E16 的本地构建检查来自同一条 RPR-2 执行。\": [\n      \"E10 checks the toolchain. This event, the new implementation files in E11, and the local build check in E16 belong to the same RPR-2 run.\",\n      \"E10 はツールチェーンを確認する。この記録、E11 の新実装ファイル、E16 のローカルビルド検査は、同じ RPR-2 実行に属する。\"\n    ],\n    \"E11 · 写入文件\": [\n      \"E11 · Write files\",\n      \"E11 · ファイル作成\"\n    ],\n    \"创建 C / Rust 构建组件\": [\n      \"Create C / Rust components\",\n      \"C / Rust のビルド部品を作成\"\n    ],\n    \"实现\": [\n      \"Code\",\n      \"実装\"\n    ],\n    \"C 代码与 Rust 调用接口\": [\n      \"C code with a Rust interface\",\n      \"C コードと Rust 呼び出し口\"\n    ],\n    \"入口\": [\n      \"Entry\",\n      \"起動口\"\n    ],\n    \"编译成可运行程序\": [\n      \"Compile an executable\",\n      \"実行可能ファイルにコンパイル\"\n    ],\n    \"E11 写入 C AST（抽象语法树，把表达式组织成运算符与运算对象的结构）、递归求值与释放函数，以及 Rust 外部函数声明（Rust 调用 C 的接口）。C 归档使用 -fPIC（生成位置无关代码的编译选项），入口脚本请求 musl（一个 C 标准库实现）目标。后续表达式求值通过 Python 调用完成。\": [\n      \"E11 writes a C AST (an abstract syntax tree organizing expressions into operators and operands), recursive evaluation and deallocation functions, and Rust foreign-function declarations (the interface for calling C). The C archive uses -fPIC (position-independent code), and the entry script requests a musl target (a C standard-library implementation). Subsequent expression evaluation is performed through Python calls.\",\n      \"E11 は C の AST（演算子と被演算子で式を構造化する抽象構文木）、再帰評価・解放関数、Rust の外部関数宣言（C を呼び出すインターフェース）を作成した。C アーカイブは -fPIC（位置独立コード）を使い、起動スクリプトは musl（C 標準ライブラリ実装）ターゲットを指定する。その後の式評価は Python の呼び出しで行う。\"\n    ],\n    \"E11–16 · 检查并运行\": [\n      \"E11–16 · Check and run\",\n      \"E11–16 · 確認して実行\"\n    ],\n    \"检查跨语言调用，再用 Python 求值\": [\n      \"Check linking; evaluate with Python\",\n      \"言語間の連携を確認し Python で評価\"\n    ],\n    \"本地测试输出 14、256\": [\n      \"Local tests return 14, 256\",\n      \"ローカル出力は 14、256\"\n    ],\n    \"原样返回 Python 计算结果\": [\n      \"Return Python output unchanged\",\n      \"Python の結果をそのまま返す\"\n    ],\n    \"第一条 RPR-2 执行先做 C 链接冒烟测试（快速检查跨语言组件能否连接并运行），再由 Rust 入口调用 Python 计算表达式并原样输出。E16 显示 static-pie（可重定位的静态链接可执行文件）链接，表达式求值依赖 Python 运行时。\": [\n      \"The first RPR-2 run performs a C-linking smoke test (a quick check that cross-language components connect and run), then calls Python from the Rust entry point to evaluate expressions and print the output unchanged. E16 shows static-pie linking (a relocatable, statically linked executable); expression evaluation depends on the Python runtime.\",\n      \"最初の RPR-2 実行は C リンクのスモークテスト（言語間の部品を接続して実行できるかの簡易検査）を行い、Rust の起動口から Python を呼んで式を評価し、その出力をそのまま返した。E16 は static-pie（再配置可能な静的リンク実行ファイル）でのリンクを示すが、式評価は Python ランタイムに依存する。\"\n    ],\n    \"RPR-2 的受保护 wrapper 检查通过。两次 RPR-2 评测均独立通过这道检查。\": [\n      \"The protected RPR-2 wrapper check passes. Both RPR-2 evaluations independently pass this check.\",\n      \"RPR-2 は保護された wrapper 検査に合格した。2 回の RPR-2 評価はそれぞれ独立にこの検査に合格している。\"\n    ],\n    \"输出等价通过\": [\n      \"Equivalence passes\",\n      \"出力等価性に合格\"\n    ],\n    \"匹配隐藏参考实现\": [\n      \"Hidden ref. matched\",\n      \"非公開参照と一致\"\n    ],\n    \"该 RPR-2 执行通过隐藏输入的 fuzz 等价检查。两次 RPR-2 独立评测都通过自动构建与输出等价验收；这里展示第一条执行的选摘事件。\": [\n      \"This RPR-2 run passes the fuzz equivalence check on hidden inputs. Both independent RPR-2 evaluations pass auto-build and output-equivalence checks; the diagram shows selected events from the first run.\",\n      \"この RPR-2 実行は非公開入力の fuzz 等価性検査に合格した。独立した 2 回の RPR-2 評価はいずれも自動ビルドと出力等価性に合格しており、ここでは最初の実行から抜粋したイベントを示す。\"\n    ],\n    \"两道验收都通过。\": [\n      \"Both checks pass.\",\n      \"両方の検証に合格。\"\n    ],\n    \"这条执行仍保留 Python 运行时依赖。\": [\n      \"This run still depends on Python.\",\n      \"この実行は Python への依存を残す。\"\n    ],\n    \"E 为论文选摘事件编号。图中分别展示 Base 与 RPR-2 的独立执行。\": [\n      \"E denotes event IDs selected in the paper. Base and RPR-2 are independent runs.\",\n      \"E は論文で抜粋されたイベント番号。Base と RPR-2 は別々の独立実行である。\"\n    ],\n    \"来源：Terminal-RSI，附录 H / Figure 16。绿色表示通过相应检查，橙色表示失败。\": [\n      \"Source: Terminal-RSI, Appendix H / Figure 16. Green: check passed; orange: failed.\",\n      \"出典：Terminal-RSI、付録 H / Figure 16。緑は該当検査の合格、橙は失敗を示す。\"\n    ],\n    \"同一份计划，重新执行仍会走向不同结果\": [\n      \"One plan; fresh runs can still diverge\",\n      \"同じ計画でも、再実行の結果は分かれる\"\n    ],\n    \"Markdown 行内语法解析 · RSR 前置论文中的真实重写案例\": [\n      \"Markdown inline parsing · A recorded rewrite case from the preceding RSR paper\",\n      \"Markdown のインライン構文解析 · RSR の先行論文にある再構成事例\"\n    ],\n    \"源执行 · 第 26 轮\": [\n      \"Source · Turn 26\",\n      \"元の実行 · ターン 26\"\n    ],\n    \"尝试生成解析器\": [\n      \"Try parser generation\",\n      \"パーサー生成を試す\"\n    ],\n    \"先准备文本解析工具\": [\n      \"Prepare a text parser\",\n      \"テキスト解析ツールを準備\"\n    ],\n    \"源成功轨迹在第26轮尝试 tree-sitter generate。tree-sitter 是生成和使用语法解析器的一套工具；解析器将 Markdown 文本转为可供程序处理的结构。图中展示论文选摘的关键事件。\": [\n      \"The successful source trajectory tries tree-sitter generate at turn 26. tree-sitter is a toolkit for generating and using parsers, which turn Markdown text into structures a program can process. The diagram shows key events selected in the paper.\",\n      \"成功した元の軌跡はターン 26 で tree-sitter generate を試した。tree-sitter はパーサーの生成・利用ツール群であり、パーサーは Markdown をプログラムで扱える構造へ変換する。図は論文で抜粋された主要イベントを示す。\"\n    ],\n    \"源执行 · 第 51 轮\": [\n      \"Source · Turn 51\",\n      \"元の実行 · ターン 51\"\n    ],\n    \"用预编译解析器\": [\n      \"Use a prebuilt parser\",\n      \"既成パーサーを使用\"\n    ],\n    \"直接加载已编译的组件\": [\n      \"Load a compiled component\",\n      \"コンパイル済み部品を読込\"\n    ],\n    \"预编译解析器是已经编译好的解析组件，在兼容环境下可直接加载。源轨迹在第51轮使用它。论文命令缩略为 tree-sitter parse -l ...node --lang-name markdown /tmp/test.md。\": [\n      \"A prebuilt parser is an already compiled parsing component that can be loaded directly in a compatible environment. The source trajectory uses it at turn 51. The paper abbreviates the command as tree-sitter parse -l ...node --lang-name markdown /tmp/test.md.\",\n      \"既成パーサーはコンパイル済みの解析部品で、互換環境では直接読み込める。元の軌跡はターン 51 でこれを使った。論文中のコマンドは tree-sitter parse -l ...node --lang-name markdown /tmp/test.md と略記されている。\"\n    ],\n    \"源执行 · 最终验证\": [\n      \"Source · Final check\",\n      \"元の実行 · 最終検証\"\n    ],\n    \"64 轮，通过\": [\n      \"64 turns, passed\",\n      \"64 ターン、合格\"\n    ],\n    \"成功经验成为计划来源\": [\n      \"Success informs the plan\",\n      \"成功経験を計画に活用\"\n    ],\n    \"这条源执行共 64 轮，最终验证通过。它的成功经验被提炼为执行计划，指导模型在新环境中重新完成任务。\": [\n      \"The source run takes 64 turns and passes final verification. Its successful experience is distilled into a plan that guides the model through the task again in a fresh environment.\",\n      \"元の実行は全 64 ターンで最終検証に合格した。その成功経験を実行計画にまとめ、新しい環境でモデルが課題をやり直す際の指針とする。\"\n    ],\n    \"从成功经验提炼的同一份执行计划\": [\n      \"The same runbook, distilled from success\",\n      \"成功経験から抽出した同じ実行計画\"\n    ],\n    \"兼容的解析器\": [\n      \"Compatible parser\",\n      \"互換パーサー\"\n    ],\n    \"对齐输出摘要\": [\n      \"Match output summaries\",\n      \"出力要約を一致\"\n    ],\n    \"表格处理参数\": [\n      \"Table-handling options\",\n      \"表の処理設定\"\n    ],\n    \"执行计划也叫runbook，记录关键做法、检查和恢复步骤。此计划来自成功源执行的经验，概括为找到兼容解析器、对齐输出摘要、检查表格处理参数。下面A和B在各自新环境中独立执行。\": [\n      \"A runbook records key procedures, checks, and recovery steps. This plan distills the successful source run into finding a compatible parser, matching output summaries, and checking table-handling options. A and B below execute independently in separate fresh environments.\",\n      \"runbook は主要な手順、確認、復旧方法を記す実行計画である。この計画は成功した元の実行から、互換パーサーの発見、出力要約の一致、表の処理設定の確認を抽出したもの。下の A と B はそれぞれ別の新しい環境で独立に実行する。\"\n    ],\n    \"新执行 A · 第 9 轮\": [\n      \"Rerun A · Turn 9\",\n      \"再実行 A · ターン 9\"\n    ],\n    \"使用预编译解析器\": [\n      \"Use a prebuilt parser\",\n      \"既成パーサーを使用\"\n    ],\n    \"较早进入可用解析路径\": [\n      \"Reach a working parser early\",\n      \"早期に有効な解析経路へ\"\n    ],\n    \"新执行 A 在第9轮使用预编译解析器。它与右侧 B 共享计划，各自在独立新环境中运行。源轨迹的第51轮摘录也记录了这一操作。\": [\n      \"Rerun A uses a prebuilt parser at turn 9. It shares the plan with B on the right, but each runs in its own fresh environment. The source excerpt at turn 51 records this operation too.\",\n      \"再実行 A はターン 9 で既成パーサーを使った。右の B と計画は共有するが、別々の新しい環境で動く。元の軌跡のターン 51 の抜粋にも同じ操作が記録されている。\"\n    ],\n    \"新执行 B · 第 26 轮\": [\n      \"Rerun B · Turn 26\",\n      \"再実行 B · ターン 26\"\n    ],\n    \"检查解析产物\": [\n      \"Inspect parse output\",\n      \"解析結果を確認\"\n    ],\n    \"终端返回：文件检查工具不存在\": [\n      \"Terminal: inspection tool not found\",\n      \"端末：ファイル確認ツールなし\"\n    ],\n    \"新执行 B 尝试 xxd .../parse.txt | head -20，终端返回 bash: xxd: command not found。xxd 是查看或转换文件十六进制内容的命令行工具，此处记录一次工具调用失败。\": [\n      \"Rerun B tries xxd .../parse.txt | head -20; the terminal returns bash: xxd: command not found. xxd is a command-line tool for viewing or converting hexadecimal file contents. This event records a failed tool call.\",\n      \"再実行 B は xxd .../parse.txt | head -20 を試し、端末は bash: xxd: command not found を返した。xxd はファイルの 16 進数表示・変換を行うコマンドラインツールで、ここではツール呼び出しの失敗を記録している。\"\n    ],\n    \"新执行 A · 第 21 轮\": [\n      \"Rerun A · Turn 21\",\n      \"再実行 A · ターン 21\"\n    ],\n    \"检查重建结果\": [\n      \"Check rebuilt output\",\n      \"再構築の結果を確認\"\n    ],\n    \"运行结果检查脚本\": [\n      \"Run the feedback script\",\n      \"結果確認スクリプトを実行\"\n    ],\n    \"第21轮使用 python3 /app/tools/feedback 检查重建结果；feedback 是这里的结果检查脚本。\": [\n      \"Turn 21 checks the rebuilt output with python3 /app/tools/feedback; feedback is the result-checking script used here.\",\n      \"ターン 21 では python3 /app/tools/feedback で再構築の結果を確認した。feedback はここで用いる結果確認スクリプトである。\"\n    ],\n    \"新执行 B · 第 36 轮\": [\n      \"Rerun B · Turn 36\",\n      \"再実行 B · ターン 36\"\n    ],\n    \"修改后再次检查\": [\n      \"Recheck after edits\",\n      \"修正後に再確認\"\n    ],\n    \"再次运行结果检查脚本\": [\n      \"Run feedback again\",\n      \"結果確認スクリプトを再実行\"\n    ],\n    \"新执行 B 在修改之后，于第36轮再次运行结果检查脚本 feedback。此处与第26轮分别展示论文选摘的两个执行事件。\": [\n      \"After making changes, rerun B runs the feedback result-checking script again at turn 36. This and turn 26 are two execution events selected in the paper.\",\n      \"再実行 B は修正後のターン 36 で、結果確認スクリプト feedback を再び実行した。この箇所とターン 26 は、論文から抜粋された 2 つの実行イベントである。\"\n    ],\n    \"新执行 A · 最终验证\": [\n      \"Rerun A · Final check\",\n      \"再実行 A · 最終検証\"\n    ],\n    \"32 轮，通过\": [\n      \"32 turns, passed\",\n      \"32 ターン、合格\"\n    ],\n    \"新执行 A 共 32 轮，最终验证通过。成功轨迹继续接受质量与泄漏筛查，合格后成为训练示范。\": [\n      \"Rerun A takes 32 turns and passes final verification. The successful trajectory then undergoes quality and leakage screening before it can become a training demonstration.\",\n      \"再実行 A は全 32 ターンで最終検証に合格した。成功軌跡はさらに品質・漏洩検査を受け、合格すれば学習用デモになる。\"\n    ],\n    \"新执行 B · 最终验证\": [\n      \"Rerun B · Final check\",\n      \"再実行 B · 最終検証\"\n    ],\n    \"38 轮，失败\": [\n      \"38 turns, failed\",\n      \"38 ターン、失敗\"\n    ],\n    \"新执行 B 共 38 轮，最终验证失败。这次重做在最终验收环节被筛除；图中选摘展示其工具检查和结果检查过程。\": [\n      \"Rerun B takes 38 turns and fails final verification. It is filtered out at the final check; the excerpts show its tool-inspection and result-checking steps.\",\n      \"再実行 B は全 38 ターンで最終検証に失敗した。この再実行は最終検証で除外される。図の抜粋はツールの確認と結果の検査を示す。\"\n    ],\n    \"提炼成功经验\": [\n      \"Distill successful experience\",\n      \"成功経験を抽出\"\n    ],\n    \"A · 独立新环境\": [\n      \"A · Separate fresh environment\",\n      \"A · 独立した新環境\"\n    ],\n    \"B · 独立新环境\": [\n      \"B · Separate fresh environment\",\n      \"B · 独立した新環境\"\n    ],\n    \"全部 \": [\n      \"Of \",\n      \"全 \"\n    ],\n    \"12 次重写中，7 次通过\": [\n      \"12 rewrites, 7 passed\",\n      \"12 回の再構成中、7 回が合格\"\n    ],\n    \"；成功重写的中位数为 \": [\n      \"; median among successes: \",\n      \"。成功した再構成の中央値は \"\n    ],\n    \"32 轮\": [\n      \"32 turns\",\n      \"32 ターン\"\n    ],\n    \"图中两支为独立采样；通过后仍需质量过滤，再决定是否作为训练示范。\": [\n      \"Two independent samples. Passing runs still need quality filtering before use as training demos.\",\n      \"2 つの分岐は独立なサンプル。合格後も品質検査を経て、学習デモとして採用するかを判断する。\"\n    ],\n    \"。\": [\n      \".\",\n      \"。\"\n    ],\n    \"TB-GAE：沿交互轮次传回终点反馈\": [\n      \"TB-GAE: terminal feedback across turns\",\n      \"TB-GAE：対話ターンを越えて終端報酬を伝える\"\n    ],\n    \"设 γ = 0.9，λ = 0.8，q = γλ = 0.72；仅终点奖励为 1。\": [\n      \"Let γ = 0.9, λ = 0.8, q = γλ = 0.72; only the terminal reward is 1.\",\n      \"γ = 0.9、λ = 0.8、q = γλ = 0.72。終端報酬のみ 1 とする。\"\n    ],\n    \"实际交互\": [\n      \"Interaction\",\n      \"実際の対話\"\n    ],\n    \"第 1 轮\": [\n      \"Turn 1\",\n      \"ターン 1\"\n    ],\n    \"第 2 轮\": [\n      \"Turn 2\",\n      \"ターン 2\"\n    ],\n    \"第1轮命令的第1个示意生成位置。实际命令通常由更多token组成。\": [\n      \"The 1st illustrative generated position in the turn-1 command. Real commands usually contain more tokens.\",\n      \"ターン 1 のコマンドの 1 番目の模式的な生成位置。実際のコマンドは通常、より多くのトークンを含む。\"\n    ],\n    \"第1轮命令的最后一个示意生成位置；工具调用完成后，环境返回观察。\": [\n      \"The last illustrative generated position in the turn-1 command. After the tool call finishes, the environment returns observations.\",\n      \"ターン 1 のコマンドの最後の模式的な生成位置。ツール呼び出し完了後、環境が観測を返す。\"\n    ],\n    \"环境返回L个观察token。它们仍进入下一轮的模型上下文；下面仅在优势递推链中跳过这些位置。比较图为可读性取L=3。\": [\n      \"The environment returns L observation tokens. They remain in the next turn’s model context; only the advantage recursion below skips these positions. The comparison uses L=3 for readability.\",\n      \"環境は L 個の観測トークンを返す。次のターンのモデル文脈には引き続き含まれ、下のアドバンテージ再帰でのみこれらの位置を飛ばす。比較図では読みやすさのため L=3 とする。\"\n    ],\n    \"第2轮的首个生成位置。策略和Critic的输入仍包含上一轮工具返回。\": [\n      \"The first generated position of turn 2. The policy and Critic inputs still include the previous turn’s tool output.\",\n      \"ターン 2 の最初の生成位置。方策と Critic の入力には、前のターンのツール出力が引き続き含まれる。\"\n    ],\n    \"第2轮最后一个生成位置。示例在这里真正结束任务，并把终点奖励放置一次。\": [\n      \"The last generated position of turn 2. The example truly terminates the task here and applies the terminal reward once.\",\n      \"ターン 2 の最後の生成位置。この例では課題がここで実際に終端し、終端報酬を 1 度だけ置く。\"\n    ],\n    \"设终点奖励 R=1。任务真正结束后，后继价值与优势递推量取 0。\": [\n      \"Set terminal reward R=1. At true termination, the successor value and recursive advantage term are 0.\",\n      \"終端報酬を R=1 とする。課題が実際に終端した後の後続価値と再帰アドバンテージ項は 0 とする。\"\n    ],\n    \"观察仍参与下一次判断；“跳过”只改变下面的 GAE 递推。\": [\n      \"Observations stay in context; only GAE recursion skips them.\",\n      \"観測は次の判断にも使う。「スキップ」は下の GAE 再帰だけを変える。\"\n    ],\n    \"同一条执行，三种信用回传时钟\": [\n      \"One run, three clocks for credit assignment\",\n      \"同じ実行、信用を遡る 3 つの時計\"\n    ],\n    \"全 token 链\": [\n      \"All-token chain\",\n      \"全トークン列\"\n    ],\n    \"生成与观察都递推\": [\n      \"Both token types\",\n      \"生成・観測とも再帰\"\n    ],\n    \"生成位置g1。混合文本链中，生成与观察位置都参加优势递推。观察位置即使在训练损失中被掩蔽，仍会在这条递推链上产生衰减。\": [\n      \"Generated position g1. In the mixed-text chain, both generated and observed positions enter the advantage recursion. Even when observation positions are masked in the training loss, they still cause decay along this recursion.\",\n      \"生成位置 g1。混合テキスト列では生成位置と観測位置の両方がアドバンテージ再帰に入る。学習損失で観測位置をマスクしても、この再帰経路では減衰が生じる。\"\n    ],\n    \"生成位置g2。混合文本链中，生成与观察位置都参加优势递推。观察位置即使在训练损失中被掩蔽，仍会在这条递推链上产生衰减。\": [\n      \"Generated position g2. In the mixed-text chain, both generated and observed positions enter the advantage recursion. Even when observation positions are masked in the training loss, they still cause decay along this recursion.\",\n      \"生成位置 g2。混合テキスト列では生成位置と観測位置の両方がアドバンテージ再帰に入る。学習損失で観測位置をマスクしても、この再帰経路では減衰が生じる。\"\n    ],\n    \"生成位置g3。混合文本链中，生成与观察位置都参加优势递推。观察位置即使在训练损失中被掩蔽，仍会在这条递推链上产生衰减。\": [\n      \"Generated position g3. In the mixed-text chain, both generated and observed positions enter the advantage recursion. Even when observation positions are masked in the training loss, they still cause decay along this recursion.\",\n      \"生成位置 g3。混合テキスト列では生成位置と観測位置の両方がアドバンテージ再帰に入る。学習損失で観測位置をマスクしても、この再帰経路では減衰が生じる。\"\n    ],\n    \"生成位置g4。混合文本链中，生成与观察位置都参加优势递推。观察位置即使在训练损失中被掩蔽，仍会在这条递推链上产生衰减。\": [\n      \"Generated position g4. In the mixed-text chain, both generated and observed positions enter the advantage recursion. Even when observation positions are masked in the training loss, they still cause decay along this recursion.\",\n      \"生成位置 g4。混合テキスト列では生成位置と観測位置の両方がアドバンテージ再帰に入る。学習損失で観測位置をマスクしても、この再帰経路では減衰が生じる。\"\n    ],\n    \"奖励在最后一个生成位置注入一次，形成终点 TD 残差；随后沿生成位置向前递推。\": [\n      \"Reward is injected once at the final generated position, forming a terminal TD residual; recursion then proceeds backward through generated positions.\",\n      \"最後の生成位置で報酬を 1 度だけ与え、終端 TD 残差を作る。その後、生成位置を遡って再帰する。\"\n    ],\n    \"一个工具观察位置。在混合文本链中，它仍参与 GAE 递推，额外经过一次衰减；策略损失对该位置取 0。\": [\n      \"A tool-observation position. In the mixed-text chain it still enters GAE recursion, adding one decay step; the policy loss is 0 at this position.\",\n      \"ツール観測の位置。混合テキスト列では GAE 再帰に入り、減衰が 1 回増える。この位置の方策損失は 0 である。\"\n    ],\n    \"终点残差权重：q⁶ ≈ 0.1393（此处日志取 3 个 token）\": [\n      \"Terminal residual weight: q⁶ ≈ 0.1393 (3 log tokens here)\",\n      \"終端残差の重み：q⁶ ≈ 0.1393（ここではログを 3 トークンとする）\"\n    ],\n    \"SAO · 跳过观察\": [\n      \"SAO · Skip obs.\",\n      \"SAO · 観測スキップ\"\n    ],\n    \"生成位置每跳 ×q\": [\n      \"Generated hops ×q\",\n      \"生成位置の各遷移 ×q\"\n    ],\n    \"生成位置g1。只跳过观察的示意递推，生成位置之间仍每条边乘q。这里用于区分“跳过观察”和“跨轮时钟”两个步骤。\": [\n      \"Generated position g1. This illustrative recursion skips only observations; every edge between generated positions still multiplies by q. It separates skipping observations from using a cross-turn clock.\",\n      \"生成位置 g1。観測だけを飛ばす模式的な再帰であり、生成位置間の各辺では引き続き q を掛ける。「観測のスキップ」と「ターン間の時計」という 2 つの手順を区別するための図である。\"\n    ],\n    \"生成位置g2。只跳过观察的示意递推，生成位置之间仍每条边乘q。这里用于区分“跳过观察”和“跨轮时钟”两个步骤。\": [\n      \"Generated position g2. This illustrative recursion skips only observations; every edge between generated positions still multiplies by q. It separates skipping observations from using a cross-turn clock.\",\n      \"生成位置 g2。観測だけを飛ばす模式的な再帰であり、生成位置間の各辺では引き続き q を掛ける。「観測のスキップ」と「ターン間の時計」という 2 つの手順を区別するための図である。\"\n    ],\n    \"生成位置g3。只跳过观察的示意递推，生成位置之间仍每条边乘q。这里用于区分“跳过观察”和“跨轮时钟”两个步骤。\": [\n      \"Generated position g3. This illustrative recursion skips only observations; every edge between generated positions still multiplies by q. It separates skipping observations from using a cross-turn clock.\",\n      \"生成位置 g3。観測だけを飛ばす模式的な再帰であり、生成位置間の各辺では引き続き q を掛ける。「観測のスキップ」と「ターン間の時計」という 2 つの手順を区別するための図である。\"\n    ],\n    \"生成位置g4。只跳过观察的示意递推，生成位置之间仍每条边乘q。这里用于区分“跳过观察”和“跨轮时钟”两个步骤。\": [\n      \"Generated position g4. This illustrative recursion skips only observations; every edge between generated positions still multiplies by q. It separates skipping observations from using a cross-turn clock.\",\n      \"生成位置 g4。観測だけを飛ばす模式的な再帰であり、生成位置間の各辺では引き続き q を掛ける。「観測のスキップ」と「ターン間の時計」という 2 つの手順を区別するための図である。\"\n    ],\n    \"跳过观察位置\": [\n      \"Skip obs.\",\n      \"観測位置を飛ばす\"\n    ],\n    \"终点残差权重：q³ ≈ 0.3732\": [\n      \"Terminal residual weight: q³ ≈ 0.3732\",\n      \"終端残差の重み：q³ ≈ 0.3732\"\n    ],\n    \"TB · 轮次时钟\": [\n      \"TB · Turn clock\",\n      \"TB · ターン時計\"\n    ],\n    \"跨轮才 ×q\": [\n      \"Only across turns ×q\",\n      \"ターン間のみ ×q\"\n    ],\n    \"生成位置g1。TB-GAE保留这个位置自己的pre-token价值基线；同轮目标可相同，优势依然可以不同。\": [\n      \"Generated position g1. TB-GAE retains this position’s own pre-token value baseline. Targets can be shared within a turn while advantages remain different.\",\n      \"生成位置 g1。TB-GAE はこの位置固有の生成前の価値ベースラインを保つ。同じターンの目標は共通でも、アドバンテージは異なり得る。\"\n    ],\n    \"生成位置g2。TB-GAE保留这个位置自己的pre-token价值基线；同轮目标可相同，优势依然可以不同。\": [\n      \"Generated position g2. TB-GAE retains this position’s own pre-token value baseline. Targets can be shared within a turn while advantages remain different.\",\n      \"生成位置 g2。TB-GAE はこの位置固有の生成前の価値ベースラインを保つ。同じターンの目標は共通でも、アドバンテージは異なり得る。\"\n    ],\n    \"生成位置g3。TB-GAE保留这个位置自己的pre-token价值基线；同轮目标可相同，优势依然可以不同。\": [\n      \"Generated position g3. TB-GAE retains this position’s own pre-token value baseline. Targets can be shared within a turn while advantages remain different.\",\n      \"生成位置 g3。TB-GAE はこの位置固有の生成前の価値ベースラインを保つ。同じターンの目標は共通でも、アドバンテージは異なり得る。\"\n    ],\n    \"生成位置g4。TB-GAE保留这个位置自己的pre-token价值基线；同轮目标可相同，优势依然可以不同。\": [\n      \"Generated position g4. TB-GAE retains this position’s own pre-token value baseline. Targets can be shared within a turn while advantages remain different.\",\n      \"生成位置 g4。TB-GAE はこの位置固有の生成前の価値ベースラインを保つ。同じターンの目標は共通でも、アドバンテージは異なり得る。\"\n    ],\n    \"终点残差权重：q = 0.72；同轮不衰减\": [\n      \"Terminal residual weight: q = 0.72; no within-turn decay\",\n      \"終端残差の重み：q = 0.72。同じターン内では減衰なし\"\n    ],\n    \"同轮共享目标；每个前缀仍有自己的优势\": [\n      \"Shared turn targets; a distinct advantage for each prefix\",\n      \"同じターンは目標を共有し、各接頭辞は固有のアドバンテージを持つ\"\n    ],\n    \"下一轮起点的V=0.5、A=0.5。共同目标U₁=0.9×(0.5+0.8×0.5)=0.81。两个prefix分别减去自己的V，得到A₁=0.81−0.2=0.61，A₂=0.81−0.4=0.41。\": [\n      \"At the next turn’s start, V=0.5 and A=0.5. The shared target is U₁=0.9×(0.5+0.8×0.5)=0.81. Each prefix subtracts its own V, giving A₁=0.81−0.2=0.61 and A₂=0.81−0.4=0.41.\",\n      \"次のターンの始点では V=0.5、A=0.5。共通目標は U₁=0.9×(0.5+0.8×0.5)=0.81。各接頭辞が自分の V を引き、A₁=0.81−0.2=0.61、A₂=0.81−0.4=0.41 となる。\"\n    ],\n    \"第2轮结束时真正终止，只有终点奖励1，因此两个生成位置的共同目标都为1；各自减去V，优势为0.5与0.2。\": [\n      \"Turn 2 ends in true termination, with only terminal reward 1. Both generated positions therefore share target 1; subtracting their own V gives advantages 0.5 and 0.2.\",\n      \"ターン 2 の終了で実際に終端し、報酬は終端の 1 だけである。そのため 2 つの生成位置の共通目標はいずれも 1。各自の V を引くとアドバンテージは 0.5 と 0.2 になる。\"\n    ],\n    \"生成前的价值 V\": [\n      \"Pre-token value V\",\n      \"生成前の価値 V\"\n    ],\n    \"共同目标 U\": [\n      \"Shared target U\",\n      \"共通目標 U\"\n    ],\n    \"优势 A = U − V\": [\n      \"Adv. A = U − V\",\n      \"優位性 A = U − V\"\n    ],\n    \"上图比较末端残差的传播系数，下图计算回报目标与优势。\": [\n      \"Above: terminal-residual propagation weights. Below: return targets and advantages.\",\n      \"上段は終端残差の伝播係数、下段はリターン目標とアドバンテージの計算。\"\n    ],\n    \"γ = λ = 1 时三条链的系数均为 1；RPR-1 使用标准 GAE 与该配置。\": [\n      \"With γ = λ = 1, all three chains have coefficient 1; RPR-1 uses standard GAE with this setting.\",\n      \"γ = λ = 1 なら 3 列とも係数は 1。RPR-1 はこの設定の標準 GAE を用いる。\"\n    ],\n    \"播放记录\": [\n      \"Play events\",\n      \"記録を再生\"\n    ],\n    \"本篇图解\": [\n      \"Diagrams\",\n      \"この記事の図解\"\n    ],\n    \"关联流程\": [\n      \"Related flows\",\n      \"関連フロー\"\n    ],\n    \"动作\": [\n      \"Action\",\n      \"行動\"\n    ],\n    \"工具返回\": [\n      \"Tool output\",\n      \"ツールの出力\"\n    ],\n    \"失败尝试 · 保留审计与成本\": [\n      \"Failed attempt · Retained for audit and cost accounting\",\n      \"失敗試行 · 監査・コスト記録として保持\"\n    ],\n    \"最终保留轮次\": [\n      \"Retained turn\",\n      \"最終的に保持したターン\"\n    ],\n    \"Harness 控制事件\": [\n      \"Harness control event\",\n      \"Harness 制御イベント\"\n    ],\n    \"上游\": [\n      \"Upstream\",\n      \"上流\"\n    ],\n    \"下游\": [\n      \"Downstream\",\n      \"下流\"\n    ],\n    \"查看详情\": [\n      \"View details\",\n      \"詳細を見る\"\n    ],\n    \"关闭详情\": [\n      \"Close details\",\n      \"詳細を閉じる\"\n    ],\n    \"事件\": [\n      \"Event\",\n      \"イベント\"\n    ],\n    \"暂停\": [\n      \"Pause\",\n      \"一時停止\"\n    ],\n    \"查看内部流程\": [\n      \"Open internal flow\",\n      \"内部フローを見る\"\n    ],\n    \"流程视图\": [\n      \"Diagram view\",\n      \"図の表示\"\n    ],\n    \"关闭\": [\n      \"Close\",\n      \"閉じる\"\n    ],\n    \"放大 ↗\": [\n      \"Expand ↗\",\n      \"拡大 ↗\"\n    ],\n    \"缩小\": [\n      \"Zoom out\",\n      \"縮小\"\n    ],\n    \"放大\": [\n      \"Zoom in\",\n      \"拡大\"\n    ],\n    \"全图\": [\n      \"Fit diagram\",\n      \"図全体\"\n    ],\n    \"适合宽度\": [\n      \"Fit width\",\n      \"幅に合わせる\"\n    ],\n    \"清晰阅读\": [\n      \"Readable size\",\n      \"読みやすい大きさ\"\n    ],\n    \"停止动效\": [\n      \"Stop motion\",\n      \"動きを止める\"\n    ],\n    \"连线动效\": [\n      \"Animate connections\",\n      \"接続線を動かす\"\n    ],\n    \"返回\": [\n      \"Back\",\n      \"戻る\"\n    ],\n    \"回到本节\": [\n      \"Back to this section\",\n      \"この節に戻る\"\n    ],\n    \"方向键平移，+ / − 缩放，0 查看全图。\": [\n      \"Arrow keys pan; + / − zoom; 0 fits the diagram.\",\n      \"矢印キーで移動、+ / − で拡大・縮小、0 で全体表示。\"\n    ],\n    \"完整轨迹\": [\n      \"Full trajectory\",\n      \"軌跡全体\"\n    ],\n    \"在总览中定位\": [\n      \"Locate in overview\",\n      \"全体図で位置を選ぶ\"\n    ],\n    \"框内为当前视野。点击定位。\": [\n      \"The box marks the current view. Click to navigate.\",\n      \"枠は現在の表示範囲。クリックで移動。\"\n    ],\n    \"上一步\": [\n      \"Previous event\",\n      \"前のイベント\"\n    ],\n    \"下一步\": [\n      \"Next event\",\n      \"次のイベント\"\n    ],\n    \"回放位置\": [\n      \"Playback position\",\n      \"再生位置\"\n    ],\n    \"事件详情\": [\n      \"Event details\",\n      \"イベントの詳細\"\n    ],\n    \"重新开始\": [\n      \"Restart\",\n      \"最初から\"\n    ],\n    \"悬停追踪连接，点击查看细节或关联图；动效仅辅助读图，不代表执行。\": [\n      \"Hover to trace connections; click for details or related diagrams. Motion guides reading and does not represent execution.\",\n      \"ホバーで接続をたどり、クリックで詳細や関連図を表示。動きは読図の補助であり、実行を表すものではない。\"\n    ],\n    \"点击节点查看细节或关联图；拖动平移，Ctrl/⌘ + 滚轮缩放。\": [\n      \"Click a node for details or related diagrams. Drag to pan; Ctrl/⌘ + wheel to zoom.\",\n      \"ノードをクリックして詳細や関連図を表示。ドラッグで移動、Ctrl/⌘ + ホイールで拡大・縮小。\"\n    ],\n    \"点击查看原图数据；拖动平移，Ctrl/⌘ + 滚轮缩放。\": [\n      \"Click to inspect source data. Drag to pan; Ctrl/⌘ + wheel to zoom.\",\n      \"クリックで元の図のデータを確認。ドラッグで移動、Ctrl/⌘ + ホイールで拡大・縮小。\"\n    ],\n    \"按论文记录顺序查看选取的事件；左侧总览可定位。两条轨迹属于独立评测，回放只用于读图。\": [\n      \"Follow selected events in the paper’s recorded order; use the overview on the left to navigate. The two trajectories are independent evaluations; playback is only a reading aid.\",\n      \"論文の記録順に抜粋イベントを表示。左の全体図で移動できる。2 本の軌跡は独立した評価であり、再生は読図の補助である。\"\n    ],\n    \"悬停追踪连线；点击模块展开；拖动平移，Ctrl/⌘ + 滚轮缩放。\": [\n      \"Hover to trace connections; click a module to expand. Drag to pan; Ctrl/⌘ + wheel to zoom.\",\n      \"ホバーで接続をたどり、モジュールをクリックして展開。ドラッグで移動、Ctrl/⌘ + ホイールで拡大・縮小。\"\n    ],\n    \"读图帮助\": [\n      \"Diagram help\",\n      \"図の操作ヘルプ\"\n    ],\n    \"Terminal-RSI：RSR 与 RPR 的完整循环\": [\n      \"Terminal-RSI: the complete RSR–RPR loop\",\n      \"Terminal-RSI：RSR と RPR の全体ループ\"\n    ],\n    \"RSR：重写、验收与监督微调\": [\n      \"RSR: rewrite, verify, and supervise\",\n      \"RSR：再構成・検証・教師あり調整\"\n    ],\n    \"RPR：验证奖励如何进入训练\": [\n      \"RPR: how verification rewards enter training\",\n      \"RPR：検証報酬が学習に入るまで\"\n    ]\n  }\n}\n",
    "en.html": "<p>A terminal agent reads files, edits code, and runs tests through command-line tools. The complete interaction record for a task is its <strong>trajectory</strong>. Terminal-RSI alternates two uses of this experience: <strong>RSR reruns successful solutions to create demonstrations; RPR runs new tasks and uses verification outcomes to train the policy and value networks.</strong></p><section aria-labelledby=\"rsi\"><h2 id=\"rsi\">1 The workflow: demonstrations, then execution feedback</h2><p id=\"framework\">The <strong>Actor</strong> is the policy network that generates commands and code. The <strong>Critic</strong> is the value network: from the task and interaction history at a particular position, it predicts the return from continuing. Follow RSR across the top, then RPR below. The <strong>verifier</strong> is the program that runs checks and determines whether the task is complete.</p><figure class=\"trajectory-figure\" id=\"figure-overview\"><div class=\"trajectory-map\" data-entry=\"overview\" data-reader-ready=\"\" hidden=\"\"></div><details class=\"trajectory-static\" open=\"\"><summary>Static figure</summary><img alt=\"Complete RSR–RPR workflow with reward, values, GAE, and separate parameter updates.\" height=\"770\" loading=\"lazy\" src=\"figures/overview.png\" width=\"1200\"/></details><figcaption>Figure 1 · RSR tunes the Actor. RPR combines verification rewards and value estimates, then updates the Actor and Critic with separate targets. Both sets of weights carry into the next round. <a href=\"https://arxiv.org/html/2610.22192v1#S2.F2\">Original Figure 2</a>, <a href=\"https://arxiv.org/html/2610.22192v1#S2.F3\">Figure 3</a>.</figcaption></figure><p><a href=\"#rewrite\">A · RSR</a> supplies demonstrations: extract a plan from a verified success, execute it in a clean environment, and keep the accepted new trajectory. <a href=\"#reward\">B · RPR</a> trains on new attempts: the verifier supplies reward, the Critic supplies value predictions, and <a href=\"#tb-gae\">GAE / TB-GAE</a> computes advantages A and return targets Ĝ at generated positions. The Actor uses A for PPO; the Critic fits Ĝ.</p><p>RSR changes the Actor. Each new RPR phase therefore holds the Actor fixed while <a href=\"#handoff\">calibrating the inherited Critic</a>, then trains both. The updated models produce experience for the next round—the recursive step in <strong>Recursive Self-Improvement (RSI)</strong>.</p><p class=\"source-note\">The diagram includes both advantage estimators. Section 2.3 proposes TB-GAE; the first training phase documented in §2.4 uses standard GAE with γ = λ = 1.</p><details class=\"method-detail framework-source\" open=\"\"><summary>The paper’s original diagrams and actual training order</summary>\n<p><a href=\"https://arxiv.org/html/2610.22192v1/terminal_rsi_overall_from_ppt.png\" rel=\"noopener\" target=\"_blank\">Figure 2 · Overall Framework ↗</a>　<a href=\"https://arxiv.org/html/2610.22192v1/terminal_rsi_single_step_from_ppt.png\" rel=\"noopener\" target=\"_blank\">Figure 3 · Single Recursive Step ↗</a></p>\n<p>The actual stage order is  <strong>Base → RSR-1 → RPR-1 → RSR-2 → RPR-2</strong>. At the top of the original diagram,  <em>Actor: RSR-1</em>  and  <em>Warm-up Critic Model</em>  indicate that, on first entering RPR, the policy has completed supervised learning and the value network has completed its initial warm-up.</p>\n</details><div class=\"table-scroll\"><table class=\"comparison\"><caption>Comparison with a PPO-only training loop</caption><thead><tr><th scope=\"col\">Step</th><th scope=\"col\">Ordinary PPO loop</th><th scope=\"col\">Terminal-RSI</th></tr></thead><tbody>\n<tr><th scope=\"row\">Using execution experience</th><td>Sample trajectories, estimate advantages from returns, and update.</td><td>Also re-execute and filter verified successful experience for SFT.</td></tr>\n<tr><th scope=\"row\">After the policy update</th><td>Continue sampling and training the Actor / Critic.</td><td>Preserve the Critic across SFT and calibrate it at the start of a new RPR stage.</td></tr>\n<tr><th scope=\"row\">Starting the next round</th><td>Continue PPO with the updated policy.</td><td>Use the updated policy to discover experience again, then enter RSR → RPR.</td></tr>\n</tbody></table></div></section><section aria-labelledby=\"rewrite\">\n<h2 id=\"rewrite\">2 RSR: rerun successful experience as demonstrations</h2>\n<p>The most direct way to learn is to imitate successful attempts. Yet a successful log may contain many detours or depend on tools specific to one harness. Copying that log may not reproduce success in the deployment environment.</p>\n<p><strong>Recursive Self-Rewrite (RSR)</strong> first distills a successful approach into a plan, then executes it again in the target environment. The trajectory is what gets ‘rewritten’; qualifying trajectories are subsequently used for training.</p><figure class=\"trajectory-figure\" id=\"figure-rsr\"><div class=\"trajectory-map\" data-entry=\"rsr\" data-reader-ready=\"\" hidden=\"\"></div><details class=\"trajectory-static\" open=\"\"><summary>Static figure</summary><img alt=\"Successful runs pass through planning, fresh execution, verification, and preparation for SFT.\" height=\"610\" loading=\"lazy\" src=\"figures/rsr.png\" width=\"1200\"/></details><figcaption>Figure 2 · RSR demonstrations come from fresh execution. The plan guides the run; after acceptance, public interactions become training context and generated actions become supervision targets. <a href=\"https://arxiv.org/html/2610.22192v1#S2.SS1\">§2.1</a>.</figcaption></figure>\n<ol class=\"method-steps\">\n<li><strong>Collect successful experience.</strong> The current model attempts tasks in different harnesses, retaining only trajectories that fully pass verification. A harness provides tools, maintains interaction history, and controls execution and stopping conditions.</li>\n<li><strong>Distill a plan.</strong> The Planner organizes key steps, checks, and recovery procedures into a  <strong>runbook</strong>. A reviewer checks whether the plan works in the target environment and whether it leaks the answer.</li>\n<li><strong>Execute again.</strong> With the plan, the Executor solves the same task in a clean <strong>sandbox</strong>—an isolated, resettable environment—making real tool calls and receiving new responses.</li>\n<li><strong>Verify and train.</strong> Once a new trajectory passes task verification and leakage checks, remove the private plan and review dialogue, retaining the public task and real interactions. These demonstrations update the language model responsible for actions: the <strong>policy network (Actor)</strong>. </li>\n</ol>\n<p>The final step is <strong>Supervised Fine-Tuning (SFT)</strong>: given the task and history, increase the probability of generating the demonstrated behavior. The private plan helps produce demonstrations; training teaches the model to act without that extra guidance.<a class=\"cite\" href=\"https://arxiv.org/html/2610.22192v1#S2.SS1\">[1, §2.1]</a></p>\n<h3>Rewriting trajectories for a Markdown task</h3>\n<p>The preceding RSR paper gives a Markdown-processing example. A <strong>parser</strong> identifies structures such as headings, paragraphs, and tables for downstream code. A <strong>precompiled parser</strong> is already compiled and can be loaded directly in a compatible environment, avoiding some generation and compilation work.</p>\n<p>The source execution took 64 turns to succeed. The distilled plan starts by looking for a compatible precompiled parser, and calls attention to output-summary and table-processing parameters. A new execution can therefore avoid some detours.</p>\n<figure class=\"trajectory-figure\" id=\"figure-rewrite\">\n<div class=\"trajectory-map\" data-entry=\"rewrite\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>View static figure</summary><img alt=\"The same successful trajectory is distilled into a runbook and executed independently in two fresh environments. One branch passes in 32 turns; the other encounters a missing xxd command and ultimately fails after 38 turns.\" height=\"1280\" loading=\"lazy\" src=\"figures/rewrite.png\" width=\"1200\"/></details>\n<figcaption>Figure 3 · Two executions of the same plan: one passes in 32 turns; the other fails after 38 turns. Each new trajectory is verified independently. Source: <a href=\"https://arxiv.org/html/2610.02826v1#S3.SS4\">RSR §3.4</a>. </figcaption>\n</figure>\n<p>The same plan produced both a successful and a failed branch. A successful trajectory enters the SFT data only after passing verification.</p>\n<details class=\"method-detail\" open=\"\"><summary>Complete rewriting results for this task</summary>\n<p>The source execution tried generating a parser at turn 26 and used a precompiled parser at turn 51; the successful rewrite shown here used one at turn 9. Across 12 rewrites of this task, 7 succeeded, with a median of 32 turns among successful rewrites. Source: <a href=\"https://arxiv.org/html/2610.02826v1#S3.SS4\">RSR §3.4</a>. </p>\n</details>\n<p>The model generates one <strong>token</strong> at a time—a textual unit such as a character, part of a word, or punctuation. SFT learns the model-generated portions of demonstrations; tool logs serve as input rather than imitation targets. The selection flags that determine which positions contribute to the training loss form the <strong>training mask</strong>. </p>\n<details class=\"method-detail\" open=\"\"><summary>Three roles for the same model</summary>\n<p>In the preceding RSR paper, the same base model takes on planning, review, and execution through different prompts and contexts. The Planner organizes the approach, the Reviewer checks the plan, and the Executor calls tools to complete the task.</p>\n<p>When producing demonstrations, the Executor may consult the private plan. Training retains only the public task and interaction history, checking whether each action can be explained by that public information. Source: <a href=\"https://arxiv.org/html/2610.02826v1#S2\">RSR §2</a>. </p>\n</details>\n<details class=\"method-detail\" open=\"\"><summary>The corresponding SFT objective</summary><p>θ denotes the trainable model parameters. πθ(yⱼ | hⱼ) is the probability that the policy with parameters θ generates demonstration token yⱼ given history hⱼ. A smaller negative log loss means a higher probability for that demonstrated choice.</p>\n<div class=\"formula-scroll\"><math aria-label=\"SFT loss is the sum of negative log probabilities at selected generated positions\" display=\"block\"><mrow><msub><mi>L</mi><mtext>SFT</mtext></msub><mo>=</mo><mo>−</mo><munder><mo>∑</mo><mi>j</mi></munder><msub><mi>m</mi><mi>j</mi></msub><mi>log</mi><msub><mi>π</mi><mi>θ</mi></msub><mo>(</mo><msub><mi>y</mi><mi>j</mi></msub><mo>∣</mo><msub><mi>h</mi><mi>j</mi></msub><mo>)</mo></mrow></math></div>\n<p>This is the form for a single demonstration; training also averages over the demonstration set. <var>hⱼ</var>  is the public history, <var>yⱼ</var>  is the demonstration token, and <var>mⱼ</var>  selects the generated positions to learn from. Minimizing negative log probability increases the probability of the verified demonstration under its corresponding history. Source: <a href=\"https://arxiv.org/html/2610.22192v1#S2.SS1\">Equation 3</a>. </p>\n</details>\n<p class=\"section-bridge\">Demonstrations teach the model an approach. On new attempts of its own, it also needs to learn from actual outcomes.</p>\n</section><section aria-labelledby=\"reward\">\n<h2 id=\"reward\">3 RPR: how verification outcomes become training signals</h2>\n<p><strong>Recursive Policy-Refine (RPR)</strong> has the supervised-fine-tuned Actor execute tasks again, using verification outcomes as rewards to update the policy with PPO. The  <strong>Critic</strong>  predicts future returns from the task and interaction history, providing a baseline for advantage estimation. For how each model is trained, see <a data-site-link=\"\" href=\"/writing/ppo-long-horizon/\">PPO: training along a long-horizon trajectory</a>. </p><p>Terminal-RSI uses programmatic verification directly, without a separately trained preference reward model; the paper sets both KL and entropy coefficients to 0. PPO still uses old-policy probabilities to control policy changes.</p><figure class=\"trajectory-figure\" id=\"figure-reward\"><div class=\"trajectory-map\" data-entry=\"reward\" data-reader-ready=\"\" hidden=\"\"></div><details class=\"trajectory-static\" open=\"\"><summary>Static figure</summary><img alt=\"Actor execution is verified; reward and value predictions produce advantages and return targets.\" height=\"720\" loading=\"lazy\" src=\"figures/reward.png\" width=\"1200\"/></details><figcaption>Figure 4 · A trajectory supplies terminal reward R and generated prefixes. Advantage estimation combines R with Critic predictions V to produce A for the Actor and Ĝ for Critic regression. <a href=\"https://arxiv.org/html/2610.22192v1#S2\">§2</a>.</figcaption></figure><p>Within an RPR phase, trajectory sampling, verification, and model updates repeat. After the phase ends, the retained Actor enters the next RSR round.</p>\n<p><strong>Reward (R)</strong> converts verification outcomes into a training score. The paper starts with two quantities: <var>P</var>  counts passed semantic checks—checks of task functionality, excluding auxiliary checks such as cleanup; <var>S</var>  is the strict-success indicator: 1 for a full pass, 0 otherwise. The score is computed at the end of an execution, rather than issued anew after every command.</p>\n<p>The earlier <strong>Family Dense Reward (FDR)</strong> uses  <var>P / D</var>  to represent partial completion, with  <var>D</var>  set in advance for the task family. This gives a signal for getting some things right. A partial-check score alone, however, need not rank full success above every failure.</p>\n<p>The subsequent <strong>Success-Prioritized Reward (SPR)</strong> therefore uses  <var>S + P / (P + D′)</var>. The second term is always below 1, while full success adds another 1: failures score below 1 and successes at least 1. Here,  <var>D′</var>  is a positive scale calibrated offline for each task family and held fixed within the stage.</p>\n<p>With 8 checks passed and D′ = 10, the reward is about 0.444 without strict success and 1.444 with strict success. SPR first distinguishes full success, then compares partial completion.</p>\n<details class=\"method-detail\" open=\"\"><summary>Exact reward formulas, scales, and training stages</summary>\n<div aria-label=\"FDR reward equals P divided by D\" class=\"equation\"><span class=\"equation-name\">FDR</span><math display=\"block\"><mrow><mi>r</mi><mo>=</mo><mfrac><mi>P</mi><mi>D</mi></mfrac></mrow></math></div><div aria-label=\"SPR reward equals S plus P divided by P plus D prime\" class=\"equation\"><span class=\"equation-name\">SPR</span><math display=\"block\"><mrow><mi>r</mi><mo>=</mo><mi>S</mi><mo>+</mo><mfrac><mi>P</mi><mrow><mi>P</mi><mo>+</mo><msup><mi>D</mi><mo>′</mo></msup></mrow></mfrac></mrow></math></div>\n<p>These formulas apply when the check report is valid; an invalid report makes both fall back to the strict-success indicator S. FDR uses the 90th percentile of historical total check counts within the task family for D, falling back to 82 when no family scale is available. SPR uses a positive, offline-calibrated D′ fixed within the stage.</p>\n<p>The ordinary RPR-2 branch uses FDR; the retained Long-Reward RPR-2 branch uses SPR. Sources: <a href=\"https://arxiv.org/html/2610.22192v1#S2.SS2\">§2.2</a>, <a href=\"https://arxiv.org/html/2610.22192v1#S3.SS1\">§3.1</a>. </p>\n</details>\n<p>In RPR-1, the training side recomputes old-policy probabilities using the old Actor for PPO’s comparison of new and old probabilities. <a href=\"https://arxiv.org/html/2610.22192v1#S2.SS4\">[§2.4]</a></p>\n</section><section aria-labelledby=\"tb-gae\">\n<h2 id=\"tb-gae\">4 TB-GAE: passing feedback back by turn</h2>\n<p>A task often spans many <strong>turns</strong>: the model generates a response or tool call, then receives an environmental response. Rewards arrive only at task completion, yet training needs an advantage for every earlier generated position.</p>\n<p><strong>Generalized Advantage Estimation (GAE)</strong> combines rewards and value predictions along the trajectory, recursively estimating advantages backward from the end. Later feedback usually decays as it propagates, so the choice of what counts as one step affects the signal reaching earlier positions.</p>\n<p>If every text token multiplies feedback by a factor below 1, simply lengthening a tool log weakens the feedback reaching earlier positions. Masking out the training loss at log positions is not enough: <strong>logs may still participate in the advantage recursion and incur additional decay.</strong></p>\n<p><strong>Turn-Boundary Skip-Observation Generalized Advantage Estimation (TB-GAE)</strong> skips tool observations in the recursion. Generated tokens within the same turn incur no decay; decay occurs only across turn boundaries.</p>\n<figure aria-labelledby=\"credit-caption\" class=\"credit-timeline\">\n<div aria-label=\"Generated positions across two turns and the TB-GAE recursion direction\" class=\"timeline-scroll\" role=\"region\" tabindex=\"0\">\n<svg aria-labelledby=\"credit-title credit-desc\" height=\"228\" role=\"img\" viewbox=\"0 0 780 228\" width=\"780\">\n<title id=\"credit-title\">Generation moves right in time; advantages recurse left through generated positions</title>\n<desc id=\"credit-desc\">The first turn generates g1 and g2, followed by a tool log; the second generates g3 and g4. Advantages recurse from g4 to g1, with factor 1 within a turn and γλ across turns, skipping the intervening tool log.</desc>\n<defs><marker id=\"credit-arrow\" markerheight=\"6\" markerwidth=\"6\" orient=\"auto-start-reverse\" refx=\"5\" refy=\"3\" viewbox=\"0 0 6 6\"><path d=\"M0 0 L6 3 L0 6\" fill=\"none\" stroke=\"currentColor\"></path></marker></defs>\n<g class=\"timeline-label\"><text x=\"36\" y=\"24\">Generation</text><text text-anchor=\"middle\" x=\"127\" y=\"65\">Turn 1</text><text text-anchor=\"middle\" x=\"347\" y=\"65\">Tool log</text><text text-anchor=\"middle\" x=\"567\" y=\"65\">Turn 2</text><text text-anchor=\"middle\" x=\"732\" y=\"65\">Verify</text></g>\n<path class=\"timeline-line\" d=\"M113 19 H756\" marker-end=\"url(#credit-arrow)\"></path>\n<g class=\"timeline-token\"><rect height=\"44\" rx=\"3\" width=\"72\" x=\"36\" y=\"82\"></rect><rect height=\"44\" rx=\"3\" width=\"72\" x=\"146\" y=\"82\"></rect><rect height=\"44\" rx=\"3\" width=\"72\" x=\"476\" y=\"82\"></rect><rect height=\"44\" rx=\"3\" width=\"72\" x=\"586\" y=\"82\"></rect></g>\n<rect class=\"timeline-log\" height=\"44\" rx=\"3\" width=\"182\" x=\"256\" y=\"82\"></rect>\n<g class=\"timeline-text\"><text text-anchor=\"middle\" x=\"72\" y=\"111\">g₁</text><text text-anchor=\"middle\" x=\"182\" y=\"111\">g₂</text><text text-anchor=\"middle\" x=\"347\" y=\"110\">… test output …</text><text text-anchor=\"middle\" x=\"512\" y=\"111\">g₃</text><text text-anchor=\"middle\" x=\"622\" y=\"111\">g₄</text><text text-anchor=\"middle\" x=\"732\" y=\"111\">R</text></g>\n<path class=\"timeline-line\" d=\"M665 104 H700\" marker-end=\"url(#credit-arrow)\"></path>\n<path class=\"timeline-credit\" d=\"M182 151 H72\" marker-end=\"url(#credit-arrow)\"></path>\n<path class=\"timeline-credit\" d=\"M512 151 H182\" marker-end=\"url(#credit-arrow)\"></path>\n<path class=\"timeline-credit\" d=\"M622 151 H512\" marker-end=\"url(#credit-arrow)\"></path>\n<g class=\"timeline-factor\"><text text-anchor=\"middle\" x=\"127\" y=\"178\">1</text><text text-anchor=\"middle\" x=\"347\" y=\"178\">γλ</text><text text-anchor=\"middle\" x=\"567\" y=\"178\">1</text></g>\n<text class=\"timeline-label\" x=\"36\" y=\"215\">Advantage recursion ←</text>\n</svg>\n</div>\n<figcaption id=\"credit-caption\">Below are the factors applied to the next advantage: 1 within a turn, γλ across turns.</figcaption>\n</figure>\n<p>Logs remain in the model input, influencing subsequent actions and value predictions. Positions g₁ through g₄ each use the context before their own generation, so they have different value baselines. The training system can batch these predictions after collecting the trajectory.</p>\n<h3>How log length affects decay</h3>\n<p>After one step, the difference between ‘immediate reward plus discounted future expectation’ and the previous expectation is the <strong>temporal-difference residual (TD residual, δ)</strong>. Below, we track only this change at the final position and see how much reaches the first position.</p>\n<p>The example has two turns and four generated positions. Set  <var>γ = 0.9，λ = 0.8</var>, multiplying by  <var>0.72</var> at each decay step. Drag the log-length control to compare three recursion chains.</p>\n<div aria-label=\"Compare three clocks for advantage recursion\" class=\"clock-example\">\n<div class=\"clock-controls\"><label for=\"observation-length\">Intervening observation positions  <output for=\"observation-length\" id=\"observation-count\">3</output></label><label class=\"unit-clock\"><input id=\"unit-clock\" type=\"checkbox\"/> γ = λ = 1</label></div>\n<input aria-describedby=\"clock-reading\" id=\"observation-length\" max=\"400\" min=\"0\" step=\"1\" type=\"range\" value=\"3\"/>\n<div class=\"clock-row\"><span>Mixed token chain</span><code id=\"clock-full-power\">0.72⁶</code><output id=\"clock-full\">0.1393</output><span aria-hidden=\"true\" class=\"clock-track\"><span id=\"clock-full-bar\" style=\"width:13.93%\"></span></span></div>\n<div class=\"clock-row\"><span>Skip observations only</span><code id=\"clock-skip-power\">0.72³</code><output id=\"clock-skip\">0.3732</output><span aria-hidden=\"true\" class=\"clock-track\"><span id=\"clock-skip-bar\" style=\"width:37.32%\"></span></span></div>\n<div class=\"clock-row\"><span>TB-GAE</span><code id=\"clock-turn-power\">0.72¹</code><output id=\"clock-turn\">0.7200</output><span aria-hidden=\"true\" class=\"clock-track\"><span id=\"clock-turn-bar\" style=\"width:72%\"></span></span></div>\n<p aria-live=\"polite\" class=\"example-reading\" id=\"clock-reading\">The mixed chain crosses 6 edges; skipping observations crosses 3; TB-GAE crosses just 1 turn boundary.</p>\n</div>\n<p class=\"source-note\">The values are the coefficients carrying the final change back to the start. Generated positions, values, and other inputs are fixed; only log length changes. With γ = λ = 1 checked, all three coefficients equal 1.</p>\n<details class=\"method-detail example-detail\" open=\"\"><summary>Three recursion chains: working through four positions</summary>\n<p>Let g₁ and g₂ belong to the first turn, and g₃ and g₄ to the second. Their pre-generation values are 0.2, 0.4, 0.5, and 0.8, respectively; reward 1 arrives only at task completion.</p>\n<p>First compute each position’s temporal-difference residual, then accumulate backward from the end.</p>\n<figure class=\"trajectory-figure\" id=\"figure-gae\">\n<div class=\"trajectory-map\" data-entry=\"gae\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>View static figure</summary><img alt=\"Four tokens are generated over two turns, separated by a tool log. Mixed-token recursion decays at every edge; skipping observations still decays by generated token; TB-GAE decays only across turns.\" height=\"1460\" loading=\"lazy\" src=\"figures/gae.png\" width=\"1200\"/></details>\n<figcaption>Figure 5 · A numerical example with two turns and four generated positions. The upper half compares feedback decay; the lower half distinguishes return targets from advantages. <a href=\"https://arxiv.org/html/2610.22192v1#S2.SS3\">Method: §2.3</a>. </figcaption>\n</figure>\n<ol class=\"calculation-steps\">\n<li><strong>g₄: the task ends.</strong> The reward is 1, against a prediction of 0.8, so  <var>A₄ = 1 − 0.8 = 0.20</var>. </li>\n<li><strong>g₃: still in the second turn.</strong> The value changes from 0.5 to 0.8, giving residual 0.3. There is no within-turn decay, so  <var>A₃ = (0.8 − 0.5) + 0.20 = 0.50</var>. </li>\n<li><strong>g₂: crossing back into the first turn.</strong> The residual is  <var>0.9 × 0.5 − 0.4 = 0.05</var>; the next advantage is multiplied by  <var>0.9 × 0.8</var>, giving  <var>A₂ = 0.05 + 0.72 × 0.50 = 0.41</var>. </li>\n<li><strong>g₁: still in the first turn.</strong> Again there is no within-turn decay: <var>A₁ = (0.4 − 0.2) + 0.41 = 0.61</var>. </li>\n</ol>\n<div class=\"table-scroll\"><table class=\"gae-values\"><caption>Worked example · Value target Ĝ = A + v</caption><thead><tr><th scope=\"col\">Generated position</th><th scope=\"col\">Turn</th><th scope=\"col\">Predicted v</th><th scope=\"col\">Advantage A</th><th scope=\"col\">Value target Ĝ</th></tr></thead><tbody>\n<tr><th scope=\"row\">g₁</th><td>1</td><td>0.20</td><td>0.61</td><td>0.81</td></tr>\n<tr><th scope=\"row\">g₂</th><td>1</td><td>0.40</td><td>0.41</td><td>0.81</td></tr>\n<tr><th scope=\"row\">g₃</th><td>2</td><td>0.50</td><td>0.50</td><td>1.00</td></tr>\n<tr><th scope=\"row\">g₄</th><td>2</td><td>0.80</td><td>0.20</td><td>1.00</td></tr>\n</tbody></table></div>\n<p>The first turn’s two positions share a return target of 0.81, but their advantages are 0.61 and 0.41 because their prior expectations differ. The Actor updates probabilities using each position’s advantage; the Critic fits its corresponding return target.</p>\n</details>\n<details class=\"method-detail\" open=\"\"><summary>Writing the calculation as a single recursion</summary><p>r̃ⱼ is the reward assigned to generated position j. In this terminal-reward example, only the final position has a nonzero reward.</p>\n<p>Enumerate only the retained generated positions  <var>j</var>, and let  <var>vⱼ</var>  be the value before that token is generated. When the next generated position is in the same turn, set  <var>Γⱼ = Λⱼ = 1</var>; across turns, use  <var>Γⱼ = γ<sub>turn</sub>，Λⱼ = λ<sub>turn</sub></var>. <var>dⱼ = 1</var>  indicates actual termination.</p>\n<div class=\"formula-scroll\"><math aria-label=\"The TB residual equals the causal reward plus Gamma times one minus the termination indicator times the next value, minus the current value\" display=\"block\"><mrow><msub><mi>δ</mi><mi>j</mi></msub><mo>=</mo><msub><mover><mi>r</mi><mo>~</mo></mover><mi>j</mi></msub><mo>+</mo><msub><mi>Γ</mi><mi>j</mi></msub><mo>(</mo><mn>1</mn><mo>−</mo><msub><mi>d</mi><mi>j</mi></msub><mo>)</mo><msub><mi>v</mi><mrow><mi>j</mi><mo>+</mo><mn>1</mn></mrow></msub><mo>−</mo><msub><mi>v</mi><mi>j</mi></msub></mrow></math></div>\n<div class=\"formula-scroll\"><math aria-label=\"The TB advantage equals the residual plus Gamma times Lambda times one minus the termination indicator times the next advantage\" display=\"block\"><mrow><msub><mi>A</mi><mi>j</mi></msub><mo>=</mo><msub><mi>δ</mi><mi>j</mi></msub><mo>+</mo><msub><mi>Γ</mi><mi>j</mi></msub><msub><mi>Λ</mi><mi>j</mi></msub><mo>(</mo><mn>1</mn><mo>−</mo><msub><mi>d</mi><mi>j</mi></msub><mo>)</mo><msub><mi>A</mi><mrow><mi>j</mi><mo>+</mo><mn>1</mn></mrow></msub></mrow></math></div>\n<p>The terminal reward is injected once at the last generated position. With no intermediate rewards within a turn, adjacent values cancel, yielding a shared return target Uₜ. Each position subtracts its own value prediction to obtain Aⱼ = Uₜ − vⱼ. Here, the first turn’s target is U₁ = 0.9 × (0.5 + 0.8 × 0.5) = 0.81.</p>\n<p>TB-GAE discounts by turn, applying one time-decay step per complete action. Log length and within-turn token count therefore no longer determine the number of discount steps. Sources: <a href=\"https://arxiv.org/html/2610.22192v1#S2.SS3\">Equations 8–13</a> and <a href=\"https://arxiv.org/html/2610.22192v1#A3\">Appendix C</a>. </p>\n</details>\n<details class=\"method-detail\" open=\"\"><summary>What happens at the boundary when a long trajectory is split?</summary>\n<p>To save GPU memory or compute in batches, a complete trajectory can be split into chunks, passing the recursion from later chunks back to earlier ones. If this example is split after g₂, retaining the next value prediction of 0.5 but zeroing the next advantage of 0.5 changes A₂ to 0.05 and A₁ to 0.25. The missing feedback is exactly 0.72 × 0.5 = 0.36.</p>\n<p>A complete continuation must pass both the next value and the next advantage, or compute backward over the full sequence. When sampling stops early and the future has not yet been executed, use <strong>value bootstrapping</strong>—estimating future returns with the current value prediction. At true task termination, the next value and advantage are zero. Context summarization also changes the history the model reads and requires separate handling.</p>\n</details>\n<p class=\"source-note\">This section describes TB-GAE as proposed in §2.3. The first stage documented in §2.4 uses standard GAE with γ = λ = 1.</p>\n</section><section aria-labelledby=\"handoff\">\n<h2 id=\"handoff\">5 Calibrating values under a new policy</h2>\n<p>RSR changes how the Actor acts, while the old Critic still scores from earlier experience. If the reward formula also changes, so does the score scale. Using old predictions to estimate advantages for a new policy can miscalibrate the learning signal.</p>\n<p>Terminal-RSI therefore retains the existing Critic and begins each RPR stage by <strong>freezing the Actor</strong>—temporarily leaving its weights unchanged—for 4 Critic-only calibration updates, before joint training. This preserves existing experience while bringing value predictions in line with the new policy and rewards.</p>\n<figure class=\"trajectory-figure\" id=\"figure-handoff\">\n<div class=\"trajectory-map\" data-entry=\"handoff\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>View static figure</summary><img alt=\"RSR updates the Actor while preserving the Critic. RPR first freezes the Actor to calibrate the Critic, then updates both jointly.\" height=\"445\" loading=\"lazy\" src=\"figures/handoff.png\" width=\"1200\"/></details>\n<figcaption>Figure 6 · RSR preserves the Critic; each RPR stage starts with 4 calibration updates before joint updates. Source: <a href=\"https://arxiv.org/html/2610.22192v1#S2.SS4\">§2.4</a>. </figcaption>\n</figure>\n<details class=\"method-detail\" id=\"critic-initialization\" open=\"\"><summary>The Critic, from initial warm-up to recursive training</summary>\n<ol class=\"method-steps\">\n<li><strong>Initial warm-up.</strong> Freeze the RSR-1 Actor after supervised fine-tuning and train the Critic for one epoch—one pass through <strong>Scientific Workflow Reconstruction (SWR)</strong> tasks. These tasks reconstruct executable scientific programs and verify their behavior with hidden checks. The Actor supplies trajectories; the Critic learns their return targets, producing the <em>Warm-up Critic Model</em>.</li>\n<li><strong>Entering RPR.</strong> Each RPR stage starts with the Actor fixed for 4 Critic-only calibration updates. The Actor then uses advantages for PPO updates, while the Critic regresses on return targets; the two parameter sets are trained separately.</li>\n<li><strong>Entering the next round.</strong> RSR-2 fine-tunes only the Actor, retaining the RPR-1 Critic’s weights. RPR-2 calibrates the Critic against executions by the new Actor, then resumes joint training.</li>\n</ol>\n<p>The paper describes this warm-up and weight handoff, but does not specify the checkpoint—the model-weight file—loaded into the Critic backbone before its first warm-up. Sources: <a href=\"https://arxiv.org/html/2610.22192v1#S2.SS1.p3\">§2.1</a>, <a href=\"https://arxiv.org/html/2610.22192v1#S2.SS4\">§2.4</a> and <a href=\"https://arxiv.org/html/2610.22192v1#A1.p5\">Appendix A</a>. </p>\n</details>\n</section><section aria-labelledby=\"task\">\n<h2 id=\"task\">6 From local tests to complete delivery</h2>\n<p>The task asks for a calculator written in Rust and C. It has two final checks: can the entry script recompile automatically after build artifacts are deleted, and do outputs for hidden inputs match the reference implementation <strong>character for character</strong>?</p>\n<p>One execution by the initial Base model passed local arithmetic tests and rebuilt automatically, but its final-check output was  <code>23</code>, while the reference returned  <code>23.0</code>. The numbers are equal, but the strings differ. An independent execution by the later RPR-2 version passed both checks.</p>\n<figure class=\"trajectory-figure\" id=\"figure-case\">\n<div class=\"trajectory-map\" data-entry=\"case\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>View static figure</summary><img alt=\"Two independent Rust–C trajectories. Base passes local tests and rebuilds automatically but fails output-format verification. RPR-2 builds cross-language components, calls Python for evaluation, and passes both checks.\" height=\"2370\" loading=\"lazy\" src=\"figures/case.png\" width=\"1200\"/></details>\n<figcaption>Figure 7 · Independent evaluations of Base and RPR-2 on the same calculator task. Final acceptance checks both automatic builds and output formatting. Source: <a href=\"https://arxiv.org/html/2610.22192v1#A8\">Terminal-RSI, Appendix H, Figure 16</a>. </figcaption>\n</figure>\n<p>The RPR-2 execution combines Rust / C components with Python expression evaluation and passes both automatic-rebuild and output-format checks.</p>\n<details class=\"method-detail\" open=\"\"><summary>How often did each of the five model versions pass this task?</summary>\n<p>Each version was evaluated twice. Full passes were Base 0/2, RSR-1 0/2, RPR-1 1/2, RSR-2 2/2, and RPR-2 2/2.</p>\n</details>\n</section><footer class=\"sources\" id=\"sources\"><h2>References</h2>\n<ol><li><a href=\"https://arxiv.org/html/2610.22192v1\">Terminal-RSI: Recursive Self-Improving Terminal Agents via Recursive Self-Rewrite and Policy-Refine</a>. Mechanisms: §2; real executions: Appendix H. <a href=\"https://arxiv.org/pdf/2610.22192\">PDF ↗</a></li>\n<li><a href=\"https://arxiv.org/html/2610.02826v1\">Recursive Self-Rewrite（RSR）</a>. The real Markdown rewrite example is in §3.4.</li>\n<li><a href=\"https://arxiv.org/abs/1707.06347\">Proximal Policy Optimization Algorithms</a>; <a href=\"https://arxiv.org/abs/1506.02438\">Generalized Advantage Estimation</a>. </li>\n</ol>\n</footer>\n",
    "ja.html": "<p>端末 Agent はコマンドラインでファイルを読み、コードを編集し、テストを実行する。一つの課題における対話記録全体を<strong>軌跡</strong>と呼ぶ。Terminal-RSI はこの経験を二つの学習に使う。<strong>RSR は成功した解法を再実行して手本を作り、RPR は新たな実行の検証結果から方策と価値ネットワークを学習する。</strong></p><section aria-labelledby=\"rsi\"><h2 id=\"rsi\">1 全体像：手本を学び、実行結果から学ぶ</h2><p id=\"framework\"><strong>Actor</strong> はコマンドやコードを生成する方策ネットワーク。<strong>Critic</strong> は、ある位置までの課題と対話履歴から、その先のリターンを予測する価値ネットワークだ。上段の RSR、下段の RPR の順に読む。<strong>検証器（verifier）</strong>は、チェックを実行して課題が完了したかを判定するプログラムである。</p><figure class=\"trajectory-figure\" id=\"figure-overview\"><div class=\"trajectory-map\" data-entry=\"overview\" data-reader-ready=\"\" hidden=\"\"></div><details class=\"trajectory-static\" open=\"\"><summary>静的な図</summary><img alt=\"報酬、価値、GAE、二つのパラメータ更新を含む RSR・RPR 全体図。\" height=\"770\" loading=\"lazy\" src=\"figures/overview.png\" width=\"1200\"/></details><figcaption>図 1 · RSR は Actor を調整する。RPR は検証報酬と価値予測から学習目標を計算し、Actor と Critic をそれぞれ更新する。両方の重みを次のラウンドへ継承する。<a href=\"https://arxiv.org/html/2610.22192v1#S2.F2\">原論文 Figure 2</a>、<a href=\"https://arxiv.org/html/2610.22192v1#S2.F3\">Figure 3</a>。</figcaption></figure><p><a href=\"#rewrite\">A · RSR</a> は手本を作る。検証済みの成功から計画を抽出し、初期化した環境で実行し直して、合格した新しい軌跡を残す。<a href=\"#reward\">B · RPR</a> は新しい試行を学習に使う。検証器の報酬と Critic の価値予測から、<a href=\"#tb-gae\">GAE / TB-GAE</a> が各生成位置のアドバンテージ A とリターン目標 Ĝ を計算する。Actor は A で PPO 更新を行い、Critic は Ĝ に回帰する。</p><p>RSR によって Actor が変わるため、各 RPR 段階では Actor を固定して<a href=\"#handoff\">継承した Critic を校正</a>してから共同学習へ進む。更新されたモデルが次の経験を作る。この循環が<strong>再帰的自己改善（Recursive Self-Improvement、RSI）</strong>である。</p><p class=\"source-note\">図は二つのアドバンテージ推定法を含む。§2.3 は TB-GAE を提案し、§2.4 に記載された最初の学習段階は標準 GAE、γ = λ = 1 を使う。</p><details class=\"method-detail framework-source\" open=\"\"><summary>論文の原図と実際の学習順序を照らし合わせる</summary>\n<p><a href=\"https://arxiv.org/html/2610.22192v1/terminal_rsi_overall_from_ppt.png\" rel=\"noopener\" target=\"_blank\">Figure 2 · Overall Framework ↗</a>　<a href=\"https://arxiv.org/html/2610.22192v1/terminal_rsi_single_step_from_ppt.png\" rel=\"noopener\" target=\"_blank\">Figure 3 · Single Recursive Step ↗</a></p>\n<p>実際の段階順序は <strong>Base → RSR-1 → RPR-1 → RSR-2 → RPR-2</strong>です。原図上部の <em>Actor: RSR-1</em> と <em>Warm-up Critic Model</em> は、最初にRPRへ入る時点で、方策は教師あり学習を、価値ネットワークは初回ウォームアップを完了していることを表します。</p>\n</details><div class=\"table-scroll\"><table class=\"comparison\"><caption>PPOだけの学習ループとの比較</caption><thead><tr><th scope=\"col\">段階</th><th scope=\"col\">通常のPPOループ</th><th scope=\"col\">Terminal-RSI</th></tr></thead><tbody>\n<tr><th scope=\"row\">実行経験の使い方</th><td>軌跡をサンプリングし、収益からアドバンテージを計算して更新する。</td><td>検証済みの成功経験をさらに再実行し、選別してSFTに使う。</td></tr>\n<tr><th scope=\"row\">方策更新の後</th><td>サンプリングとActor / Criticの学習を続ける。</td><td>SFTをまたいでCriticを保持し、新しいRPR段階の冒頭で校正する。</td></tr>\n<tr><th scope=\"row\">次の反復の出発点</th><td>更新した方策でPPOを続ける。</td><td>更新した方策で経験を再び発見し、RSR → RPRに進む。</td></tr>\n</tbody></table></div></section><section aria-labelledby=\"rewrite\">\n<h2 id=\"rewrite\">2 RSR：成功経験を再実行し、手本にする</h2>\n<p>最も直接的な学習方法は、成功した試行をまねることです。ただし成功ログにも遠回りが含まれ、特定の実行基盤のツールに依存する場合があります。そのまま写しても、配備先の環境で成功を再現できるとは限りません。</p>\n<p><strong>再帰的自己書き換え（Recursive Self-Rewrite、RSR）</strong>は、成功した方法を計画にまとめ、対象環境でもう一度実行します。「書き換える」のは軌跡であり、条件を満たした軌跡がその後の学習に使われます。</p><figure class=\"trajectory-figure\" id=\"figure-rsr\"><div class=\"trajectory-map\" data-entry=\"rsr\" data-reader-ready=\"\" hidden=\"\"></div><details class=\"trajectory-static\" open=\"\"><summary>静的な図</summary><img alt=\"成功軌跡を計画、再実行、検証、整理し、SFT に用いる。\" height=\"610\" loading=\"lazy\" src=\"figures/rsr.png\" width=\"1200\"/></details><figcaption>図 2 · RSR の手本は再実行から得る。計画を使って実行し、合格後の公開対話を入力、生成行動を教師信号として学習する。<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS1\">§2.1</a>。</figcaption></figure>\n<ol class=\"method-steps\">\n<li><strong>成功経験を集める。</strong>現在のモデルが複数の実行基盤で課題を試み、検証に完全合格した軌跡だけを残します。実行基盤（harness）は、ツールの提供、対話履歴の管理、実行と終了条件の制御を担います。</li>\n<li><strong>計画を抽出する。</strong>Plannerが主要な手順、確認項目、復旧方法を整理し、手順書である <strong>runbook</strong>を作ります。Reviewerは対象環境で計画を使えるか、答えが紛れ込んでいないかを確認します。</li>\n<li><strong>再実行する。</strong>Executorは計画を参考に、クリーンな<strong>サンドボックス</strong>、つまり分離され再初期化できる実行環境で同じ課題を解きます。実際にツールを呼び出し、新たな応答を受け取ります。</li>\n<li><strong>検証し、学習する。</strong>新しい軌跡が課題の検証と漏洩検査に合格したら、非公開の計画とレビュー対話を除き、公開された課題と実際の対話を残します。この手本で、行動を担う言語モデルである<strong>方策ネットワーク（Actor）を更新します</strong>。</li>\n</ol>\n<p>最後の段階を<strong>教師あり微調整（Supervised Fine-Tuning、SFT）</strong>と呼びます。課題と履歴を与えたときに、手本の行動を生成する確率を高めます。非公開の計画は手本を作るために使い、学習では追加の指示なしでも行動できるようにします。<a class=\"cite\" href=\"https://arxiv.org/html/2610.22192v1#S2.SS1\">[1, §2.1]</a></p>\n<h3>Markdown課題の軌跡を書き換える</h3>\n<p>先行するRSR論文は、Markdownを処理する例を示しています。<strong>構文解析器（parser）</strong>は、後続のコードが扱えるよう、テキストから見出し、段落、表などの構造を認識します。<strong>コンパイル済みparser</strong>は、互換性のある環境ならそのまま読み込めるため、生成やコンパイルの作業を一部省けます。</p>\n<p>元の実行は成功まで64ターンかかりました。抽出した計画では、互換性のあるコンパイル済みparserを探すことを最初の方針とし、出力要約と表処理のパラメータを合わせるよう促しています。やり直す際には、遠回りを減らせる可能性があります。</p>\n<figure class=\"trajectory-figure\" id=\"figure-rewrite\">\n<div class=\"trajectory-map\" data-entry=\"rewrite\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>静止図を見る</summary><img alt=\"同じ成功軌跡からrunbookを作り、2つの新しい環境で独立に実行する。一方は32ターンで合格し、他方はxxdコマンドが存在しない問題に遭遇し、最終的に38ターンで失敗する。\" height=\"1280\" loading=\"lazy\" src=\"figures/rewrite.png\" width=\"1200\"/></details>\n<figcaption>図 3 · 同じ計画から2回再実行し、32ターンで合格したものと、38ターンで失敗したもの。新しい軌跡はそれぞれ独立に検証されます。出典：<a href=\"https://arxiv.org/html/2610.02826v1#S3.SS4\">RSR §3.4</a>。</figcaption>\n</figure>\n<p>同じ計画から、成功と失敗の両方の分岐が生まれました。成功した軌跡は、検証に合格して初めてSFTデータに入ります。</p>\n<details class=\"method-detail\" open=\"\"><summary>この課題の書き換え結果全体</summary>\n<p>元の実行では26ターン目にparserの生成を試み、51ターン目にコンパイル済みparserを使いました。図中の成功した書き換えでは、9ターン目で利用しています。この課題は計12回書き換えられ、そのうち7回が成功し、成功例のターン数中央値は32でした。出典：<a href=\"https://arxiv.org/html/2610.02826v1#S3.SS4\">RSR §3.4</a>。</p>\n</details>\n<p>モデルは<strong>token</strong>を1つずつ生成します。これは文字、単語の一部、句読点などのテキスト単位です。SFTは手本のうちモデルが生成した部分を学習し、ツールログは模倣対象ではなく入力として使います。どの位置を学習損失に含めるかを選ぶ印が<strong>学習マスク（mask）です</strong>。</p>\n<details class=\"method-detail\" open=\"\"><summary>同じモデルが担う3つの役割</summary>\n<p>先行するRSR論文では、同じ基盤モデルが異なるプロンプトと文脈を通じて、計画、レビュー、実行を担います。Plannerが方法を整理し、Reviewerが計画を確認し、Executorがツールを呼び出して課題を完了します。</p>\n<p>手本を作る際、Executorは非公開の計画を参照できます。学習時には公開された課題と対話履歴だけを残し、各行動がその公開情報から説明できるかを検査します。出典：<a href=\"https://arxiv.org/html/2610.02826v1#S2\">RSR §2</a>。</p>\n</details>\n<details class=\"method-detail\" open=\"\"><summary>対応するSFTの目的関数</summary><p>θは学習可能なモデルパラメータです。πθ(yⱼ | hⱼ)は、パラメータθの方策が履歴hⱼの下で手本のtoken yⱼを生成する確率を表します。負の対数損失が小さいほど、その手本の選択確率は高くなります。</p>\n<div class=\"formula-scroll\"><math aria-label=\"SFT損失は、選択した生成位置の負の対数確率の和\" display=\"block\"><mrow><msub><mi>L</mi><mtext>SFT</mtext></msub><mo>=</mo><mo>−</mo><munder><mo>∑</mo><mi>j</mi></munder><msub><mi>m</mi><mi>j</mi></msub><mi>log</mi><msub><mi>π</mi><mi>θ</mi></msub><mo>(</mo><msub><mi>y</mi><mi>j</mi></msub><mo>∣</mo><msub><mi>h</mi><mi>j</mi></msub><mo>)</mo></mrow></math></div>\n<p>これは1つの手本に対する形です。学習では手本の集合全体でも平均を取ります。<var>hⱼ</var> は公開履歴、<var>yⱼ</var> は手本のtoken、<var>mⱼ</var> は学習対象の生成位置を選びます。負の対数確率を最小化すると、その履歴において検証済みの手本を生成する確率が高まります。出典：<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS1\">式3</a>。</p>\n</details>\n<p class=\"section-bridge\">手本からモデルは方法を学びます。自ら新たに試みる際には、実際の結果からも学ぶ必要があります。</p>\n</section><section aria-labelledby=\"reward\">\n<h2 id=\"reward\">3 RPR：検証結果を学習信号にする</h2>\n<p><strong>再帰的方策精練（Recursive Policy-Refine、RPR）</strong>では、教師あり微調整を終えたActorが課題を再び実行し、検証結果を報酬としてPPOで方策を更新します。ここでの <strong>Critic</strong> は、課題と対話履歴から将来の収益を予測し、アドバンテージ推定のベースラインを提供します。各モデルの学習方法は次の記事で説明しています：<a data-site-link=\"\" href=\"/writing/ppo-long-horizon/\">PPO：長期軌跡に沿って学習を見る</a>。</p><p>Terminal-RSIはプログラムによる検証を直接使い、選好報酬モデルを別途学習しません。論文の設定では、KLとエントロピーの係数はいずれも0です。PPOの更新では、引き続き旧方策の確率を使って方策の変化を制御します。</p><figure class=\"trajectory-figure\" id=\"figure-reward\"><div class=\"trajectory-map\" data-entry=\"reward\" data-reader-ready=\"\" hidden=\"\"></div><details class=\"trajectory-static\" open=\"\"><summary>静的な図</summary><img alt=\"Actor の実行を検証し、報酬と価値からアドバンテージとリターン目標を計算する。\" height=\"720\" loading=\"lazy\" src=\"figures/reward.png\" width=\"1200\"/></details><figcaption>図 4 · 同じ軌跡から終端報酬 R と各生成前の履歴を得る。アドバンテージ推定は R と価値予測 V を使い、Actor 用の A と Critic の回帰目標 Ĝ を計算する。<a href=\"https://arxiv.org/html/2610.22192v1#S2\">§2</a>。</figcaption></figure><p>各 RPR 段階では軌跡の生成、検証、モデル更新を繰り返す。段階が終わると、継承した Actor が次の RSR に入る。</p>\n<p><strong>報酬（reward、R）</strong>は、検証結果を学習用の点数に変換したものです。論文では2つの値を用います。<var>P</var> は合格した意味的検査の数です。課題の機能に関する検査を指し、後片付けなどの補助検査は含みません。<var>S</var> は厳密な成功の印で、完全合格なら1、それ以外は0です。点数は実行の終了時に計算され、各コマンドの直後に毎回付与されるものではありません。</p>\n<p>先に使われた<strong>課題ファミリー別の密な報酬（Family Dense Reward、FDR）</strong>は、 <var>P / D</var> で部分的な達成度を表します。 <var>D</var> は同じ課題ファミリーで事前に定める尺度です。これにより、一部を正しくできた場合にも信号が得られます。ただし部分検査の点数だけでは、完全成功があらゆる失敗より上に並ぶとは限りません。</p>\n<p>そこで、後の<strong>成功優先報酬（Success-Prioritized Reward、SPR）</strong>は <var>S + P / (P + D′)</var>を使います。後半の項は常に1未満で、完全成功にはさらに1を加えます。失敗は1点未満、成功は少なくとも1点になります。ここで <var>D′</var> は課題ファミリーごとにオフラインで校正され、その段階内では固定される正の尺度です。</p>\n<p>8項目に合格しD′ = 10の場合、厳密な成功でなければ報酬は約0.444、厳密な成功なら1.444です。SPRはまず完全成功かどうかを分け、その後で部分的な達成度を比べます。</p>\n<details class=\"method-detail\" open=\"\"><summary>報酬の正確な式、尺度、適用段階</summary>\n<div aria-label=\"FDR報酬はPをDで割った値\" class=\"equation\"><span class=\"equation-name\">FDR</span><math display=\"block\"><mrow><mi>r</mi><mo>=</mo><mfrac><mi>P</mi><mi>D</mi></mfrac></mrow></math></div><div aria-label=\"SPR報酬はSに、PをPとDプライムの和で割った値を加える\" class=\"equation\"><span class=\"equation-name\">SPR</span><math display=\"block\"><mrow><mi>r</mi><mo>=</mo><mi>S</mi><mo>+</mo><mfrac><mi>P</mi><mrow><mi>P</mi><mo>+</mo><msup><mi>D</mi><mo>′</mo></msup></mrow></mfrac></mrow></math></div>\n<p>ここでの式は検査レポートが有効な場合のものです。無効な場合は、どちらも厳密な成功の印Sに戻ります。FDRのDは、その課題ファミリーの過去の検査総数の第90百分位で、利用できるファミリー尺度がなければ82を使います。SPRのD′はオフラインで校正された正数で、段階内では固定です。</p>\n<p>通常のRPR-2分岐はFDRを使い、最終的に採用されたLong-Reward RPR-2分岐はSPRを使います。出典：<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS2\">§2.2</a>、<a href=\"https://arxiv.org/html/2610.22192v1#S3.SS1\">§3.1</a>。</p>\n</details>\n<p>RPR-1では、学習側が旧Actorを使って旧方策の確率を再計算し、PPOの新旧確率の比較に用います。 <a href=\"https://arxiv.org/html/2610.22192v1#S2.SS4\">[§2.4]</a></p>\n</section><section aria-labelledby=\"tb-gae\">\n<h2 id=\"tb-gae\">4 TB-GAE：ターン単位でフィードバックを遡らせる</h2>\n<p>1つの課題には、多くの<strong>ターン（turn）</strong>が含まれます。モデルが応答やツール呼び出しを生成し、環境から結果を受け取る単位です。報酬は課題の終了時にしか得られませんが、学習には、それ以前の各生成位置のアドバンテージが必要です。</p>\n<p><strong>一般化アドバンテージ推定（Generalized Advantage Estimation、GAE）</strong>は、軌跡上の報酬と価値予測を組み合わせ、末尾から逆向きにアドバンテージを再帰計算します。後から得たフィードバックは通常、伝わる過程で減衰するため、「何を1ステップと数えるか」が前の位置に届く信号を左右します。</p>\n<p>各テキストtokenを通るたびに1未満の係数を掛けると、ツールログを長くするだけで、前の位置に届くフィードバックが弱くなります。ログ位置の学習損失を無効にするだけでは十分ではありません。<strong>ログがアドバンテージの再帰計算に残り、追加の減衰を生むことがあるためです。</strong></p>\n<p><strong>ターン境界・観測スキップ型一般化アドバンテージ推定（Turn-Boundary Skip-Observation Generalized Advantage Estimation、TB-GAE）</strong>は、再帰計算からツールの観測を飛ばします。同じターン内の生成token間では減衰せず、ターン境界を越えるときだけ減衰させます。</p>\n<figure aria-labelledby=\"credit-caption\" class=\"credit-timeline\">\n<div aria-label=\"2ターンの生成位置とTB-GAEの再帰方向\" class=\"timeline-scroll\" role=\"region\" tabindex=\"0\">\n<svg aria-labelledby=\"credit-title credit-desc\" height=\"228\" role=\"img\" viewbox=\"0 0 780 228\" width=\"780\">\n<title id=\"credit-title\">生成は時間順に右へ、アドバンテージは生成位置を左へ遡る</title>\n<desc id=\"credit-desc\">第1ターンでg1、g2を生成し、ツールログを受け取り、第2ターンでg3、g4を生成します。アドバンテージはg4からg1へ遡り、同一ターン内の係数は1、ターン間はγλです。途中のツールログは飛ばします。</desc>\n<defs><marker id=\"credit-arrow\" markerheight=\"6\" markerwidth=\"6\" orient=\"auto-start-reverse\" refx=\"5\" refy=\"3\" viewbox=\"0 0 6 6\"><path d=\"M0 0 L6 3 L0 6\" fill=\"none\" stroke=\"currentColor\"></path></marker></defs>\n<g class=\"timeline-label\"><text x=\"36\" y=\"24\">生成順</text><text text-anchor=\"middle\" x=\"127\" y=\"65\">第1ターン</text><text text-anchor=\"middle\" x=\"347\" y=\"65\">ツールログ</text><text text-anchor=\"middle\" x=\"567\" y=\"65\">第2ターン</text><text text-anchor=\"middle\" x=\"732\" y=\"65\">検証</text></g>\n<path class=\"timeline-line\" d=\"M113 19 H756\" marker-end=\"url(#credit-arrow)\"></path>\n<g class=\"timeline-token\"><rect height=\"44\" rx=\"3\" width=\"72\" x=\"36\" y=\"82\"></rect><rect height=\"44\" rx=\"3\" width=\"72\" x=\"146\" y=\"82\"></rect><rect height=\"44\" rx=\"3\" width=\"72\" x=\"476\" y=\"82\"></rect><rect height=\"44\" rx=\"3\" width=\"72\" x=\"586\" y=\"82\"></rect></g>\n<rect class=\"timeline-log\" height=\"44\" rx=\"3\" width=\"182\" x=\"256\" y=\"82\"></rect>\n<g class=\"timeline-text\"><text text-anchor=\"middle\" x=\"72\" y=\"111\">g₁</text><text text-anchor=\"middle\" x=\"182\" y=\"111\">g₂</text><text text-anchor=\"middle\" x=\"347\" y=\"110\">… テスト出力 …</text><text text-anchor=\"middle\" x=\"512\" y=\"111\">g₃</text><text text-anchor=\"middle\" x=\"622\" y=\"111\">g₄</text><text text-anchor=\"middle\" x=\"732\" y=\"111\">R</text></g>\n<path class=\"timeline-line\" d=\"M665 104 H700\" marker-end=\"url(#credit-arrow)\"></path>\n<path class=\"timeline-credit\" d=\"M182 151 H72\" marker-end=\"url(#credit-arrow)\"></path>\n<path class=\"timeline-credit\" d=\"M512 151 H182\" marker-end=\"url(#credit-arrow)\"></path>\n<path class=\"timeline-credit\" d=\"M622 151 H512\" marker-end=\"url(#credit-arrow)\"></path>\n<g class=\"timeline-factor\"><text text-anchor=\"middle\" x=\"127\" y=\"178\">1</text><text text-anchor=\"middle\" x=\"347\" y=\"178\">γλ</text><text text-anchor=\"middle\" x=\"567\" y=\"178\">1</text></g>\n<text class=\"timeline-label\" x=\"36\" y=\"215\">アドバンテージの再帰計算 ←</text>\n</svg>\n</div>\n<figcaption id=\"credit-caption\">下段は後続のアドバンテージに掛ける係数です。同一ターン内は1、ターン間はγλです。</figcaption>\n</figure>\n<p>ログはモデルの入力には残り、次の行動や価値予測に影響します。g₁からg₄はそれぞれ生成直前の文脈を使うため、価値のベースラインが異なります。学習システムは、軌跡の収集後に各位置の予測をまとめて計算できます。</p>\n<h3>ログの長さが減衰に与える影響</h3>\n<p>1ステップ後の「即時報酬と割引後の将来予測の和」から、元の予測を引いた差を<strong>時間差分残差（TD residual、δ）</strong>と呼びます。以下では最後の位置でのこの変化だけを追い、最初の位置までどれだけ届くかを見ます。</p>\n<p>例は2ターン、4つの生成位置です。 <var>γ = 0.9，λ = 0.8</var>とし、減衰のたびに <var>0.72</var>を掛けます。ログ長を動かして、3種類の再帰計算を比べてください。</p>\n<div aria-label=\"アドバンテージ再帰計算の3種類の時計を比べる\" class=\"clock-example\">\n<div class=\"clock-controls\"><label for=\"observation-length\">間に入る観測位置の数  <output for=\"observation-length\" id=\"observation-count\">3</output></label><label class=\"unit-clock\"><input id=\"unit-clock\" type=\"checkbox\"/> γ = λ = 1</label></div>\n<input aria-describedby=\"clock-reading\" id=\"observation-length\" max=\"400\" min=\"0\" step=\"1\" type=\"range\" value=\"3\"/>\n<div class=\"clock-row\"><span>混合token列</span><code id=\"clock-full-power\">0.72⁶</code><output id=\"clock-full\">0.1393</output><span aria-hidden=\"true\" class=\"clock-track\"><span id=\"clock-full-bar\" style=\"width:13.93%\"></span></span></div>\n<div class=\"clock-row\"><span>観測だけをスキップ</span><code id=\"clock-skip-power\">0.72³</code><output id=\"clock-skip\">0.3732</output><span aria-hidden=\"true\" class=\"clock-track\"><span id=\"clock-skip-bar\" style=\"width:37.32%\"></span></span></div>\n<div class=\"clock-row\"><span>TB-GAE</span><code id=\"clock-turn-power\">0.72¹</code><output id=\"clock-turn\">0.7200</output><span aria-hidden=\"true\" class=\"clock-track\"><span id=\"clock-turn-bar\" style=\"width:72%\"></span></span></div>\n<p aria-live=\"polite\" class=\"example-reading\" id=\"clock-reading\">混合列は6本の辺、観測だけを飛ばす列は3本の辺、TB-GAEは1つのターン境界を越えます。</p>\n</div>\n<p class=\"source-note\">表示値は、末端の変化を起点へ伝える係数です。生成位置や価値などの入力は固定し、ログ長だけを変えています。γ = λ = 1にチェックすると、3種類とも係数は1になります。</p>\n<details class=\"method-detail example-detail\" open=\"\"><summary>3種類の再帰計算と4位置の手計算</summary>\n<p>g₁、g₂を第1ターン、g₃、g₄を第2ターンとします。各位置の生成直前の価値は順に0.2、0.4、0.5、0.8で、課題終了時だけ報酬1を得ます。</p>\n<p>まず各位置の時間差分残差を求め、末尾から順に遡って累積します。</p>\n<figure class=\"trajectory-figure\" id=\"figure-gae\">\n<div class=\"trajectory-map\" data-entry=\"gae\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>静止図を見る</summary><img alt=\"2ターンで4つのtokenを生成し、その間にツールログが入る。混合tokenの再帰計算は各辺で減衰し、観測だけを飛ばしても生成tokenごとに減衰する。TB-GAEはターン間だけで減衰する。\" height=\"1460\" loading=\"lazy\" src=\"figures/gae.png\" width=\"1200\"/></details>\n<figcaption>図 5 · 2ターン、4つの生成位置による数値例。上段はフィードバックの減衰を比較し、下段は収益目標とアドバンテージを区別します。<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS3\">方法は§2.3</a>。</figcaption>\n</figure>\n<ol class=\"calculation-steps\">\n<li><strong>g₄：課題終了。</strong>報酬は1、事前予測は0.8なので、 <var>A₄ = 1 − 0.8 = 0.20</var>。</li>\n<li><strong>g₃：まだ第2ターン。</strong>価値が0.5から0.8へ変わるため、残差は0.3です。同じターンでは減衰しないので、 <var>A₃ = (0.8 − 0.5) + 0.20 = 0.50</var>。</li>\n<li><strong>g₂：第1ターンへ戻る。</strong>残差は <var>0.9 × 0.5 − 0.4 = 0.05</var>です。後続のアドバンテージには <var>0.9 × 0.8</var>を掛けるため、 <var>A₂ = 0.05 + 0.72 × 0.50 = 0.41</var>。</li>\n<li><strong>g₁：まだ第1ターン。</strong>同じターンなので引き続き減衰せず、<var>A₁ = (0.4 − 0.2) + 0.41 = 0.61</var>。</li>\n</ol>\n<div class=\"table-scroll\"><table class=\"gae-values\"><caption>手計算例 · 価値目標 Ĝ = A + v</caption><thead><tr><th scope=\"col\">生成位置</th><th scope=\"col\">ターン</th><th scope=\"col\">元の予測 v</th><th scope=\"col\">アドバンテージ A</th><th scope=\"col\">価値目標 Ĝ</th></tr></thead><tbody>\n<tr><th scope=\"row\">g₁</th><td>1</td><td>0.20</td><td>0.61</td><td>0.81</td></tr>\n<tr><th scope=\"row\">g₂</th><td>1</td><td>0.40</td><td>0.41</td><td>0.81</td></tr>\n<tr><th scope=\"row\">g₃</th><td>2</td><td>0.50</td><td>0.50</td><td>1.00</td></tr>\n<tr><th scope=\"row\">g₄</th><td>2</td><td>0.80</td><td>0.20</td><td>1.00</td></tr>\n</tbody></table></div>\n<p>第1ターンの2位置は0.81という収益目標を共有しますが、事前予測が異なるため、アドバンテージは0.61と0.41です。Actorは各位置のアドバンテージで確率を更新し、Criticは対応する収益目標に適合させます。</p>\n</details>\n<details class=\"method-detail\" open=\"\"><summary>手計算を共通の再帰式で表す</summary><p>r̃ⱼは第j生成位置に割り当てる報酬です。この終端報酬の例では、最後の位置だけが非ゼロです。</p>\n<p>保持する生成位置だけに <var>j</var>を付け、 <var>vⱼ</var> をそのtokenの生成直前の価値とします。次の生成位置が同じターンなら <var>Γⱼ = Λⱼ = 1</var>、ターンをまたぐなら <var>Γⱼ = γ<sub>turn</sub>，Λⱼ = λ<sub>turn</sub></var>。<var>dⱼ = 1</var> は実際の終端を表します。</p>\n<div class=\"formula-scroll\"><math aria-label=\"TB残差は、因果的報酬にGammaと1から終端フラグを引いた値と次の価値の積を加え、現在の価値を引く\" display=\"block\"><mrow><msub><mi>δ</mi><mi>j</mi></msub><mo>=</mo><msub><mover><mi>r</mi><mo>~</mo></mover><mi>j</mi></msub><mo>+</mo><msub><mi>Γ</mi><mi>j</mi></msub><mo>(</mo><mn>1</mn><mo>−</mo><msub><mi>d</mi><mi>j</mi></msub><mo>)</mo><msub><mi>v</mi><mrow><mi>j</mi><mo>+</mo><mn>1</mn></mrow></msub><mo>−</mo><msub><mi>v</mi><mi>j</mi></msub></mrow></math></div>\n<div class=\"formula-scroll\"><math aria-label=\"TBアドバンテージは、残差にGammaとLambdaと1から終端フラグを引いた値と次のアドバンテージの積を加える\" display=\"block\"><mrow><msub><mi>A</mi><mi>j</mi></msub><mo>=</mo><msub><mi>δ</mi><mi>j</mi></msub><mo>+</mo><msub><mi>Γ</mi><mi>j</mi></msub><msub><mi>Λ</mi><mi>j</mi></msub><mo>(</mo><mn>1</mn><mo>−</mo><msub><mi>d</mi><mi>j</mi></msub><mo>)</mo><msub><mi>A</mi><mrow><mi>j</mi><mo>+</mo><mn>1</mn></mrow></msub></mrow></math></div>\n<p>終端報酬は最後の生成位置に1回だけ入れます。同じターン内に中間報酬がなければ、隣り合う価値が相殺され、共通の収益目標Uₜが得られます。各位置で自分の価値予測を引くと、Aⱼ = Uₜ − vⱼです。この例の第1ターンの目標はU₁ = 0.9 × (0.5 + 0.8 × 0.5) = 0.81です。</p>\n<p>TB-GAEはターンを割引の単位とし、完結した1回の行動に1回の時間減衰を適用します。これにより、ログ長とターン内のtoken数が割引ステップ数から外れます。出典：<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS3\">式8–13</a>および<a href=\"https://arxiv.org/html/2610.22192v1#A3\">付録C</a>。</p>\n</details>\n<details class=\"method-detail\" open=\"\"><summary>長い軌跡を分割したら、境界をどう扱うか</summary>\n<p>GPUメモリを節約したり分割計算したりするため、完全な軌跡を複数の区間に分け、後半の再帰計算結果を前半へ渡すことがあります。この例をg₂の後で切り、次の価値予測0.5だけを残して次のアドバンテージ0.5をゼロにすると、A₂は0.05、A₁は0.25になります。失われるフィードバックは、ちょうど0.72 × 0.5 = 0.36です。</p>\n<p>完全に接続するには、後続の価値とアドバンテージを両方渡すか、全系列をまとめて逆向きに計算する必要があります。サンプリングが早く止まり、将来部分をまだ実行していない場合には、<strong>価値のブートストラップ（bootstrap）</strong>を使い、現在の価値予測で将来の収益を見積もります。課題が実際に終了した場合、後続の価値とアドバンテージはゼロです。文脈の要約もモデルが読む履歴を変えるため、別途扱う必要があります。</p>\n</details>\n<p class=\"source-note\">この節は§2.3で提案されたTB-GAEを説明しています。論文§2.4に記載された第1段階は、γ = λ = 1の標準GAEを使います。</p>\n</section><section aria-labelledby=\"handoff\">\n<h2 id=\"handoff\">5 新しい方策に合わせて価値を校正する</h2>\n<p>RSRでActorの行動は変わりますが、旧Criticは以前の経験で評価を続けます。報酬式も変われば、点数の尺度も変わります。古い予測で新方策のアドバンテージを計算すると、学習信号がずれる場合があります。</p>\n<p>そこでTerminal-RSIは既存のCriticを引き継ぎ、各RPR段階の冒頭で<strong>Actorを凍結</strong>します。つまりActorの重みを一時的に更新せず、Criticだけを4回校正してから共同学習に移ります。既存の経験を残しつつ、価値予測を新しい方策と報酬に合わせます。</p>\n<figure class=\"trajectory-figure\" id=\"figure-handoff\">\n<div class=\"trajectory-map\" data-entry=\"handoff\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>静止図を見る</summary><img alt=\"RSRはActorを更新し、Criticを保持する。RPRはまずActorを凍結してCriticを校正し、その後に両者を共同更新する。\" height=\"445\" loading=\"lazy\" src=\"figures/handoff.png\" width=\"1200\"/></details>\n<figcaption>図 6 · RSRではCriticを保持し、RPR段階の冒頭で4回校正してから共同更新します。出典：<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS4\">§2.4</a>。</figcaption>\n</figure>\n<details class=\"method-detail\" id=\"critic-initialization\" open=\"\"><summary>Criticの初回ウォームアップから再帰学習まで</summary>\n<ol class=\"method-steps\">\n<li><strong>初回ウォームアップ。</strong>教師あり微調整を終えた RSR-1 Actor を固定し、<strong>科学ワークフロー再構築（Scientific Workflow Reconstruction、SWR）</strong>課題で Critic を 1 epoch、つまりデータを 1 巡して学習する。この課題では実行可能な科学プログラムを再構築し、隠されたチェックで動作を検証する。Actor が軌跡を供給し、Critic がリターン目標を学ぶ。その結果が原図の <em>Warm-up Critic Model</em> である。</li>\n<li><strong>RPRに入る。</strong>各RPR段階の最初にActorを固定し、Criticだけを4回校正します。その後、Actorはアドバンテージを用いてPPOで更新し、Criticは収益目標への価値回帰を行います。2組のパラメータはそれぞれ学習されます。</li>\n<li><strong>次の反復に入る。</strong>RSR-2はActorだけを微調整し、RPR-1のCriticの重みを保持します。RPR-2では新しいActorの実行結果でCriticを校正し、その後に共同学習を続けます。</li>\n</ol>\n<p>論文はこのウォームアップと重みの引き継ぎを説明していますが、初回ウォームアップ前にCriticの基盤へ読み込む具体的なcheckpoint、つまりモデル重みファイルは明記していません。出典：<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS1.p3\">§2.1</a>、<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS4\">§2.4</a>と<a href=\"https://arxiv.org/html/2610.22192v1#A1.p5\">付録A</a>。</p>\n</details>\n</section><section aria-labelledby=\"task\">\n<h2 id=\"task\">6 局所テストから課題全体の達成へ</h2>\n<p>課題は Rust と C で計算機を作ること。最終検証は二つある。ビルド成果物を削除しても起動スクリプトが自動で再コンパイルできるか、そして未知の入力に対する出力が参照実装と<strong>一字一句一致するか</strong>を確認する。</p>\n<p>初期モデルBaseのある実行は、ローカルの計算テストと自動再ビルドには成功しました。しかし最終検証の出力は <code>23</code>で、参照出力は <code>23.0</code>でした。数値は同じでも、文字列は異なります。後の学習段階のRPR-2による独立した実行は、両方の検証に合格しました。</p>\n<figure class=\"trajectory-figure\" id=\"figure-case\">\n<div class=\"trajectory-map\" data-entry=\"case\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>静止図を見る</summary><img alt=\"独立した2本のRust–C軌跡。Baseはローカルテストと自動再ビルドには成功するが、出力形式の検証に失敗する。RPR-2は言語をまたぐ部品を構築し、Pythonで評価して両方の検証に合格する。\" height=\"2370\" loading=\"lazy\" src=\"figures/case.png\" width=\"1200\"/></details>\n<figcaption>図 7 · 同じ計算機課題に対するBaseとRPR-2の独立した評価。最終検証では、自動ビルドと出力形式の両方を確認します。出典：<a href=\"https://arxiv.org/html/2610.22192v1#A8\">Terminal-RSI、付録H、Figure 16</a>。</figcaption>\n</figure>\n<p>この RPR-2 の実行は Rust / C の部品と Python の式評価を組み合わせ、自動再ビルドと出力形式の両検証に合格した。</p>\n<details class=\"method-detail\" open=\"\"><summary>5つのモデル版は、この課題にそれぞれ何回合格したか</summary>\n<p>各版を2回ずつ評価した結果、完全合格はBase 0/2、RSR-1 0/2、RPR-1 1/2、RSR-2 2/2、RPR-2 2/2でした。</p>\n</details>\n</section><footer class=\"sources\" id=\"sources\"><h2>参考文献</h2>\n<ol><li><a href=\"https://arxiv.org/html/2610.22192v1\">Terminal-RSI: Recursive Self-Improving Terminal Agents via Recursive Self-Rewrite and Policy-Refine</a>。仕組みは§2、実際の実行例は付録Hを参照。<a href=\"https://arxiv.org/pdf/2610.22192\">PDF ↗</a></li>\n<li><a href=\"https://arxiv.org/html/2610.02826v1\">Recursive Self-Rewrite（RSR）</a>。実際のMarkdown書き換え例は§3.4を参照。</li>\n<li><a href=\"https://arxiv.org/abs/1707.06347\">Proximal Policy Optimization Algorithms</a>；<a href=\"https://arxiv.org/abs/1506.02438\">Generalized Advantage Estimation</a>。</li>\n</ol>\n</footer>\n",
    "zh.html": "<p>终端 Agent 通过命令行读文件、改代码、跑测试。一次任务留下的完整交互记录叫<strong>执行轨迹</strong>。Terminal-RSI 用这些轨迹交替进行两种训练：<strong>RSR 重做成功经验，制作监督学习的示范；RPR 执行新任务，根据验证结果更新策略与价值网络。</strong></p><section aria-labelledby=\"rsi\"><h2 id=\"rsi\">1 整体流程：先学示范，再从执行中学习</h2><p id=\"framework\">图中的 <strong>Actor</strong> 是生成命令与代码的策略网络；<strong>Critic</strong> 是价值网络，根据截至某个位置的任务与交互历史，预测继续执行能获得的回报。先沿上方看 RSR，再沿下方看 RPR。<strong>验证器（verifier）</strong>是运行检查、判断任务是否完成的程序。</p><figure class=\"trajectory-figure\" id=\"figure-overview\"><div class=\"trajectory-map\" data-entry=\"overview\" data-reader-ready=\"\" hidden=\"\"></div><details class=\"trajectory-static\" open=\"\"><summary>查看静态图</summary><img alt=\"RSR 与 RPR 全流程，包含验证奖励、价值预测、GAE 和两套参数更新。\" height=\"770\" loading=\"lazy\" src=\"figures/overview.png\" width=\"1200\"/></details><figcaption>图 1 · RSR 只微调 Actor；RPR 把验证奖励与价值预测交给优势估计，再分别更新 Actor 与 Critic。两套权重进入下一轮。<a href=\"https://arxiv.org/html/2610.22192v1#S2.F2\">原文 Figure 2</a>、<a href=\"https://arxiv.org/html/2610.22192v1#S2.F3\">Figure 3</a>。</figcaption></figure><p><a href=\"#rewrite\">A · RSR</a> 解决示范从哪里来：从通过验收的旧轨迹中提炼做法，在干净环境重做，留下可以学习的新轨迹。<a href=\"#reward\">B · RPR</a> 解决新尝试怎么训练：验证器给出奖励，Critic 给出价值预测，<a href=\"#tb-gae\">GAE / TB-GAE</a> 算出各生成位置的优势 A 和回报目标 Ĝ。Actor 用 A 做 PPO 更新；Critic 拟合 Ĝ。</p><p>每次 RSR 都会改变 Actor。进入新的 RPR 阶段时，先固定 Actor，<a href=\"#handoff\">校准继承的 Critic</a>，再联合训练。更新后的模型又为下一轮产生经验，这就是这里的<strong>递归自我改进（Recursive Self-Improvement，RSI）</strong>。</p><p class=\"source-note\">图中保留两种优势估计方法。论文 §2.3 提出 TB-GAE；§2.4 披露的第一训练阶段使用标准 GAE，γ = λ = 1。</p><details class=\"method-detail framework-source\" open=\"\"><summary>对照论文原图与具体训练顺序</summary>\n<p><a href=\"https://arxiv.org/html/2610.22192v1/terminal_rsi_overall_from_ppt.png\" rel=\"noopener\" target=\"_blank\">Figure 2 · Overall Framework ↗</a>　<a href=\"https://arxiv.org/html/2610.22192v1/terminal_rsi_single_step_from_ppt.png\" rel=\"noopener\" target=\"_blank\">Figure 3 · Single Recursive Step ↗</a></p>\n<p>实际阶段顺序为 <strong>Base → RSR-1 → RPR-1 → RSR-2 → RPR-2</strong>。原图顶部的 <em>Actor: RSR-1</em> 与 <em>Warm-up Critic Model</em> 表示首次进入 RPR 时，策略已完成监督学习，价值网络已完成初始预热。</p>\n</details><div class=\"table-scroll\"><table class=\"comparison\"><caption>与只使用 PPO 训练循环的对照</caption><thead><tr><th scope=\"col\">环节</th><th scope=\"col\">普通 PPO 循环</th><th scope=\"col\">Terminal-RSI</th></tr></thead><tbody>\n<tr><th scope=\"row\">执行经验怎么用</th><td>采样轨迹，按回报计算优势并更新。</td><td>还把验证过的成功经验重新执行、过滤后用于 SFT。</td></tr>\n<tr><th scope=\"row\">策略更新之后</th><td>继续采样并训练 Actor / Critic。</td><td>跨 SFT 阶段保留 Critic，进入新 RPR 阶段先校准。</td></tr>\n<tr><th scope=\"row\">下一轮从哪里开始</th><td>用更新后的策略继续 PPO。</td><td>用更新后的策略重新发现经验，再进入 RSR → RPR。</td></tr>\n</tbody></table></div></section><section aria-labelledby=\"rewrite\">\n<h2 id=\"rewrite\">2 RSR：把成功经验重做成示范</h2>\n<p>最直接的学习办法，是模仿成功尝试。但成功日志也可能包含许多弯路，或依赖特定框架的工具。照搬日志，未必能在部署环境里重现成功。</p>\n<p><strong>递归自我重写（Recursive Self-Rewrite，RSR）</strong>先把成功做法整理成计划，再在目标环境里重新执行。“重写”的是轨迹，合格轨迹随后才用于训练。</p><figure class=\"trajectory-figure\" id=\"figure-rsr\"><div class=\"trajectory-map\" data-entry=\"rsr\" data-reader-ready=\"\" hidden=\"\"></div><details class=\"trajectory-static\" open=\"\"><summary>查看静态图</summary><img alt=\"成功轨迹经计划、重做、验证与数据整理后用于监督微调。\" height=\"610\" loading=\"lazy\" src=\"figures/rsr.png\" width=\"1200\"/></details><figcaption>图 2 · RSR 的示范来自重新执行。计划引导执行；通过验收后，公开交互成为训练输入，模型生成的动作成为监督目标。<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS1\">§2.1</a>。</figcaption></figure>\n<ol class=\"method-steps\">\n<li><strong>收集成功经验。</strong>当前模型在不同执行框架中尝试任务，只保留完整通过验证的轨迹。执行框架（harness）负责提供工具、维护交互历史、控制运行与结束条件。</li>\n<li><strong>提炼计划。</strong>规划角色（Planner）整理关键步骤、检查与恢复办法，形成操作说明 <strong>runbook</strong>。审查角色检查计划能否在目标环境使用，以及是否夹带答案。</li>\n<li><strong>重新执行。</strong>执行角色（Executor）带着计划，在干净的<strong>沙盒</strong>——隔离、可重新初始化的运行环境——里解决同一任务，实际调用工具并获得新的返回。</li>\n<li><strong>验收并训练。</strong>新轨迹通过任务验证与泄漏检查后，移除私有计划和审查对话，保留公开任务与真实交互。用这些示范更新负责行动的语言模型，即<strong>策略网络（Actor）</strong>。</li>\n</ol>\n<p>最后一步叫<strong>监督微调（Supervised Fine-Tuning，SFT）</strong>：给定任务和历史，提高模型生成示范行为的概率。私有计划帮助制作示范，训练则让模型在没有这份额外指导时也能行动。<a class=\"cite\" href=\"https://arxiv.org/html/2610.22192v1#S2.SS1\">[1, §2.1]</a></p>\n<h3>Markdown 任务中的轨迹重写</h3>\n<p>RSR 前置论文给出一个处理 Markdown 的案例。<strong>语法解析器（parser）</strong>把文本识别为标题、段落、表格等结构，供后续代码处理。<strong>预编译 parser</strong>已经编译好，可在兼容环境中直接加载，省去部分生成与编译工作。</p>\n<p>源执行花了 64 轮才成功。提炼后的计划把寻找兼容的预编译解析器作为起步策略，并提醒对齐输出摘要和表格处理参数。重做时，模型有机会少走弯路。</p>\n<figure class=\"trajectory-figure\" id=\"figure-rewrite\">\n<div class=\"trajectory-map\" data-entry=\"rewrite\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>查看静态图</summary><img alt=\"同一成功轨迹提炼为runbook后，在两个新环境独立执行。一支32轮通过，另一支遇到xxd命令不存在并在后续38轮最终失败。\" height=\"1280\" loading=\"lazy\" src=\"figures/rewrite.png\" width=\"1200\"/></details>\n<figcaption>图 3 · 同一计划的两次重做：32 轮通过，38 轮失败。每条新轨迹都经过独立验收。来源：<a href=\"https://arxiv.org/html/2610.02826v1#S3.SS4\">RSR §3.4</a>。</figcaption>\n</figure>\n<p>同一份计划产生了成功与失败两条分支。成功轨迹通过验收后，才进入 SFT 数据。</p>\n<details class=\"method-detail\" open=\"\"><summary>这项任务的完整重写结果</summary>\n<p>源执行在第 26 轮尝试生成 parser，第 51 轮使用预编译 parser；图中成功重写在第 9 轮就用上了它。这项任务共重写 12 次，7 次成功，成功重写的中位轮数为 32。来源：<a href=\"https://arxiv.org/html/2610.02826v1#S3.SS4\">RSR §3.4</a>。</p>\n</details>\n<p>模型逐个生成<strong>token</strong>——一个字、词的一部分或标点等文字单位。SFT 学习示范中的模型生成部分，工具日志作为输入，不作为模仿目标。决定哪些位置参与训练损失的选择标记，叫<strong>训练掩码（mask）</strong>。</p>\n<details class=\"method-detail\" open=\"\"><summary>同一模型的三种角色</summary>\n<p>RSR 前置论文让同一基础模型通过不同提示和上下文，分别承担规划、审查和执行。规划者整理做法，审查者检查计划，执行者调用工具完成任务。</p>\n<p>制作示范时，Executor 可以参考私有计划；训练时，只留下公开任务与交互历史，并筛查每一步行为是否能由这些公开信息解释。来源：<a href=\"https://arxiv.org/html/2610.02826v1#S2\">RSR §2</a>。</p>\n</details>\n<details class=\"method-detail\" open=\"\"><summary>对应的 SFT 目标</summary><p>θ 表示模型的可训练参数；πθ(yⱼ | hⱼ) 表示参数为 θ 的策略网络，在历史 hⱼ 下生成示范 token yⱼ 的概率。负对数损失越小，这个示范选择的概率越大。</p>\n<div class=\"formula-scroll\"><math aria-label=\"SFT损失为被选中生成位置的负对数概率之和\" display=\"block\"><mrow><msub><mi>L</mi><mtext>SFT</mtext></msub><mo>=</mo><mo>−</mo><munder><mo>∑</mo><mi>j</mi></munder><msub><mi>m</mi><mi>j</mi></msub><mi>log</mi><msub><mi>π</mi><mi>θ</mi></msub><mo>(</mo><msub><mi>y</mi><mi>j</mi></msub><mo>∣</mo><msub><mi>h</mi><mi>j</mi></msub><mo>)</mo></mrow></math></div>\n<p>这里画的是单条示范的形式；训练还对示范集合取平均。<var>hⱼ</var> 是公开历史，<var>yⱼ</var> 是示范 token，<var>mⱼ</var> 选择需要学习的生成位置。最小化负对数概率，就是提高合格示范在相应历史下的生成概率。来源：<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS1\">式 3</a>。</p>\n</details>\n<p class=\"section-bridge\">示范教会模型一种做法。面对自己新产生的尝试，它还需要从实际结果中学习。</p>\n</section><section aria-labelledby=\"reward\">\n<h2 id=\"reward\">3 RPR：验证结果怎样进入训练</h2>\n<p><strong>递归策略精炼（Recursive Policy-Refine，RPR）</strong>让完成监督微调的 Actor 再次执行任务，用验证结果作为奖励，通过 PPO 更新策略。这里的 <strong>Critic</strong> 根据任务与交互历史预测后续回报，为优势估计提供基线。模型各自如何训练，见<a data-site-link=\"\" href=\"/writing/ppo-long-horizon/\">PPO：沿一条长程轨迹看训练</a>。</p><p>Terminal-RSI 直接使用程序验收，没有另行训练偏好奖励模型；论文配置中的 KL 与熵系数均为 0。PPO 更新仍使用旧策略概率来控制策略变化。</p><figure class=\"trajectory-figure\" id=\"figure-reward\"><div class=\"trajectory-map\" data-entry=\"reward\" data-reader-ready=\"\" hidden=\"\"></div><details class=\"trajectory-static\" open=\"\"><summary>查看静态图</summary><img alt=\"Actor 执行后由验证器评分；奖励和价值预测用于计算优势及回报目标。\" height=\"720\" loading=\"lazy\" src=\"figures/reward.png\" width=\"1200\"/></details><figcaption>图 4 · 同一条轨迹提供终点奖励 R 和各生成前缀。优势估计结合 R 与 Critic 的预测 V，分别产生 Actor 使用的 A 与 Critic 拟合的 Ĝ。<a href=\"https://arxiv.org/html/2610.22192v1#S2\">§2</a>。</figcaption></figure><p>一个 RPR 阶段会反复采样轨迹、验收并更新模型；阶段结束后，保留的 Actor 再进入下一轮 RSR。</p>\n<p><strong>奖励（reward，R）</strong>是把验证结果转换成的训练分数。论文从两项结果出发：<var>P</var> 是通过的语义检查数量，也就是与任务功能有关的检查，不含清理等辅助检查；<var>S</var> 是严格成功标记，完整通过为 1，否则为 0。分数在一次执行结束时计算，并非每条命令之后都重新发一次。</p>\n<p>先前使用的<strong>家族稠密奖励（Family Dense Reward，FDR）</strong>用 <var>P / D</var> 表达部分完成程度，其中 <var>D</var> 是同类任务预先确定的尺度。这样“做对一些”也有信号。但部分检查得分本身，不一定把完整成功排在所有失败之前。</p>\n<p>后续的<strong>成功优先奖励（Success-Prioritized Reward，SPR）</strong>因此改为 <var>S + P / (P + D′)</var>。后一项永远小于 1，完整成功则另加 1：失败在 1 分以下，成功至少 1 分。这里的 <var>D′</var> 是按任务家族离线校准、在该阶段固定的正尺度。</p>\n<p>通过 8 项检查、D′ = 10 时，未严格成功的奖励约为 0.444，严格成功则为 1.444。SPR 先区分是否完整成功，再比较部分完成程度。</p>\n<details class=\"method-detail\" open=\"\"><summary>奖励的精确公式、尺度和使用阶段</summary>\n<div aria-label=\"FDR奖励等于P除以D\" class=\"equation\"><span class=\"equation-name\">FDR</span><math display=\"block\"><mrow><mi>r</mi><mo>=</mo><mfrac><mi>P</mi><mi>D</mi></mfrac></mrow></math></div><div aria-label=\"SPR奖励等于S加上P除以P加D撇\" class=\"equation\"><span class=\"equation-name\">SPR</span><math display=\"block\"><mrow><mi>r</mi><mo>=</mo><mi>S</mi><mo>+</mo><mfrac><mi>P</mi><mrow><mi>P</mi><mo>+</mo><msup><mi>D</mi><mo>′</mo></msup></mrow></mfrac></mrow></math></div>\n<p>这里写的是检查报告有效时的形式；报告无效时都回退到严格成功标记 S。FDR 的 D 使用该任务家族历史检查总数的第 90 百分位，没有可用家族尺度时取 82。SPR 的 D′ 为离线校准的正数，在阶段内固定。</p>\n<p>普通 RPR-2 分支使用 FDR，最终保留的 Long-Reward RPR-2 分支使用 SPR。来源：<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS2\">§2.2</a>、<a href=\"https://arxiv.org/html/2610.22192v1#S3.SS1\">§3.1</a>。</p>\n</details>\n<p>RPR-1 的旧策略概率由训练端使用旧 Actor 重算，用于 PPO 的新旧概率比较。 <a href=\"https://arxiv.org/html/2610.22192v1#S2.SS4\">[§2.4]</a></p>\n</section><section aria-labelledby=\"tb-gae\">\n<h2 id=\"tb-gae\">4 TB-GAE：按回合回传反馈</h2>\n<p>一次任务往往包含许多<strong>回合（turn）</strong>：模型生成一段响应或工具调用，随后得到环境返回。奖励直到任务结束才出现，训练却需要为此前的每个生成位置计算优势。</p>\n<p><strong>广义优势估计（Generalized Advantage Estimation，GAE）</strong>结合沿途的奖励和价值预测，从末尾向前递推优势。递推时，后续反馈通常会逐步衰减，因而“多长算一步”会影响早先位置收到的信号。</p>\n<p>若每经过一个文本 token 都乘一个小于 1 的系数，那么仅仅加长工具日志，也会削弱传到早先位置的反馈。关掉日志位置的训练损失还不够：<strong>日志可能仍参与优势递推，额外消耗了衰减。</strong></p>\n<p><strong>回合边界跳过观测的广义优势估计（Turn-Boundary Skip-Observation Generalized Advantage Estimation，TB-GAE）</strong>从递推链里跳过工具观察；同一回合的生成 token 之间不衰减，跨回合时才衰减。</p>\n<figure aria-labelledby=\"credit-caption\" class=\"credit-timeline\">\n<div aria-label=\"两回合的生成位置与 TB-GAE 递推方向\" class=\"timeline-scroll\" role=\"region\" tabindex=\"0\">\n<svg aria-labelledby=\"credit-title credit-desc\" height=\"228\" role=\"img\" viewbox=\"0 0 780 228\" width=\"780\">\n<title id=\"credit-title\">生成按时间向右，优势沿生成位置向左递推</title>\n<desc id=\"credit-desc\">第一回合生成 g1、g2，然后工具返回日志，再进入第二回合生成 g3、g4。优势从 g4 向 g1 递推，同回合系数为 1，跨回合为 γλ；递推跳过中间的工具日志。</desc>\n<defs><marker id=\"credit-arrow\" markerheight=\"6\" markerwidth=\"6\" orient=\"auto-start-reverse\" refx=\"5\" refy=\"3\" viewbox=\"0 0 6 6\"><path d=\"M0 0 L6 3 L0 6\" fill=\"none\" stroke=\"currentColor\"></path></marker></defs>\n<g class=\"timeline-label\"><text x=\"36\" y=\"24\">生成顺序</text><text text-anchor=\"middle\" x=\"127\" y=\"65\">第 1 回合</text><text text-anchor=\"middle\" x=\"347\" y=\"65\">工具日志</text><text text-anchor=\"middle\" x=\"567\" y=\"65\">第 2 回合</text><text text-anchor=\"middle\" x=\"732\" y=\"65\">验收</text></g>\n<path class=\"timeline-line\" d=\"M113 19 H756\" marker-end=\"url(#credit-arrow)\"></path>\n<g class=\"timeline-token\"><rect height=\"44\" rx=\"3\" width=\"72\" x=\"36\" y=\"82\"></rect><rect height=\"44\" rx=\"3\" width=\"72\" x=\"146\" y=\"82\"></rect><rect height=\"44\" rx=\"3\" width=\"72\" x=\"476\" y=\"82\"></rect><rect height=\"44\" rx=\"3\" width=\"72\" x=\"586\" y=\"82\"></rect></g>\n<rect class=\"timeline-log\" height=\"44\" rx=\"3\" width=\"182\" x=\"256\" y=\"82\"></rect>\n<g class=\"timeline-text\"><text text-anchor=\"middle\" x=\"72\" y=\"111\">g₁</text><text text-anchor=\"middle\" x=\"182\" y=\"111\">g₂</text><text text-anchor=\"middle\" x=\"347\" y=\"110\">… 测试输出 …</text><text text-anchor=\"middle\" x=\"512\" y=\"111\">g₃</text><text text-anchor=\"middle\" x=\"622\" y=\"111\">g₄</text><text text-anchor=\"middle\" x=\"732\" y=\"111\">R</text></g>\n<path class=\"timeline-line\" d=\"M665 104 H700\" marker-end=\"url(#credit-arrow)\"></path>\n<path class=\"timeline-credit\" d=\"M182 151 H72\" marker-end=\"url(#credit-arrow)\"></path>\n<path class=\"timeline-credit\" d=\"M512 151 H182\" marker-end=\"url(#credit-arrow)\"></path>\n<path class=\"timeline-credit\" d=\"M622 151 H512\" marker-end=\"url(#credit-arrow)\"></path>\n<g class=\"timeline-factor\"><text text-anchor=\"middle\" x=\"127\" y=\"178\">1</text><text text-anchor=\"middle\" x=\"347\" y=\"178\">γλ</text><text text-anchor=\"middle\" x=\"567\" y=\"178\">1</text></g>\n<text class=\"timeline-label\" x=\"36\" y=\"215\">优势递推 ←</text>\n</svg>\n</div>\n<figcaption id=\"credit-caption\">下方标出后继优势的传递系数：同回合为 1，跨回合为 γλ。</figcaption>\n</figure>\n<p>日志仍保留在模型的输入中，影响后续行动和价值预测。g₁ 到 g₄ 各自使用生成前的上下文，因而有不同的价值基线。训练系统可以在轨迹收集完成后，批量计算这些位置的预测。</p>\n<h3>日志长度对衰减的影响</h3>\n<p>一步之后，“即时奖励加上折扣后的后续预期”，与原先预期之差，叫<strong>时序差分残差（TD residual，δ）</strong>。下面只跟踪最后一个位置的这份变化，看看它传到第一个位置时还剩多少。</p>\n<p>例子有两回合、四个生成位置。取 <var>γ = 0.9，λ = 0.8</var>，每次衰减乘 <var>0.72</var>。拖动日志长度，比较三条递推链。</p>\n<div aria-label=\"比较三种优势递推时钟\" class=\"clock-example\">\n<div class=\"clock-controls\"><label for=\"observation-length\">中间的观察位置数 <output for=\"observation-length\" id=\"observation-count\">3</output></label><label class=\"unit-clock\"><input id=\"unit-clock\" type=\"checkbox\"/> γ = λ = 1</label></div>\n<input aria-describedby=\"clock-reading\" id=\"observation-length\" max=\"400\" min=\"0\" step=\"1\" type=\"range\" value=\"3\"/>\n<div class=\"clock-row\"><span>混合 token 链</span><code id=\"clock-full-power\">0.72⁶</code><output id=\"clock-full\">0.1393</output><span aria-hidden=\"true\" class=\"clock-track\"><span id=\"clock-full-bar\" style=\"width:13.93%\"></span></span></div>\n<div class=\"clock-row\"><span>只跳过观察</span><code id=\"clock-skip-power\">0.72³</code><output id=\"clock-skip\">0.3732</output><span aria-hidden=\"true\" class=\"clock-track\"><span id=\"clock-skip-bar\" style=\"width:37.32%\"></span></span></div>\n<div class=\"clock-row\"><span>TB-GAE</span><code id=\"clock-turn-power\">0.72¹</code><output id=\"clock-turn\">0.7200</output><span aria-hidden=\"true\" class=\"clock-track\"><span id=\"clock-turn-bar\" style=\"width:72%\"></span></span></div>\n<p aria-live=\"polite\" class=\"example-reading\" id=\"clock-reading\">混合链跨 6 条边；只跳过观察跨 3 条边；TB-GAE 只跨 1 个回合边界。</p>\n</div>\n<p class=\"source-note\">图中数值是末端变化传回起点的系数。例子固定生成位置与价值等输入，只改变日志长度。勾选 γ = λ = 1，三条链的系数都为 1。</p>\n<details class=\"method-detail example-detail\" open=\"\"><summary>三条递推链与四个位置的逐步手算</summary>\n<p>设 g₁、g₂ 属于第一回合，g₃、g₄ 属于第二回合。四个位置生成前的价值依次为 0.2、0.4、0.5、0.8，只在任务结束时获得奖励 1。</p>\n<p>先算各位置的时序差分残差，再从末尾逐步向前累积。</p>\n<figure class=\"trajectory-figure\" id=\"figure-gae\">\n<div class=\"trajectory-map\" data-entry=\"gae\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>查看静态图</summary><img alt=\"两回合生成四个token，中间有工具日志。混合token递推对每条边衰减，只跳过观察仍按生成token衰减，TB-GAE仅在跨回合时衰减。\" height=\"1460\" loading=\"lazy\" src=\"figures/gae.png\" width=\"1200\"/></details>\n<figcaption>图 5 · 两回合、四个生成位置的数值示例：上半图比较反馈的衰减，下半图区分回报目标与优势。<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS3\">方法见 §2.3</a>。</figcaption>\n</figure>\n<ol class=\"calculation-steps\">\n<li><strong>g₄：任务结束。</strong>拿到 1 分，之前预计 0.8 分，所以 <var>A₄ = 1 − 0.8 = 0.20</var>。</li>\n<li><strong>g₃：还在第二回合。</strong>价值从 0.5 变成 0.8，残差为 0.3；同轮不衰减，故 <var>A₃ = (0.8 − 0.5) + 0.20 = 0.50</var>。</li>\n<li><strong>g₂：跨回第一回合。</strong>残差为 <var>0.9 × 0.5 − 0.4 = 0.05</var>；后续优势要乘 <var>0.9 × 0.8</var>，因此 <var>A₂ = 0.05 + 0.72 × 0.50 = 0.41</var>。</li>\n<li><strong>g₁：还在第一回合。</strong>同轮继续不衰减，<var>A₁ = (0.4 − 0.2) + 0.41 = 0.61</var>。</li>\n</ol>\n<div class=\"table-scroll\"><table class=\"gae-values\"><caption>教学手算 · 价值目标 Ĝ = A + v</caption><thead><tr><th scope=\"col\">生成位置</th><th scope=\"col\">回合</th><th scope=\"col\">原预测 v</th><th scope=\"col\">优势 A</th><th scope=\"col\">价值目标 Ĝ</th></tr></thead><tbody>\n<tr><th scope=\"row\">g₁</th><td>1</td><td>0.20</td><td>0.61</td><td>0.81</td></tr>\n<tr><th scope=\"row\">g₂</th><td>1</td><td>0.40</td><td>0.41</td><td>0.81</td></tr>\n<tr><th scope=\"row\">g₃</th><td>2</td><td>0.50</td><td>0.50</td><td>1.00</td></tr>\n<tr><th scope=\"row\">g₄</th><td>2</td><td>0.80</td><td>0.20</td><td>1.00</td></tr>\n</tbody></table></div>\n<p>第一回合的两个位置共享 0.81 的回报目标，却分别有 0.61 和 0.41 的优势，因为它们原先的预期不同。Actor 用各位置的优势更新概率，Critic 拟合相应的回报目标。</p>\n</details>\n<details class=\"method-detail\" open=\"\"><summary>把手算写成统一递推式</summary><p>r̃ⱼ 表示分配到第 j 个生成位置的奖励；在这里的末尾奖励示例中，仅最后一个位置非零。</p>\n<p>只枚举保留的生成位置 <var>j</var>，令 <var>vⱼ</var> 是该 token 生成前的价值。与下一生成位置同轮时，取 <var>Γⱼ = Λⱼ = 1</var>；跨轮时取 <var>Γⱼ = γ<sub>turn</sub>，Λⱼ = λ<sub>turn</sub></var>。<var>dⱼ = 1</var> 表示真实终止。</p>\n<div class=\"formula-scroll\"><math aria-label=\"TB残差等于因果奖励加Gamma乘一减终止标记乘下一价值减当前价值\" display=\"block\"><mrow><msub><mi>δ</mi><mi>j</mi></msub><mo>=</mo><msub><mover><mi>r</mi><mo>~</mo></mover><mi>j</mi></msub><mo>+</mo><msub><mi>Γ</mi><mi>j</mi></msub><mo>(</mo><mn>1</mn><mo>−</mo><msub><mi>d</mi><mi>j</mi></msub><mo>)</mo><msub><mi>v</mi><mrow><mi>j</mi><mo>+</mo><mn>1</mn></mrow></msub><mo>−</mo><msub><mi>v</mi><mi>j</mi></msub></mrow></math></div>\n<div class=\"formula-scroll\"><math aria-label=\"TB优势等于残差加Gamma Lambda乘一减终止标记乘下一优势\" display=\"block\"><mrow><msub><mi>A</mi><mi>j</mi></msub><mo>=</mo><msub><mi>δ</mi><mi>j</mi></msub><mo>+</mo><msub><mi>Γ</mi><mi>j</mi></msub><msub><mi>Λ</mi><mi>j</mi></msub><mo>(</mo><mn>1</mn><mo>−</mo><msub><mi>d</mi><mi>j</mi></msub><mo>)</mo><msub><mi>A</mi><mrow><mi>j</mi><mo>+</mo><mn>1</mn></mrow></msub></mrow></math></div>\n<p>终点奖励在最后一个生成位置注入一次。同轮无中间奖励时，相邻价值相互抵消，得到共同回报目标 Uₜ；每个位置分别扣除自己的价值预测，得到 Aⱼ = Uₜ − vⱼ。本例第一轮的目标为 U₁ = 0.9 × (0.5 + 0.8 × 0.5) = 0.81。</p>\n<p>TB-GAE 以回合为折扣单位，让一次完整行动承担一次时间衰减。日志长度与回合内的 token 数由此从折扣步数中移除。来源：<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS3\">式 8–13</a>及<a href=\"https://arxiv.org/html/2610.22192v1#A3\">附录 C</a>。</p>\n</details>\n<details class=\"method-detail\" open=\"\"><summary>长轨迹被切成两块，边界该怎么办？</summary>\n<p>为节省显存或分批计算，可以把一条完整轨迹切成几块，再把后半块的递推结果传回前半块。若在本例 g₂ 后切开，只保留下一价值预测 0.5，却把下一优势 0.5 清零，A₂ 会变成 0.05，A₁ 变成 0.25，缺失的反馈正是 0.72 × 0.5 = 0.36。</p>\n<p>完整续接需要同时传递后继价值与后继优势，或对完整序列统一反向计算。若采样提前停止、未来尚未执行，则用<strong>价值自举（bootstrap）</strong>——以当前价值预测估计未来回报。任务真正终止时，后继价值与优势取零。上下文摘要还会改变模型读取的历史，需要单独处理。</p>\n</details>\n<p class=\"source-note\">本节介绍 §2.3 提出的 TB-GAE。论文 §2.4 记录的第一阶段使用标准 GAE，γ = λ = 1。</p>\n</section><section aria-labelledby=\"handoff\">\n<h2 id=\"handoff\">5 新策略下的价值校准</h2>\n<p>RSR 改变了 Actor 的做法，旧 Critic 却还按之前的经验估分。若奖励公式也变了，分数尺度也随之改变。用旧预测计算新策略的优势，学习信号就可能失准。</p>\n<p>Terminal-RSI 因而保留已有 Critic，在每个 RPR 阶段开头先<strong>冻结 Actor</strong>——暂时不更新其权重——做 4 次只更新 Critic 的校准，再联合训练。已有经验得以保留，价值预测也能跟上新的策略与奖励。</p>\n<figure class=\"trajectory-figure\" id=\"figure-handoff\">\n<div class=\"trajectory-map\" data-entry=\"handoff\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>查看静态图</summary><img alt=\"RSR期间Actor更新而Critic保留。RPR先冻结Actor校准Critic，再联合更新Actor与Critic。\" height=\"445\" loading=\"lazy\" src=\"figures/handoff.png\" width=\"1200\"/></details>\n<figcaption>图 6 · RSR 保留 Critic；RPR 阶段开头先校准 4 次，再联合更新。来源：<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS4\">§2.4</a>。</figcaption>\n</figure>\n<details class=\"method-detail\" id=\"critic-initialization\" open=\"\"><summary>Critic 从首次预热到递归训练</summary>\n<ol class=\"method-steps\">\n<li><strong>首次预热。</strong>固定完成监督微调的 RSR-1 Actor，在<strong>科学工作流重建（Scientific Workflow Reconstruction，SWR）</strong>任务上训练 Critic 一个 epoch，即遍历一轮数据。这类任务要求重建可执行的科学程序，并用隐藏检查验证其行为。Actor 提供执行轨迹，Critic 学习相应的回报目标，得到原图中的 <em>Warm-up Critic Model</em>。</li>\n<li><strong>进入 RPR。</strong>每个 RPR 阶段先固定 Actor，做 4 次只更新 Critic 的校准；随后 Actor 用优势做 PPO 更新，Critic 用回报目标做价值回归，两套参数分别训练。</li>\n<li><strong>进入下一轮。</strong>RSR-2 只微调 Actor，保留 RPR-1 的 Critic 权重。到了 RPR-2，再按新 Actor 的执行结果校准 Critic，然后继续联合训练。</li>\n</ol>\n<p>论文说明了上述预热和权重交接；首次预热之前，Critic 骨干加载的具体 checkpoint（模型权重文件）没有明确给出。来源：<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS1.p3\">§2.1</a>、<a href=\"https://arxiv.org/html/2610.22192v1#S2.SS4\">§2.4</a>与<a href=\"https://arxiv.org/html/2610.22192v1#A1.p5\">附录 A</a>。</p>\n</details>\n</section><section aria-labelledby=\"task\">\n<h2 id=\"task\">6 从局部测试到完整交付</h2>\n<p>任务要求用 Rust 和 C 写一个计算器。它有两道最终检查：删除构建产物后，入口脚本能否自动重新编译；面对隐藏输入时，输出能否与参考实现<strong>逐字一致</strong>。</p>\n<p>初始模型 Base 的一条执行通过了本地算术测试，也做到了自动重建，却在最终检查里输出了 <code>23</code>，而参考输出是 <code>23.0</code>。数值相等，字符串仍不同。一个后期训练版本 RPR-2 的独立执行则通过了两道检查。</p>\n<figure class=\"trajectory-figure\" id=\"figure-case\">\n<div class=\"trajectory-map\" data-entry=\"case\" data-reader-ready=\"\" hidden=\"\"></div>\n<details class=\"trajectory-static\" open=\"\"><summary>查看静态图</summary><img alt=\"两条独立Rust–C轨迹。Base在本地测试和自动重建后未通过输出格式验收；RPR-2构建跨语言组件、调用Python求值后通过两道验收。\" height=\"2370\" loading=\"lazy\" src=\"figures/case.png\" width=\"1200\"/></details>\n<figcaption>图 7 · Base 与 RPR-2 在同一计算器任务上的独立评测。最终验收同时检查自动构建与输出格式。来源：<a href=\"https://arxiv.org/html/2610.22192v1#A8\">Terminal-RSI 附录 H，Figure 16</a>。</figcaption>\n</figure>\n<p>RPR-2 的这条执行组合了 Rust / C 组件与 Python 表达式求值，最终通过自动重建与输出格式两道检查。</p>\n<details class=\"method-detail\" open=\"\"><summary>五个模型版本在这项任务上各通过几次？</summary>\n<p>每个版本各评测两次，完整通过次数依次为 Base 0/2、RSR-1 0/2、RPR-1 1/2、RSR-2 2/2、RPR-2 2/2。</p>\n</details>\n</section><footer class=\"sources\" id=\"sources\"><h2>参考资料</h2>\n<ol><li><a href=\"https://arxiv.org/html/2610.22192v1\">Terminal-RSI: Recursive Self-Improving Terminal Agents via Recursive Self-Rewrite and Policy-Refine</a>。机制见 §2，真实执行见附录 H。<a href=\"https://arxiv.org/pdf/2610.22192\">PDF ↗</a></li>\n<li><a href=\"https://arxiv.org/html/2610.02826v1\">Recursive Self-Rewrite（RSR）</a>。Markdown 真实重写案例见 §3.4。</li>\n<li><a href=\"https://arxiv.org/abs/1707.06347\">Proximal Policy Optimization Algorithms</a>；<a href=\"https://arxiv.org/abs/1506.02438\">Generalized Advantage Estimation</a>。</li>\n</ol>\n</footer>\n"
  }
}