Commit ac2f15a
committed
Close exp 9 measurement gap: traced search variants, real coherence
Two new OMC builtins return [result, probe_indices_array]:
phi_pi_fib_search_traced(arr, target) -> [int, array]
phi_pi_fib_nearest_traced(arr, target) -> [int, array]
Backed by a new fibonacci_search_with_trace in phi_pi_fib.rs that
collects probed indices alongside the normal search and shares the
global compare counters.
Re-running experiment 9 with traced phi_pi_fib gives REAL coherence
numbers instead of the prior 0/0 measurement gap:
linear scan: step coherence 2800/2800 = 1.000 (degenerate)
binary search: step coherence 392/592 = 0.662 (~34% NOT Fibonacci)
phi_pi_fib: step coherence 821/916 = 0.896 (~90% ARE Fibonacci)
The phi_pi_fib trace for phi.fold(50) is now visible:
probes [14, 13, 8, 12, 11, 10, 10]
step sizes [1, 5, 4, 1, 1, 0] — 5 of 6 are Fibonacci, the lone
outlier (4) comes from an offset-reset after a "go right" branch.
So phi_pi_fib is empirically ~90% substrate-coherent, not 100% as I
analytically claimed. Binary's apparent 66% is partly chance —
small-attractor tables happen to have Fibonacci-valued midpoint
step sizes (1, 2, 3, 8); at larger tables binary's halving step
sizes (16, 32, 64, 128) are all non-Fibonacci, so its coherence
should DROP while phi_pi_fib's stays high.
Path is now: phi_pi_fib is the substrate-coherent choice for the
foundational phi.fold and HInt::compute_resonance operations. Next
commit does the refactor — promote phi_pi_fib::FIBONACCI to canonical,
delete the 17 duplicate fibs tables, rewrite fold_to_fibonacci_const
and HInt::compute_resonance to use phi_pi_fib_nearest.
Both engines audit byte-identical (3114 bytes). 148/148 tests pass.1 parent aa4bd51 commit ac2f15a
3 files changed
Lines changed: 153 additions & 18 deletions
File tree
- experiments/hybrid_llm
- omnimcode-core/src
Lines changed: 10 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
137 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
301 | 293 | | |
302 | 294 | | |
303 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1666 | 1666 | | |
1667 | 1667 | | |
1668 | 1668 | | |
| 1669 | + | |
| 1670 | + | |
1669 | 1671 | | |
1670 | 1672 | | |
1671 | 1673 | | |
| |||
4133 | 4135 | | |
4134 | 4136 | | |
4135 | 4137 | | |
| 4138 | + | |
| 4139 | + | |
| 4140 | + | |
| 4141 | + | |
| 4142 | + | |
| 4143 | + | |
| 4144 | + | |
| 4145 | + | |
| 4146 | + | |
| 4147 | + | |
| 4148 | + | |
| 4149 | + | |
| 4150 | + | |
| 4151 | + | |
| 4152 | + | |
| 4153 | + | |
| 4154 | + | |
| 4155 | + | |
| 4156 | + | |
| 4157 | + | |
| 4158 | + | |
| 4159 | + | |
| 4160 | + | |
| 4161 | + | |
| 4162 | + | |
| 4163 | + | |
| 4164 | + | |
| 4165 | + | |
| 4166 | + | |
| 4167 | + | |
| 4168 | + | |
| 4169 | + | |
| 4170 | + | |
| 4171 | + | |
| 4172 | + | |
| 4173 | + | |
| 4174 | + | |
| 4175 | + | |
| 4176 | + | |
| 4177 | + | |
| 4178 | + | |
| 4179 | + | |
| 4180 | + | |
| 4181 | + | |
| 4182 | + | |
| 4183 | + | |
| 4184 | + | |
| 4185 | + | |
| 4186 | + | |
| 4187 | + | |
| 4188 | + | |
| 4189 | + | |
| 4190 | + | |
| 4191 | + | |
| 4192 | + | |
| 4193 | + | |
| 4194 | + | |
| 4195 | + | |
| 4196 | + | |
| 4197 | + | |
| 4198 | + | |
| 4199 | + | |
| 4200 | + | |
| 4201 | + | |
| 4202 | + | |
| 4203 | + | |
| 4204 | + | |
| 4205 | + | |
| 4206 | + | |
| 4207 | + | |
| 4208 | + | |
| 4209 | + | |
| 4210 | + | |
| 4211 | + | |
| 4212 | + | |
| 4213 | + | |
| 4214 | + | |
| 4215 | + | |
| 4216 | + | |
| 4217 | + | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
| 4226 | + | |
| 4227 | + | |
4136 | 4228 | | |
4137 | 4229 | | |
4138 | 4230 | | |
| |||
5102 | 5194 | | |
5103 | 5195 | | |
5104 | 5196 | | |
| 5197 | + | |
5105 | 5198 | | |
5106 | 5199 | | |
5107 | 5200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
228 | 278 | | |
229 | 279 | | |
230 | 280 | | |
| |||
0 commit comments