@reicek/neataptic-ts 0.1.25 → 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 (210) 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/package.json +19 -13
  8. package/plans/Flappy_Bird_Folder_Documentation_Pass.md +4 -4
  9. package/plans/README.md +24 -0
  10. package/plans/Roadmap.md +62 -40
  11. package/plans/analyze-trace-solid-split.plans.md +66 -0
  12. package/plans/architecture-solid-split.plans.md +9 -15
  13. package/plans/asciiMaze-typescript-repair.plans.md +1 -1
  14. package/plans/generate-docs-solid-split.plans.md +87 -0
  15. package/plans/methods-docs.plans.md +25 -1
  16. package/plans/methods-solid-split.plans.md +14 -14
  17. package/plans/neat-docs.plans.md +9 -1
  18. package/plans/neat-test-surface-repair.plans.md +1 -1
  19. package/plans/render-docs-html-solid-split.plans.md +68 -0
  20. package/plans/src-no-explicit-any-cleanup.plans.md +1 -1
  21. package/plans/utils-docs.plans.md +6 -1
  22. package/scripts/analyze-trace/analyze-trace.analysis.ts +479 -0
  23. package/scripts/analyze-trace/analyze-trace.constants.ts +35 -0
  24. package/scripts/analyze-trace/analyze-trace.io.ts +69 -0
  25. package/scripts/analyze-trace/analyze-trace.report.ts +100 -0
  26. package/scripts/analyze-trace/analyze-trace.shared.ts +116 -0
  27. package/scripts/analyze-trace/analyze-trace.ts +45 -0
  28. package/scripts/analyze-trace/analyze-trace.types.ts +72 -0
  29. package/scripts/assets/theme.css +80 -23
  30. package/scripts/copy-examples.ts +239 -0
  31. package/scripts/export-onnx.ts +223 -0
  32. package/scripts/generate-bench-tables.ts +378 -37
  33. package/scripts/generate-docs/generate-docs.constants.ts +107 -0
  34. package/scripts/generate-docs/generate-docs.order.ts +355 -0
  35. package/scripts/generate-docs/generate-docs.state.ts +31 -0
  36. package/scripts/generate-docs/generate-docs.targets.ts +165 -0
  37. package/scripts/generate-docs/generate-docs.ts +63 -0
  38. package/scripts/generate-docs/generate-docs.types.ts +112 -0
  39. package/scripts/generate-docs/output/generate-docs.output.folder-index.utils.ts +167 -0
  40. package/scripts/generate-docs/output/generate-docs.output.ordering.utils.ts +353 -0
  41. package/scripts/generate-docs/output/generate-docs.output.readme.utils.ts +420 -0
  42. package/scripts/generate-docs/output/generate-docs.output.ts +123 -0
  43. package/scripts/generate-docs/output/generate-docs.output.warnings.utils.ts +219 -0
  44. package/scripts/generate-docs/symbols/generate-docs.symbols.collection.utils.ts +365 -0
  45. package/scripts/generate-docs/symbols/generate-docs.symbols.jsdoc.utils.ts +373 -0
  46. package/scripts/generate-docs/symbols/generate-docs.symbols.normalize.utils.ts +155 -0
  47. package/scripts/generate-docs/symbols/generate-docs.symbols.render.utils.ts +149 -0
  48. package/scripts/generate-docs/symbols/generate-docs.symbols.signature.utils.ts +289 -0
  49. package/scripts/generate-docs/symbols/generate-docs.symbols.ts +11 -0
  50. package/scripts/mermaid-cli.mjs +102 -22
  51. package/scripts/mermaid-cli.ts +736 -0
  52. package/scripts/render-docs-html/render-docs-html.assets.ts +54 -0
  53. package/scripts/render-docs-html/render-docs-html.mermaid.ts +245 -0
  54. package/scripts/{render-docs-html.sidebar.ts → render-docs-html/render-docs-html.navigation.ts} +141 -144
  55. package/scripts/render-docs-html/render-docs-html.pages.ts +333 -0
  56. package/scripts/render-docs-html/render-docs-html.shared.ts +333 -0
  57. package/scripts/render-docs-html/render-docs-html.types.ts +42 -0
  58. package/scripts/render-docs-html.ts +23 -587
  59. package/scripts/run-docs.ts +238 -0
  60. package/scripts/write-dist-docs-pkg.ts +40 -0
  61. package/src/README.md +75 -75
  62. package/src/architecture/connection/README.md +5 -5
  63. package/src/architecture/layer/README.md +508 -508
  64. package/src/architecture/network/README.md +1458 -1458
  65. package/src/architecture/network/activate/README.md +694 -694
  66. package/src/architecture/network/bootstrap/README.md +77 -77
  67. package/src/architecture/network/connect/README.md +74 -74
  68. package/src/architecture/network/deterministic/README.md +135 -135
  69. package/src/architecture/network/evolve/README.md +364 -364
  70. package/src/architecture/network/gating/README.md +130 -130
  71. package/src/architecture/network/genetic/README.md +399 -399
  72. package/src/architecture/network/mutate/README.md +897 -897
  73. package/src/architecture/network/onnx/README.md +720 -720
  74. package/src/architecture/network/onnx/export/README.md +728 -728
  75. package/src/architecture/network/onnx/export/layers/README.md +450 -450
  76. package/src/architecture/network/onnx/import/README.md +618 -618
  77. package/src/architecture/network/onnx/schema/README.md +32 -32
  78. package/src/architecture/network/prune/README.md +245 -245
  79. package/src/architecture/network/remove/README.md +135 -135
  80. package/src/architecture/network/runtime/README.md +106 -106
  81. package/src/architecture/network/serialize/README.md +542 -542
  82. package/src/architecture/network/slab/README.md +608 -608
  83. package/src/architecture/network/standalone/README.md +212 -212
  84. package/src/architecture/network/stats/README.md +84 -84
  85. package/src/architecture/network/topology/README.md +465 -465
  86. package/src/architecture/network/training/README.md +200 -200
  87. package/src/architecture/node/README.md +5 -5
  88. package/src/architecture/nodePool/README.md +14 -14
  89. package/src/methods/README.md +99 -99
  90. package/src/methods/activation/README.md +189 -189
  91. package/src/methods/cost/README.md +131 -131
  92. package/src/methods/rate/README.md +86 -86
  93. package/src/multithreading/README.md +77 -77
  94. package/src/multithreading/workers/browser/README.md +8 -8
  95. package/src/multithreading/workers/node/README.md +8 -8
  96. package/src/neat/README.md +148 -148
  97. package/src/neat/adaptive/README.md +120 -120
  98. package/src/neat/adaptive/acceptance/README.md +40 -40
  99. package/src/neat/adaptive/complexity/README.md +137 -137
  100. package/src/neat/adaptive/core/README.md +197 -197
  101. package/src/neat/adaptive/lineage/README.md +90 -90
  102. package/src/neat/adaptive/mutation/README.md +284 -284
  103. package/src/neat/compat/README.md +43 -43
  104. package/src/neat/compat/core/README.md +90 -90
  105. package/src/neat/diversity/README.md +35 -35
  106. package/src/neat/diversity/core/README.md +88 -88
  107. package/src/neat/evaluate/README.md +85 -85
  108. package/src/neat/evaluate/auto-distance/README.md +75 -75
  109. package/src/neat/evaluate/entropy-compat/README.md +37 -37
  110. package/src/neat/evaluate/entropy-sharing/README.md +43 -43
  111. package/src/neat/evaluate/fitness/README.md +23 -23
  112. package/src/neat/evaluate/novelty/README.md +120 -120
  113. package/src/neat/evaluate/objectives/README.md +17 -17
  114. package/src/neat/evaluate/shared/README.md +94 -94
  115. package/src/neat/evolve/README.md +96 -96
  116. package/src/neat/evolve/adaptive/README.md +60 -60
  117. package/src/neat/evolve/objectives/README.md +63 -63
  118. package/src/neat/evolve/offspring/README.md +56 -56
  119. package/src/neat/evolve/population/README.md +171 -171
  120. package/src/neat/evolve/runtime/README.md +79 -79
  121. package/src/neat/evolve/speciation/README.md +74 -74
  122. package/src/neat/evolve/warnings/README.md +10 -10
  123. package/src/neat/export/README.md +114 -114
  124. package/src/neat/helpers/README.md +50 -50
  125. package/src/neat/init/README.md +9 -9
  126. package/src/neat/lineage/core/README.md +101 -101
  127. package/src/neat/multiobjective/category/README.md +74 -74
  128. package/src/neat/multiobjective/crowding/README.md +272 -272
  129. package/src/neat/multiobjective/dominance/README.md +171 -171
  130. package/src/neat/multiobjective/fronts/README.md +68 -68
  131. package/src/neat/multiobjective/metrics/README.md +43 -43
  132. package/src/neat/multiobjective/objectives/README.md +31 -31
  133. package/src/neat/multiobjective/shared/README.md +27 -27
  134. package/src/neat/mutation/README.md +97 -97
  135. package/src/neat/mutation/add-conn/README.md +115 -115
  136. package/src/neat/mutation/add-node/README.md +126 -126
  137. package/src/neat/mutation/flow/README.md +149 -149
  138. package/src/neat/mutation/repair/README.md +185 -185
  139. package/src/neat/mutation/select/README.md +117 -117
  140. package/src/neat/mutation/shared/README.md +32 -32
  141. package/src/neat/objectives/README.md +25 -25
  142. package/src/neat/objectives/core/README.md +67 -67
  143. package/src/neat/pruning/README.md +40 -40
  144. package/src/neat/pruning/core/README.md +171 -171
  145. package/src/neat/pruning/facade/README.md +32 -32
  146. package/src/neat/rng/README.md +104 -104
  147. package/src/neat/rng/core/README.md +137 -137
  148. package/src/neat/rng/facade/README.md +50 -50
  149. package/src/neat/selection/README.md +111 -111
  150. package/src/neat/selection/core/README.md +227 -227
  151. package/src/neat/selection/facade/README.md +61 -61
  152. package/src/neat/shared/README.md +163 -163
  153. package/src/neat/speciation/README.md +31 -31
  154. package/src/neat/speciation/threshold/README.md +35 -35
  155. package/src/neat/species/README.md +25 -25
  156. package/src/neat/species/core/README.md +20 -20
  157. package/src/neat/species/core/shared/README.md +18 -18
  158. package/src/neat/species/history/context/README.md +22 -22
  159. package/src/neat/telemetry/accessors/README.md +58 -58
  160. package/src/neat/telemetry/exports/README.md +233 -233
  161. package/src/neat/telemetry/facade/README.md +252 -252
  162. package/src/neat/telemetry/facade/archive/README.md +57 -57
  163. package/src/neat/telemetry/facade/buffer/README.md +43 -43
  164. package/src/neat/telemetry/facade/lineage/README.md +12 -12
  165. package/src/neat/telemetry/facade/objectives/README.md +44 -44
  166. package/src/neat/telemetry/facade/runtime/README.md +26 -26
  167. package/src/neat/telemetry/facade/species/README.md +27 -27
  168. package/src/neat/telemetry/metrics/README.md +696 -696
  169. package/src/neat/telemetry/recorder/README.md +57 -57
  170. package/src/neat/telemetry/types/README.md +32 -32
  171. package/src/neat/topology-intent/README.md +75 -75
  172. package/src/utils/README.md +193 -193
  173. package/test/examples/asciiMaze/browser-entry/README.md +92 -92
  174. package/test/examples/asciiMaze/dashboardManager/README.md +109 -109
  175. package/test/examples/asciiMaze/dashboardManager/telemetry/README.md +28 -28
  176. package/test/examples/asciiMaze/evolutionEngine/README.md +1527 -1527
  177. package/test/examples/asciiMaze/mazeMovement/README.md +105 -105
  178. package/test/examples/asciiMaze/mazeMovement/finalization/README.md +16 -16
  179. package/test/examples/asciiMaze/mazeMovement/policy/README.md +57 -57
  180. package/test/examples/asciiMaze/mazeMovement/runtime/README.md +52 -52
  181. package/test/examples/asciiMaze/mazeMovement/shaping/README.md +46 -46
  182. package/test/examples/flappy_bird/browser-entry/README.md +508 -508
  183. package/test/examples/flappy_bird/browser-entry/host/README.md +101 -101
  184. package/test/examples/flappy_bird/browser-entry/host/resize/README.md +144 -144
  185. package/test/examples/flappy_bird/browser-entry/network-view/README.md +194 -194
  186. package/test/examples/flappy_bird/browser-entry/playback/README.md +278 -278
  187. package/test/examples/flappy_bird/browser-entry/playback/background/README.md +129 -129
  188. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/README.md +502 -502
  189. package/test/examples/flappy_bird/browser-entry/playback/frame-render/README.md +139 -139
  190. package/test/examples/flappy_bird/browser-entry/playback/snapshot/README.md +10 -10
  191. package/test/examples/flappy_bird/browser-entry/playback/trail/README.md +43 -43
  192. package/test/examples/flappy_bird/browser-entry/playback/worker-channel/README.md +30 -30
  193. package/test/examples/flappy_bird/browser-entry/runtime/README.md +59 -59
  194. package/test/examples/flappy_bird/browser-entry/visualization/README.md +276 -276
  195. package/test/examples/flappy_bird/browser-entry/worker-channel/README.md +16 -16
  196. package/test/examples/flappy_bird/constants/README.md +1070 -1070
  197. package/test/examples/flappy_bird/environment/README.md +22 -22
  198. package/test/examples/flappy_bird/evaluation/README.md +32 -32
  199. package/test/examples/flappy_bird/evaluation/rollout/README.md +141 -141
  200. package/test/examples/flappy_bird/flappy-evolution-worker/README.md +425 -425
  201. package/test/examples/flappy_bird/simulation-shared/README.md +170 -170
  202. package/test/examples/flappy_bird/simulation-shared/observation/README.md +109 -109
  203. package/test/examples/flappy_bird/trainer/README.md +325 -325
  204. package/test/examples/flappy_bird/trainer/evaluation/README.md +74 -74
  205. package/scripts/analyze-trace.ts +0 -590
  206. package/scripts/copy-examples.mjs +0 -114
  207. package/scripts/export-onnx.mjs +0 -86
  208. package/scripts/generate-bench-tables.mjs +0 -182
  209. package/scripts/generate-docs.ts +0 -2900
  210. package/scripts/write-dist-docs-pkg.mjs +0 -16
