@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
@@ -4,26 +4,26 @@ Canonical threshold used for random binary parent/gene choice.
4
4
 
5
5
  ## architecture/network/genetic/network.genetic.utils.types.ts
6
6
 
7
- ### RANDOM_BINARY_SELECTION_THRESHOLD
8
-
9
- Canonical threshold used for random binary parent/gene choice.
10
-
11
7
  ### DEFAULT_REENABLE_PROBABILITY
12
8
 
13
9
  Default probability for re-enabling disabled genes during crossover.
14
10
 
15
- ### NO_GATER_INDEX
16
-
17
- Sentinel index representing that no gater node is assigned.
18
-
19
11
  ### FIRST_INDEX
20
12
 
21
13
  First element index used when reading newly created connections.
22
14
 
15
+ ### NO_GATER_INDEX
16
+
17
+ Sentinel index representing that no gater node is assigned.
18
+
23
19
  ### PARENT_COMPATIBILITY_ERROR_MESSAGE
24
20
 
25
21
  Shared compatibility error message for crossover parent validation.
26
22
 
23
+ ### RANDOM_BINARY_SELECTION_THRESHOLD
24
+
25
+ Canonical threshold used for random binary parent/gene choice.
26
+
27
27
  ### RandomGenerator
28
28
 
29
29
  ```ts
@@ -116,39 +116,35 @@ offspring.mutate();
116
116
 
117
117
  ## architecture/network/genetic/network.genetic.setup.utils.ts
118
118
 
119
- ### createCrossoverContext
119
+ ### asGeneticNetwork
120
120
 
121
121
  ```ts
122
- createCrossoverContext(
123
- parentNetwork1: default,
124
- parentNetwork2: default,
125
- equal: boolean,
126
- ): CrossoverContext
122
+ asGeneticNetwork(
123
+ network: default,
124
+ ): GeneticNetwork
127
125
  ```
128
126
 
129
- Creates the immutable crossover baseline context.
127
+ Coerces a network to the internal genetic runtime shape.
130
128
 
131
129
  Parameters:
132
- - `parentNetwork1` - - First parent network.
133
- - `parentNetwork2` - - Second parent network.
134
- - `equal` - - Equal-treatment mode flag.
130
+ - `network` - - Source network.
135
131
 
136
- Returns: Initialized crossover context.
132
+ Returns: Network with runtime genetic properties.
137
133
 
138
- ### createNodeBuildContext
134
+ ### assignNodeIndexes
139
135
 
140
136
  ```ts
141
- createNodeBuildContext(
142
- context: CrossoverContext,
143
- ): CrossoverNodeBuildContext
137
+ assignNodeIndexes(
138
+ nodes: default[],
139
+ ): void
144
140
  ```
145
141
 
146
- Creates the node-build context for offspring node selection.
142
+ Assigns contiguous indices to a node list.
147
143
 
148
144
  Parameters:
149
- - `context` - - Crossover baseline context.
145
+ - `nodes` - - Nodes to reindex.
150
146
 
151
- Returns: Node-build context.
147
+ Returns: Nothing.
152
148
 
153
149
  ### assignOffspringNodes
154
150
 
@@ -165,6 +161,31 @@ Parameters:
165
161
 
166
162
  Returns: Nothing.
167
163
 
164
+ ### buildOffspringNodes
165
+
166
+ ```ts
167
+ buildOffspringNodes(
168
+ parent1: GeneticNetwork,
169
+ parent2: GeneticNetwork,
170
+ parentMetrics: ParentMetrics,
171
+ offspringNodeCount: number,
172
+ equal: boolean,
173
+ randomGenerator: RandomGenerator,
174
+ ): default[]
175
+ ```
176
+
177
+ Builds the offspring node list by selecting genes per slot.
178
+
179
+ Parameters:
180
+ - `parent1` - - First parent.
181
+ - `parent2` - - Second parent.
182
+ - `parentMetrics` - - Parent metrics.
183
+ - `offspringNodeCount` - - Target offspring size.
184
+ - `equal` - - Equal-treatment mode.
185
+ - `randomGenerator` - - Random generator.
186
+
187
+ Returns: Cloned offspring node genes.
188
+
168
189
  ### chooseOffspringConnectionGenes
169
190
 
170
191
  ```ts
@@ -180,37 +201,54 @@ Parameters:
180
201
 
181
202
  Returns: Chosen connection genes.
182
203
 
183
- ### validateParentCompatibility
204
+ ### cloneNodeGene
184
205
 
185
206
  ```ts
186
- validateParentCompatibility(
207
+ cloneNodeGene(
208
+ sourceNode: default,
209
+ ): default
210
+ ```
211
+
212
+ Clones node structural gene attributes.
213
+
214
+ Parameters:
215
+ - `sourceNode` - - Source node gene.
216
+
217
+ Returns: Cloned node.
218
+
219
+ ### createCrossoverContext
220
+
221
+ ```ts
222
+ createCrossoverContext(
187
223
  parentNetwork1: default,
188
224
  parentNetwork2: default,
189
- ): void
225
+ equal: boolean,
226
+ ): CrossoverContext
190
227
  ```
191
228
 
192
- Validates parent compatibility for crossover.
229
+ Creates the immutable crossover baseline context.
193
230
 
194
231
  Parameters:
