@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
@@ -34,43 +34,53 @@ SNIP heuristic:
34
34
 
35
35
  ## architecture/network/prune/network.prune.utils.types.ts
36
36
 
37
- ### PRUNING_METHOD_MAGNITUDE
37
+ ### ActivePruningConfig
38
38
 
39
- Pruning method identifier for absolute-weight ranking.
39
+ Non-nullable pruning schedule configuration shape used by helpers.
40
40
 
41
- ### PRUNING_METHOD_SNIP
41
+ ### DEFAULT_PRUNE_FREQUENCY
42
42
 
43
- Pruning method identifier for SNIP-like saliency ranking.
43
+ Fallback prune cadence when schedule frequency is omitted or invalid.
44
44
 
45
- ### MIN_REMAINING_CONNECTION_COUNT
45
+ ### MAX_EVOLUTIONARY_TARGET_SPARSITY
46
46
 
47
- Lower bound to ensure at least one connection remains after pruning.
47
+ Safety cap below full sparsity to avoid degenerate zero-connection networks.
48
48
 
49
- ### DEFAULT_PRUNE_FREQUENCY
49
+ ### MAX_PROGRESS_FRACTION
50
50
 
51
- Fallback prune cadence when schedule frequency is omitted or invalid.
51
+ Maximum normalized schedule progress value.
52
52
 
53
53
  ### MIN_PROGRESS_FRACTION
54
54
 
55
55
  Minimum normalized schedule progress value.
56
56
 
57
- ### MAX_PROGRESS_FRACTION
57
+ ### MIN_REMAINING_CONNECTION_COUNT
58
58
 
59
- Maximum normalized schedule progress value.
59
+ Lower bound to ensure at least one connection remains after pruning.
60
60
 
61
- ### MAX_EVOLUTIONARY_TARGET_SPARSITY
61
+ ### PRUNING_METHOD_MAGNITUDE
62
62
 
63
- Safety cap below full sparsity to avoid degenerate zero-connection networks.
63
+ Pruning method identifier for absolute-weight ranking.
64
+
65
+ ### PRUNING_METHOD_SNIP
66
+
67
+ Pruning method identifier for SNIP-like saliency ranking.
64
68
 
65
69
  ### REGROW_ATTEMPT_MULTIPLIER
66
70
 
67
71
  Retry multiplier to convert intended regrowth count into max attempts.
68
72
 
69
- ### ActivePruningConfig
73
+ ## architecture/network/prune/network.prune.utils.ts
70
74
 
71
- Non-nullable pruning schedule configuration shape used by helpers.
75
+ ### getCurrentSparsity
72
76
 
73
- ## architecture/network/prune/network.prune.utils.ts
77
+ ```ts
78
+ getCurrentSparsity(): number
79
+ ```
80
+
81
+ Current sparsity fraction relative to the training-time pruning baseline.
82
+
83
+ Returns: Current sparsity in the [0,1] range when baseline is available.
74
84
 
75
85
  ### maybePrune
76
86
 
@@ -107,34 +117,22 @@ Parameters:
107
117
 
108
118
  Returns: Nothing.
109
119
 
110
- ### getCurrentSparsity
111
-
112
- ```ts
113
- getCurrentSparsity(): number
114
- ```
115
-
116
- Current sparsity fraction relative to the training-time pruning baseline.
117
-
118
- Returns: Current sparsity in the [0,1] range when baseline is available.
119
-
120
120
  ## architecture/network/prune/network.prune.regrowth.utils.ts
121
121
 
122
- ### maybeRunRegrowth
122
+ ### buildRegrowthCandidatePair
123
123
 
124
124
  ```ts
125
- maybeRunRegrowth(
125
+ buildRegrowthCandidatePair(
126
126
  currentNetwork: default,
127
- context: RegrowthPlanContext,
128
- ): void
127
+ ): { sourceNode: default; targetNode: default; } | null
129
128
  ```
130
129
 
131
- Build and execute a regrowth plan when enabled.
130
+ Build one random regrowth candidate pair if valid.
132
131
 
133
132
  Parameters:
134
- - `currentNetwork` - - Network to regrow.
135
- - `context` - - Inputs describing regrowth intent.
133
+ - `currentNetwork` - - Network being regrown.
136
134
 
137
- Returns: Nothing.
135
+ Returns: Candidate node pair or null when invalid.
138
136
 
139
137
  ### buildRegrowthPlan
140
138
 