@@ -42,28 +42,6 @@ A useful reading order is:
42
42
 
43
43
  ## neat/telemetry/recorder/telemetry.recorder.ts
44
44
 
45
- ### createTelemetryEntryBase
46
-
47
- ```ts
48
- createTelemetryEntryBase(
49
- generationIndex: number,
50
- bestScore: number,
51
- speciesCount: number,
52
- ): TelemetryEntry
53
- ```
54
-
55
- Create a strict baseline telemetry entry with required fields populated.
56
-
57
- This helper centralizes defaults so downstream telemetry producers can
58
- extend the entry while keeping the strict `TelemetryEntry` contract.
59
-
60
- Parameters:
61
- - `generationIndex` - Generation index for the telemetry snapshot.
62
- - `bestScore` - Best fitness value observed in the generation.
63
- - `speciesCount` - Number of extant species.
64
-
65
- Returns: A strict telemetry entry with required fields populated.
66
-
67
45
  ### applyTelemetrySelect
68
46
 
69
47
  ```ts
@@ -92,33 +70,42 @@ neat._telemetrySelect = new Set(['diversity']);
92
70
  applyTelemetrySelect.call(neat, entry);
93
71
  ```
94
72
 
95
- ### structuralEntropy
73
+ ### buildTelemetryEntry
96
74
 
