You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: LOGIC-MAP.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,3 +84,16 @@ This document explains the logic chain for updating `UPDATES_STRATEGY.md` with s
84
84
-**Why:** Verb transitivity must guide whether direct objects appear; adverbs must originate from the lexicon; lyric corpus should load real files when available.
85
85
-**Invariant:** Transitive verbs prefer `V NP`, intransitives avoid object insertion; adverbs are derived from `lexicon.Adv`; corpus loading resolves `/lyrics/*.txt` entries before falling back to embedded lines.
86
86
-**Proof Sketch:** The VP generator branches on `feats.trans` with explicit paths, and `import.meta.glob` enumerates real assets, ensuring coverage without mock fillers.
-**Why:** Kernel PCA initialization, TD(λ) weights, and grammar generation relied on implicit randomness, making runs irreproducible.
91
+
-**Invariant:** All stochastic paths must consume a single seeded RNG when provided.
92
+
2.**Centralize seeded RNG consumption**
93
+
-**Why:** A single RNG source enables reproducible training and generation across components.
94
+
-**Invariant:** KernelPCA, TDValueEstimator, and ConstraintGrammar call the same RNG instance or function.
95
+
-**Proof Sketch:** Each component accepts a `rng` dependency and defers calls to `rng()` or `rng.next()`, so the RNG state advances deterministically in a single sequence.
96
+
3.**Define deterministic seed resolution**
97
+
-**Why:** Users need a stable way to set seeds without UI changes.
98
+
-**Invariant:** When `?seed=` is provided, the engine seed is deterministic for both numeric and string inputs; otherwise, default entropy is used.
99
+
-**Proof Sketch:** Numeric seeds map directly; string seeds use a deterministic hash (`fnv-1a`), so identical inputs always map to the same 32-bit seed.
0 commit comments