@reicek/neataptic-ts 0.1.24 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/.github/copilot-instructions.md +11 -0
  2. package/.github/skills/trace-analyzer-extension/SKILL.md +3 -3
  3. package/.github/skills/trace-analyzer-extension/assets/extension-checklist.md +1 -1
  4. package/.github/skills/trace-analyzer-extension/references/analyzer-extension-workflow.md +1 -1
  5. package/.github/skills/trace-audit-reporting/SKILL.md +3 -3
  6. package/.github/skills/trace-audit-reporting/references/trace-analysis-workflow.md +1 -1
  7. package/.github/workflows/ci.yml +3 -3
  8. package/.github/workflows/deploy-pages.yml +6 -6
  9. package/.github/workflows/manual_release_pipeline.yml +3 -3
  10. package/.github/workflows/publish.yml +18 -19
  11. package/.github/workflows/release_dispatch.yml +3 -3
  12. package/package.json +26 -20
  13. package/plans/Flappy_Bird_Folder_Documentation_Pass.md +4 -4
  14. package/plans/README.md +24 -0
  15. package/plans/Roadmap.md +62 -40
  16. package/plans/analyze-trace-solid-split.plans.md +66 -0
  17. package/plans/architecture-solid-split.plans.md +9 -15
  18. package/plans/asciiMaze-typescript-repair.plans.md +1 -1
  19. package/plans/generate-docs-solid-split.plans.md +87 -0
  20. package/plans/methods-docs.plans.md +25 -1
  21. package/plans/methods-solid-split.plans.md +14 -14
  22. package/plans/neat-docs.plans.md +9 -1
  23. package/plans/neat-test-surface-repair.plans.md +1 -1
  24. package/plans/render-docs-html-solid-split.plans.md +68 -0
  25. package/plans/src-no-explicit-any-cleanup.plans.md +1 -1
  26. package/plans/utils-docs.plans.md +6 -1
  27. package/scripts/analyze-trace/analyze-trace.analysis.ts +479 -0
  28. package/scripts/analyze-trace/analyze-trace.constants.ts +35 -0
  29. package/scripts/analyze-trace/analyze-trace.io.ts +69 -0
  30. package/scripts/analyze-trace/analyze-trace.report.ts +100 -0
  31. package/scripts/analyze-trace/analyze-trace.shared.ts +116 -0
  32. package/scripts/analyze-trace/analyze-trace.ts +45 -0
  33. package/scripts/analyze-trace/analyze-trace.types.ts +72 -0
  34. package/scripts/assets/theme.css +80 -23
  35. package/scripts/copy-examples.ts +239 -0
  36. package/scripts/export-onnx.ts +223 -0
  37. package/scripts/generate-bench-tables.ts +378 -37
  38. package/scripts/generate-docs/generate-docs.constants.ts +107 -0
  39. package/scripts/generate-docs/generate-docs.order.ts +355 -0
  40. package/scripts/generate-docs/generate-docs.state.ts +31 -0
  41. package/scripts/generate-docs/generate-docs.targets.ts +165 -0
  42. package/scripts/generate-docs/generate-docs.ts +63 -0
  43. package/scripts/generate-docs/generate-docs.types.ts +112 -0
  44. package/scripts/generate-docs/output/generate-docs.output.folder-index.utils.ts +167 -0
  45. package/scripts/generate-docs/output/generate-docs.output.ordering.utils.ts +353 -0
  46. package/scripts/generate-docs/output/generate-docs.output.readme.utils.ts +420 -0
  47. package/scripts/generate-docs/output/generate-docs.output.ts +123 -0
  48. package/scripts/generate-docs/output/generate-docs.output.warnings.utils.ts +219 -0
  49. package/scripts/generate-docs/symbols/generate-docs.symbols.collection.utils.ts +365 -0
  50. package/scripts/generate-docs/symbols/generate-docs.symbols.jsdoc.utils.ts +373 -0
  51. package/scripts/generate-docs/symbols/generate-docs.symbols.normalize.utils.ts +155 -0
  52. package/scripts/generate-docs/symbols/generate-docs.symbols.render.utils.ts +149 -0
  53. package/scripts/generate-docs/symbols/generate-docs.symbols.signature.utils.ts +289 -0
  54. package/scripts/generate-docs/symbols/generate-docs.symbols.ts +11 -0
  55. package/scripts/mermaid-cli.mjs +102 -22
  56. package/scripts/mermaid-cli.ts +736 -0
  57. package/scripts/render-docs-html/render-docs-html.assets.ts +54 -0
  58. package/scripts/render-docs-html/render-docs-html.mermaid.ts +245 -0
  59. package/scripts/{render-docs-html.sidebar.ts → render-docs-html/render-docs-html.navigation.ts} +141 -144
  60. package/scripts/render-docs-html/render-docs-html.pages.ts +333 -0
  61. package/scripts/render-docs-html/render-docs-html.shared.ts +333 -0
  62. package/scripts/render-docs-html/render-docs-html.types.ts +42 -0
  63. package/scripts/render-docs-html.ts +23 -587
  64. package/scripts/run-docs.ts +238 -0
  65. package/scripts/write-dist-docs-pkg.ts +40 -0
  66. package/src/README.md +75 -75
  67. package/src/architecture/connection/README.md +5 -5
  68. package/src/architecture/layer/README.md +508 -508
  69. package/src/architecture/network/README.md +1458 -1458
  70. package/src/architecture/network/activate/README.md +694 -694
  71. package/src/architecture/network/bootstrap/README.md +77 -77
  72. package/src/architecture/network/connect/README.md +74 -74
  73. package/src/architecture/network/deterministic/README.md +135 -135
  74. package/src/architecture/network/evolve/README.md +364 -364
  75. package/src/architecture/network/gating/README.md +130 -130
  76. package/src/architecture/network/genetic/README.md +399 -399
  77. package/src/architecture/network/mutate/README.md +897 -897
  78. package/src/architecture/network/onnx/README.md +720 -720
  79. package/src/architecture/network/onnx/export/README.md +728 -728
  80. package/src/architecture/network/onnx/export/layers/README.md +450 -450
  81. package/src/architecture/network/onnx/import/README.md +618 -618
  82. package/src/architecture/network/onnx/schema/README.md +32 -32
  83. package/src/architecture/network/prune/README.md +245 -245
  84. package/src/architecture/network/remove/README.md +135 -135
  85. package/src/architecture/network/runtime/README.md +106 -106
  86. package/src/architecture/network/serialize/README.md +542 -542
  87. package/src/architecture/network/slab/README.md +608 -608
  88. package/src/architecture/network/standalone/README.md +212 -212
  89. package/src/architecture/network/stats/README.md +84 -84
  90. package/src/architecture/network/topology/README.md +465 -465
  91. package/src/architecture/network/training/README.md +200 -200
  92. package/src/architecture/node/README.md +5 -5
  93. package/src/architecture/nodePool/README.md +14 -14
  94. package/src/methods/README.md +99 -99
  95. package/src/methods/activation/README.md +189 -189
  96. package/src/methods/cost/README.md +131 -131
  97. package/src/methods/rate/README.md +86 -86
  98. package/src/multithreading/README.md +77 -77
  99. package/src/multithreading/workers/browser/README.md +8 -8
  100. package/src/multithreading/workers/node/README.md +8 -8
  101. package/src/neat/README.md +148 -148
  102. package/src/neat/adaptive/README.md +120 -120
  103. package/src/neat/adaptive/acceptance/README.md +40 -40
  104. package/src/neat/adaptive/complexity/README.md +137 -137
  105. package/src/neat/adaptive/core/README.md +197 -197
  106. package/src/neat/adaptive/lineage/README.md +90 -90
  107. package/src/neat/adaptive/mutation/README.md +284 -284
  108. package/src/neat/compat/README.md +43 -43
  109. package/src/neat/compat/core/README.md +90 -90
  110. package/src/neat/diversity/README.md +35 -35
  111. package/src/neat/diversity/core/README.md +88 -88
  112. package/src/neat/evaluate/README.md +85 -85
  113. package/src/neat/evaluate/auto-distance/README.md +75 -75
  114. package/src/neat/evaluate/entropy-compat/README.md +37 -37
  115. package/src/neat/evaluate/entropy-sharing/README.md +43 -43
  116. package/src/neat/evaluate/fitness/README.md +23 -23
  117. package/src/neat/evaluate/novelty/README.md +120 -120
  118. package/src/neat/evaluate/objectives/README.md +17 -17
  119. package/src/neat/evaluate/shared/README.md +94 -94
  120. package/src/neat/evolve/README.md +96 -96
  121. package/src/neat/evolve/adaptive/README.md +60 -60
  122. package/src/neat/evolve/objectives/README.md +63 -63
  123. package/src/neat/evolve/offspring/README.md +56 -56
  124. package/src/neat/evolve/population/README.md +171 -171
  125. package/src/neat/evolve/runtime/README.md +79 -79
  126. package/src/neat/evolve/speciation/README.md +74 -74
  127. package/src/neat/evolve/warnings/README.md +10 -10
  128. package/src/neat/export/README.md +114 -114
  129. package/src/neat/helpers/README.md +50 -50
  130. package/src/neat/init/README.md +9 -9
  131. package/src/neat/lineage/core/README.md +101 -101
  132. package/src/neat/multiobjective/category/README.md +74 -74
  133. package/src/neat/multiobjective/crowding/README.md +272 -272
  134. package/src/neat/multiobjective/dominance/README.md +171 -171
  135. package/src/neat/multiobjective/fronts/README.md +68 -68
  136. package/src/neat/multiobjective/metrics/README.md +43 -43
  137. package/src/neat/multiobjective/objectives/README.md +31 -31
  138. package/src/neat/multiobjective/shared/README.md +27 -27
  139. package/src/neat/mutation/README.md +97 -97
  140. package/src/neat/mutation/add-conn/README.md +115 -115
  141. package/src/neat/mutation/add-node/README.md +126 -126
  142. package/src/neat/mutation/flow/README.md +149 -149
  143. package/src/neat/mutation/repair/README.md +185 -185
  144. package/src/neat/mutation/select/README.md +117 -117
  145. package/src/neat/mutation/shared/README.md +32 -32
  146. package/src/neat/objectives/README.md +25 -25
  147. package/src/neat/objectives/core/README.md +67 -67
  148. package/src/neat/pruning/README.md +40 -40
  149. package/src/neat/pruning/core/README.md +171 -171
  150. package/src/neat/pruning/facade/README.md +32 -32
  151. package/src/neat/rng/README.md +104 -104
  152. package/src/neat/rng/core/README.md +137 -137
  153. package/src/neat/rng/facade/README.md +50 -50
  154. package/src/neat/selection/README.md +111 -111
  155. package/src/neat/selection/core/README.md +227 -227
  156. package/src/neat/selection/facade/README.md +61 -61
  157. package/src/neat/shared/README.md +163 -163
  158. package/src/neat/speciation/README.md +31 -31
  159. package/src/neat/speciation/threshold/README.md +35 -35
  160. package/src/neat/species/README.md +25 -25
  161. package/src/neat/species/core/README.md +20 -20
  162. package/src/neat/species/core/shared/README.md +18 -18
  163. package/src/neat/species/history/context/README.md +22 -22
  164. package/src/neat/telemetry/accessors/README.md +58 -58
  165. package/src/neat/telemetry/exports/README.md +233 -233
  166. package/src/neat/telemetry/facade/README.md +252 -252
  167. package/src/neat/telemetry/facade/archive/README.md +57 -57
  168. package/src/neat/telemetry/facade/buffer/README.md +43 -43
  169. package/src/neat/telemetry/facade/lineage/README.md +12 -12
  170. package/src/neat/telemetry/facade/objectives/README.md +44 -44
  171. package/src/neat/telemetry/facade/runtime/README.md +26 -26
  172. package/src/neat/telemetry/facade/species/README.md +27 -27
  173. package/src/neat/telemetry/metrics/README.md +696 -696
  174. package/src/neat/telemetry/recorder/README.md +57 -57
  175. package/src/neat/telemetry/types/README.md +32 -32
  176. package/src/neat/topology-intent/README.md +75 -75
  177. package/src/utils/README.md +193 -193
  178. package/test/examples/asciiMaze/browser-entry/README.md +92 -92
  179. package/test/examples/asciiMaze/dashboardManager/README.md +109 -109
  180. package/test/examples/asciiMaze/dashboardManager/telemetry/README.md +28 -28
  181. package/test/examples/asciiMaze/evolutionEngine/README.md +1527 -1527
  182. package/test/examples/asciiMaze/mazeMovement/README.md +105 -105
  183. package/test/examples/asciiMaze/mazeMovement/finalization/README.md +16 -16
  184. package/test/examples/asciiMaze/mazeMovement/policy/README.md +57 -57
  185. package/test/examples/asciiMaze/mazeMovement/runtime/README.md +52 -52
  186. package/test/examples/asciiMaze/mazeMovement/shaping/README.md +46 -46
  187. package/test/examples/flappy_bird/browser-entry/README.md +508 -508
  188. package/test/examples/flappy_bird/browser-entry/host/README.md +101 -101
  189. package/test/examples/flappy_bird/browser-entry/host/resize/README.md +144 -144
  190. package/test/examples/flappy_bird/browser-entry/network-view/README.md +194 -194
  191. package/test/examples/flappy_bird/browser-entry/playback/README.md +278 -278
  192. package/test/examples/flappy_bird/browser-entry/playback/background/README.md +129 -129
  193. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/README.md +502 -502
  194. package/test/examples/flappy_bird/browser-entry/playback/frame-render/README.md +139 -139
  195. package/test/examples/flappy_bird/browser-entry/playback/snapshot/README.md +10 -10
  196. package/test/examples/flappy_bird/browser-entry/playback/trail/README.md +43 -43
  197. package/test/examples/flappy_bird/browser-entry/playback/worker-channel/README.md +30 -30
  198. package/test/examples/flappy_bird/browser-entry/runtime/README.md +59 -59
  199. package/test/examples/flappy_bird/browser-entry/visualization/README.md +276 -276
  200. package/test/examples/flappy_bird/browser-entry/worker-channel/README.md +16 -16
  201. package/test/examples/flappy_bird/constants/README.md +1070 -1070
  202. package/test/examples/flappy_bird/environment/README.md +22 -22
  203. package/test/examples/flappy_bird/evaluation/README.md +32 -32
  204. package/test/examples/flappy_bird/evaluation/rollout/README.md +141 -141
  205. package/test/examples/flappy_bird/flappy-evolution-worker/README.md +425 -425
  206. package/test/examples/flappy_bird/simulation-shared/README.md +170 -170
  207. package/test/examples/flappy_bird/simulation-shared/observation/README.md +109 -109
  208. package/test/examples/flappy_bird/trainer/README.md +325 -325
  209. package/test/examples/flappy_bird/trainer/evaluation/README.md +74 -74
  210. package/scripts/analyze-trace.ts +0 -590
  211. package/scripts/copy-examples.mjs +0 -114
  212. package/scripts/export-onnx.mjs +0 -86
  213. package/scripts/generate-bench-tables.mjs +0 -182
  214. package/scripts/generate-docs.ts +0 -2900
  215. package/scripts/write-dist-docs-pkg.mjs +0 -16