97
75
  ```ts
98
- structuralEntropy(
99
- graph: { [key: string]: unknown; nodes: { geneId: number; }[]; connections: { from: { geneId: number; }; to: { geneId: number; }; enabled: boolean; }[]; },
100
- ): number
76
+ buildTelemetryEntry(
77
+ fittest: Record<string, unknown>,
78
+ ): TelemetryEntry
101
79
  ```
102
80
 
103
- Lightweight proxy for structural entropy based on degree-distribution.
81
+ Build a comprehensive telemetry entry for the current generation.
104
82
 
105
- This function computes an approximate entropy of a graph topology by
106
- counting node degrees and computing the entropy of the degree histogram.
107
- The result is cached on the graph object for the current generation in
108
- `_entropyVal` to avoid repeated expensive recomputation.
83
+ This is the recorder's main orchestration surface. It gathers one coherent
84
+ explanation of the current generation by combining immediate state
85
+ (`generation`, `best`, `species`) with whichever optional evidence blocks the
86
+ controller has enabled: diversity, lineage, objective activity, Pareto-front
87
+ summaries, complexity growth, RNG state, and performance timing.
88
+
89
+ This function intentionally mirrors the legacy in-loop telemetry construction
90
+ to preserve behavior relied upon by tests and consumers.
109
91
 
