Commit 5ebd078
HBit::harmony substrate-routed (D3 partial)
Replace the Euclidean `1/(1+|alpha-beta|)` harmony formula in
value::HBit::harmony with substrate-routed
`1/(1+attractor_distance(|alpha-beta|))`. Harmony now measures
coherence with the phi-pi-fibonacci attractor lattice — peaks at 1.0
when the band-diff lands on a Fibonacci attractor (0, 1, 2, 3, 5, 8,
13, 21, ..., 63245986). Decays with distance from the nearest.
Also delete the duplicate harmony formula in hbit::HBitProcessor —
it now delegates to value::HBit::harmony so both call sites share
one substrate-routed implementation.
Test coverage refreshed: HBitProcessor::harmony(5, 10) is no longer
asserted < 1.0 (diff 5 is on an attractor, so harmony = 1.0 is
correct under the new formula). New asserts pin off-attractor pairs
(harmony(4, 10) where diff 6 lands between attractors) and far-off
pairs (harmony(0, 1000) where diff 1000 lands distance 13 from
nearest attractor 987).
NOTE: this is D3-PARTIAL. The remaining work — wiring @hbit pragma
into a real codegen path (SL HBit architecture targets AVX-512 SIMD
intrinsics) — is a multi-session project tracked separately. This
commit is the substrate-alignment foundation that the codegen path
will build on top of.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 3d4f9b0 commit 5ebd078
2 files changed
Lines changed: 38 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | | - | |
44 | | - | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
224 | 239 | | |
225 | 240 | | |
226 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
111 | 123 | | |
112 | | - | |
113 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
114 | 127 | | |
115 | 128 | | |
116 | 129 | | |
| |||
0 commit comments