@@ -107,67 +107,68 @@ const bestScore = Math.max(...controller.population.map((genome) => genome.score
107
107
  console.log('best score after evaluation:', bestScore);
108
108
  ```
109
109
 
110
- ### NOVELTY_DEFAULT_NEIGHBORS
110
+ ### AUTO_COEFF_ADJUST_DEFAULT
111
111
 
112
- Default number of nearest neighbors used when computing novelty.
112
+ Default rate used when auto distance-coefficient tuning rebalances structural distance weights.
113
113
 
114
- Small values keep novelty sensitive to local behavioral differences without requiring a large
115
- archive or population.
114
+ This shared step size controls how quickly excess and disjoint coefficients react when topology
115
+ variance drifts away from the recent baseline.
116
116
 
117
- ### NOVELTY_DEFAULT_BLEND
117
+ ### AUTO_COEFF_MAX_DEFAULT
118
118
 
119
- Default blend factor used when mixing novelty into an existing fitness score.
119
+ Maximum structural-distance coefficient allowed during automatic tuning.
120
120
 
121
- A mid-range value keeps novelty influential without letting exploratory behavior completely drown
122
- out task performance.
121
+ The upper bound prevents excess and disjoint penalties from dominating every later compatibility
122
+ comparison.
123
123
 
124
- ### NOVELTY_ARCHIVE_CAP
124
+ ### AUTO_COEFF_MIN_DEFAULT
125
125
 
126
- Maximum number of descriptors retained in the novelty archive.
126
+ Minimum structural-distance coefficient allowed during automatic tuning.
127
127
 
128
- The cap keeps novelty history useful for exploration while preventing unbounded memory growth.
128
+ The lower bound keeps structural differences meaningful even when the auto-distance policy is
129
+ softening species pressure.
129
130
 
130
- ### ENTROPY_VAR_TARGET_DEFAULT
131
+ ### COMPAT_MAX_THRESHOLD_DEFAULT
131
132
 
132
- Target variance used by entropy-sharing tuning.
133
+ Maximum compatibility threshold allowed during automatic compatibility tuning.
133
134
 
134
- The controller nudges sharing sigma toward a population whose entropy spread is neither too flat
135
- nor too unstable.
135
+ The upper clamp prevents compatibility from becoming so permissive that species boundaries lose
136
+ practical meaning.
136
137
 
137
- ### ENTROPY_VAR_ADJUST_DEFAULT
138
+ ### COMPAT_MIN_THRESHOLD_DEFAULT
138
139
 
139
- Default step size used when entropy-sharing tuning increases or decreases sharing sigma.
140
+ Minimum compatibility threshold allowed during automatic compatibility tuning.
140
141
 
141
- A modest default keeps the sigma controller responsive without letting one noisy variance read
142
- swing the sharing radius too aggressively.
142
+ The lower clamp prevents the threshold from collapsing until even small structural differences
143
+ force unnecessary species fragmentation.
143
144
 
144
- ### ENTROPY_VAR_MIN_SIGMA_DEFAULT
145
+ ### COMPAT_THRESHOLD_DEFAULT
145
146
 
146
- Lower bound for the sharing sigma used by entropy-sharing adaptation.
147
+ Baseline compatibility threshold used when no explicit value is configured.
147
148
 
148
- The lower clamp prevents the sharing radius from shrinking so far that later sharing pressure
149
- becomes hypersensitive to tiny entropy fluctuations.
149
+ This serves as the neutral starting point before entropy-based tuning or explicit user policy
150
+ begins to reshape species pressure.
150
151
 
151
- ### ENTROPY_VAR_MAX_SIGMA_DEFAULT
152
+ ### DISTANCE_COEFF_DEFAULT
152
153
 
153
- Upper bound for the sharing sigma used by entropy-sharing adaptation.
154
+ Baseline structural-distance coefficient used before automatic tuning occurs.
154
155
 
155
- The upper clamp prevents the radius from widening until entropy sharing loses practical
156
- contrast across the population.
156
+ This is the neutral starting point for the structural-distance fold before variance-driven
157
+ updates begin to reshape it.
157
158
 
158
- ### ENTROPY_VAR_LOW_BAND
159
+ ### ENTROPY_ADJUST_DEFAULT
159
160
 
160
- Lower tolerance band for deciding that observed entropy variance is meaningfully low.
161
+ Default rate used when compatibility tuning nudges the threshold upward or downward.
161
162
 
162
- Values below this multiplier mark a population whose entropy spread is flatter than the tuning
163
- target expects.
163
+ A conservative step size keeps the compatibility-threshold loop gradual enough that later
164
+ speciation reads remain interpretable from one generation to the next.
164
165
 
165
- ### ENTROPY_VAR_HIGH_BAND
166
+ ### ENTROPY_DEADBAND_DEFAULT
166
167
 
167
- Upper tolerance band for deciding that observed entropy variance is meaningfully high.
168
+ Deadband around the entropy target where compatibility tuning intentionally does nothing.
168
169
 
169
- Values above this multiplier mark a population whose entropy spread is noisier than the tuning
170
- target expects.
170
+ The deadband reduces threshold jitter by treating small entropy deviations as normal noise
171
+ rather than signals that demand a policy change.
171
172
 
172
173
  ### ENTROPY_TARGET_DEFAULT
173
174
 
@@ -176,68 +177,81 @@ Target mean entropy used when tuning the compatibility threshold.
176
177
  The goal is to keep speciation pressure near a stable diversity level instead of drifting toward
177
178
  either species collapse or fragmentation.
178
179
 
179
- ### ENTROPY_DEADBAND_DEFAULT
180
+ ### ENTROPY_VAR_ADJUST_DEFAULT
180
181
 
181
- Deadband around the entropy target where compatibility tuning intentionally does nothing.
182
+ Default step size used when entropy-sharing tuning increases or decreases sharing sigma.
182
183
 
183
- The deadband reduces threshold jitter by treating small entropy deviations as normal noise
184
- rather than signals that demand a policy change.
184
+ A modest default keeps the sigma controller responsive without letting one noisy variance read
185
+ swing the sharing radius too aggressively.
185
186
 
186
- ### ENTROPY_ADJUST_DEFAULT
187
+ ### ENTROPY_VAR_HIGH_BAND
187
188
 
188
- Default rate used when compatibility tuning nudges the threshold upward or downward.
189
+ Upper tolerance band for deciding that observed entropy variance is meaningfully high.
189
190
 
190
- A conservative step size keeps the compatibility-threshold loop gradual enough that later
191
- speciation reads remain interpretable from one generation to the next.
191
+ Values above this multiplier mark a population whose entropy spread is noisier than the tuning
192
+ target expects.
192
193
 
193
- ### COMPAT_THRESHOLD_DEFAULT
194
+ ### ENTROPY_VAR_LOW_BAND
194
195
 
195
- Baseline compatibility threshold used when no explicit value is configured.
196
+ Lower tolerance band for deciding that observed entropy variance is meaningfully low.
196
197
 
197
- This serves as the neutral starting point before entropy-based tuning or explicit user policy
198
- begins to reshape species pressure.
198
+ Values below this multiplier mark a population whose entropy spread is flatter than the tuning
199
+ target expects.
199
200
 
200
- ### COMPAT_MIN_THRESHOLD_DEFAULT
201
+ ### ENTROPY_VAR_MAX_SIGMA_DEFAULT
201
202
 
202
- Minimum compatibility threshold allowed during automatic compatibility tuning.
203
+ Upper bound for the sharing sigma used by entropy-sharing adaptation.
203
204
 
204
- The lower clamp prevents the threshold from collapsing until even small structural differences
205
- force unnecessary species fragmentation.
205
+ The upper clamp prevents the radius from widening until entropy sharing loses practical
206
+ contrast across the population.
206
207
 
207
- ### COMPAT_MAX_THRESHOLD_DEFAULT
208
+ ### ENTROPY_VAR_MIN_SIGMA_DEFAULT
208
209
 
209
- Maximum compatibility threshold allowed during automatic compatibility tuning.
210
+ Lower bound for the sharing sigma used by entropy-sharing adaptation.
210
211
 
211
- The upper clamp prevents compatibility from becoming so permissive that species boundaries lose
212
- practical meaning.
212
+ The lower clamp prevents the sharing radius from shrinking so far that later sharing pressure
213
+ becomes hypersensitive to tiny entropy fluctuations.
213
214
 
214
- ### AUTO_COEFF_ADJUST_DEFAULT
215
+ ### ENTROPY_VAR_TARGET_DEFAULT
215
216
 
216
- Default rate used when auto distance-coefficient tuning rebalances structural distance weights.
217
+ Target variance used by entropy-sharing tuning.
217
218
 
218
- This shared step size controls how quickly excess and disjoint coefficients react when topology
219
- variance drifts away from the recent baseline.
219
+ The controller nudges sharing sigma toward a population whose entropy spread is neither too flat
220
+ nor too unstable.
220
221
 
221
- ### AUTO_COEFF_MIN_DEFAULT
222
+ ### NeatControllerForEval
222
223
 
223
- Minimum structural-distance coefficient allowed during automatic tuning.
224
+ NEAT controller interface for evaluation.
224
225
 
225
- The lower bound keeps structural differences meaningful even when the auto-distance policy is
226
- softening species pressure.
226
+ This interface models the subset of a NEAT controller used by the evaluation
227
+ helpers. It includes the runtime options, population data, lightweight
228
+ evidence caches, and optional hooks that the evaluate subtree needs in order
229
+ to enrich one generation without taking ownership of the whole controller.
227
230
 
228
- ### AUTO_COEFF_MAX_DEFAULT
231
+ The contract is intentionally broader than an individual helper needs but
232
+ still much smaller than the full `Neat` surface. That tradeoff keeps the
233
+ evaluate chapters interoperable while preserving a clear boundary between
234
+ evaluation and the rest of the runtime.
229
235
 
230
- Maximum structural-distance coefficient allowed during automatic tuning.
236
+ ### NOVELTY_ARCHIVE_CAP
231
237
 
232
- The upper bound prevents excess and disjoint penalties from dominating every later compatibility
233
- comparison.
238
+ Maximum number of descriptors retained in the novelty archive.
234
239
 
235
- ### DISTANCE_COEFF_DEFAULT
240
+ The cap keeps novelty history useful for exploration while preventing unbounded memory growth.
236
241
 
237
- Baseline structural-distance coefficient used before automatic tuning occurs.
242
+ ### NOVELTY_DEFAULT_BLEND
238
243
 
239
- This is the neutral starting point for the structural-distance fold before variance-driven
240
- updates begin to reshape it.
244
+ Default blend factor used when mixing novelty into an existing fitness score.
245
+
246
+ A mid-range value keeps novelty influential without letting exploratory behavior completely drown
247
+ out task performance.
248
+
249
+ ### NOVELTY_DEFAULT_NEIGHBORS
250
+
251
+ Default number of nearest neighbors used when computing novelty.
252
+
253
+ Small values keep novelty sensitive to local behavioral differences without requiring a large
254
+ archive or population.
241
255
 
242
256
  ### VARIANCE_DECREASE_THRESHOLD
243
257
 
@@ -252,17 +266,3 @@ Multiplier above which observed variance is treated as a meaningful increase.
252
266
 
253
267
  Values above this band tell the auto-distance loop that topology sizes are spreading relative to
254
268
  the recent baseline.
255
-
256
- ### NeatControllerForEval
257
-
258
- NEAT controller interface for evaluation.
259
-
260
- This interface models the subset of a NEAT controller used by the evaluation
261
- helpers. It includes the runtime options, population data, lightweight
262
- evidence caches, and optional hooks that the evaluate subtree needs in order
263
- to enrich one generation without taking ownership of the whole controller.
264
-
265
- The contract is intentionally broader than an individual helper needs but
266
- still much smaller than the full `Neat` surface. That tradeoff keeps the
267
- evaluate chapters interoperable while preserving a clear boundary between
268
- evaluation and the rest of the runtime.
@@ -52,40 +52,78 @@ flowchart TD
52
52
 
53
53
  ## neat/evaluate/auto-distance/evaluate.auto-distance.ts
54
54
 
55
- ### runAutoDistanceCoefficientTuning
55
+ ### applyAutoDistanceCoefficientTuning
56
56
 
57
57
  ```ts
58
- runAutoDistanceCoefficientTuning(
58
+ applyAutoDistanceCoefficientTuning(
59
59
  controller: NeatControllerForEval,
60
- evaluationOptions: { [key: string]: unknown; fitnessPopulation?: boolean | undefined; clear?: boolean | undefined; novelty?: { enabled?: boolean | undefined; descriptor?: ((genome: GenomeForEvaluation) => number[]) | undefined; k?: number | undefined; blendFactor?: number | undefined; archiveAddThreshold?: number | undefined; } | undefined; entropySharingTuning?: { enabled?: boolean | undefined; targetEntropyVar?: number | undefined; adjustRate?: number | undefined; minSigma?: number | undefined; maxSigma?: number | undefined; } | undefined; entropyCompatTuning?: { enabled?: boolean | undefined; targetEntropy?: number | undefined; deadband?: number | undefined; adjustRate?: number | undefined; minThreshold?: number | undefined; maxThreshold?: number | undefined; } | undefined; autoDistanceCoeffTuning?: { enabled?: boolean | undefined; adjustRate?: number | undefined; minCoeff?: number | undefined; maxCoeff?: number | undefined; } | undefined; multiObjective?: { enabled?: boolean | undefined; autoEntropy?: boolean | undefined; dynamic?: { enabled?: boolean | undefined; } | undefined; } | undefined; speciation?: boolean | undefined; targetSpecies?: number | undefined; compatAdjust?: boolean | undefined; speciesAllocation?: { extendedHistory?: boolean | undefined; } | undefined; sharingSigma?: number | undefined; compatibilityThreshold?: number | undefined; excessCoeff?: number | undefined; disjointCoeff?: number | undefined; },
60
+ autoDistanceCoeffOptions: { enabled?: boolean | undefined; adjustRate?: number | undefined; minCoeff?: number | undefined; maxCoeff?: number | undefined; },
61
+ connectionVariance: number,
61
62
  ): void
62
63
  ```
63
64
 
64
- Apply variance-driven tuning to the controller's distance coefficients.
65
+ Apply the coefficient-tuning policy using the observed connection variance.
65
66
 
66
- This is the controller-facing entrypoint for auto-distance tuning. It only
67
- runs when both speciation and auto coefficient tuning are enabled because the
68
- resulting coefficients are only meaningful when later compatibility reads are
69
- still part of the runtime policy.
67
+ This helper compares the freshly observed variance with the controller's
68
+ stored baseline. Lower-than-expected variance means topology sizes are
69
+ converging, so excess and disjoint coefficients are increased to make future
70
+ structural differences matter more. Higher-than-expected variance means the
71
+ population is already spreading structurally, so the coefficients are eased
72
+ downward.
70
73
 
71
- The helper preserves several important controller assumptions:
72
- - genome scores are already complete and are not recomputed here,
73
- - live species assignments are left intact,
74
- - population order is left intact,
75
- - only the structural-distance coefficients and their variance baseline are
76
- updated for future passes.
74
+ The comparison is deliberately relative instead of target-based. The policy
75
+ tracks the population's recent structural spread and responds to drift,
76
+ rather than forcing every problem domain toward one global variance number.
77
77
 
78
78
  Parameters:
79
79
  - `controller` - - NEAT controller instance for evaluation.
80
- - `evaluationOptions` - - Options object for the current evaluation pass.
80
+ - `autoDistanceCoeffOptions` - - Tuning options that define adjustment rate
81
+ and coefficient bounds.
82
+ - `connectionVariance` - - Freshly observed variance of population
83
+ connection counts.
81
84
 
82
- Example:
85
+ ### applyDistanceCoefficientDecrease
83
86
 
84
87
  ```ts
85
- runAutoDistanceCoefficientTuning(controller, controller.options);
86
- console.log(controller.options.excessCoeff, controller.options.disjointCoeff);
88
+ applyDistanceCoefficientDecrease(
89
+ controller: NeatControllerForEval,
90
+ bounds: { minCoeff: number; maxCoeff: number; },
91
+ adjustRate: number,
92
+ ): void
87
93
  ```
88
94
 
95
+ Decrease distance coefficients within the configured bounds.
96
+
97
+ Decreasing these coefficients softens the structural-distance penalty when
98
+ topology sizes are already spreading, which helps keep the controller from
99
+ over-fragmenting species on the next pass.
100
+
101
+ Parameters:
102
+ - `controller` - - NEAT controller instance for evaluation.
103
+ - `bounds` - - Min and max coefficient bounds.
104
+ - `adjustRate` - - Adjustment rate.
105
+
106
+ ### applyDistanceCoefficientIncrease
107
+
108
+ ```ts
109
+ applyDistanceCoefficientIncrease(
110
+ controller: NeatControllerForEval,
111
+ bounds: { minCoeff: number; maxCoeff: number; },
112
+ adjustRate: number,
113
+ ): void
114
+ ```
115
+
116
+ Increase distance coefficients within the configured bounds.
117
+
118
+ Increasing these coefficients makes later compatibility reads treat excess
119
+ and disjoint structural differences as more important, which helps push back
120
+ when topology sizes are collapsing toward one narrow profile.
121
+
122
+ Parameters:
123
+ - `controller` - - NEAT controller instance for evaluation.
124
+ - `bounds` - - Min and max coefficient bounds.
125
+ - `adjustRate` - - Adjustment rate.
126
+
89
127
  ### computeMean
90
128
 
91
129
  ```ts
@@ -126,36 +164,6 @@ Parameters:
126
164
 
127
165
  Returns: Variance of the values.
128
166
 
129
- ### applyAutoDistanceCoefficientTuning
130
-
131
- ```ts
132
- applyAutoDistanceCoefficientTuning(
133
- controller: NeatControllerForEval,
134
- autoDistanceCoeffOptions: { enabled?: boolean | undefined; adjustRate?: number | undefined; minCoeff?: number | undefined; maxCoeff?: number | undefined; },
135
- connectionVariance: number,
136
- ): void
137
- ```
138
-
139
- Apply the coefficient-tuning policy using the observed connection variance.
140
-
141
- This helper compares the freshly observed variance with the controller's
142
- stored baseline. Lower-than-expected variance means topology sizes are
143
- converging, so excess and disjoint coefficients are increased to make future
144
- structural differences matter more. Higher-than-expected variance means the
145
- population is already spreading structurally, so the coefficients are eased
146
- downward.
147
-
148
- The comparison is deliberately relative instead of target-based. The policy
149
- tracks the population's recent structural spread and responds to drift,
150
- rather than forcing every problem domain toward one global variance number.
151
-
152
- Parameters:
153
- - `controller` - - NEAT controller instance for evaluation.
154
- - `autoDistanceCoeffOptions` - - Tuning options that define adjustment rate
155
- and coefficient bounds.
156
- - `connectionVariance` - - Freshly observed variance of population
157
- connection counts.
158
-
159
167
  ### getDistanceCoefficientBounds
160
168
 
161
169
  ```ts
@@ -199,44 +207,36 @@ Parameters:
199
207
  - `bounds` - - Min and max coefficient bounds.
200
208
  - `adjustRate` - - Adjustment rate.
201
209
 
202
- ### applyDistanceCoefficientIncrease
210
+ ### runAutoDistanceCoefficientTuning
203
211
 
204
212
  ```ts
205
- applyDistanceCoefficientIncrease(
213
+ runAutoDistanceCoefficientTuning(
206
214
  controller: NeatControllerForEval,
207
- bounds: { minCoeff: number; maxCoeff: number; },
208
- adjustRate: number,
215
+ evaluationOptions: { [key: string]: unknown; fitnessPopulation?: boolean | undefined; clear?: boolean | undefined; novelty?: { enabled?: boolean | undefined; descriptor?: ((genome: GenomeForEvaluation) => number[]) | undefined; k?: number | undefined; blendFactor?: number | undefined; archiveAddThreshold?: number | undefined; } | undefined; entropySharingTuning?: { enabled?: boolean | undefined; targetEntropyVar?: number | undefined; adjustRate?: number | undefined; minSigma?: number | undefined; maxSigma?: number | undefined; } | undefined; entropyCompatTuning?: { enabled?: boolean | undefined; targetEntropy?: number | undefined; deadband?: number | undefined; adjustRate?: number | undefined; minThreshold?: number | undefined; maxThreshold?: number | undefined; } | undefined; autoDistanceCoeffTuning?: { enabled?: boolean | undefined; adjustRate?: number | undefined; minCoeff?: number | undefined; maxCoeff?: number | undefined; } | undefined; multiObjective?: { enabled?: boolean | undefined; autoEntropy?: boolean | undefined; dynamic?: { enabled?: boolean | undefined; } | undefined; } | undefined; speciation?: boolean | undefined; targetSpecies?: number | undefined; compatAdjust?: boolean | undefined; speciesAllocation?: { extendedHistory?: boolean | undefined; } | undefined; sharingSigma?: number | undefined; compatibilityThreshold?: number | undefined; excessCoeff?: number | undefined; disjointCoeff?: number | undefined; },
209
216
  ): void
210
217
  ```
211
218
 
212
- Increase distance coefficients within the configured bounds.
219
+ Apply variance-driven tuning to the controller's distance coefficients.
213
220
 
214
- Increasing these coefficients makes later compatibility reads treat excess
215
- and disjoint structural differences as more important, which helps push back
216
- when topology sizes are collapsing toward one narrow profile.
221
+ This is the controller-facing entrypoint for auto-distance tuning. It only
222
+ runs when both speciation and auto coefficient tuning are enabled because the
223
+ resulting coefficients are only meaningful when later compatibility reads are
224
+ still part of the runtime policy.
225
+
226
+ The helper preserves several important controller assumptions:
227
+ - genome scores are already complete and are not recomputed here,
228
+ - live species assignments are left intact,
229
+ - population order is left intact,
230
+ - only the structural-distance coefficients and their variance baseline are
231
+ updated for future passes.
217
232
 
218
233
  Parameters:
219
234
  - `controller` - - NEAT controller instance for evaluation.
220
- - `bounds` - - Min and max coefficient bounds.
221
- - `adjustRate` - - Adjustment rate.
235
+ - `evaluationOptions` - - Options object for the current evaluation pass.
222
236
 
223
- ### applyDistanceCoefficientDecrease
237
+ Example:
224
238
 
225
239
  ```ts
226
- applyDistanceCoefficientDecrease(
227
- controller: NeatControllerForEval,
228
- bounds: { minCoeff: number; maxCoeff: number; },
229
- adjustRate: number,
230
- ): void
240
+ runAutoDistanceCoefficientTuning(controller, controller.options);
241
+ console.log(controller.options.excessCoeff, controller.options.disjointCoeff);
231
242
  ```
232
-
233
- Decrease distance coefficients within the configured bounds.
234
-
235
- Decreasing these coefficients softens the structural-distance penalty when
236
- topology sizes are already spreading, which helps keep the controller from
237
- over-fragmenting species on the next pass.
238
-
239
- Parameters:
240
- - `controller` - - NEAT controller instance for evaluation.
241
- - `bounds` - - Min and max coefficient bounds.
242
- - `adjustRate` - - Adjustment rate.
@@ -47,43 +47,6 @@ flowchart TD
47
47
 
48
48
  ## neat/evaluate/entropy-compat/evaluate.entropy-compat.ts
49
49
 
50
- ### runEntropyCompatibilityTuning
51
-
52
- ```ts
53
- runEntropyCompatibilityTuning(
54
- controller: NeatControllerForEval,
55
- evaluationOptions: { [key: string]: unknown; fitnessPopulation?: boolean | undefined; clear?: boolean | undefined; novelty?: { enabled?: boolean | undefined; descriptor?: ((genome: GenomeForEvaluation) => number[]) | undefined; k?: number | undefined; blendFactor?: number | undefined; archiveAddThreshold?: number | undefined; } | undefined; entropySharingTuning?: { enabled?: boolean | undefined; targetEntropyVar?: number | undefined; adjustRate?: number | undefined; minSigma?: number | undefined; maxSigma?: number | undefined; } | undefined; entropyCompatTuning?: { enabled?: boolean | undefined; targetEntropy?: number | undefined; deadband?: number | undefined; adjustRate?: number | undefined; minThreshold?: number | undefined; maxThreshold?: number | undefined; } | undefined; autoDistanceCoeffTuning?: { enabled?: boolean | undefined; adjustRate?: number | undefined; minCoeff?: number | undefined; maxCoeff?: number | undefined; } | undefined; multiObjective?: { enabled?: boolean | undefined; autoEntropy?: boolean | undefined; dynamic?: { enabled?: boolean | undefined; } | undefined; } | undefined; speciation?: boolean | undefined; targetSpecies?: number | undefined; compatAdjust?: boolean | undefined; speciesAllocation?: { extendedHistory?: boolean | undefined; } | undefined; sharingSigma?: number | undefined; compatibilityThreshold?: number | undefined; excessCoeff?: number | undefined; disjointCoeff?: number | undefined; },
56
- ): void
57
- ```
58
-
59
- Adjust the compatibility threshold when entropy-compatibility tuning is enabled.
60
-
61
- This is the controller-facing entrypoint for the entropy-compatibility
62
- chapter. It behaves like best-effort maintenance after fresh diversity
63
- evidence has been written, not like a required scoring or speciation phase.
64
-
65
- The helper preserves several important controller assumptions:
66
- - genome scores are already complete and are not recomputed here,
67
- - current species assignments are left intact,
68
- - population order is left intact,
69
- - only `compatibilityThreshold` is prepared for later passes.
70
-
71
- That narrow scope lets the evaluation chapter adjust future speciation
72
- pressure without widening into a full species-rebuild workflow.
73
-
74
- Parameters:
75
- - `controller` - - NEAT controller instance for evaluation.
76
- - `evaluationOptions` - - Options object for the current evaluation pass.
77
-
78
- Example:
79
-
80
- ```ts
81
- controller._diversityStats = { meanEntropy: 0.42 };
82
-
83
- runEntropyCompatibilityTuning(controller, controller.options);
84
- console.log(controller.options.compatibilityThreshold);
85
- ```
86
-
87
50
  ### computeNextCompatibilityThreshold
88
51
 
89
52
  ```ts
@@ -126,3 +89,40 @@ const nextThreshold = computeNextCompatibilityThreshold(
126
89
 
127
90
  console.log(nextThreshold);
128
91
  ```
92
+
93
+ ### runEntropyCompatibilityTuning
94
+
95
+ ```ts
96
+ runEntropyCompatibilityTuning(
97
+ controller: NeatControllerForEval,
98
+ evaluationOptions: { [key: string]: unknown; fitnessPopulation?: boolean | undefined; clear?: boolean | undefined; novelty?: { enabled?: boolean | undefined; descriptor?: ((genome: GenomeForEvaluation) => number[]) | undefined; k?: number | undefined; blendFactor?: number | undefined; archiveAddThreshold?: number | undefined; } | undefined; entropySharingTuning?: { enabled?: boolean | undefined; targetEntropyVar?: number | undefined; adjustRate?: number | undefined; minSigma?: number | undefined; maxSigma?: number | undefined; } | undefined; entropyCompatTuning?: { enabled?: boolean | undefined; targetEntropy?: number | undefined; deadband?: number | undefined; adjustRate?: number | undefined; minThreshold?: number | undefined; maxThreshold?: number | undefined; } | undefined; autoDistanceCoeffTuning?: { enabled?: boolean | undefined; adjustRate?: number | undefined; minCoeff?: number | undefined; maxCoeff?: number | undefined; } | undefined; multiObjective?: { enabled?: boolean | undefined; autoEntropy?: boolean | undefined; dynamic?: { enabled?: boolean | undefined; } | undefined; } | undefined; speciation?: boolean | undefined; targetSpecies?: number | undefined; compatAdjust?: boolean | undefined; speciesAllocation?: { extendedHistory?: boolean | undefined; } | undefined; sharingSigma?: number | undefined; compatibilityThreshold?: number | undefined; excessCoeff?: number | undefined; disjointCoeff?: number | undefined; },
99
+ ): void
100
+ ```
101
+
102
+ Adjust the compatibility threshold when entropy-compatibility tuning is enabled.
103
+
104
+ This is the controller-facing entrypoint for the entropy-compatibility
105
+ chapter. It behaves like best-effort maintenance after fresh diversity
106
+ evidence has been written, not like a required scoring or speciation phase.
107
+
108
+ The helper preserves several important controller assumptions:
109
+ - genome scores are already complete and are not recomputed here,
110
+ - current species assignments are left intact,
111
+ - population order is left intact,
112
+ - only `compatibilityThreshold` is prepared for later passes.
113
+
114
+ That narrow scope lets the evaluation chapter adjust future speciation
115
+ pressure without widening into a full species-rebuild workflow.
116
+
117
+ Parameters:
118
+ - `controller` - - NEAT controller instance for evaluation.
119
+ - `evaluationOptions` - - Options object for the current evaluation pass.
120
+
121
+ Example:
122
+
123
+ ```ts
124
+ controller._diversityStats = { meanEntropy: 0.42 };
125
+
126
+ runEntropyCompatibilityTuning(controller, controller.options);
127
+ console.log(controller.options.compatibilityThreshold);
128
+ ```
@@ -46,6 +46,49 @@ flowchart TD
46
46
 
47
47
  ## neat/evaluate/entropy-sharing/evaluate.entropy-sharing.ts
48
48
 
49
+ ### computeNextSharingSigma
50
+
51
+ ```ts
52
+ computeNextSharingSigma(
53
+ entropySharingOptions: { enabled?: boolean | undefined; targetEntropyVar?: number | undefined; adjustRate?: number | undefined; minSigma?: number | undefined; maxSigma?: number | undefined; },
54
+ currentVarEntropy: number,
55
+ currentSigma: number,
56
+ ): number
57
+ ```
58
+
59
+ Compute the next sharing sigma value from the observed entropy variance.
60
+
61
+ The tuning rule is intentionally small and band-driven instead of trying to
62
+ build a full controller inside evaluation. When observed variance drops below
63
+ the low band, sigma is reduced so the next pass applies a tighter sharing
64
+ radius. When variance rises above the high band, sigma is increased so the
65
+ next pass smooths pressure across a wider neighborhood. Values inside the
66
+ band keep the current sigma unchanged.
67
+
68
+ The returned value is always clamped to the configured minimum and maximum,
69
+ which keeps tuning predictable even when entropy measurements swing sharply.
70
+
71
+ Parameters:
72
+ - `entropySharingOptions` - - Tuning options that define the target
73
+ entropy variance, adjustment rate, and clamp bounds.
74
+ - `currentVarEntropy` - - Freshly observed variance of structural entropy
75
+ for the current population.
76
+ - `currentSigma` - - Current sharing sigma before this adjustment.
77
+
78
+ Returns: Next sharing sigma value to carry into later controller passes.
79
+
80
+ Example:
81
+
82
+ ```ts
83
+ const nextSigma = computeNextSharingSigma(
84
+ { enabled: true, targetEntropyVar: 0.2, adjustRate: 0.1, minSigma: 0.5, maxSigma: 3 },
85
+ 0.28,
86
+ 1,
87
+ );
88
+
89
+ console.log(nextSigma);
90
+ ```
91
+
49
92
  ### ensureDiversityStatsContainer
50
93
 
51
94
  ```ts
@@ -102,46 +145,3 @@ controller._diversityStats!.varEntropy = 0.18;
102
145
  runEntropySharingTuning(controller, controller.options);
103
146
  console.log(controller.options.sharingSigma);
104
147
  ```
105
-
106
- ### computeNextSharingSigma
107
-
108
- ```ts
109
- computeNextSharingSigma(
110
- entropySharingOptions: { enabled?: boolean | undefined; targetEntropyVar?: number | undefined; adjustRate?: number | undefined; minSigma?: number | undefined; maxSigma?: number | undefined; },
111
- currentVarEntropy: number,
112
- currentSigma: number,
113
- ): number
114
- ```
115
-
116
- Compute the next sharing sigma value from the observed entropy variance.
117
-
118
- The tuning rule is intentionally small and band-driven instead of trying to
119
- build a full controller inside evaluation. When observed variance drops below
120
- the low band, sigma is reduced so the next pass applies a tighter sharing
121
- radius. When variance rises above the high band, sigma is increased so the
122
- next pass smooths pressure across a wider neighborhood. Values inside the
123
- band keep the current sigma unchanged.
124
-
125
- The returned value is always clamped to the configured minimum and maximum,
126
- which keeps tuning predictable even when entropy measurements swing sharply.
127
-
128
- Parameters:
129
- - `entropySharingOptions` - - Tuning options that define the target
130
- entropy variance, adjustment rate, and clamp bounds.
131
- - `currentVarEntropy` - - Freshly observed variance of structural entropy
132
- for the current population.
133
- - `currentSigma` - - Current sharing sigma before this adjustment.
134
-
135
- Returns: Next sharing sigma value to carry into later controller passes.
136
-
137
- Example:
138
-
139
- ```ts
140
- const nextSigma = computeNextSharingSigma(
141
- { enabled: true, targetEntropyVar: 0.2, adjustRate: 0.1, minSigma: 0.5, maxSigma: 3 },
142
- 0.28,
143
- 1,
144
- );
145
-
146
- console.log(nextSigma);
147
- ```