195
- - `parentNetwork1` - - First parent candidate.
196
- - `parentNetwork2` - - Second parent candidate.
232
+ - `parentNetwork1` - - First parent network.
233
+ - `parentNetwork2` - - Second parent network.
234
+ - `equal` - - Equal-treatment mode flag.
197
235
 
198
- Returns: Nothing.
236
+ Returns: Initialized crossover context.
199
237
 
200
- ### asGeneticNetwork
238
+ ### createNodeBuildContext
201
239
 
202
240
  ```ts
203
- asGeneticNetwork(
204
- network: default,
205
- ): GeneticNetwork
241
+ createNodeBuildContext(
242
+ context: CrossoverContext,
243
+ ): CrossoverNodeBuildContext
206
244
  ```
207
245
 
208
- Coerces a network to the internal genetic runtime shape.
246
+ Creates the node-build context for offspring node selection.
209
247
 
210
248
  Parameters:
211
- - `network` - - Source network.
249
+ - `context` - - Crossover baseline context.
212
250
 
213
- Returns: Network with runtime genetic properties.
251
+ Returns: Node-build context.
214
252
 
215
253
  ### createOffspringScaffold
216
254
 
@@ -229,40 +267,6 @@ Parameters:
229
267
 
230
268
  Returns: Initialized offspring runtime object.
231
269
 
232
- ### resolveParentMetrics
233
-
234
- ```ts
235
- resolveParentMetrics(
236
- parent1: GeneticNetwork,
237
- parent2: GeneticNetwork,
238
- outputSize: number,
239
- ): ParentMetrics
240
- ```
241
-
242
- Computes common parent metrics reused across helper functions.
243
-
244
- Parameters:
245
- - `parent1` - - First parent network.
246
- - `parent2` - - Second parent network.
247
- - `outputSize` - - Shared output size.
248
-
249
- Returns: Parent metrics.
250
-
251
- ### getRandomGenerator
252
-
253
- ```ts
254
- getRandomGenerator(
255
- parentNetwork: default,
256
- ): RandomGenerator
257
- ```
258
-
259
- Resolves the random generator used by crossover decisions.
260
-
261
- Parameters:
262
- - `parentNetwork` - - Parent network that may provide a deterministic `_rand` source.
263
-
264
- Returns: Random function.
265
-
266
270
  ### determineOffspringNodeCount
267
271
 
268
272
  ```ts
@@ -282,52 +286,62 @@ Parameters:
282
286
 
283
287
  Returns: Offspring node count.
284
288
 
285
- ### assignNodeIndexes
289
+ ### getAlignedOutputNode
286
290
 
287
291
  ```ts
288
- assignNodeIndexes(
289
- nodes: default[],
290
- ): void
292
+ getAlignedOutputNode(
293
+ parent: GeneticNetwork,
294
+ alignedIndex: number,
295
+ ): default | undefined
291
296
  ```
292
297
 
293
- Assigns contiguous indices to a node list.
298
+ Reads an aligned output candidate node if index is in the valid non-input range.
294
299
 
295
300
  Parameters:
296
- - `nodes` - - Nodes to reindex.
301
+ - `parent` - - Parent network.
302
+ - `alignedIndex` - - Tail-aligned index.
297
303
 
298
- Returns: Nothing.
304
+ Returns: Output candidate node.
299
305
 
300
- ### buildOffspringNodes
306
+ ### getRandomGenerator
301
307
 
302
308
  ```ts
303
- buildOffspringNodes(
309
+ getRandomGenerator(
310
+ parentNetwork: default,
311
+ ): RandomGenerator
312
+ ```
313
+
314
+ Resolves the random generator used by crossover decisions.
315
+
316
+ Parameters:
317
+ - `parentNetwork` - - Parent network that may provide a deterministic `_rand` source.
318
+
319
+ Returns: Random function.
320
+
321
+ ### resolveParentMetrics
322
+
323
+ ```ts
324
+ resolveParentMetrics(
304
325
  parent1: GeneticNetwork,
305
326
  parent2: GeneticNetwork,
306
- parentMetrics: ParentMetrics,
307
- offspringNodeCount: number,
308
- equal: boolean,
309
- randomGenerator: RandomGenerator,
310
- ): default[]
327
+ outputSize: number,
328
+ ): ParentMetrics
311
329
  ```
312
330
 
313
- Builds the offspring node list by selecting genes per slot.
331
+ Computes common parent metrics reused across helper functions.
314
332
 
315
333
  Parameters:
316
- - `parent1` - - First parent.
317
- - `parent2` - - Second parent.
318
- - `parentMetrics` - - Parent metrics.
319
- - `offspringNodeCount` - - Target offspring size.
320
- - `equal` - - Equal-treatment mode.
321
- - `randomGenerator` - - Random generator.
334
+ - `parent1` - - First parent network.
335
+ - `parent2` - - Second parent network.
336
+ - `outputSize` - - Shared output size.
322
337
 
323
- Returns: Cloned offspring node genes.
338
+ Returns: Parent metrics.
324
339
 
325
- ### selectNodeGeneAtIndex
340
+ ### selectHiddenNodeGene
326
341
 
327
342
  ```ts