110
92
  Parameters:
111
- - `graph` - - A genome-like object with `nodes` and `connections` arrays.
93
+ - `fittest` - - The currently fittest genome (used to report `best` score).
112
94
 
113
- Returns: A non-negative number approximating structural entropy.
95
+ Returns: A TelemetryEntry object suitable for recording/streaming.
114
96
 
115
97
  Example:
116
98
 
117
99
  ```ts
118
- const H = structuralEntropy.call(neat, genome);
119
- console.log(`Structure entropy: ${H.toFixed(3)}`);
100
+ // build a telemetry snapshot for the current generation
101
+ const snapshot = neat.buildTelemetryEntry(neat.population[0]);
102
+ neat.recordTelemetryEntry(snapshot);
120
103
  ```
121
104
 
105
+ The function has two internal paths:
106
+ - multi-objective mode adds Pareto-front and hypervolume-oriented signals
107
+ - mono-objective mode keeps the payload smaller while preserving the same core fields
108
+
122
109
  ### computeDiversityStats
123
110
 
124
111
  ```ts
@@ -145,6 +132,28 @@ neat.computeDiversityStats();
145
132
  console.log(neat._diversityStats.meanCompat);
146
133
  ```
147
134
 
135
+ ### createTelemetryEntryBase
136
+
137
+ ```ts
138
+ createTelemetryEntryBase(
139
+ generationIndex: number,
140
+ bestScore: number,
141
+ speciesCount: number,
142
+ ): TelemetryEntry
143
+ ```
144
+
145
+ Create a strict baseline telemetry entry with required fields populated.
146
+
147
+ This helper centralizes defaults so downstream telemetry producers can
148
+ extend the entry while keeping the strict `TelemetryEntry` contract.
149
+
150
+ Parameters:
151
+ - `generationIndex` - Generation index for the telemetry snapshot.
152
+ - `bestScore` - Best fitness value observed in the generation.
153
+ - `speciesCount` - Number of extant species.
154
+
155
+ Returns: A strict telemetry entry with required fields populated.
156
+
148
157
  ### recordTelemetryEntry