@@ -151,6 +149,25 @@ Parameters:
151
149
 
152
150
  Returns: A plan when regrowth is meaningful; otherwise null.
153
151
 
152
+ ### connectionAlreadyExists
153
+
154
+ ```ts
155
+ connectionAlreadyExists(
156
+ currentNetwork: default,
157
+ sourceNode: default,
158
+ targetNode: default,
159
+ ): boolean
160
+ ```
161
+
162
+ Check whether a connection already exists.
163
+
164
+ Parameters:
165
+ - `currentNetwork` - - Network being regrown.
166
+ - `sourceNode` - - Proposed source node.
167
+ - `targetNode` - - Proposed target node.
168
+
169
+ Returns: True when the edge already exists.
170
+
154
171
  ### executeRegrowthAttempts
155
172
 
156
173
  ```ts
@@ -166,57 +183,42 @@ Parameters:
166
183
 
167
184
  Returns: Nothing.
168
185
 
169
- ### shouldContinueRegrowth
186
+ ### isInvalidRegrowthPair
170
187
 
171
188
  ```ts
172
- shouldContinueRegrowth(
189
+ isInvalidRegrowthPair(
173
190
  currentNetwork: default,
174
- desiredRemainingConnections: number,
175
- attemptedRegrowthCount: number,
176
- maxAttempts: number,
191
+ sourceNode: default,
192
+ targetNode: default,
177
193
  ): boolean
178
194
  ```
179
195
 
180
- Decide whether another regrowth attempt is allowed.
196
+ Validate whether a candidate regrowth pair is acceptable.
181
197
 
182
198
  Parameters:
183
199
  - `currentNetwork` - - Network being regrown.
184
- - `desiredRemainingConnections` - - Target remaining connection count.
185
- - `attemptedRegrowthCount` - - Number of attempts already used.
186
- - `maxAttempts` - - Maximum attempts allowed.
200
+ - `sourceNode` - - Proposed source node.
201
+ - `targetNode` - - Proposed target node.
187
202
 
188
- Returns: True when another attempt should run.
203
+ Returns: True when the pair must be rejected.
189
204
 
190
- ### tryRegrowConnection
205
+ ### maybeRunRegrowth
191
206
 
192
207
  ```ts
193
- tryRegrowConnection(
208
+ maybeRunRegrowth(
194
209
  currentNetwork: default,
210
+ context: RegrowthPlanContext,
195
211
  ): void
196
212
  ```
197
213
 
198
- Attempt one random valid connection addition.
214
+ Build and execute a regrowth plan when enabled.
199
215
 
200
216
  Parameters:
201
- - `currentNetwork` - - Network being regrown.
217
+ - `currentNetwork` - - Network to regrow.
218
+ - `context` - - Inputs describing regrowth intent.
202
219
 
203
220
  Returns: Nothing.
204
221
 
205
- ### buildRegrowthCandidatePair
206
-
207
- ```ts
208
- buildRegrowthCandidatePair(
209
- currentNetwork: default,
210
- ): { sourceNode: default; targetNode: default; } | null
211
- ```
212
-
213
- Build one random regrowth candidate pair if valid.
214
-
215
- Parameters:
216
- - `currentNetwork` - - Network being regrown.
217
-
218
- Returns: Candidate node pair or null when invalid.
219
-
220
222
  ### pickRandomNode
221
223
 
222
224
  ```ts
@@ -232,43 +234,41 @@ Parameters:
232
234
 
233
235
  Returns: Random node or undefined when the node list is empty.
234
236
 
235
- ### isInvalidRegrowthPair
237
+ ### shouldContinueRegrowth
236
238
 
237
239
  ```ts
238
- isInvalidRegrowthPair(
240
+ shouldContinueRegrowth(
239
241
  currentNetwork: default,
240
- sourceNode: default,
241
- targetNode: default,
242
+ desiredRemainingConnections: number,
243
+ attemptedRegrowthCount: number,
244
+ maxAttempts: number,
242
245
  ): boolean
243
246
  ```
244
247
 
245
- Validate whether a candidate regrowth pair is acceptable.
248
+ Decide whether another regrowth attempt is allowed.
246
249
 
247
250
  Parameters:
248
251
  - `currentNetwork` - - Network being regrown.
249
- - `sourceNode` - - Proposed source node.
250
- - `targetNode` - - Proposed target node.
252
+ - `desiredRemainingConnections` - - Target remaining connection count.
253
+ - `attemptedRegrowthCount` - - Number of attempts already used.
254
+ - `maxAttempts` - - Maximum attempts allowed.
251
255
 
252
- Returns: True when the pair must be rejected.
256
+ Returns: True when another attempt should run.
253
257
 
254
- ### connectionAlreadyExists
258
+ ### tryRegrowConnection
255
259
 
256
260
  ```ts
257
- connectionAlreadyExists(
261
+ tryRegrowConnection(
258
262
  currentNetwork: default,
259
- sourceNode: default,
260
- targetNode: default,
261
- ): boolean
263
+ ): void
262
264
  ```
263
265
 
264
- Check whether a connection already exists.
266
+ Attempt one random valid connection addition.
265
267
 
266
268
  Parameters:
267
269
  - `currentNetwork` - - Network being regrown.
268
- - `sourceNode` - - Proposed source node.
269
- - `targetNode` - - Proposed target node.
270
270
 
271
- Returns: True when the edge already exists.
271
+ Returns: Nothing.
272
272
 
273
273
  ### violatesAcyclicConstraint
274
274
 
@@ -291,52 +291,37 @@ Returns: True when acyclic ordering would be violated.
291
291
 
292
292
  ## architecture/network/prune/network.prune.schedule.utils.ts
293
293
 
294
- ### getPruningConfig
295
-
296
- ```ts
297
- getPruningConfig(
298
- currentNetwork: default,
299
- ): { start: number; end: number; frequency: number; targetSparsity: number; method: PruningMethod; regrowFraction: number; lastPruneIter?: number | undefined; } | undefined
300
- ```
301
-
302
- Read the active pruning schedule from network internals.
303
-
304
- Parameters:
305
- - `currentNetwork` - - Network instance to inspect.
306
-
307
- Returns: Pruning configuration when enabled; otherwise undefined.
308
-
309
- ### shouldRunScheduledPrune
294
+ ### alreadyPrunedThisIteration
310
295
 
311
296
  ```ts
312
- shouldRunScheduledPrune(
297
+ alreadyPrunedThisIteration(
313
298
  currentIteration: number,
314
299
  currentPruningConfig: { start: number; end: number; frequency: number; targetSparsity: number; method: PruningMethod; regrowFraction: number; lastPruneIter?: number | undefined; },
315
300
  ): boolean
316
301
  ```
317
302
 
318
- Determine whether scheduled pruning should run at this iteration.
303
+ Check whether this iteration was already pruned.
319
304
 
320
305
  Parameters:
321
- - `currentIteration` - - Training iteration being processed.
306
+ - `currentIteration` - - Iteration to evaluate.
322
307
  - `currentPruningConfig` - - Active pruning schedule.
323
308
 
324
- Returns: True when pruning should execute now.
309
+ Returns: True when pruning already happened for this iteration.
325
310
 
326
- ### getInitialConnectionBaseline
311
+ ### buildPruneSelection
327
312
 
328
313
  ```ts
329
- getInitialConnectionBaseline(
330
- currentNetwork: default,
331
- ): number | undefined
314
+ buildPruneSelection(
315
+ context: PruneSelectionContext,
316
+ ): PruneSelectionResult
332
317
  ```
333
318
 
334
- Read the scheduled-pruning baseline connection count.
319
+ Build a connection removal selection from current ranking context.
335
320
 
336
321
  Parameters:
337
- - `currentNetwork` - - Network instance to inspect.
322
+ - `context` - - Inputs for ranking and slicing removable connections.
338
323
 
339
- Returns: Baseline count when captured; otherwise undefined.
324
+ Returns: Connections selected for pruning.
340
325
 
341
326
  ### buildScheduledTarget
342
327
 
@@ -355,118 +340,122 @@ Parameters:
355
340
 
356
341
  Returns: Desired remaining connections and current excess.
357
342
 
358
- ### buildPruneSelection
343
+ ### calculateProgressFraction
359
344
 
360
345
  ```ts
361
- buildPruneSelection(
362
- context: PruneSelectionContext,
363
- ): PruneSelectionResult
346
+ calculateProgressFraction(
347
+ currentIteration: number,
348
+ scheduleStart: number,
349
+ scheduleEnd: number,
350
+ ): number
364
351
  ```
365
352
 
366
- Build a connection removal selection from current ranking context.
353
+ Compute clamped schedule progress in the [0,1] range.
367
354
 
368
355
  Parameters:
369
- - `context` - - Inputs for ranking and slicing removable connections.
356
+ - `currentIteration` - - Iteration to evaluate.
357
+ - `scheduleStart` - - Start iteration of schedule window.
358
+ - `scheduleEnd` - - End iteration of schedule window.
370
359
 
371
- Returns: Connections selected for pruning.
360
+ Returns: Clamped normalized progress.
372
361
 
373
- ### disconnectConnections
362
+ ### calculateSnipSaliency
374
363
 
375
364
  ```ts
376
- disconnectConnections(
377
- currentNetwork: default,
378
- connectionsToDisconnect: default[],
379
- ): void
365
+ calculateSnipSaliency(
366
+ connection: default,
367
+ ): number
380
368
  ```
381
369
 
382
- Disconnect all selected connections from the network.
370
+ Compute saliency for SNIP-like ranking.
383
371
 
384
372
  Parameters:
385
- - `currentNetwork` - - Network to mutate.
386
- - `connectionsToDisconnect` - - Connections to remove.
373
+ - `connection` - - Connection to score.
387
374
 
388
- Returns: Nothing.
375
+ Returns: Saliency value used for sorting.
389
376
 
390
- ### resolvePruningMethod
377
+ ### clamp
391
378
 
392
379
  ```ts
393
- resolvePruningMethod(
394
- method: PruningMethod | undefined,
395
- ): PruningMethod
380
+ clamp(
381
+ value: number,
382
+ minimum: number,
383
+ maximum: number,
384
+ ): number
396
385
  ```
397
386
 
398
- Normalize optional pruning method to a concrete value.
387
+ Clamp a number into an inclusive range.
399
388
 
400
389
  Parameters:
401
- - `method` - - Optional configured pruning method.
390
+ - `value` - - Raw value to clamp.
391
+ - `minimum` - - Inclusive lower bound.
392
+ - `maximum` - - Inclusive upper bound.
402
393
 
403
- Returns: Concrete pruning method.
394
+ Returns: Clamped value.
404
395
 
405
- ### markPruneIteration
396
+ ### disconnectConnections
406
397
 
407
398
  ```ts
408
- markPruneIteration(
409
- currentPruningConfig: { start: number; end: number; frequency: number; targetSparsity: number; method: PruningMethod; regrowFraction: number; lastPruneIter?: number | undefined; },
410
- currentIteration: number,
399
+ disconnectConnections(
400
+ currentNetwork: default,
401
+ connectionsToDisconnect: default[],
411
402
  ): void
412
403
  ```
413
404
 
414
- Persist the iteration that last performed pruning.
405
+ Disconnect all selected connections from the network.
415
406
 
416
407
  Parameters:
417
- - `currentPruningConfig` - - Active pruning configuration.
418
- - `currentIteration` - - Iteration to record.
408
+ - `currentNetwork` - - Network to mutate.
409
+ - `connectionsToDisconnect` - - Connections to remove.
419
410
 
420
411
  Returns: Nothing.
421
412
 
422
- ### markTopologyDirty
413
+ ### getInitialConnectionBaseline
423
414
 
424
415
  ```ts
425
- markTopologyDirty(
416
+ getInitialConnectionBaseline(
426
417
  currentNetwork: default,
427
- ): void
418
+ ): number | undefined
428
419
  ```
429
420
 
430
- Mark topology cache as dirty after structural updates.
421
+ Read the scheduled-pruning baseline connection count.
431
422
 
432
423
  Parameters:
433
- - `currentNetwork` - - Network with modified connectivity.
424
+ - `currentNetwork` - - Network instance to inspect.
434
425
 
435
- Returns: Nothing.
426
+ Returns: Baseline count when captured; otherwise undefined.
436
427
 
437
- ### isOutsidePruningWindow
428
+ ### getPruningConfig
438
429
 
439
430
  ```ts
440
- isOutsidePruningWindow(
441
- currentIteration: number,
442
- currentPruningConfig: { start: number; end: number; frequency: number; targetSparsity: number; method: PruningMethod; regrowFraction: number; lastPruneIter?: number | undefined; },
443
- ): boolean
431
+ getPruningConfig(
432
+ currentNetwork: default,
433
+ ): { start: number; end: number; frequency: number; targetSparsity: number; method: PruningMethod; regrowFraction: number; lastPruneIter?: number | undefined; } | undefined
444
434
  ```
445
435
 
446
- Check whether an iteration is outside the pruning window.
436
+ Read the active pruning schedule from network internals.
447
437
 
448
438
  Parameters:
449
- - `currentIteration` - - Iteration to evaluate.
450
- - `currentPruningConfig` - - Active pruning schedule.
439
+ - `currentNetwork` - - Network instance to inspect.
451
440
 
452
- Returns: True when the iteration is out of range.
441
+ Returns: Pruning configuration when enabled; otherwise undefined.
453
442
 
454
- ### alreadyPrunedThisIteration
443
+ ### isOutsidePruningWindow
455
444
 
456
445
  ```ts
457
- alreadyPrunedThisIteration(
446
+ isOutsidePruningWindow(
458
447
  currentIteration: number,
459
448
  currentPruningConfig: { start: number; end: number; frequency: number; targetSparsity: number; method: PruningMethod; regrowFraction: number; lastPruneIter?: number | undefined; },
460
449
  ): boolean
461
450
  ```
462
451
 
463
- Check whether this iteration was already pruned.
452
+ Check whether an iteration is outside the pruning window.
464
453
 
465
454
  Parameters:
466
455
  - `currentIteration` - - Iteration to evaluate.
467
456
  - `currentPruningConfig` - - Active pruning schedule.
468
457
 
469
- Returns: True when pruning already happened for this iteration.
458
+ Returns: True when the iteration is out of range.
470
459
 
471
460
  ### isScheduledPruningIteration
472
461
 
@@ -485,75 +474,69 @@ Parameters:
485
474
 
486
475
  Returns: True when this iteration matches the schedule cadence.
487
476
 
488
- ### calculateProgressFraction
477
+ ### markPruneIteration
489
478
 
490
479
  ```ts
491
- calculateProgressFraction(
480
+ markPruneIteration(
481
+ currentPruningConfig: { start: number; end: number; frequency: number; targetSparsity: number; method: PruningMethod; regrowFraction: number; lastPruneIter?: number | undefined; },
492
482
  currentIteration: number,
493
- scheduleStart: number,
494
- scheduleEnd: number,
495
- ): number
483
+ ): void
496
484
  ```
497
485
 
498
- Compute clamped schedule progress in the [0,1] range.
486
+ Persist the iteration that last performed pruning.
499
487
 
500
488
  Parameters:
501
- - `currentIteration` - - Iteration to evaluate.
502
- - `scheduleStart` - - Start iteration of schedule window.
503
- - `scheduleEnd` - - End iteration of schedule window.
489
+ - `currentPruningConfig` - - Active pruning configuration.
490
+ - `currentIteration` - - Iteration to record.
504
491
 
505
- Returns: Clamped normalized progress.
492
+ Returns: Nothing.
506
493
 
507
- ### clamp
494
+ ### markTopologyDirty
508
495
 
509
496
  ```ts
510
- clamp(
511
- value: number,
512
- minimum: number,
513
- maximum: number,
514
- ): number
497
+ markTopologyDirty(
498
+ currentNetwork: default,
499
+ ): void
515
500
  ```
516
501
 
517
- Clamp a number into an inclusive range.
502
+ Mark topology cache as dirty after structural updates.
518
503
 
519
504
  Parameters:
520
- - `value` - - Raw value to clamp.
521
- - `minimum` - - Inclusive lower bound.
522
- - `maximum` - - Inclusive upper bound.
505
+ - `currentNetwork` - - Network with modified connectivity.
523
506
 
524
- Returns: Clamped value.
507
+ Returns: Nothing.
525
508
 
526
- ### rankConnectionsByRemovalPriority
509
+ ### rankConnectionsByMagnitude
527
510
 
528
511
  ```ts
529
- rankConnectionsByRemovalPriority(
512
+ rankConnectionsByMagnitude(
530
513
  connections: default[],
531
- method: PruningMethod,
532
514
  ): default[]
533
515
  ```
534
516
 
535
- Route ranking to the configured pruning heuristic.
517
+ Rank connections by absolute weight magnitude.
536
518
 
537
519
  Parameters:
538
520
  - `connections` - - Candidate connections to rank.
539
- - `method` - - Ranking method to apply.
540
521
 
541
- Returns: Connections sorted by ascending removal priority.
522
+ Returns: Connections sorted by ascending absolute weight.
542
523
 
543
- ### rankConnectionsByMagnitude
524
+ ### rankConnectionsByRemovalPriority
544
525
 
545
526
  ```ts
546
- rankConnectionsByMagnitude(
527
+ rankConnectionsByRemovalPriority(
547
528
  connections: default[],
529
+ method: PruningMethod,
548
530
  ): default[]
549
531
  ```
550
532
 
551
- Rank connections by absolute weight magnitude.
533
+ Route ranking to the configured pruning heuristic.
552
534
 
553
535
  Parameters:
554
536
  - `connections` - - Candidate connections to rank.
537
+ - `method` - - Ranking method to apply.
555
538
 
556
- Returns: Connections sorted by ascending absolute weight.
539
+ Returns: Connections sorted by ascending removal priority.
557
540
 
558
541
  ### rankConnectionsBySnipSaliency
559
542
 
@@ -570,52 +553,54 @@ Parameters:
570
553
 
571
554
  Returns: Connections sorted by ascending saliency.
572
555
 
573
- ### calculateSnipSaliency
556
+ ### resolveGradientMagnitude
574
557
 
575
558
  ```ts
576
- calculateSnipSaliency(
559
+ resolveGradientMagnitude(
577
560
  connection: default,
578
561
  ): number
579
562
  ```
580
563
 
581
- Compute saliency for SNIP-like ranking.
564
+ Resolve a stable gradient-magnitude proxy from connection delta statistics.
582
565
 
583
566
  Parameters:
584
- - `connection` - - Connection to score.
567
+ - `connection` - - Connection containing accumulated delta history.
585
568
 
586
- Returns: Saliency value used for sorting.
569
+ Returns: Absolute gradient magnitude proxy.
587
570
 
588
- ### resolveGradientMagnitude
571
+ ### resolvePruningMethod
589
572
 
590
573
  ```ts
591
- resolveGradientMagnitude(
592
- connection: default,
593
- ): number
574
+ resolvePruningMethod(
575
+ method: PruningMethod | undefined,
576
+ ): PruningMethod
594
577
  ```
595
578
 
596
- Resolve a stable gradient-magnitude proxy from connection delta statistics.
579
+ Normalize optional pruning method to a concrete value.
597
580
 
598
581
  Parameters:
599
- - `connection` - - Connection containing accumulated delta history.
600
-
601
- Returns: Absolute gradient magnitude proxy.
582
+ - `method` - - Optional configured pruning method.
602
583
 
603
- ## architecture/network/prune/network.prune.sparsity.utils.ts
584
+ Returns: Concrete pruning method.
604
585
 
605
- ### readInitialSparsityBaseline
586
+ ### shouldRunScheduledPrune
606
587
 
607
588
  ```ts
608
- readInitialSparsityBaseline(
609
- currentNetwork: default,
610
- ): number | undefined
589
+ shouldRunScheduledPrune(
590
+ currentIteration: number,
591
+ currentPruningConfig: { start: number; end: number; frequency: number; targetSparsity: number; method: PruningMethod; regrowFraction: number; lastPruneIter?: number | undefined; },
592
+ ): boolean
611
593
  ```
612
594
 
613
- Read baseline used for sparsity reporting.
595
+ Determine whether scheduled pruning should run at this iteration.
614
596
 
615
597
  Parameters:
616
- - `currentNetwork` - - Network to inspect.
598
+ - `currentIteration` - - Training iteration being processed.
599
+ - `currentPruningConfig` - - Active pruning schedule.
617
600
 
618
- Returns: Baseline connection count when available.
601
+ Returns: True when pruning should execute now.
602
+
603
+ ## architecture/network/prune/network.prune.sparsity.utils.ts
619
604
 
620
605
  ### calculateSparsityFromBaseline
621
606
 
@@ -634,37 +619,37 @@ Parameters:
634
619
 
635
620
  Returns: Sparsity ratio in [0,1] for valid baselines.
636
621
 
637
- ## architecture/network/prune/network.prune.evolutionary.utils.ts
638
-
639
- ### normalizeEvolutionaryTargetSparsity
622
+ ### readInitialSparsityBaseline
640
623
 
641
624
  ```ts
642
- normalizeEvolutionaryTargetSparsity(
643
- rawTargetSparsity: number,
644
- ): number
625
+ readInitialSparsityBaseline(
626
+ currentNetwork: default,
627
+ ): number | undefined
645
628
  ```
646
629
 
647
- Clamp evolutionary target sparsity to safe operational bounds.
630
+ Read baseline used for sparsity reporting.
648
631
 
649
632
  Parameters:
650
- - `rawTargetSparsity` - - Requested target sparsity.
633
+ - `currentNetwork` - - Network to inspect.
651
634
 
652
- Returns: Normalized target sparsity.
635
+ Returns: Baseline connection count when available.
653
636
 
654
- ### getOrCaptureEvolutionaryBaseline
637
+ ## architecture/network/prune/network.prune.evolutionary.utils.ts
638
+
639
+ ### buildEvolutionaryPruneSelection
655
640
 
656
641
  ```ts
657
- getOrCaptureEvolutionaryBaseline(
658
- currentNetwork: default,
659
- ): number
642
+ buildEvolutionaryPruneSelection(
643
+ context: PruneSelectionContext,
644
+ ): PruneSelectionResult
660
645
  ```
661
646
 
662
- Capture evolutionary baseline once and reuse it for subsequent pruning calls.
647
+ Build evolutionary pruning connection selection.
663
648
 
664
649
  Parameters:
665
- - `currentNetwork` - - Network to inspect and possibly initialize.
650
+ - `context` - - Inputs for ranking and slicing.
666
651
 
667
- Returns: Evolutionary baseline connection count.
652
+ Returns: Connections selected for removal.
668
653
 
669
654
  ### buildEvolutionaryTarget
670
655
 
@@ -683,20 +668,20 @@ Parameters:
683
668
 
684
669
  Returns: Desired remaining and excess connection counts.
685
670
 
686
- ### buildEvolutionaryPruneSelection
671
+ ### calculateEvolutionarySnipSaliency
687
672
 
688
673
  ```ts
689
- buildEvolutionaryPruneSelection(
690
- context: PruneSelectionContext,
691
- ): PruneSelectionResult
674
+ calculateEvolutionarySnipSaliency(
675
+ connection: default,
676
+ ): number
692
677
  ```
693
678
 
694
- Build evolutionary pruning connection selection.
679
+ Compute evolutionary SNIP-like saliency for one connection.
695
680
 
696
681
  Parameters:
697
- - `context` - - Inputs for ranking and slicing.
682
+ - `connection` - - Connection to score.
698
683
 
699
- Returns: Connections selected for removal.
684
+ Returns: Saliency score.
700
685
 
701
686
  ### disconnectEvolutionaryConnections
702
687
 
@@ -715,6 +700,21 @@ Parameters:
715
700
 
716
701
  Returns: Nothing.
717
702
 
703
+ ### getOrCaptureEvolutionaryBaseline
704
+
705
+ ```ts
706
+ getOrCaptureEvolutionaryBaseline(
707
+ currentNetwork: default,
708
+ ): number
709
+ ```
710
+
711
+ Capture evolutionary baseline once and reuse it for subsequent pruning calls.
712
+
713
+ Parameters:
714
+ - `currentNetwork` - - Network to inspect and possibly initialize.
715
+
716
+ Returns: Evolutionary baseline connection count.
717
+
718
718
  ### markEvolutionaryTopologyDirty
719
719
 
720
720
  ```ts
@@ -730,6 +730,21 @@ Parameters:
730
730
 
731
731
  Returns: Nothing.
732
732
 
733
+ ### normalizeEvolutionaryTargetSparsity
734
+
735
+ ```ts
736
+ normalizeEvolutionaryTargetSparsity(
737
+ rawTargetSparsity: number,
738
+ ): number
739
+ ```
740
+
741
+ Clamp evolutionary target sparsity to safe operational bounds.
742
+
743
+ Parameters:
744
+ - `rawTargetSparsity` - - Requested target sparsity.
745
+
746
+ Returns: Normalized target sparsity.
747
+
733
748
  ### rankEvolutionaryConnections
734
749
 
735
750
  ```ts
@@ -777,21 +792,6 @@ Parameters:
777
792
 
778
793
  Returns: Connections sorted by ascending saliency.
779
794
 
780
- ### calculateEvolutionarySnipSaliency
781
-
782
- ```ts
783
- calculateEvolutionarySnipSaliency(
784
- connection: default,
785
- ): number
786
- ```
787
-
788
- Compute evolutionary SNIP-like saliency for one connection.
789
-
790
- Parameters:
791
- - `connection` - - Connection to score.
792
-
793
- Returns: Saliency score.
794
-
795
795
  ### resolveEvolutionaryGradientMagnitude
796
796
 
797
797
  ```ts