Skip to content

Commit eba31f4

Browse files
committed
gpt-6.1-sol-max: refine Native terminal scores and save the survival-form story gain
Evaluate complete remaining Native tapes before accepting focus/fire edits, sharing the source capture catalogue with reporting. Preserve the incumbent on death, timeout, incomplete execution, route changes or non-improving cash; record all rejected work and verify final owner execution. Fix survival-form priority outside flow/pacing and preserve the selected 3,903,603,650 NMNB 37/37 story replay with exact provenance. Document the 105 non-improving Extra edits and subsequent complete source-economic trials. Explain original-writer NaN slowdown from absent headless draw samples and report unavailable metadata as JSON null without changing replay bytes. Validation: Release Native/DAT CTest 57/57; fresh exact terminal following, natural replay/capture verification, and final documentation checks pass. Assisted-by: Nitori (gensokyo-skills:nitori-reverse-engineering)
1 parent cb6f47a commit eba31f4

23 files changed

Lines changed: 853 additions & 57 deletions

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
!/reports/native/replays/extra-native-nmnb-2564311730-seed19732.rpy
2727
!/reports/native/replays/extra-native-nmnb-2589417330-seed10025.rpy
2828
!/reports/native/replays/story-native-nmnb-4a-finalb-3890487560-seed40755.rpy
29+
!/reports/native/replays/story-native-nmnb-4a-finalb-3903603650-seed40755.rpy
2930
**/private_resources/
3031
__pycache__/
3132
*.py[cod]