149
158
 
150
159
  ```ts
@@ -178,42 +187,33 @@ Example:
178
187
  neat.recordTelemetryEntry({ gen: neat.generation, best: neat.population[0].score });
179
188
  ```
180
189
 
181
- ### buildTelemetryEntry
190
+ ### structuralEntropy
182
191
 
183
192
  ```ts
184
- buildTelemetryEntry(
185
- fittest: Record<string, unknown>,
186
- ): TelemetryEntry
193
+ structuralEntropy(
194
+ graph: { [key: string]: unknown; nodes: { geneId: number; }[]; connections: { from: { geneId: number; }; to: { geneId: number; }; enabled: boolean; }[]; },
195
+ ): number
187
196
  ```
188
197
 
189
- Build a comprehensive telemetry entry for the current generation.
190
-
191
- This is the recorder's main orchestration surface. It gathers one coherent
192
- explanation of the current generation by combining immediate state
193
- (`generation`, `best`, `species`) with whichever optional evidence blocks the
194
- controller has enabled: diversity, lineage, objective activity, Pareto-front
195
- summaries, complexity growth, RNG state, and performance timing.
198
+ Lightweight proxy for structural entropy based on degree-distribution.
196
199
 
197
- This function intentionally mirrors the legacy in-loop telemetry construction
198
- to preserve behavior relied upon by tests and consumers.
200
+ This function computes an approximate entropy of a graph topology by
201
+ counting node degrees and computing the entropy of the degree histogram.
202
+ The result is cached on the graph object for the current generation in
203
+ `_entropyVal` to avoid repeated expensive recomputation.
199
204
 
200
205
  Parameters:
201
- - `fittest` - - The currently fittest genome (used to report `best` score).
206
+ - `graph` - - A genome-like object with `nodes` and `connections` arrays.
202
207
 
203
- Returns: A TelemetryEntry object suitable for recording/streaming.
208
+ Returns: A non-negative number approximating structural entropy.
204
209
 
205
210
  Example:
206
211
 
207
212
  ```ts
208
- // build a telemetry snapshot for the current generation
209
- const snapshot = neat.buildTelemetryEntry(neat.population[0]);
210
- neat.recordTelemetryEntry(snapshot);
213
+ const H = structuralEntropy.call(neat, genome);
214
+ console.log(`Structure entropy: ${H.toFixed(3)}`);
211
215
  ```
212
216
 
213
- The function has two internal paths:
214
- - multi-objective mode adds Pareto-front and hypervolume-oriented signals
215
- - mono-objective mode keeps the payload smaller while preserving the same core fields
216
-
217
217
  ### TelemetryContext
218
218
 
219
219
  Context view used within telemetry helpers to access optional internal
@@ -18,14 +18,29 @@ are narrow enough to stay telemetry-local.
18
18
 
19
19
  ## neat/telemetry/types/telemetry.types.ts
20
20
 
21
- ### TelemetryGenome
21
+ ### OperatorStatsMap
22
22
 
23
- Minimal genome shape used by telemetry helpers.
23
+ Operator stats map shape for telemetry extraction.
24
24
 