328
- selectNodeGeneAtIndex(
343
+ selectHiddenNodeGene(
329
344
  nodeIndex: number,
330
- offspringNodeCount: number,
331
345
  parent1: GeneticNetwork,
332
346
  parent2: GeneticNetwork,
333
347
  parentMetrics: ParentMetrics,
@@ -336,18 +350,17 @@ selectNodeGeneAtIndex(
336
350
  ): default | undefined
337
351
  ```
338
352
 
339
- Selects a node gene for a specific offspring slot.
353
+ Selects a hidden-region node gene.
340
354
 
341
355
  Parameters:
342
356
  - `nodeIndex` - - Slot index.
343
- - `offspringNodeCount` - - Total offspring slots.
344
357
  - `parent1` - - First parent.
345
358
  - `parent2` - - Second parent.
346
359
  - `parentMetrics` - - Parent metrics.
347
360
  - `equal` - - Equal-treatment mode.
348
361
  - `randomGenerator` - - Random generator.
349
362
 
350
- Returns: Selected parent node gene, when present.
363
+ Returns: Selected hidden node gene.
351
364
 
352
365
  ### selectInputNodeGene
353
366
 
@@ -366,104 +379,121 @@ Parameters:
366
379
 
367
380
  Returns: Parent 1 input node gene.
368
381
 
369
- ### selectOutputNodeGene
382
+ ### selectNodeGeneAtIndex
370
383
 
371
384
  ```ts
372
- selectOutputNodeGene(
385
+ selectNodeGeneAtIndex(
373
386
  nodeIndex: number,
374
387
  offspringNodeCount: number,
375
388
  parent1: GeneticNetwork,
376
389
  parent2: GeneticNetwork,
377
390
  parentMetrics: ParentMetrics,
391
+ equal: boolean,
378
392
  randomGenerator: RandomGenerator,
379
393
  ): default | undefined
380
394
  ```
381
395
 
382
- Selects an output-region node gene using tail alignment.
396
+ Selects a node gene for a specific offspring slot.
383
397
 
384
398
  Parameters:
385
399
  - `nodeIndex` - - Slot index.
386
- - `offspringNodeCount` - - Target offspring size.
400
+ - `offspringNodeCount` - - Total offspring slots.
387
401
  - `parent1` - - First parent.
388
402
  - `parent2` - - Second parent.
389
403
  - `parentMetrics` - - Parent metrics.
404
+ - `equal` - - Equal-treatment mode.
390
405
  - `randomGenerator` - - Random generator.
391
406
 
392
- Returns: Selected output node gene.
393
-
394
- ### getAlignedOutputNode
395
-
396
- ```ts
397
- getAlignedOutputNode(
398
- parent: GeneticNetwork,
399
- alignedIndex: number,
400
- ): default | undefined
401
- ```
402
-
403
- Reads an aligned output candidate node if index is in the valid non-input range.
404
-
405
- Parameters:
406
- - `parent` - - Parent network.
407
- - `alignedIndex` - - Tail-aligned index.
408
-
409
- Returns: Output candidate node.
407
+ Returns: Selected parent node gene, when present.
410
408
 
411
- ### selectHiddenNodeGene
409
+ ### selectOutputNodeGene
412
410
 
413
411
  ```ts
414
- selectHiddenNodeGene(
412
+ selectOutputNodeGene(
415
413
  nodeIndex: number,
414
+ offspringNodeCount: number,
416
415
  parent1: GeneticNetwork,
417
416
  parent2: GeneticNetwork,
418
417
  parentMetrics: ParentMetrics,
419
- equal: boolean,
420
418
  randomGenerator: RandomGenerator,
421
419
  ): default | undefined
422
420
  ```
423
421
 
424
- Selects a hidden-region node gene.
422
+ Selects an output-region node gene using tail alignment.
425
423
 
426
424
  Parameters:
427
425
  - `nodeIndex` - - Slot index.
426
+ - `offspringNodeCount` - - Target offspring size.
428
427
  - `parent1` - - First parent.
429
428
  - `parent2` - - Second parent.
430
429
  - `parentMetrics` - - Parent metrics.
431
- - `equal` - - Equal-treatment mode.
432
430
  - `randomGenerator` - - Random generator.
433
431
 
434
- Returns: Selected hidden node gene.
432
+ Returns: Selected output node gene.
435
433
 
436
- ### cloneNodeGene
434
+ ### validateParentCompatibility
437
435
 
438
436
  ```ts
439
- cloneNodeGene(
440
- sourceNode: default,
441
- ): default
437
+ validateParentCompatibility(
438
+ parentNetwork1: default,
439
+ parentNetwork2: default,
440
+ ): void
442
441
  ```
443
442
 
444
- Clones node structural gene attributes.
443
+ Validates parent compatibility for crossover.
445
444
 
446
445
  Parameters:
447
- - `sourceNode` - - Source node gene.
446
+ - `parentNetwork1` - - First parent candidate.
447
+ - `parentNetwork2` - - Second parent candidate.
448
448
 
449
- Returns: Cloned node.
449
+ Returns: Nothing.
450
450
 
451
451
  ## architecture/network/genetic/network.genetic.selection.utils.ts
452
452
 
453
- ### collectConnectionGenes
453
+ ### buildConnectionGene
454
454
 
455
455
  ```ts
456
- collectConnectionGenes(
457
- parent: GeneticNetwork,
458
- ): Record<string, ConnectionGene>
456
+ buildConnectionGene(
457
+ connection: default,
458
+ ): ConnectionGene | undefined
459
459
  ```
460
460
 
461
- Collects all connection genes (standard + self) keyed by innovation ID.
461
+ Builds a connection gene from a concrete connection instance.
462
462
 
463
463
  Parameters:
464
- - `parent` - - Parent network.
464
+ - `connection` - - Runtime connection.
465
465
 
466
- Returns: Innovation-keyed connection gene map.
466
+ Returns: Gene descriptor, or undefined when endpoints lack valid indices.
467
+
468
+ ### canInheritParent1DisjointGenes
469
+
470
+ ```ts
471
+ canInheritParent1DisjointGenes(
472
+ context: ConnectionGeneSelectionContext,
473
+ ): boolean
474
+ ```
475
+
476
+ Determines if parent-1 disjoint/excess genes are inheritable.
477
+
478
+ Parameters:
479
+ - `context` - - Selection context.
480
+
481
+ Returns: True when parent-1 disjoint genes can be selected.
482
+
483
+ ### canInheritParent2DisjointGenes
484
+
485
+ ```ts
486
+ canInheritParent2DisjointGenes(
487
+ context: ConnectionGeneSelectionContext,
488
+ ): boolean
489
+ ```
490
+
491
+ Determines if parent-2 disjoint/excess genes are inheritable.
492
+
493
+ Parameters:
494
+ - `context` - - Selection context.
495
+
496
+ Returns: True when parent-2 disjoint genes can be selected.
467
497
 
468
498
  ### chooseConnectionGenes
469
499
 
@@ -492,62 +522,92 @@ Parameters:
492
522
 
493
523
  Returns: Chosen genes for offspring materialization.
494
524
 
495
- ### buildConnectionGene
525
+ ### chooseDisjointGeneFromParent
496
526
 
497
527
  ```ts
498
- buildConnectionGene(
499
- connection: default,
500
- ): ConnectionGene | undefined
528
+ chooseDisjointGeneFromParent(
529
+ parent: GeneticNetwork,
530
+ sourceGene: ConnectionGene,
531
+ ): ConnectionGene
501
532
  ```
502
533
 
503
- Builds a connection gene from a concrete connection instance.
534
+ Chooses a disjoint/excess gene from a single parent.
504
535
 
505
536
  Parameters:
506
- - `connection` - - Runtime connection.
537
+ - `parent` - - Source parent.
538
+ - `sourceGene` - - Source gene.
507
539
 
508
- Returns: Gene descriptor, or undefined when endpoints lack valid indices.
540
+ Returns: Selected disjoint gene.
509
541
 
510
- ### createSelectionContext
542
+ ### chooseMatchingGene
511
543
 
512
544
  ```ts
513
- createSelectionContext(
514
- sourceParent1: GeneticNetwork,
515
- sourceParent2: GeneticNetwork,
516
- sourceParentMetrics: ParentMetrics,
517
- sourceParent1Genes: Record<string, ConnectionGene>,
518
- sourceParent2Genes: Record<string, ConnectionGene>,
519
- sourceEqual: boolean,
520
- sourceRandomGenerator: RandomGenerator,
521
- ): ConnectionGeneSelectionContext
545
+ chooseMatchingGene(
546
+ parent1: GeneticNetwork,
547
+ parent2: GeneticNetwork,
548
+ parent1Gene: ConnectionGene,
549
+ parent2Gene: ConnectionGene,
550
+ randomGenerator: RandomGenerator,
551
+ ): ConnectionGene
522
552
  ```
523
553
 
524
- Creates the immutable context for this selection pass.
554
+ Chooses a gene for matching innovation IDs.
525
555
 
526
556
  Parameters:
527
- - `sourceParent1` - - First parent.
528
- - `sourceParent2` - - Second parent.
529
- - `sourceParentMetrics` - - Shared parent metrics.
530
- - `sourceParent1Genes` - - Parent-1 genes.
531
- - `sourceParent2Genes` - - Parent-2 genes.
532
- - `sourceEqual` - - Equal-treatment flag.
533
- - `sourceRandomGenerator` - - Random source.
557
+ - `parent1` - - First parent.
558
+ - `parent2` - - Second parent.
559
+ - `parent1Gene` - - Parent 1 matching gene.
560
+ - `parent2Gene` - - Parent 2 matching gene.
561
+ - `randomGenerator` - - Random generator.
534
562
 
535
- Returns: Selection context.
563
+ Returns: Selected gene.
536
564
 
537
- ### selectParent1TraversalGenes
565
+ ### cloneConnectionGene
538
566
 
539
567
  ```ts
540
- selectParent1TraversalGenes(
541
- context: ConnectionGeneSelectionContext,
542
- ): Parent1TraversalSelectionResult
568
+ cloneConnectionGene(
569
+ sourceGene: ConnectionGene,
570
+ ): ConnectionGene
543
571
  ```
544
572
 
545
- Selects genes reachable from parent-1 innovation traversal.
573
+ Clones a connection gene.
546
574
 
547
575
  Parameters:
548
- - `context` - - Selection context.
576
+ - `sourceGene` - - Source gene.
549
577
 
550
- Returns: Parent-1 traversal result.
578
+ Returns: Independent clone.
579
+
580
+ ### collectConnectionGenes
581
+
582
+ ```ts
583
+ collectConnectionGenes(
584
+ parent: GeneticNetwork,
585
+ ): Record<string, ConnectionGene>
586
+ ```
587
+
588
+ Collects all connection genes (standard + self) keyed by innovation ID.
589
+
590
+ Parameters:
591
+ - `parent` - - Parent network.
592
+
593
+ Returns: Innovation-keyed connection gene map.
594
+
595
+ ### combineChosenGenes
596
+
597
+ ```ts
598
+ combineChosenGenes(
599
+ parent1TraversalGenes: ConnectionGene[],
600
+ parent2OnlyGenesToAppend: ConnectionGene[],
601
+ ): ConnectionGene[]
602
+ ```
603
+
604
+ Combines selected gene partitions into one ordered list.
605
+
606
+ Parameters:
607
+ - `parent1TraversalGenes` - - Genes selected from parent-1 traversal.
608
+ - `parent2OnlyGenesToAppend` - - Parent-2-only genes.
609
+
610
+ Returns: Combined chosen genes.
551
611
 
552
612
  ### createParent1TraversalContexts
553
613
 
@@ -564,6 +624,33 @@ Parameters:
564
624
 
565
625
  Returns: Parent-1 traversal contexts.
566
626
 
627
+ ### createSelectionContext
628
+
629
+ ```ts
630
+ createSelectionContext(
631
+ sourceParent1: GeneticNetwork,
632
+ sourceParent2: GeneticNetwork,
633
+ sourceParentMetrics: ParentMetrics,
634
+ sourceParent1Genes: Record<string, ConnectionGene>,
635
+ sourceParent2Genes: Record<string, ConnectionGene>,
636
+ sourceEqual: boolean,
637
+ sourceRandomGenerator: RandomGenerator,
638
+ ): ConnectionGeneSelectionContext
639
+ ```
640
+
641
+ Creates the immutable context for this selection pass.
642
+
643
+ Parameters:
644
+ - `sourceParent1` - - First parent.
645
+ - `sourceParent2` - - Second parent.
646
+ - `sourceParentMetrics` - - Shared parent metrics.
647
+ - `sourceParent1Genes` - - Parent-1 genes.
648
+ - `sourceParent2Genes` - - Parent-2 genes.
649
+ - `sourceEqual` - - Equal-treatment flag.
650
+ - `sourceRandomGenerator` - - Random source.
651
+
652
+ Returns: Selection context.
653
+
567
654
  ### foldParent1TraversalContexts
568
655
 
569
656
  ```ts
@@ -579,6 +666,23 @@ Parameters:
579
666
 
580
667
  Returns: Parent-1 selection result.
581
668
 
669
+ ### resolveReenableProbability
670
+
671
+ ```ts
672
+ resolveReenableProbability(
673
+ preferredProbability: number | undefined,
674
+ fallbackProbability: number | undefined,
675
+ ): number
676
+ ```
677
+
678
+ Resolves re-enable probability with fallback to default value.
679
+
680
+ Parameters:
681
+ - `preferredProbability` - - Preferred parent probability.
682
+ - `fallbackProbability` - - Secondary parent probability.
683
+
684
+ Returns: Probability in [0, 1].
685
+
582
686
  ### selectGeneForParent1TraversalContext
583
687
 
584
688
  ```ts
@@ -594,22 +698,20 @@ Parameters:
594
698
 
595
699
  Returns: Selected gene or undefined.
596
700
 
597
- ### selectRemainingParent2Genes
701
+ ### selectParent1TraversalGenes
598
702
 
599
703
  ```ts
600
- selectRemainingParent2Genes(
704
+ selectParent1TraversalGenes(
601
705
  context: ConnectionGeneSelectionContext,
602
- consumedInnovationIds: string[],
603
- ): Record<string, ConnectionGene>
706
+ ): Parent1TraversalSelectionResult
604
707
  ```
605
708
 
606
- Builds parent-2 gene map after removing consumed matching innovations.
709
+ Selects genes reachable from parent-1 innovation traversal.
607
710
 
608
711
  Parameters:
609
712
  - `context` - - Selection context.
610
- - `consumedInnovationIds` - - Innovation IDs already consumed via matching genes.
611
713
 
612
- Returns: Remaining parent-2 genes.
714
+ Returns: Parent-1 traversal result.
613
715
 
614
716
  ### selectParent2OnlyGenes
615
717
 
@@ -628,143 +730,92 @@ Parameters:
628
730
 
629
731
  Returns: Selected parent-2-only genes.
630
732
 
631
- ### canInheritParent1DisjointGenes
733
+ ### selectRemainingParent2Genes
632
734
 
633
735
  ```ts
634
- canInheritParent1DisjointGenes(
736
+ selectRemainingParent2Genes(
635
737
  context: ConnectionGeneSelectionContext,
636
- ): boolean
738
+ consumedInnovationIds: string[],
739
+ ): Record<string, ConnectionGene>
637
740
  ```
638
741
 
639
- Determines if parent-1 disjoint/excess genes are inheritable.
742
+ Builds parent-2 gene map after removing consumed matching innovations.
640
743
 
641
744
  Parameters:
642
745
  - `context` - - Selection context.
746
+ - `consumedInnovationIds` - - Innovation IDs already consumed via matching genes.
643
747
 
644
- Returns: True when parent-1 disjoint genes can be selected.
748
+ Returns: Remaining parent-2 genes.
645
749
 
646
- ### canInheritParent2DisjointGenes
750
+ ## architecture/network/genetic/network.genetic.materialize.utils.ts
751
+
752
+ ### applyConnectionGeneToConnection
647
753
 
648
754
  ```ts
649
- canInheritParent2DisjointGenes(
650
- context: ConnectionGeneSelectionContext,
651
- ): boolean
755
+ applyConnectionGeneToConnection(
756
+ connection: default,
757
+ connectionGene: ConnectionGene,
758
+ ): void
652
759
  ```
653
760
 
654
- Determines if parent-2 disjoint/excess genes are inheritable.
761
+ Applies gene properties to a runtime connection.
655
762
 
656
763
  Parameters:
657
- - `context` - - Selection context.
764
+ - `connection` - - Runtime connection.
765
+ - `connectionGene` - - Gene source.
658
766
 
659
- Returns: True when parent-2 disjoint genes can be selected.
767
+ Returns: Nothing.
660
768
 
661
- ### combineChosenGenes
769
+ ### attachGaterIfAvailable
662
770
 
663
771
  ```ts
664
- combineChosenGenes(
665
- parent1TraversalGenes: ConnectionGene[],
666
- parent2OnlyGenesToAppend: ConnectionGene[],
667
- ): ConnectionGene[]
772
+ attachGaterIfAvailable(
773
+ offspring: GeneticNetwork,
774
+ connection: default,
775
+ gaterIndex: number,
776
+ ): void
668
777
  ```
669
778
 
670
- Combines selected gene partitions into one ordered list.
671
-
672
- Parameters:
673
- - `parent1TraversalGenes` - - Genes selected from parent-1 traversal.
674
- - `parent2OnlyGenesToAppend` - - Parent-2-only genes.
675
-
676
- Returns: Combined chosen genes.
677
-
678
- ### chooseMatchingGene
679
-
680
- ```ts
681
- chooseMatchingGene(
682
- parent1: GeneticNetwork,
683
- parent2: GeneticNetwork,
684
- parent1Gene: ConnectionGene,
685
- parent2Gene: ConnectionGene,
686
- randomGenerator: RandomGenerator,
687
- ): ConnectionGene
688
- ```
689
-
690
- Chooses a gene for matching innovation IDs.
691
-
692
- Parameters:
693
- - `parent1` - - First parent.
694
- - `parent2` - - Second parent.
695
- - `parent1Gene` - - Parent 1 matching gene.
696
- - `parent2Gene` - - Parent 2 matching gene.
697
- - `randomGenerator` - - Random generator.
698
-
699
- Returns: Selected gene.
700
-
701
- ### chooseDisjointGeneFromParent
702
-
703
- ```ts
704
- chooseDisjointGeneFromParent(
705
- parent: GeneticNetwork,
706
- sourceGene: ConnectionGene,
707
- ): ConnectionGene
708
- ```
709
-
710
- Chooses a disjoint/excess gene from a single parent.
711
-
712
- Parameters:
713
- - `parent` - - Source parent.
714
- - `sourceGene` - - Source gene.
715
-
716
- Returns: Selected disjoint gene.
717
-
718
- ### cloneConnectionGene
719
-
720
- ```ts
721
- cloneConnectionGene(
722
- sourceGene: ConnectionGene,
723
- ): ConnectionGene
724
- ```
725
-
726
- Clones a connection gene.
779
+ Attaches a gater node when the target index is valid.
727
780
 
728
781
  Parameters:
729
- - `sourceGene` - - Source gene.
782
+ - `offspring` - - Offspring network.
783
+ - `connection` - - Connection to gate.
784
+ - `gaterIndex` - - Candidate gater node index.
730
785
 
731
- Returns: Independent clone.
786
+ Returns: Nothing.
732
787
 
733
- ### resolveReenableProbability
788
+ ### collectEligibleTraversalContexts
734
789
 
735
790
  ```ts
736
- resolveReenableProbability(
737
- preferredProbability: number | undefined,
738
- fallbackProbability: number | undefined,
739
- ): number
791
+ collectEligibleTraversalContexts(
792
+ context: OffspringMaterializationContext,
793
+ genes: ConnectionGene[],
794
+ ): GeneTraversalContext[]
740
795
  ```
741
796
 
742
- Resolves re-enable probability with fallback to default value.
797
+ Collects traversal contexts that satisfy all structural eligibility checks.
743
798
 
744
799
  Parameters:
745
- - `preferredProbability` - - Preferred parent probability.
746
- - `fallbackProbability` - - Secondary parent probability.
747
-
748
- Returns: Probability in [0, 1].
800
+ - `context` - - Top-level materialization context.
801
+ - `genes` - - Candidate genes.
749
802
 
750
- ## architecture/network/genetic/network.genetic.materialize.utils.ts
803
+ Returns: Eligible traversal contexts.
751
804
 
752
- ### materializeOffspringConnections
805
+ ### createConnectionForEndpoints
753
806
 
754
807
  ```ts
755
- materializeOffspringConnections(
756
- offspring: GeneticNetwork,
757
- chosenGenes: ConnectionGene[],
758
- ): void
808
+ createConnectionForEndpoints(
809
+ endpointsContext: GeneEndpointsContext,
810
+ ): default | undefined
759
811
  ```
760
812
 
761
- Materializes selected connection genes in the offspring network.
813
+ Creates a runtime connection for endpoint nodes.
762
814
 
763
815
  Parameters:
764
- - `offspring` - - Offspring network.
765
- - `chosenGenes` - - Chosen connection genes.
816
+ - `endpointsContext` - - Endpoint context.
766
817
 
767
- Returns: Nothing.
818
+ Returns: Created connection or undefined.
768
819
 
769
820
  ### createMaterializationContext
770
821
 
@@ -781,22 +832,24 @@ Parameters:
781
832
 
782
833
  Returns: Materialization context.
783
834
 
784
- ### collectEligibleTraversalContexts
835
+ ### createOffspringConnection
785
836
 
786
837
  ```ts
787
- collectEligibleTraversalContexts(
788
- context: OffspringMaterializationContext,
789
- genes: ConnectionGene[],
790
- ): GeneTraversalContext[]
838
+ createOffspringConnection(
839
+ offspring: GeneticNetwork,
840
+ fromNode: default,
841
+ toNode: default,
842
+ ): default | undefined
791
843
  ```
792
844
 
793
- Collects traversal contexts that satisfy all structural eligibility checks.
845
+ Creates a single offspring connection edge.
794
846
 
795
847
  Parameters:
796
- - `context` - - Top-level materialization context.
797
- - `genes` - - Candidate genes.
848
+ - `offspring` - - Offspring network.
849
+ - `fromNode` - - Source node.
850
+ - `toNode` - - Destination node.
798
851
 
799
- Returns: Eligible traversal contexts.
852
+ Returns: Created connection or undefined.
800
853
 
801
854
  ### createTraversalContexts
802
855
 
@@ -815,192 +868,139 @@ Parameters:
815
868
 
816
869
  Returns: Traversal contexts.
817
870
 
818
- ### keepTraversalContextsWithinNodeBounds
819
-
820
- ```ts
821
- keepTraversalContextsWithinNodeBounds(
822
- traversalContexts: GeneTraversalContext[],
823
- ): GeneTraversalContext[]
824
- ```
825
-
826
- Keeps traversal contexts whose endpoints are inside offspring bounds.
827
-
828
- Parameters:
829
- - `traversalContexts` - - Candidate traversal contexts.
830
-
831
- Returns: Node-bounded contexts.
832
-
833
- ### keepFeedForwardTraversalContexts
834
-
835
- ```ts
836
- keepFeedForwardTraversalContexts(
837
- traversalContexts: GeneTraversalContext[],
838
- ): GeneTraversalContext[]
839
- ```
840
-
841
- Keeps traversal contexts that preserve feed-forward edge direction.
842
-
843
- Parameters:
844
- - `traversalContexts` - - Node-bounded traversal contexts.
845
-
846
- Returns: Feed-forward contexts.
847
-
848
- ### materializeTraversalContexts
871
+ ### hasExistingProjection
849
872
 
850
873
  ```ts
851
- materializeTraversalContexts(
852
- traversalContexts: GeneTraversalContext[],
853
- ): void
874
+ hasExistingProjection(
875
+ endpointsContext: GeneEndpointsContext,
876
+ ): boolean
854
877
  ```
855
878
 
856
- Materializes each eligible traversal context independently.
879
+ Checks whether the source endpoint already projects to the target endpoint.
857
880
 
858
881
  Parameters:
859
- - `traversalContexts` - - Eligible traversal contexts.
882
+ - `endpointsContext` - - Endpoint context.
860
883
 
861
- Returns: Nothing.
884
+ Returns: True when projection already exists.
862
885
 
863
- ### materializeSingleTraversalContext
886
+ ### isTraversalContextFeedForward
864
887
 
865
888
  ```ts
866
- materializeSingleTraversalContext(
889
+ isTraversalContextFeedForward(
867
890
  traversalContext: GeneTraversalContext,
868
- ): void
891
+ ): boolean
869
892
  ```
870
893
 
871
- Materializes one eligible traversal context when no duplicate projection exists.
894
+ Validates that a traversal context follows feed-forward ordering.
872
895
 
873
896
  Parameters:
874
897
  - `traversalContext` - - Traversal context.
875
898
 
876
- Returns: Nothing.
899
+ Returns: True when the gene is strictly forward.
877
900
 
878
- ### resolveGeneEndpointsContext
901
+ ### isTraversalContextWithinNodeBounds
879
902
 
880
903
  ```ts
881
- resolveGeneEndpointsContext(
904
+ isTraversalContextWithinNodeBounds(
882
905
  traversalContext: GeneTraversalContext,
883
- ): GeneEndpointsContext | undefined
906
+ ): boolean
884
907
  ```
885
908
 
886
- Resolves concrete endpoint nodes for a traversal context.
909
+ Validates that a traversal context endpoints are inside offspring bounds.
887
910
 
888
911
  Parameters:
889
912
  - `traversalContext` - - Traversal context.
890
913
 
891
- Returns: Endpoint context or undefined.
914
+ Returns: True when both indices are bounded.
892
915
 
893
- ### createConnectionForEndpoints
916
+ ### keepFeedForwardTraversalContexts
894
917
 
895
918
  ```ts
896
- createConnectionForEndpoints(
897
- endpointsContext: GeneEndpointsContext,
898
- ): default | undefined
919
+ keepFeedForwardTraversalContexts(
920
+ traversalContexts: GeneTraversalContext[],
921
+ ): GeneTraversalContext[]
899
922
  ```
900
923
 
901
- Creates a runtime connection for endpoint nodes.
924
+ Keeps traversal contexts that preserve feed-forward edge direction.
902
925
 
903
926
  Parameters:
904
- - `endpointsContext` - - Endpoint context.
927
+ - `traversalContexts` - - Node-bounded traversal contexts.
905
928
 
906
- Returns: Created connection or undefined.
929
+ Returns: Feed-forward contexts.
907
930
 
908
- ### hasExistingProjection
931
+ ### keepTraversalContextsWithinNodeBounds
909
932
 
910
933
  ```ts
911
- hasExistingProjection(
912
- endpointsContext: GeneEndpointsContext,
913
- ): boolean
934
+ keepTraversalContextsWithinNodeBounds(
935
+ traversalContexts: GeneTraversalContext[],
936
+ ): GeneTraversalContext[]
914
937
  ```
915
938
 
916
- Checks whether the source endpoint already projects to the target endpoint.
939
+ Keeps traversal contexts whose endpoints are inside offspring bounds.
917
940
 
918
941
  Parameters:
919
- - `endpointsContext` - - Endpoint context.
942
+ - `traversalContexts` - - Candidate traversal contexts.
920
943
 
921
- Returns: True when projection already exists.
944
+ Returns: Node-bounded contexts.
922
945
 
923
- ### isTraversalContextWithinNodeBounds
946
+ ### materializeOffspringConnections
924
947
 
925
948
  ```ts
926
- isTraversalContextWithinNodeBounds(
927
- traversalContext: GeneTraversalContext,
928
- ): boolean
949
+ materializeOffspringConnections(
950
+ offspring: GeneticNetwork,
951
+ chosenGenes: ConnectionGene[],
952
+ ): void
929
953
  ```
930
954
 
931
- Validates that a traversal context endpoints are inside offspring bounds.
955
+ Materializes selected connection genes in the offspring network.
932
956
 
933
957
  Parameters:
934
- - `traversalContext` - - Traversal context.
958
+ - `offspring` - - Offspring network.
959
+ - `chosenGenes` - - Chosen connection genes.
935
960
 
936
- Returns: True when both indices are bounded.
961
+ Returns: Nothing.
937
962
 
938
- ### isTraversalContextFeedForward
963
+ ### materializeSingleTraversalContext
939
964
 
940
965
  ```ts
941
- isTraversalContextFeedForward(
966
+ materializeSingleTraversalContext(
942
967
  traversalContext: GeneTraversalContext,
943
- ): boolean
968
+ ): void
944
969
  ```
945
970
 
946
- Validates that a traversal context follows feed-forward ordering.
971
+ Materializes one eligible traversal context when no duplicate projection exists.
947
972
 
948
973
  Parameters:
949
974
  - `traversalContext` - - Traversal context.
950
975
 
951
- Returns: True when the gene is strictly forward.
952
-
953
- ### createOffspringConnection
954
-
955
- ```ts
956
- createOffspringConnection(
957
- offspring: GeneticNetwork,
958
- fromNode: default,
959
- toNode: default,
960
- ): default | undefined
961
- ```
962
-
963
- Creates a single offspring connection edge.
964
-
965
- Parameters:
966
- - `offspring` - - Offspring network.
967
- - `fromNode` - - Source node.
968
- - `toNode` - - Destination node.
969
-
970
- Returns: Created connection or undefined.
976
+ Returns: Nothing.
971
977
 
972
- ### applyConnectionGeneToConnection
978
+ ### materializeTraversalContexts
973
979
 
974
980
  ```ts
975
- applyConnectionGeneToConnection(
976
- connection: default,
977
- connectionGene: ConnectionGene,
981
+ materializeTraversalContexts(
982
+ traversalContexts: GeneTraversalContext[],
978
983
  ): void
979
984
  ```
980
985
 
981
- Applies gene properties to a runtime connection.
986
+ Materializes each eligible traversal context independently.
982
987
 
983
988
  Parameters:
984
- - `connection` - - Runtime connection.
985
- - `connectionGene` - - Gene source.
989
+ - `traversalContexts` - - Eligible traversal contexts.
986
990
 
987
991
  Returns: Nothing.
988
992
 
989
- ### attachGaterIfAvailable
993
+ ### resolveGeneEndpointsContext
990
994
 
991
995
  ```ts
992
- attachGaterIfAvailable(
993
- offspring: GeneticNetwork,
994
- connection: default,
995
- gaterIndex: number,
996
- ): void
996
+ resolveGeneEndpointsContext(
997
+ traversalContext: GeneTraversalContext,
998
+ ): GeneEndpointsContext | undefined
997
999
  ```
998
1000
 
999
- Attaches a gater node when the target index is valid.
1001
+ Resolves concrete endpoint nodes for a traversal context.
1000
1002
 
1001
1003
  Parameters:
1002
- - `offspring` - - Offspring network.
1003
- - `connection` - - Connection to gate.
1004
- - `gaterIndex` - - Candidate gater node index.
1004
+ - `traversalContext` - - Traversal context.
1005
1005
 
1006
- Returns: Nothing.
1006
+ Returns: Endpoint context or undefined.