‎AGENTS.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ owner-selected eight-byte `ysopwnab`; preserve historical replay bytes.
8989
`story-native-nmnb-4a-finalb-3890487560-seed40755.rpy` under
9090
`reports/native/replays/`. Preserve exact bytes and provenance; failed tapes,
9191
experiment reports and videos remain local
92+
- The owner's continuing progress-replay authorization also covers the selected
93+
story improvement `story-native-nmnb-4a-finalb-3903603650-seed40755.rpy` in the
94+
same directory. Preserve earlier selected replays unchanged
9295
- The owner also authorizes selected compact learned policy/risk snapshots under
9396
`models/`. Preserve exact weights/tables with schema, hashes, provenance and
9497
training/evaluation limitations. This exception does not include raw datasets,

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
> [!NOTE]
44
> **Lunatic NMNB story clear: 1 → 2 → 3 → 4A → 5 → Final B (Kaguya).**
55
> Marisa/Alice, played online in Wine with game audio. Extra also clears NMNB online.
6-
> **Native NMNB scores: Extra 2,589,417,330 (14/14); Lunatic story 3,890,487,560 (37/37).**
7-
> [Extra replay](reports/native/replays/extra-native-nmnb-2589417330-seed10025.rpy) · [Native story replay](reports/native/replays/story-native-nmnb-4a-finalb-3890487560-seed40755.rpy) · [Videos and replays](https://drive.google.com/drive/folders/11x9m65sysbsQZZYyHvNJS0-LQ3u2cOAu?usp=drive_link)
6+
> **Native NMNB scores: Extra 2,589,417,330 (14/14); Lunatic story 3,903,603,650 (37/37).**
7+
> [Extra replay](reports/native/replays/extra-native-nmnb-2589417330-seed10025.rpy) · [Native story replay](reports/native/replays/story-native-nmnb-4a-finalb-3903603650-seed40755.rpy) · [Videos and replays](https://drive.google.com/drive/folders/11x9m65sysbsQZZYyHvNJS0-LQ3u2cOAu?usp=drive_link)
88
99
![Wine and Native shadow planning loop, animated schematic by Claude.](docs/media/shadow-mpc-online.gif)
1010

@@ -18,7 +18,7 @@ validation. Scoring uses source attack timing, item collection and form control.
1818
| Online Lunatic 4A → Final B | 2,189,965,070 | Alan: 6,168,365,790 | 33/37 |
1919
| Online Extra | 1,166,969,620 | ASL: 3,021,639,920 | 14/14 |
2020
| **Native Extra** | **2,589,417,330** | ASL: 3,021,639,920 | **14/14** |
21-
| **Native Lunatic 4A → Final B** | **3,890,487,560** | Alan: 6,168,365,790 | **37/37** |
21+
| **Native Lunatic 4A → Final B** | **3,903,603,650** | Alan: 6,168,365,790 | **37/37** |
2222

2323
Both Native progress replays have fresh execution and natural replay agreement;
2424
their player name is `ysopwnab`. Native scoring continues toward the human references.

‎cmake/Headless.cmake‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ add_executable(th08_shadow_style tools/shadow_style.cpp)
159159
target_link_libraries(th08_shadow_style PRIVATE th08_shadow_proposals)
160160
target_compile_options(th08_shadow_style PRIVATE -ffp-contract=off
161161
"-include${th08_native}/src/modern/linux/linux_compat.hpp")
162+
add_library(th08_score_refinement src/score_refine.cpp)
163+
target_link_libraries(th08_score_refinement PUBLIC th08_shadow_native)
164+
target_compile_options(th08_score_refinement PRIVATE -ffp-contract=off)
165+
add_executable(th08_score_refine tools/score_refine.cpp)
166+
target_link_libraries(th08_score_refine PRIVATE th08_score_refinement)
167+
target_compile_options(th08_score_refine PRIVATE -ffp-contract=off
168+
"-include${th08_native}/src/modern/linux/linux_compat.hpp")
162169
if(BUILD_TESTING AND TH08_HEADLESS_DAT)
163170
add_test(NAME headless_shadow_style COMMAND ${CMAKE_COMMAND}
164171
-DSOLVER=$<TARGET_FILE:th08_shadow_style>
@@ -169,6 +176,17 @@ if(BUILD_TESTING AND TH08_HEADLESS_DAT)
169176
-DWORK=${CMAKE_CURRENT_BINARY_DIR}/shadow-style-regression
170177
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/shadow_style_real_data.cmake)
171178
set_tests_properties(headless_shadow_style PROPERTIES TIMEOUT 330)
179+
set_tests_properties(headless_shadow_style PROPERTIES FIXTURES_SETUP native_score_incumbent)
180+
add_test(NAME headless_score_refine COMMAND ${CMAKE_COMMAND}
181+
-DREFINER=$<TARGET_FILE:th08_score_refine>
182+
-DFOLLOWER=$<TARGET_FILE:th08_shadow_follow>
183+
-DCHECKER=$<TARGET_FILE:th08_replay_check>
184+
-DDAT=${TH08_HEADLESS_DAT}
185+
-DINCUMBENT=${CMAKE_CURRENT_BINARY_DIR}/shadow-style-regression
186+
-DWORK=${CMAKE_CURRENT_BINARY_DIR}/score-refine-regression
187+
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/score_refine_real_data.cmake)
188+
set_tests_properties(headless_score_refine PROPERTIES TIMEOUT 120
189+
FIXTURES_REQUIRED native_score_incumbent)
172190
endif()
173191
set_source_files_properties(src/shadow_recorded.cpp PROPERTIES
174192
COMPILE_OPTIONS "-fpermissive;-include${th08_native}/src/modern/linux/linux_compat.hpp")

‎docs/ARCHITECTURE.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Do not infer complete-world behavior from a supported parser, opcode or kernel.
3030
| Owned current-memory observations and online proposal history | `online.hpp`, `online.cpp`, `online_model.cpp`; the optional previous-plan cache belongs to each `Policy` and is rechecked against new observations |
3131
| Common-start shadow synchronization | `shadow_protocol.hpp`, `shadow_native.*`, `shadow_process.*`, `tools/shadow_follow.cpp`; fixed-width wire values and a single-threaded independently initialized follower process |
3232
| True-RNG branch verification and committed action frontier | `shadow_rollout.*`, `shadow_plan.hpp`; isolated native child futures and checked consecutive execution receipts |
33+
| Offline terminal-score refinement | `score_refine.*`, `tools/score_refine.cpp`; complete remaining-tape evaluation, identical capture/route goals and strict terminal-score selection |
34+
| Source capture coverage | `modern/headless/score_audit.*`; one source-catalogue goal shared by reporting and complete-trajectory selection |
3335
| Local Wine observation/input bridge and future proposals | `shadow_bridge.hpp`, `shadow_proposal.*`, `tools/shadow_online.cpp`, `tools/wine-shadow/`; pinned retail ABI adapter, owned launcher and branch-owned proposal history |
3436
| Native observation adapter and online execution/reporting | `online_native.*`, `tools/online.cpp`; no native future updates or live rewinds |
3537
| Replay projection and strict corpus gate | `modern/headless/replay_check.*`, `tools/replay_check.cpp`, `tools/replay_suite.cpp` |

‎docs/PLANNER.md‎

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,40 @@ difficulties and Last Words require separate runs. These are run-level capture
3737
goals, distinct from populating every Spell Practice entry in a persistent profile.
3838

3939
Current outcomes and historical failures belong in [Status](STATUS.md); this
40-
section describes the implemented mechanisms and their limits. New experiments
41-
are restricted to Extra until the owner changes scope.
40+
section describes the implemented mechanisms and their limits. Current Native
41+
experiments cover Extra and the complete Magic Team Lunatic4A→FinalB route.
42+
43+
### Complete-tape score refinement
44+
45+
`th08_score_refine` starts with our own complete Native input tape. Before
46+
changing it, an isolated Native child must finish the entire tape NMNB and
47+
capture the source catalogue for every visited stage, including gated Last
48+
Spells. The reporting tool explicitly enables the lifecycle audit; reporting
49+
and selection share `score_capture_coverage`, so they cannot silently use
50+
different capture goals.
51+
52+
The refiner advances the owner through the certified incumbent. At spaced
53+
boundaries after a64-update phase warmup, it tries two form alternatives or two
54+
fire alternatives over an explicit update window. These edits have no seed,
55+
card-number or human-input lookup. Each trial forks the actual current world
56+
and executes the **entire remaining tape** with its own action-dependent RNG,
57+
bullets, actors, items and transitions. It accepts only complete NMNB/all-capture
58+
results with the identical expected spell set, identical final stage and a
59+
strictly higher actual terminal score. Ties retain the incumbent. Final owner
60+
execution must match the selected trial's complete41-word terminal projection.
61+
62+
This evaluates delayed bonus, clear rewards, PIV and carried-item effects through
63+
the source instead of adding an approximate local economic reward. Trial death,
64+
fault, timeout and tape exhaustion never certify an edit. All attempts and the
65+
initial incumbent evaluation are charged; interrupted branches charge the full
66+
remaining-tape cap. A search budget stops new trials and leaves the incumbent
67+
executable. The exported final tape still needs fresh following and natural
68+
original-writer replay verification.
69+
70+
The current proposal family changes only focus or fire bits and retains the
71+
remaining timed inputs. An early kill or form change can make that suffix unsafe
72+
or out of phase, so this bounded coordinate search can reject useful strategies.
73+
It neither proves optimality nor supplies retail or online-FPS evidence.
4274

4375
### Source economics and capture boundaries
4476

‎docs/STATUS.md‎

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Fresh replay checks execution agreement, not independent physics or retail equiv
2222
| Evidence | Score / captures | Scope |
2323
| --- | ---: | --- |
2424
| **Current Native Extra** | **2,589,417,330 /14 of 14** | Seed10025, complete from entry,500ms offline search; selected progress replay |
25-
| **Current Native Lunatic4A→FinalB** | **3,890,487,560 /37 of 37** | Seed40755, complete story from entry,500ms offline search; selected progress replay |
25+
| **Current Native Lunatic4A→FinalB** | **3,903,603,650 /37 of 37** | Seed40755, source-survival form priority and bias5; selected progress replay |
26+
| Native story price baseline |3,890,487,560 /37 of 37 | Seed40755, complete from entry,500ms offline search; selected earlier progress replay |
2627
| Selected Native v15 snapshot | 2,564,311,730 /14 of 14 | Seed19732, frozen prototype; original bytes preserved |
2728
| Main price/staging controls | 2,453,582,120 /14 of 14 | Seed 10025, complete from entry, reserve 1.2/120 |
2829
| Main successful prefix + expert recovery | 2,464,473,300 /14 of 14 | Seed 19732, separately charged offline checkpoint continuation |
@@ -45,12 +46,14 @@ The source links and dated scoreboard snapshot are in [README](../README.md).
4546

4647
## Native score-first progress
4748

48-
The two new selected replays are complete from entry, with exact fresh41-word
49+
The selected Native progress replays are complete from entry, with exact fresh41-word
4950
terminal agreement, natural replay NMNB/all-capture checks and the selected name
5051
`ysopwnab`. [Validation](VALIDATION.md#selected-native-progress-replays) owns their
5152
identities and commands. Both remain below their explicit human-reference target;
5253
exit5 and `objective_met:false` distinguish valid progress from meeting that goal.
53-
No retail Wine playback is started for them yet.
54+
No retail Wine playback is started for them yet. The source-survival priority
55+
follow-up improves story to3,903,603,650,37/37, NMNB; the earlier3,890,487,560
56+
replay is preserved unchanged.
5457

5558
The common profile is Magic Team, SampledGameplay, score-harvest, held/baseline
5659
recovery,500ms total/60ms proposal, priced collection, upper-stage positioning,
@@ -63,6 +66,7 @@ These are named combined profiles, not component ablations or new holdouts.
6366
| --- | --- | --- | --- |
6467
| Extra native baseline v1 |69381 /448.547 |2239860+120 |277 /8 /8 |
6568
| Story native price v1 |119637 /479.403 |1975206+2016 |538 /0 /0 |
69+
| Story source-survival priority v2 |119637 /515.804 |1975206+2016 |538 /0 /0 |
6670

6771
Extra finishes with984 points/86136 orbs. Story finishes with1265 points,
6872
100100 collected stage-orb inventory total, PIV800510 and clock5; all37 captures.
@@ -96,7 +100,55 @@ Its source references, instrumented ledgers and negative controls support:
96100
suppresses the explicit survival-form goal before extending riskier farming.
97101

98102
Package synthetic formula examples are not integrated code or verified gains.
99-
The active ledger is234/320 at this checkpoint; concurrency remains at most4.
103+
The source-survival priority bug is fixed: outside flow/pacing, the economic
104+
human prior no longer overrides an active source survival-form goal. The
105+
score-harvest regression covers this independently of macro flow. With the
106+
named bias5 profile, the five final timeout cards now have1771 physical graze
107+
events,1695 at extreme-youkai versus0 in the earlier tape. Actual complete
108+
story score improves13,116,090. This combined profile is not a bias ablation;
109+
individual card intervals still include carried items and delayed settlement.
110+
111+
`th08_score_refine` implements the complete-terminal comparison proposed by the
112+
research review. It evaluates the entire remaining true-RNG Native tape before
113+
accepting any edit, preserving NMNB, the exact capture catalogue and final stage.
114+
The first Extra form/fire passes try59/46 candidates and accept0. Form has58
115+
deaths and1 equal-score completion; fire has43 deaths,2 incomplete tails and1
116+
equal-score completion. All costs remain local: form7.97808s/79499 charged
117+
updates, fire12.3233s/168738, each including the initial69381-update incumbent
118+
verification. The selected2,589,417,330 incumbent remains intact. This exposes
119+
the next constraint: changing a form/kill can invalidate the old timed tail;
120+
safe adaptive continuation is needed before claiming a scoring benefit.
121+
122+
Follow-up source-economic profiles all complete Native NMNB,14/14, but do not
123+
beat the incumbent. They use the same predeclared seed10025,500ms budget and
124+
whole-entry acceptance, not a component ablation or held-out result:
125+
126+
| Named profile | Score / owner updates / solve seconds | Branch+proposal updates / rejected deaths / timeouts |
127+
| --- | --- | --- |
128+
| Human bias0 between priced collections |2,313,546,260 /65677 /481.653 |2206349+704 /2104 /68 |
129+
| Current reduction-target hit income |2,496,594,790 /68221 /475.148 |2217214+224 /551 /19 |
130+
| No ordinary pacing |2,137,930,300 /47229 /314.593 |1564684+312 /667 /30 |
131+
132+
A private paired adapter/policy tests source current bonus headroom plus nominal
133+
clear-orb value instead of flat8000. It completes2,589,417,330,14/14 in448.751s,
134+
2240019+120 branch/proposal updates,291 rejected future deaths and7 timeouts.
135+
The full69381-input tape is byte-identical to the incumbent (SHA-256
136+
`4997feed5ecfcb523e383ac9db8eedd767b79ca291de5af5d2487106aff2dcbc`):
137+
this valuation correction alone changes no selected input and proves no gain.
138+
The current pacer samples once, then stays in Farm until its capture reserve;
139+
rolling re-evaluation and adaptive continuations remain proposed improvements.
140+
Extra point extends are200/666/9999 in the source, so984→1000 is not an extra-life
141+
threshold to exploit. This differs from the normal-story extend table.
142+
All manifests/tapes/costs remain in
143+
`reports/local/native-score-offline-20261026/`.
144+
145+
The uploaded Extra replay is byte-identical to the selected file. Its `nan%`
146+
slowdown is the original writer's0/0 with no headless draw/FPS samples, not an
147+
online frame-rate result. The checker preserves the metadata bits and reports
148+
unavailable slowdown as JSON null. [Validation](VALIDATION.md#slowdown-metadata-in-native-exports)
149+
owns the source explanation and comparison. No replay bytes are rewritten.
150+
151+
The active ledger is244/320 at this checkpoint; concurrency remains at most4.
100152

101153
## What produced the gain
102154

@@ -298,14 +350,14 @@ continuation feasibility, not a live handoff or permission to rewind the owner.
298350
## Unresolved problems and proposed next work
299351

300352
These are proposed solutions, not implemented/verified gains. Preserve NMNB,
301-
14/14 and actual terminal score as the acceptance criteria. Keep options
353+
14/14 Extra or37/37 story and actual terminal score as the acceptance criteria. Keep options
302354
independent for later ablations; no new ablation matrix is requested now.
303355

304356
| Problem / evidence | Proposed next experiment | Required acceptance |
305357
| --- | --- | --- |
306358
| Final-card reliability: main seed 19732 fails; expert checkpoint tail succeeds | Freeze the failing frontier and compare a bounded generic neutral/held/move-then-stop recovery portfolio, with explicit observer warming and work accounting. Integrate only if complete episodes improve | Complete from entry on old and predeclared fresh seeds, exact fresh execution and natural replay; retain the original failures |
307359
| Prototype/main and same-seed reruns diverge | Bind source/binary/options, log the first differing candidate/certificate, timeouts, tie state and action. Test whether a deterministic work cap is useful as a separately named profile; do not silently replace time budgets | Explain observed divergence with evidence; preserve current ordering, budgets and failure meaning for baseline |
308-
| Native first-safe selection and stale economic tails | Preserve a certified incumbent; compare a few fresh same-boundary Native candidates with cash plus unsettled economic value, and trigger refresh on relevant events | Higher complete NMNB/all-capture terminal score; charge every added branch and reject observed capture failures |
360+
| Native first-safe selection and stale economic tails | Complete-tape strict-score selection is implemented; literal form/fire windows accept0/105 because the old timed continuation usually dies. Try a generic adaptive continuation or event-aligned proposal while preserving the actual world | Higher complete NMNB/all-capture terminal score; charge every added branch and reject observed capture failures |
309361
| Native scores remain below the human references | Extra: early production/chain termination and PIV timing. Story: supply collection/price and form scheduling. Use reviewed source facts and new Native baselines | >3,021,639,920 Extra and >6,168,365,790 full route, followed by successful retail replay playback |
310362
| Orb/bonus opportunity remains below ASL | Use actual per-spell income and source cap/decay state to choose whether to extend, reposition, then capture. Include point/PIV/clear rewards rather than optimizing raw graze | Higher complete terminal score without capture loss; charge every longer attempt and retry |
311363
| Pickup loss: v15 still has 49 low-height and 33 non-doubled items | Measure transit pickups, gauge convergence and missed drops. Test geometry-aware staging/return paths, preserving actual carried shots and item state | Actual point income and complete score improve, not merely a static price ceiling |
@@ -329,7 +381,7 @@ independent for later ablations; no new ablation matrix is requested now.
329381
actors, latch and observer history. A fresh replay is a separate verification.
330382
3. Freeze source/binary/configuration and a bounded complete-duration experiment
331383
before launch. Use at most 4 solver jobs and the remaining campaign task budget
332-
(215/320 after handoff checks); do not reset the ledger to hide earlier attempts.
384+
(244/320 at this checkpoint); do not reset the ledger to hide earlier attempts.
333385
4. Optimize Native complete trajectories first. Require qualified exported
334386
replays before retail Wine playback; do not resume live MPC scoring.
335387
Freeze all binaries for the normal CTest suite; do not
@@ -347,6 +399,14 @@ remain available without them.
347399

348400
## Validation and preserved historical work
349401

402+
The complete-tape refiner, source-survival priority fix and slowdown metadata
403+
reporting pass Release Native/DAT CTest **57/57 in1020.13s**. The new end-to-end
404+
refinement regression preserves complete source capture coverage, rejects safe
405+
incomplete and timed-out incumbents with charged work, then checks fresh exact
406+
terminal execution and natural original-writer replay. Focused2/2 passes48.19s;
407+
the final documentation check passes. New selected story bytes and previous
408+
selected replays are preserved; other generated experiment artifacts remain local.
409+
350410
The live scoring port and optional current reduction target pass the normal
351411
Release Native/DAT suite56/56 in1175.95s and core36/36 in12.75s. The earlier port
352412
suite also passes56/56 in1189.57s. Final recovery-control/source-policy checks

0 commit comments

Comments
 (0)