25
- Telemetry code rarely needs the entire `Network` surface. Most helpers only
26
- care about structural size and a few optional lineage hints, so this type
27
- captures the smallest genome contract needed for diversity, complexity, and
28
- lineage-oriented telemetry work.
25
+ Adaptive mutation telemetry records success and attempt counts per operator.
26
+ This map type names that contract so extraction helpers can stay specific
27
+ about what they read without depending on a broader controller class.
28
+
29
+ ### TelemetryBufferContext
30
+
31
+ Minimal telemetry buffer context shape.
32
+
33
+ Runtime helpers only need a host that can expose or receive the in-memory
34
+ telemetry buffer. This tiny shape keeps those helpers reusable and easy to
35
+ test.
36
+
37
+ ### TelemetryCoreFields
38
+
39
+ Core telemetry field keys used by selection helpers.
40
+
41
+ Some telemetry fields remain mandatory even when callers request a narrower
42
+ export or inspection surface. This alias documents that those core keys are
43
+ treated as a fixed protected set rather than arbitrary strings.
29
44
 
30
45
  ### TelemetryDiversityOptions
31
46
 
@@ -36,14 +51,6 @@ to the fields that matter for diversity-oriented telemetry decisions: whether
36
51
  diversity metrics are enabled, how aggressively to sample in fast mode, and
37
52
  which novelty-search defaults should influence telemetry output.
38
53
 
39
- ### TelemetryStreamOptions
40
-
41
- Minimal telemetry stream options for streaming helpers.
42
-
43
- The runtime layer only needs to know whether streaming is enabled and which
44
- callback should receive each entry. This keeps the callback contract explicit
45
- without forcing runtime helpers to depend on the entire controller option bag.
46
-
47
54
  ### TelemetryEntryRecord
48
55
 
49
56
  Telemetry entry shape used for constructing snapshots.
@@ -52,21 +59,14 @@ Builders often need the strongly typed `TelemetryEntry` model plus temporary
52
59
  access to additional dynamic fields while a snapshot is being assembled or
53
60
  filtered. This alias keeps that construction-phase flexibility localized.
54
61
 
55
- ### OperatorStatsMap
56
-
57
- Operator stats map shape for telemetry extraction.
58
-
59
- Adaptive mutation telemetry records success and attempt counts per operator.
60
- This map type names that contract so extraction helpers can stay specific
61
- about what they read without depending on a broader controller class.
62
-
63
- ### TelemetryBufferContext
62
+ ### TelemetryGenome
64
63
 
65
- Minimal telemetry buffer context shape.
64
+ Minimal genome shape used by telemetry helpers.
66
65
 
67
- Runtime helpers only need a host that can expose or receive the in-memory
68
- telemetry buffer. This tiny shape keeps those helpers reusable and easy to
69
- test.
66
+ Telemetry code rarely needs the entire `Network` surface. Most helpers only
67
+ care about structural size and a few optional lineage hints, so this type
68
+ captures the smallest genome contract needed for diversity, complexity, and
69
+ lineage-oriented telemetry work.
70
70
 
71
71
  ### TelemetrySelectContext
72
72
 
@@ -76,10 +76,10 @@ Selection helpers narrow telemetry entries to a configured subset of fields.
76
76
  This context type names the single host capability they need: an optional set
77
77
  of selected telemetry keys.
78
78
 
79
- ### TelemetryCoreFields
79
+ ### TelemetryStreamOptions
80
80
 
81
- Core telemetry field keys used by selection helpers.
81
+ Minimal telemetry stream options for streaming helpers.
82
82
 
83
- Some telemetry fields remain mandatory even when callers request a narrower
84
- export or inspection surface. This alias documents that those core keys are
85
- treated as a fixed protected set rather than arbitrary strings.
83
+ The runtime layer only needs to know whether streaming is enabled and which
84
+ callback should receive each entry. This keeps the callback contract explicit
85
+ without forcing runtime helpers to depend on the entire controller option bag.
@@ -66,46 +66,61 @@ promoteGenomeToFeedForwardIntentWhenEligible(genome, shouldPromote);
66
66
 
67
67
  ## neat/topology-intent/neat.topology-intent.ts
68
68
 
69
- ### usesFeedForwardMutationPolicy
69
+ ### isGenomeEligibleForFeedForwardIntentPromotion
70
70
 
71
71
  ```ts
72
- usesFeedForwardMutationPolicy(
73
- mutationConfig: unknown,
72
+ isGenomeEligibleForFeedForwardIntentPromotion(
73
+ genome: TopologyIntentGenome,
74
74
  ): boolean
75
75
  ```
