knowledge: Stockfish NNUE as the shipped reference for the perturbation-cascade + temporal/episodic substrate#679
Conversation
…n cascade Captures the operator's framing (2026-07-11): the reason to wire lance-graph + ndarray + OGAR into the stockfish work is to learn the REUSABLE Morton-cascade / inverse-pyramid perturbation-shader / HHTL / SoA compute — not a chess niche. Thesis: the workspace's perturbation-shader/HHTL surface is CONJECTURE-as-code (ndarray guid-prefix-shape-routing §3-4); Stockfish NNUE is a byte-exact PRODUCTION instance of the same structure (base + deterministic-address-indexed perturbations over a hierarchically-addressed grid, stored SoA, updated incrementally), now transcoded byte-exact (E-CHESS-TRANSCODE-COMPLETE-1). So stockfish-rs is the oracle for the reusable primitive. Contents: the NNUE-mechanism ↔ workspace-primitive correspondence table, each graded [G]/[H]/[S]; an honest mechanism-vs-rhyme ledger (deterministic-phase + stored-magnitude = [G]; Walsh-Hadamard bipolar side = NO NNUE analog, fenced); the reusable PerturbationAccumulator (ndarray mechanism / V3 policy); and a probe-gated wiring plan (D-SF-V3-1 lift-to-closure-kernel, D-PALETTE-NNUE tenant probe, D-MORTON-KA route probe, D-SF-V3-4 escalation identity). Marked SYNTHESIS — not canon until the epiphany-council + a probe run. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Awg6TXocHcwTtc6eGsHcdD
Extends the perturbation-cascade synthesis with the temporal axis: a chess game is a temporal.rs version-stream, each apply_move is one Markov step AND the spatial L4 delta (one accumulator, two axes). Opening variants = L1 part_of:is_a basins; transpositions = L2 memberof:members; episodic recall = AriGraph EpisodicMemory. SurrealQL AST fenced as query adapter only (not the episodic spine, per SURREAL-AST-TRAP). Four probe-gated deliverables (D-SF-EPISODIC-1/-BASIN-1/-RUNG-1/-ARIGRAPH-1); the strongest reuses the existing incremental oracle as a temporal-replay oracle at zero new ground-truth cost. Graded [G]/[H]/[S]; SYNTHESIS-not-canon. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Awg6TXocHcwTtc6eGsHcdD
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_9481105e-e8ae-44e8-9014-2955b74b3c7a) |
📝 WalkthroughWalkthroughThe PR adds a knowledge document describing Stockfish NNUE as a byte-exact perturbation-cascade reference, defining a reusable accumulator concept, identifying probe-gated integration work, and extending the model to temporal and episodic chess-game processing. ChangesNNUE perturbation cascade
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/knowledge/stockfish-nnue-as-perturbation-cascade.md:
- Line 162: Update the “position after ply v” entry to remove the “zero-copy”
claim from the QueryReference::at(...)+deinterlace description; retain the
characterization as a version-pinned projection unless the implementation and
contract are changed to avoid Vec allocation and row cloning.
- Around line 208-216: Revise the concluding paragraph beginning “Spatial (the
board)” so its claims about shared byte-exact ground truth and all three axes
are explicitly conditional on the temporal replay, rung semantics, basin
mapping, and episodic retrieval probes passing. Frame the frozen 90 MB net and
chess workload as what would close the loop if validated, rather than as
already-established results.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4260cef0-56bd-468f-bd99-1f704a4beb96
📒 Files selected for processing (1)
.claude/knowledge/stockfish-nnue-as-perturbation-cascade.md
| | Chess object | Temporal substrate | Grade | | ||
| |---|---|---| | ||
| | A game (ply sequence) | a `temporal.rs` sorted version-stream; ply *v* = one Lance version | **[G]** — moves already carry a total order; `apply_move` IS the step | | ||
| | "position after ply *v*" | `QueryReference::at(v, rung)` + deinterlace — a zero-copy projection, no replay | **[H]** — the read is [G]; that it needs no recomputation is the D-SF-EPISODIC-1 gate | |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win
Do not describe deinterlace as zero-copy.
The supplied implementation allocates a new Vec and clones each dispatchable row, so QueryReference::at(...)+deinterlace is a version-pinned projection but not zero-copy. Please remove “zero-copy” or update the implementation and its contract accordingly.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.claude/knowledge/stockfish-nnue-as-perturbation-cascade.md at line 162,
Update the “position after ply v” entry to remove the “zero-copy” claim from the
QueryReference::at(...)+deinterlace description; retain the characterization as
a version-pinned projection unless the implementation and contract are changed
to avoid Vec allocation and row cloning.
| Spatial (the board), temporal (the game), and episodic (the archive of games) are | ||
| **three reads of one accumulator trajectory** — the same `apply_move` delta, | ||
| projected on the square axis (perturbation cascade), the version axis (Markov | ||
| stream), and the similarity axis (episodic recall). The frozen 90 MB net keeps all | ||
| three honest: every temporal projection has the same byte-exact yes/no oracle the | ||
| spatial cascade has, because replay-to-ply-*v* and compute-from-ply-*v*-FEN must | ||
| agree to the bit. That is the whole reason chess is the learning vehicle — it is | ||
| the only workload in the building where *all three axes* answer to one frozen | ||
| ground truth. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Make this conclusion conditional on the probe results.
The preceding section marks temporal replay, rung semantics, basin mapping, and episodic retrieval as unvalidated gates, but this paragraph states that all three axes already share a byte-exact ground truth. Please change this to “would close the loop if the probes pass” to preserve the document’s anti-theater discipline.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.claude/knowledge/stockfish-nnue-as-perturbation-cascade.md around lines 208
- 216, Revise the concluding paragraph beginning “Spatial (the board)” so its
claims about shared byte-exact ground truth and all three axes are explicitly
conditional on the temporal replay, rung semantics, basin mapping, and episodic
retrieval probes passing. Frame the frozen 90 MB net and chess workload as what
would close the loop if validated, rather than as already-established results.
Summary
Adds one knowledge doc,
.claude/knowledge/stockfish-nnue-as-perturbation-cascade.md, that grounds the workspace's Morton-cascade / inverse-pyramid perturbation-shader / HHTL / SoA doctrine in a shipped, byte-exact production instance: thestockfish-rsNNUE evaluator (E-CHESS #539 / E-CHESS-TRANSCODE-COMPLETE-1). Doc-only — no crate source, no contract type, no behavior change.The thesis: the perturbation-cascade surface is largely CONJECTURE-as-code across the workspace, while Stockfish NNUE is a frozen (90 MB net), externally-validated instance of the same structure — base + deterministic-address-indexed perturbations over a hierarchically-addressed grid, stored SoA, updated incrementally. The frozen net is the byte-exact proof workload: a ground truth that cannot drift.
What the doc establishes (graded [G]/[H]/[S] throughout)
Spatial axis (first commit).
RouteAction::Escalate).Temporal/episodic axis (second commit).
apply_move) is BOTH the spatial L4 board delta AND one temporal Markov step — a game is the accumulator's trajectory through version-space, one accumulator read on two axes.temporal.rssorted version-stream [G]; position-at-ply =QueryReference::at(v, rung)zero-copy projection [H]; opening variants = episodic basins = le-contract L1part_of:is_arails [H]; transpositions = L2memberof:members[H]; episodic recall = AriGraphEpisodicMemory[G]/[H].Status
The doc is labeled SYNTHESIS-not-canon: the [G] anchors are real, everything else is [H]/[S] and named as such, and no deliverable ships without its probe green. It is a map of what the chess workload lets us falsify about the substrate, not a claim that the substrate is proven.
Testing
Doc-only; nothing to compile. Cross-refs verified against the sources they cite (ndarray
guid-prefix-shape-routing.md§4/§4b, V3soa_layout/le-contract.mdL1–L4,temporal.rsQueryReference, AriGraphEpisodicMemory, OGARSURREAL-AST-TRAP-PREFLIGHT.md, board E-CHESS / E-MARKOV-TEMPORAL-STREAM-1).🤖 Generated with Claude Code
https://claude.ai/code/session_01Awg6TXocHcwTtc6eGsHcdD
Generated by Claude Code
Summary by CodeRabbit