76
76
 
77
- Determine whether the configured mutation policy communicates feed-forward intent.
77
+ Check whether a genome can safely adopt feed-forward topology intent.
78
78
 
79
- Accepts the canonical mutation pool reference, the legacy single-item array
80
- wrapper, or a flattened pool that exactly matches the canonical feed-forward
81
- operator order. The comparison stays strict on purpose so the controller does
82
- not silently reinterpret custom mutation pools as feed-forward mode.
79
+ Eligibility is intentionally conservative: the graph must already be free of
80
+ gates and self-connections, and every normal connection must follow the
81
+ current node ordering. This keeps the helper focused on preserving an
82
+ already-feed-forward structure instead of rewriting arbitrary graphs into a
83
+ different interpretation.
83
84
 
84
- In practice this helper answers the policy question only. It does not inspect
85
- a concrete genome, and it does not attempt runtime promotion by itself.
86
- That separation is important because a caller may request feed-forward
87
- mutation semantics while still holding seed genomes whose current graphs are
88
- recurrent, gated, or otherwise not yet eligible for the stricter runtime
89
- contract.
85
+ The helper therefore answers a structural-preservation question, not a graph
86
+ repair question. A `false` result does not mean the genome is invalid. It
87
+ means only that this bridge should not relabel it as feed-forward yet.
90
88
 
91
- Treat this as the chapter's public signal decoder. It translates several
92
- legacy and canonical configuration shapes into one yes-or-no answer that the
93
- rest of the controller can reuse consistently.
89
+ This distinction is the chapter's core invariant. The helper is intentionally
90
+ willing to say "not yet" to valid genomes, because false positives would be
91
+ worse than conservative misses at this boundary.
94
92
 
95
93
  Parameters:
96
- - `mutationConfig` - Configured mutation option.
94
+ - `genome` - Genome candidate.
97
95
 
98
- Returns: True when the option expresses canonical feed-forward intent.
96
+ Returns: True when the genome can safely adopt feed-forward intent.
99
97
 
100
- Example:
98
+ ### matchesCanonicalFeedForwardPool
101
99
 
102
100
  ```ts
103
- const shouldPromote = usesFeedForwardMutationPolicy(neat.options.mutation);
104
- if (!shouldPromote) {
105
- console.log('keep unconstrained topology intent');
106
- }
101
+ matchesCanonicalFeedForwardPool(
102
+ configuredPool: TopologyIntentMutationMethod[],
103
+ canonicalPool: TopologyIntentMutationMethod[],
104
+ ): boolean
107
105
  ```
108
106
 
107
+ Check whether a configured mutation pool matches the canonical FFW pool.
108
+
109
+ This helper exists so callers can recognize the feed-forward mutation policy
110
+ even after options have been flattened, copied, or wrapped by legacy code.
111
+ The comparison deliberately stays order-sensitive because the canonical pool
112
+ is treated as one explicit public signal rather than as a fuzzy set of
113
+ approximately similar operators.
114
+ That strictness is a feature: it keeps the topology-intent story predictable
115
+ for readers and users instead of letting near-matches silently acquire a
116
+ stronger runtime meaning than they asked for.
117
+
118
+ Parameters:
119
+ - `configuredPool` - Mutation pool configured on the NEAT instance.
120
+ - `canonicalPool` - Canonical feed-forward mutation pool.
121
+
122
+ Returns: True when both pools align by operator name and order.
123
+
109
124
  ### promoteGenomeToFeedForwardIntentWhenEligible
110
125
 
111
126
  ```ts
@@ -145,17 +160,6 @@ const shouldPromote = usesFeedForwardMutationPolicy(neat.options.mutation);
145
160
  promoteGenomeToFeedForwardIntentWhenEligible(candidateGenome, shouldPromote);
146
161
  ```
147
162
 
148
- ### TopologyIntentMutationMethod
149
-
150
- Minimal mutation descriptor used by topology-intent helpers.
151
-
152
- The bridge only needs one stable piece of information from a mutation entry:
153
- its public name. That keeps the topology-intent checks aligned with the
154
- canonical feed-forward pool without importing the full mutation subsystem.
155
- Keeping the contract this small also makes the chapter's main teaching point
156
- easier to see: topology intent recognition is a public-policy comparison, not
157
- a second mutation-engine implementation.
158
-
159
163
  ### TopologyIntentGenome
160
164
 
161
165
  Minimal genome surface required to promote feed-forward intent safely.
@@ -169,57 +173,53 @@ In other words, this contract captures just enough structure to answer the
169
173
  chapter's one real question: "would a feed-forward runtime label preserve the
170
174
  current graph's meaning, or would it over-promise?"
171
175
 
172
- ### matchesCanonicalFeedForwardPool
173
-
174
- ```ts
175
- matchesCanonicalFeedForwardPool(
176
- configuredPool: TopologyIntentMutationMethod[],
177
- canonicalPool: TopologyIntentMutationMethod[],
178
- ): boolean
179
- ```
180
-
181
- Check whether a configured mutation pool matches the canonical FFW pool.
182
-
183
- This helper exists so callers can recognize the feed-forward mutation policy
184
- even after options have been flattened, copied, or wrapped by legacy code.
185
- The comparison deliberately stays order-sensitive because the canonical pool
186
- is treated as one explicit public signal rather than as a fuzzy set of
187
- approximately similar operators.
188
- That strictness is a feature: it keeps the topology-intent story predictable
189
- for readers and users instead of letting near-matches silently acquire a
190
- stronger runtime meaning than they asked for.
176
+ ### TopologyIntentMutationMethod
191
177
 
192
- Parameters:
193
- - `configuredPool` - Mutation pool configured on the NEAT instance.
194
- - `canonicalPool` - Canonical feed-forward mutation pool.
178
+ Minimal mutation descriptor used by topology-intent helpers.
195
179
 
196
- Returns: True when both pools align by operator name and order.
180
+ The bridge only needs one stable piece of information from a mutation entry:
181
+ its public name. That keeps the topology-intent checks aligned with the
182
+ canonical feed-forward pool without importing the full mutation subsystem.
183
+ Keeping the contract this small also makes the chapter's main teaching point
184
+ easier to see: topology intent recognition is a public-policy comparison, not
185
+ a second mutation-engine implementation.
197
186
 
198
- ### isGenomeEligibleForFeedForwardIntentPromotion
187
+ ### usesFeedForwardMutationPolicy
199
188
 
200
189
  ```ts
201
- isGenomeEligibleForFeedForwardIntentPromotion(
202
- genome: TopologyIntentGenome,
190
+ usesFeedForwardMutationPolicy(
191
+ mutationConfig: unknown,
203
192
  ): boolean
204
193
  ```
205
194
 
206
- Check whether a genome can safely adopt feed-forward topology intent.
195
+ Determine whether the configured mutation policy communicates feed-forward intent.
207
196
 
208
- Eligibility is intentionally conservative: the graph must already be free of
209
- gates and self-connections, and every normal connection must follow the
210
- current node ordering. This keeps the helper focused on preserving an
211
- already-feed-forward structure instead of rewriting arbitrary graphs into a
212
- different interpretation.
197
+ Accepts the canonical mutation pool reference, the legacy single-item array
198
+ wrapper, or a flattened pool that exactly matches the canonical feed-forward
199
+ operator order. The comparison stays strict on purpose so the controller does
200
+ not silently reinterpret custom mutation pools as feed-forward mode.
213
201
 
214
- The helper therefore answers a structural-preservation question, not a graph
215
- repair question. A `false` result does not mean the genome is invalid. It
216
- means only that this bridge should not relabel it as feed-forward yet.
202
+ In practice this helper answers the policy question only. It does not inspect
203
+ a concrete genome, and it does not attempt runtime promotion by itself.
204
+ That separation is important because a caller may request feed-forward
205
+ mutation semantics while still holding seed genomes whose current graphs are
206
+ recurrent, gated, or otherwise not yet eligible for the stricter runtime
207
+ contract.
217
208
 
218
- This distinction is the chapter's core invariant. The helper is intentionally
219
- willing to say "not yet" to valid genomes, because false positives would be
220
- worse than conservative misses at this boundary.
209
+ Treat this as the chapter's public signal decoder. It translates several
210
+ legacy and canonical configuration shapes into one yes-or-no answer that the
211
+ rest of the controller can reuse consistently.
221
212
 
222
213
  Parameters:
223
- - `genome` - Genome candidate.
214
+ - `mutationConfig` - Configured mutation option.
224
215
 
225
- Returns: True when the genome can safely adopt feed-forward intent.
216
+ Returns: True when the option expresses canonical feed-forward intent.
217
+
218
+ Example:
219
+
220
+ ```ts
221
+ const shouldPromote = usesFeedForwardMutationPolicy(neat.options.mutation);
222
+ if (!shouldPromote) {
223
+ console.log('keep unconstrained topology intent');
224
+ }
225
+ ```