@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
@@ -36,6 +36,10 @@ flowchart LR
36
36
 
37
37
  ## browser-entry/browser-entry.ts
38
38
 
39
+ ### FlappyBirdRunHandle
40
+
41
+ Handle returned by `start` for controlling demo execution lifecycle.
42
+
39
43
  ### start
40
44
 
41
45
  ```ts
@@ -66,10 +70,6 @@ runHandle.stop();
66
70
  await runHandle.done;
67
71
  ```
68
72
 
69
- ### FlappyBirdRunHandle
70
-
71
- Handle returned by `start` for controlling demo execution lifecycle.
72
-
73
73
  ## browser-entry/browser-entry.types.ts
74
74
 
75
75
  Aggregated public type surface for the Flappy Bird browser runtime.
@@ -99,42 +99,33 @@ flowchart TB
99
99
  PublicTypes --> Viz["visualization types\nlegend and color scales"]
100
100
  ```
101
101
 
102
- ### FlappyBirdRunHandle
103
-
104
- Handle returned by `start` for controlling demo execution lifecycle.
105
-
106
- ### RuntimeWindow
107
-
108
- Runtime window contract for the Flappy Bird browser demo.
102
+ ### BrowserDifficultyProfile
109
103
 
110
- The demo exposes a small debug-friendly surface on `window` so manual browser
111
- experiments and docs examples can start the simulation without importing the
112
- bundle as a module.
104
+ Difficulty profile consumed by simulation observation helpers.
113
105
 
114
- ### FlappyStatsKey
106
+ This bundles the three variables that define how demanding a stretch of the
107
+ course is: corridor width, pipe speed, and spawn cadence.
115
108
 
116
- Runtime stats table key union used across browser-entry helpers.
109
+ ### BrowserPopulationBirdLike
117
110
 
118
- ### FlappyStatsRowDescriptor
111
+ Bird shape used by utility winner/leader resolver helpers.
119
112
 
120
- Declarative row descriptor for the runtime stats table.
113
+ ### BrowserPopulationPipeLike
121
114
 
122
- Each row is described as data first so the HUD can be assembled in a stable,
123
- testable order instead of being hand-written imperatively.
115
+ Pipe shape used by utility observation-vector helpers.
124
116
 
125
- ### FlappyStatsTableCells
117
+ ### ColorLegendRow
126
118
 
127
- Runtime lookup map of stat keys to writable value cells.
119
+ Legend row model for network visualization color legends.
128
120
 
129
- This acts like a small DOM index so the update loop can mutate the correct
130
- cells directly without repeatedly querying the document.
121
+ Each row labels a numeric interval and the color used to render it.
131
122
 
132
- ### FlappyStatsCategoryColors
123
+ ### ColorTier
133
124
 
134
- Color pair used for stats category key/value styling.
125
+ Connection or bias tier used for color mapping ramps.
135
126
 
136
- The HUD uses paired colors so labels and values stay visually grouped while
137
- still separating categories such as current run, telemetry, and best-so-far.
127
+ Visualization buckets continuous weights into legible color bands so humans
128
+ can scan sign and magnitude at a glance.
138
129
 
139
130
  ### CreateFlappyStatsTableRowsInput
140
131
 
@@ -143,39 +134,6 @@ Input contract for declarative runtime stats table row builder.
143
134
  The builder needs both the target table and a small policy surface that says
144
135
  whether instrumentation rows should appear and how rows should be colored.
145
136
 
146
- ### SerializedNetwork
147
-
148
- Loose JSON-compatible network payload used by worker messages.
149
-
150
- ### PopulationPipe
151
-
152
- Renderable pipe state snapshot emitted by the playback worker.
153
-
154
- This is the smallest pipe shape the browser renderer needs for one frame:
155
- horizontal position plus the vertical corridor geometry.
156
-
157
- ### PopulationBird
158
-
159
- Renderable bird state snapshot emitted by the playback worker.
160
-
161
- The browser does not receive full neural state here. It only gets the fields
162
- needed for presentation and HUD summaries, which keeps per-frame transport
163
- light.
164
-
165
- ### PackedPlaybackPipeSnapshot
166
-
167
- Packed typed-array payload for playback pipe snapshot transport.
168
-
169
- Typed arrays keep frame payloads compact and predictable, which matters when
170
- the worker is streaming many birds and pipes across animation frames.
171
-
172
- ### PackedPlaybackBirdSnapshot
173
-
174
- Packed typed-array payload for playback bird snapshot transport.
175
-
176
- This mirrors the pipe packing strategy so playback can move large population
177
- snapshots with less allocation pressure than object-per-bird messages.
178
-
179
137
  ### EvolutionGenerationPayload
180
138
 
181
139
  Worker payload describing evolved generation summary values.
@@ -188,9 +146,13 @@ network for visualization or playback.
188
146
 
189
147
  Worker message emitted when a generation has completed evolving.
190
148
 
191
- ### EvolutionWorkerErrorMessage
149
+ ### EvolutionPlaybackStepMessage
192
150
 
193
- Worker message emitted for simulation/playback errors.
151
+ Worker message carrying one playback step and aggregate markers.
152
+
153
+ Besides the frame snapshot itself, this message also carries summary values
154
+ used by the HUD so the browser can show performance and progress without
155
+ recomputing population-wide statistics on the main thread.
194
156
 
195
157
  ### EvolutionPlaybackStepSnapshot
196
158
 
@@ -200,13 +162,9 @@ A snapshot combines geometry, packed population state, and lightweight world
200
162
  metadata so the browser can render a deterministic frame without rerunning
201
163
  the simulation locally.
202
164
 
203
- ### EvolutionPlaybackStepMessage
204
-
205
- Worker message carrying one playback step and aggregate markers.
165
+ ### EvolutionWorkerErrorMessage
206
166
 
207
- Besides the frame snapshot itself, this message also carries summary values
208
- used by the HUD so the browser can show performance and progress without
209
- recomputing population-wide statistics on the main thread.
167
+ Worker message emitted for simulation/playback errors.
210
168
 
211
169
  ### EvolutionWorkerMessage
212
170
 
@@ -215,6 +173,67 @@ Union of all supported worker messages consumed by browser entry.
215
173
  A closed union keeps the main-thread message handler explicit and easy to
216
174
  audit when the protocol evolves.
217
175
 
176
+ ### FlappyBirdRunHandle
177
+
178
+ Handle returned by `start` for controlling demo execution lifecycle.
179
+
180
+ ### FlappyStatsCategoryColors
181
+
182
+ Color pair used for stats category key/value styling.
183
+
184
+ The HUD uses paired colors so labels and values stay visually grouped while
185
+ still separating categories such as current run, telemetry, and best-so-far.
186
+
187
+ ### FlappyStatsKey
188
+
189
+ Runtime stats table key union used across browser-entry helpers.
190
+
191
+ ### FlappyStatsRowDescriptor
192
+
193
+ Declarative row descriptor for the runtime stats table.
194
+
195
+ Each row is described as data first so the HUD can be assembled in a stable,
196
+ testable order instead of being hand-written imperatively.
197
+
198
+ ### FlappyStatsTableCells
199
+
200
+ Runtime lookup map of stat keys to writable value cells.
201
+
202
+ This acts like a small DOM index so the update loop can mutate the correct
203
+ cells directly without repeatedly querying the document.
204
+
205
+ ### NetworkLegendLayout
206
+
207
+ Precomputed legend panel layout used by visualization renderer.
208
+
209
+ Layout is resolved up front so the draw path can stay focused on painting,
210
+ not recomputing geometry every frame.
211
+
212
+ ### NetworkNodeDimensionsLike
213
+
214
+ Pixel dimensions used for network-node rectangle rendering.
215
+
216
+ Keeping node box dimensions explicit makes legend and topology layout easier
217
+ to tune without hidden drawing constants.
218
+
219
+ ### NetworkVisualizationHandle
220
+
221
+ Draw callback contract for network architecture panel updates.
222
+
223
+ ### PackedPlaybackBirdSnapshot
224
+
225
+ Packed typed-array payload for playback bird snapshot transport.
226
+
227
+ This mirrors the pipe packing strategy so playback can move large population
228
+ snapshots with less allocation pressure than object-per-bird messages.
229
+
230
+ ### PackedPlaybackPipeSnapshot
231
+
232
+ Packed typed-array payload for playback pipe snapshot transport.
233
+
234
+ Typed arrays keep frame payloads compact and predictable, which matters when
235
+ the worker is streaming many birds and pipes across animation frames.
236
+
218
237
  ### PlaybackFrameStats
219
238
 
220
239
  Lightweight per-frame telemetry emitted to HUD update callback.
@@ -223,20 +242,20 @@ These values are the browser-friendly metrics shown in the live status panel:
223
242
  how many birds remain, how far the leader has progressed, and how expensive
224
243
  the current playback cadence is.
225
244
 
226
- ### BrowserPopulationBirdLike
227
-
228
- Bird shape used by utility winner/leader resolver helpers.
245
+ ### PopulationBird
229
246
 
230
- ### BrowserPopulationPipeLike
247
+ Renderable bird state snapshot emitted by the playback worker.
231
248
 
232
- Pipe shape used by utility observation-vector helpers.
249
+ The browser does not receive full neural state here. It only gets the fields
250
+ needed for presentation and HUD summaries, which keeps per-frame transport
251
+ light.
233
252
 
234
- ### BrowserDifficultyProfile
253
+ ### PopulationPipe
235
254
 
236
- Difficulty profile consumed by simulation observation helpers.
255
+ Renderable pipe state snapshot emitted by the playback worker.
237
256
 
238
- This bundles the three variables that define how demanding a stretch of the
239
- course is: corridor width, pipe speed, and spawn cadence.
257
+ This is the smallest pipe shape the browser renderer needs for one frame:
258
+ horizontal position plus the vertical corridor geometry.
240
259
 
241
260
  ### PopulationRenderState
242
261
 
@@ -246,19 +265,23 @@ The playback layer incrementally updates this state as worker snapshots
246
265
  arrive, which lets rendering stay deterministic without re-deriving world
247
266
  history from scratch each frame.
248
267
 
249
- ### TrailPoint
268
+ ### PositionedNetworkNodeLike
250
269
 
251
- Trail point used by playback trail rendering cache.
270
+ Positioned node instance used by network visualization drawing.
252
271
 
253
- A trail point stores where one bird was at one frame so the UI can draw a
254
- short motion history behind active agents.
272
+ Layout and rendering are split: first a node is assigned screen coordinates,
273
+ then the renderer paints it.
255
274
 
256
- ### TrailState
275
+ ### RenderClosedOuterBoxInput
257
276
 
258
- Mutable trail cache keyed by bird index for frame rendering.
277
+ Input contract for outer frame rendering helper.
259
278
 
260
- This cache exists purely for visualization ergonomics; it is not part of the
261
- worker simulation state.
279
+ The outer frame is the decorative shell that visually separates the playable
280
+ world and telemetry panels from the rest of the page.
281
+
282
+ ### RenderStandaloneTitleBoxInput
283
+
284
+ Input contract for standalone title frame rendering helper.
262
285
 
263
286
  ### RngLike
264
287
 
@@ -267,23 +290,17 @@ Minimal random source contract used by utility random helpers.
267
290
  The narrow contract keeps deterministic spawn utilities portable across
268
291
  browser and test contexts.
269
292
 
270
- ### RenderStandaloneTitleBoxInput
271
-
272
- Input contract for standalone title frame rendering helper.
273
-
274
- ### RenderClosedOuterBoxInput
275
-
276
- Input contract for outer frame rendering helper.
293
+ ### RuntimeWindow
277
294
 
278
- The outer frame is the decorative shell that visually separates the playable
279
- world and telemetry panels from the rest of the page.
295
+ Runtime window contract for the Flappy Bird browser demo.
280
296
 
281
- ### ViewportInfo
297
+ The demo exposes a small debug-friendly surface on `window` so manual browser
298
+ experiments and docs examples can start the simulation without importing the
299
+ bundle as a module.
282
300
 
283
- Viewport transform values for world-to-canvas rendering.
301
+ ### SerializedNetwork
284
302
 
285
- These numbers answer the classic graphics question: how does one unit in the
286
- simulated world map into the current canvas rectangle?
303
+ Loose JSON-compatible network payload used by worker messages.
287
304
 
288
305
  ### TextFrameMetrics
289
306
 
@@ -292,29 +309,26 @@ Canvas text-grid metrics used for frame rendering layout helpers.
292
309
  The frame renderer measures glyph and row geometry once, then uses that grid
293
310
  to place ASCII-style UI elements consistently.
294
311
 
295
- ### NetworkVisualizationHandle
296
-
297
- Draw callback contract for network architecture panel updates.
298
-
299
- ### ColorTier
312
+ ### TrailPoint
300
313
 
301
- Connection or bias tier used for color mapping ramps.
314
+ Trail point used by playback trail rendering cache.
302
315
 
303
- Visualization buckets continuous weights into legible color bands so humans
304
- can scan sign and magnitude at a glance.
316
+ A trail point stores where one bird was at one frame so the UI can draw a
317
+ short motion history behind active agents.
305
318
 
306
- ### ColorLegendRow
319
+ ### TrailState
307
320
 
308
- Legend row model for network visualization color legends.
321
+ Mutable trail cache keyed by bird index for frame rendering.
309
322
 
310
- Each row labels a numeric interval and the color used to render it.
323
+ This cache exists purely for visualization ergonomics; it is not part of the
324
+ worker simulation state.
311
325
 
312
- ### NetworkLegendLayout
326
+ ### ViewportInfo
313
327
 
314
- Precomputed legend panel layout used by visualization renderer.
328
+ Viewport transform values for world-to-canvas rendering.
315
329
 
316
- Layout is resolved up front so the draw path can stay focused on painting,
317
- not recomputing geometry every frame.
330
+ These numbers answer the classic graphics question: how does one unit in the
331
+ simulated world map into the current canvas rectangle?
318
332
 
319
333
  ### VisualNetworkConnectionLike
320
334
 
@@ -330,27 +344,27 @@ Lightweight node shape used by network visualization drawing.
330
344
  This shape keeps the renderer independent from the concrete Network class
331
345
  while still exposing the semantic fields that matter visually.
332
346
 
333
- ### PositionedNetworkNodeLike
347
+ ## browser-entry/browser-entry.stats.types.ts
334
348
 
335
- Positioned node instance used by network visualization drawing.
349
+ HUD and runtime stats contracts for the Flappy Bird browser demo.
336
350
 
337
- Layout and rendering are split: first a node is assigned screen coordinates,
338
- then the renderer paints it.
351
+ The browser HUD is intentionally declarative: keys describe what should be
352
+ shown, and helper utilities map those keys to DOM rows and live values. That
353
+ keeps the status panel readable even as telemetry grows.
339
354
 
340
- ### NetworkNodeDimensionsLike
355
+ ### CreateFlappyStatsTableRowsInput
341
356
 
342
- Pixel dimensions used for network-node rectangle rendering.
357
+ Input contract for declarative runtime stats table row builder.
343
358
 
344
- Keeping node box dimensions explicit makes legend and topology layout easier
345
- to tune without hidden drawing constants.
359
+ The builder needs both the target table and a small policy surface that says
360
+ whether instrumentation rows should appear and how rows should be colored.
346
361
 
347
- ## browser-entry/browser-entry.stats.types.ts
362
+ ### FlappyStatsCategoryColors
348
363
 
349
- HUD and runtime stats contracts for the Flappy Bird browser demo.
364
+ Color pair used for stats category key/value styling.
350
365
 
351
- The browser HUD is intentionally declarative: keys describe what should be
352
- shown, and helper utilities map those keys to DOM rows and live values. That
353
- keeps the status panel readable even as telemetry grows.
366
+ The HUD uses paired colors so labels and values stay visually grouped while
367
+ still separating categories such as current run, telemetry, and best-so-far.
354
368
 
355
369
  ### FlappyStatsKey
356
370
 
@@ -370,20 +384,6 @@ Runtime lookup map of stat keys to writable value cells.
370
384
  This acts like a small DOM index so the update loop can mutate the correct
371
385
  cells directly without repeatedly querying the document.
372
386
 
373
- ### FlappyStatsCategoryColors
374
-
375
- Color pair used for stats category key/value styling.
376
-
377
- The HUD uses paired colors so labels and values stay visually grouped while
378
- still separating categories such as current run, telemetry, and best-so-far.
379
-
380
- ### CreateFlappyStatsTableRowsInput
381
-
382
- Input contract for declarative runtime stats table row builder.
383
-
384
- The builder needs both the target table and a small policy surface that says
385
- whether instrumentation rows should appear and how rows should be colored.
386
-
387
387
  ## browser-entry/browser-entry.render.types.ts
388
388
 
389
389
  Canvas frame-layout contracts for the Flappy Bird browser demo.
@@ -392,10 +392,6 @@ These types support the demo's deliberately stylized text-frame chrome: title
392
392
  boxes, outer borders, and viewport transforms that make the example feel more
393
393
  like an instrument panel than a plain canvas game.
394
394
 
395
- ### RenderStandaloneTitleBoxInput
396
-
397
- Input contract for standalone title frame rendering helper.
398
-
399
395
  ### RenderClosedOuterBoxInput
400
396
 
401
397
  Input contract for outer frame rendering helper.
@@ -403,12 +399,9 @@ Input contract for outer frame rendering helper.
403
399
  The outer frame is the decorative shell that visually separates the playable
404
400
  world and telemetry panels from the rest of the page.
405
401
 
406
- ### ViewportInfo
407
-
408
- Viewport transform values for world-to-canvas rendering.
402
+ ### RenderStandaloneTitleBoxInput
409
403
 
410
- These numbers answer the classic graphics question: how does one unit in the
411
- simulated world map into the current canvas rectangle?
404
+ Input contract for standalone title frame rendering helper.
412
405
 
413
406
  ### TextFrameMetrics
414
407
 
@@ -417,6 +410,13 @@ Canvas text-grid metrics used for frame rendering layout helpers.
417
410
  The frame renderer measures glyph and row geometry once, then uses that grid
418
411
  to place ASCII-style UI elements consistently.
419
412
 
413
+ ### ViewportInfo
414
+
415
+ Viewport transform values for world-to-canvas rendering.
416
+
417
+ These numbers answer the classic graphics question: how does one unit in the
418
+ simulated world map into the current canvas rectangle?
419
+
420
420
  ## browser-entry/browser-entry.worker.types.ts
421
421
 
422
422
  Worker transport contracts for the Flappy Bird browser runtime.
@@ -429,39 +429,6 @@ transferred frame-by-frame, and which events advance the demo state.
429
429
  If you want background reading, the Wikipedia article on "message passing"
430
430
  provides a useful conceptual frame for this boundary.
431
431
 
432
- ### SerializedNetwork
433
-
434
- Loose JSON-compatible network payload used by worker messages.
435
-
436
- ### PopulationPipe
437
-
438
- Renderable pipe state snapshot emitted by the playback worker.
439
-
440
- This is the smallest pipe shape the browser renderer needs for one frame:
441
- horizontal position plus the vertical corridor geometry.
442
-
443
- ### PopulationBird
444
-
445
- Renderable bird state snapshot emitted by the playback worker.
446
-
447
- The browser does not receive full neural state here. It only gets the fields
448
- needed for presentation and HUD summaries, which keeps per-frame transport
449
- light.
450
-
451
- ### PackedPlaybackPipeSnapshot
452
-
453
- Packed typed-array payload for playback pipe snapshot transport.
454
-
455
- Typed arrays keep frame payloads compact and predictable, which matters when
456
- the worker is streaming many birds and pipes across animation frames.
457
-
458
- ### PackedPlaybackBirdSnapshot
459
-
460
- Packed typed-array payload for playback bird snapshot transport.
461
-
462
- This mirrors the pipe packing strategy so playback can move large population
463
- snapshots with less allocation pressure than object-per-bird messages.
464
-
465
432
  ### EvolutionGenerationPayload
466
433
 
467
434
  Worker payload describing evolved generation summary values.
@@ -474,9 +441,13 @@ network for visualization or playback.
474
441
 
475
442
  Worker message emitted when a generation has completed evolving.
476
443
 
477
- ### EvolutionWorkerErrorMessage
444
+ ### EvolutionPlaybackStepMessage
478
445
 
479
- Worker message emitted for simulation/playback errors.
446
+ Worker message carrying one playback step and aggregate markers.
447
+
448
+ Besides the frame snapshot itself, this message also carries summary values
449
+ used by the HUD so the browser can show performance and progress without
450
+ recomputing population-wide statistics on the main thread.
480
451
 
481
452
  ### EvolutionPlaybackStepSnapshot
482
453
 
@@ -486,13 +457,9 @@ A snapshot combines geometry, packed population state, and lightweight world
486
457
  metadata so the browser can render a deterministic frame without rerunning
487
458
  the simulation locally.
488
459
 
489
- ### EvolutionPlaybackStepMessage
490
-
491
- Worker message carrying one playback step and aggregate markers.
460
+ ### EvolutionWorkerErrorMessage
492
461
 
493
- Besides the frame snapshot itself, this message also carries summary values
494
- used by the HUD so the browser can show performance and progress without
495
- recomputing population-wide statistics on the main thread.
462
+ Worker message emitted for simulation/playback errors.
496
463
 
497
464
  ### EvolutionWorkerMessage
498
465
 
@@ -501,6 +468,20 @@ Union of all supported worker messages consumed by browser entry.
501
468
  A closed union keeps the main-thread message handler explicit and easy to
502
469
  audit when the protocol evolves.
503
470
 
471
+ ### PackedPlaybackBirdSnapshot
472
+
473
+ Packed typed-array payload for playback bird snapshot transport.
474
+
475
+ This mirrors the pipe packing strategy so playback can move large population
476
+ snapshots with less allocation pressure than object-per-bird messages.
477
+
478
+ ### PackedPlaybackPipeSnapshot
479
+
480
+ Packed typed-array payload for playback pipe snapshot transport.
481
+
482
+ Typed arrays keep frame payloads compact and predictable, which matters when
483
+ the worker is streaming many birds and pipes across animation frames.
484
+
504
485
  ### PlaybackFrameStats
505
486
 
506
487
  Lightweight per-frame telemetry emitted to HUD update callback.
@@ -509,6 +490,25 @@ These values are the browser-friendly metrics shown in the live status panel:
509
490
  how many birds remain, how far the leader has progressed, and how expensive
510
491
  the current playback cadence is.
511
492
 
493
+ ### PopulationBird
494
+
495
+ Renderable bird state snapshot emitted by the playback worker.
496
+
497
+ The browser does not receive full neural state here. It only gets the fields
498
+ needed for presentation and HUD summaries, which keeps per-frame transport
499
+ light.
500
+
501
+ ### PopulationPipe
502
+
503
+ Renderable pipe state snapshot emitted by the playback worker.
504
+
505
+ This is the smallest pipe shape the browser renderer needs for one frame:
506
+ horizontal position plus the vertical corridor geometry.
507
+
508
+ ### SerializedNetwork
509
+
510
+ Loose JSON-compatible network payload used by worker messages.
511
+
512
512
  ## browser-entry/browser-entry.runtime.types.ts
513
513
 
514
514
  Public lifecycle contracts for the Flappy Bird browser runtime.
@@ -537,6 +537,13 @@ Simulation-facing browser contracts shared by playback helpers.
537
537
  These types describe the minimum world state the browser needs while it is
538
538
  reconstructing, rendering, or summarizing worker-produced frames.
539
539
 
540
+ ### BrowserDifficultyProfile
541
+
542
+ Difficulty profile consumed by simulation observation helpers.
543
+
544
+ This bundles the three variables that define how demanding a stretch of the
545
+ course is: corridor width, pipe speed, and spawn cadence.
546
+
540
547
  ### BrowserPopulationBirdLike
541
548
 
542
549
  Bird shape used by utility winner/leader resolver helpers.
@@ -545,13 +552,6 @@ Bird shape used by utility winner/leader resolver helpers.
545
552
 
546
553
  Pipe shape used by utility observation-vector helpers.
547
554
 
548
- ### BrowserDifficultyProfile
549
-
550
- Difficulty profile consumed by simulation observation helpers.
551
-
552
- This bundles the three variables that define how demanding a stretch of the
553
- course is: corridor width, pipe speed, and spawn cadence.
554
-
555
555
  ### PopulationRenderState
556
556
 
557
557
  Mutable render-state model consumed by the population frame renderer.
@@ -560,6 +560,13 @@ The playback layer incrementally updates this state as worker snapshots
560
560
  arrive, which lets rendering stay deterministic without re-deriving world
561
561
  history from scratch each frame.
562
562
 
563
+ ### RngLike
564
+
565
+ Minimal random source contract used by utility random helpers.
566
+
567
+ The narrow contract keeps deterministic spawn utilities portable across
568
+ browser and test contexts.
569
+
563
570
  ### TrailPoint
564
571
 
565
572
  Trail point used by playback trail rendering cache.
@@ -574,13 +581,6 @@ Mutable trail cache keyed by bird index for frame rendering.
574
581
  This cache exists purely for visualization ergonomics; it is not part of the
575
582
  worker simulation state.
576
583
 
577
- ### RngLike
578
-
579
- Minimal random source contract used by utility random helpers.
580
-
581
- The narrow contract keeps deterministic spawn utilities portable across
582
- browser and test contexts.
583
-
584
584
  ## browser-entry/browser-entry.visualization.types.ts
585
585
 
586
586
  Network-visualization contracts for the Flappy Bird browser demo.
@@ -590,9 +590,11 @@ controllers as structures, not just as scores. These types describe the
590
590
  lightweight shapes used by the architecture panel so rendering logic can stay
591
591
  decoupled from the full internal network implementation.
592
592
 
593
- ### NetworkVisualizationHandle
593
+ ### ColorLegendRow
594
594
 
595
- Draw callback contract for network architecture panel updates.
595
+ Legend row model for network visualization color legends.
596
+
597
+ Each row labels a numeric interval and the color used to render it.
596
598
 
597
599
  ### ColorTier
598
600
 
@@ -601,12 +603,6 @@ Connection or bias tier used for color mapping ramps.
601
603
  Visualization buckets continuous weights into legible color bands so humans
602
604
  can scan sign and magnitude at a glance.
603
605
 
604
- ### ColorLegendRow
605
-
606
- Legend row model for network visualization color legends.
607
-
608
- Each row labels a numeric interval and the color used to render it.
609
-
610
606
  ### NetworkLegendLayout
611
607
 
612
608
  Precomputed legend panel layout used by visualization renderer.
@@ -614,19 +610,16 @@ Precomputed legend panel layout used by visualization renderer.
614
610
  Layout is resolved up front so the draw path can stay focused on painting,
615
611
  not recomputing geometry every frame.
616
612
 
617
- ### VisualNetworkConnectionLike
618
-
619
- Lightweight connection shape used by network visualization drawing.
613
+ ### NetworkNodeDimensionsLike
620
614
 
621
- The renderer only needs connectivity, weight, and enabled state, not the full
622
- training-time behavior of a connection object.
615
+ Pixel dimensions used for network-node rectangle rendering.
623
616
 
624
- ### VisualNetworkNodeLike
617
+ Keeping node box dimensions explicit makes legend and topology layout easier
618
+ to tune without hidden drawing constants.
625
619
 
626
- Lightweight node shape used by network visualization drawing.
620
+ ### NetworkVisualizationHandle
627
621
 
628
- This shape keeps the renderer independent from the concrete Network class
629
- while still exposing the semantic fields that matter visually.
622
+ Draw callback contract for network architecture panel updates.
630
623
 
631
624
  ### PositionedNetworkNodeLike
632
625
 
@@ -635,12 +628,19 @@ Positioned node instance used by network visualization drawing.
635
628
  Layout and rendering are split: first a node is assigned screen coordinates,
636
629
  then the renderer paints it.
637
630
 
638
- ### NetworkNodeDimensionsLike
631
+ ### VisualNetworkConnectionLike
639
632
 
640
- Pixel dimensions used for network-node rectangle rendering.
633
+ Lightweight connection shape used by network visualization drawing.
641
634
 
642
- Keeping node box dimensions explicit makes legend and topology layout easier
643
- to tune without hidden drawing constants.
635
+ The renderer only needs connectivity, weight, and enabled state, not the full
636
+ training-time behavior of a connection object.
637
+
638
+ ### VisualNetworkNodeLike
639
+
640
+ Lightweight node shape used by network visualization drawing.
641
+
642
+ This shape keeps the renderer independent from the concrete Network class
643
+ while still exposing the semantic fields that matter visually.
644
644
 
645
645
  ## browser-entry/browser-entry.host.utils.ts
646
646
 
@@ -685,6 +685,23 @@ Returns: Nothing.
685
685
 
686
686
  ## browser-entry/browser-entry.math.utils.ts
687
687
 
688
+ ### applyAlphaToHexColor
689
+
690
+ ```ts
691
+ applyAlphaToHexColor(
692
+ hexColor: string,
693
+ alphaValue: number,
694
+ ): string
695
+ ```
696
+
697
+ Converts a six-digit hex color to rgba with the requested alpha.
698
+
699
+ Parameters:
700
+ - `hexColor` - - Color in `#RRGGBB` form.
701
+ - `alphaValue` - - Alpha value to apply.
702
+
703
+ Returns: rgba color string, or original value when not 6-digit hex.
704
+
688
705
  ### clamp
689
706
 
690
707
  ```ts
@@ -738,41 +755,44 @@ Parameters:
738
755
 
739
756
  Returns: Interpolated value.
740
757
 
741
- ### applyAlphaToHexColor
758
+ ## browser-entry/browser-entry.spawn.utils.ts
759
+
760
+ ### createBirdColor
742
761
 
743
762
  ```ts
744
- applyAlphaToHexColor(
745
- hexColor: string,
746
- alphaValue: number,
763
+ createBirdColor(
764
+ birdIndex: number,
765
+ totalBirds: number,
747
766
  ): string
748
767
  ```
749
768
 
750
- Converts a six-digit hex color to rgba with the requested alpha.
769
+ Resolves deterministic bird color from palette index.
751
770
 
752
771
  Parameters:
753
- - `hexColor` - - Color in `#RRGGBB` form.
754
- - `alphaValue` - - Alpha value to apply.
755
-
756
- Returns: rgba color string, or original value when not 6-digit hex.
772
+ - `birdIndex` - - Bird index in current population.
773
+ - `totalBirds` - - Population size.
757
774
 
758
- ## browser-entry/browser-entry.spawn.utils.ts
775
+ Returns: Hex color string.
759
776
 
760
- ### sampleGapCenterY
777
+ ### resolveGapCenterUpperBoundYPx
761
778
 
762
779
  ```ts
763
- sampleGapCenterY(
764
- rng: RngLike,
780
+ resolveGapCenterUpperBoundYPx(
765
781
  worldHeightPx: number,
766
782
  ): number
767
783
  ```
768
784
 
769
- Samples a random gap center y-position.
785
+ Resolves the exclusive upper bound used for gap-center sampling.
786
+
787
+ Educational note:
788
+ We cap dynamic viewport-derived bounds at the shared simulation maximum to
789
+ keep browser playback distribution aligned with trainer/evaluation defaults,
790
+ while still supporting smaller world heights.
770
791
 
771
792
  Parameters:
772
- - `rng` - - Deterministic RNG.
773
- - `worldHeightPx` - - World height used to derive valid gap-center bounds.
793
+ - `worldHeightPx` - - Current world height.
774
794
 
775
- Returns: Sampled y-position.
795
+ Returns: Exclusive upper bound for `nextInt(minInclusive, maxExclusive)`.
776
796
 
777
797
  ### resolveNextSpawnGapCenterY
778
798
 
@@ -793,23 +813,6 @@ Parameters:
793
813
 
794
814
  Returns: Next gap center y-position.
795
815
 
796
- ### createBirdColor
797
-
798
- ```ts
799
- createBirdColor(
800
- birdIndex: number,
801
- totalBirds: number,
802
- ): string
803
- ```
804
-
805
- Resolves deterministic bird color from palette index.
806
-
807
- Parameters:
808
- - `birdIndex` - - Bird index in current population.
809
- - `totalBirds` - - Population size.
810
-
811
- Returns: Hex color string.
812
-
813
816
  ### resolveNextSpawnGapSize
814
817
 
815
818
  ```ts
@@ -846,25 +849,22 @@ Parameters:
846
849
 
847
850
  Returns: Next spawn interval in frames.
848
851
 
849
- ### resolveGapCenterUpperBoundYPx
852
+ ### sampleGapCenterY
850
853
 
851
854
  ```ts
852
- resolveGapCenterUpperBoundYPx(
855
+ sampleGapCenterY(
856
+ rng: RngLike,
853
857
  worldHeightPx: number,
854
858
  ): number
855
859
  ```
856
860
 
857
- Resolves the exclusive upper bound used for gap-center sampling.
858
-
859
- Educational note:
860
- We cap dynamic viewport-derived bounds at the shared simulation maximum to
861
- keep browser playback distribution aligned with trainer/evaluation defaults,
862
- while still supporting smaller world heights.
861
+ Samples a random gap center y-position.
863
862
 
864
863
  Parameters:
865
- - `worldHeightPx` - - Current world height.
864
+ - `rng` - - Deterministic RNG.
865
+ - `worldHeightPx` - - World height used to derive valid gap-center bounds.
866
866
 
867
- Returns: Exclusive upper bound for `nextInt(minInclusive, maxExclusive)`.
867
+ Returns: Sampled y-position.
868
868
 
869
869
  ## browser-entry/browser-entry.stats.utils.ts
870
870
 
@@ -934,164 +934,158 @@ Returns: Aggregate playback summary for the current episode.
934
934
 
935
935
  ## browser-entry/browser-entry.viewport.utils.ts
936
936
 
937
- ### resolveWorldViewport
937
+ ### resolvePipeSpawnXPx
938
938
 
939
939
  ```ts
940
- resolveWorldViewport(
941
- canvas: HTMLCanvasElement,
942
- ): ViewportInfo
940
+ resolvePipeSpawnXPx(
941
+ visibleWorldWidthPx: number,
942
+ ): number
943
943
  ```
944
944
 
945
- Resolves world viewport transformation based on canvas size.
945
+ Resolves the world-space x spawn position for new pipes.
946
946
 
947
947
  Parameters:
948
- - `canvas` - - Playback canvas.
948
+ - `visibleWorldWidthPx` - - Current visible world width.
949
949
 
950
- Returns: Viewport scale and offsets.
950
+ Returns: Spawn x-position.
951
951
 
952
- ### resolveVisibleWorldWidthPx
952
+ ### resolveVisibleWorldHeightPx
953
953
 
954
954
  ```ts
955
- resolveVisibleWorldWidthPx(
955
+ resolveVisibleWorldHeightPx(
956
956
  canvas: HTMLCanvasElement,
957
957
  ): number
958
958
  ```
959
959
 
960
- Resolves visible world width represented by the current canvas.
960
+ Resolves visible world height represented by the current canvas.
961
961
 
962
962
  Educational note:
963
963
  The current viewport model uses a 1:1 mapping between canvas pixels and
964
- world-space pixels, so visible width is the canvas width directly.
964
+ world-space pixels, so visible height is the canvas height directly.
965
965
 
966
966
  Parameters:
967
967
  - `canvas` - - Playback canvas.
968
968
 
969
- Returns: Visible width in world-space pixels.
969
+ Returns: Visible height in world-space pixels.
970
970
 
971
- ### resolveVisibleWorldHeightPx
971
+ ### resolveVisibleWorldWidthPx
972
972
 
973
973
  ```ts
974
- resolveVisibleWorldHeightPx(
974
+ resolveVisibleWorldWidthPx(
975
975
  canvas: HTMLCanvasElement,
976
976
  ): number
977
977
  ```
978
978
 
979
- Resolves visible world height represented by the current canvas.
979
+ Resolves visible world width represented by the current canvas.
980
980
 
981
981
  Educational note:
982
982
  The current viewport model uses a 1:1 mapping between canvas pixels and
983
- world-space pixels, so visible height is the canvas height directly.
983
+ world-space pixels, so visible width is the canvas width directly.
984
984
 
985
985
  Parameters:
986
986
  - `canvas` - - Playback canvas.
987
987
 
988
- Returns: Visible height in world-space pixels.
988
+ Returns: Visible width in world-space pixels.
989
989
 
990
- ### resolvePipeSpawnXPx
990
+ ### resolveWorldViewport
991
991
 
992
992
  ```ts
993
- resolvePipeSpawnXPx(
994
- visibleWorldWidthPx: number,
995
- ): number
993
+ resolveWorldViewport(
994
+ canvas: HTMLCanvasElement,
995
+ ): ViewportInfo
996
996
  ```
997
997
 
998
- Resolves the world-space x spawn position for new pipes.
998
+ Resolves world viewport transformation based on canvas size.
999
999
 
1000
1000
  Parameters:
1001
- - `visibleWorldWidthPx` - - Current visible world width.
1001
+ - `canvas` - - Playback canvas.
1002
1002
 
1003
- Returns: Spawn x-position.
1003
+ Returns: Viewport scale and offsets.
1004
1004
 
1005
1005
  ## browser-entry/browser-entry.telemetry.utils.ts
1006
1006
 
1007
- ### trimSamplesToWindow
1007
+ ### createMinorGcObserver
1008
1008
 
1009
1009
  ```ts
1010
- trimSamplesToWindow(
1011
- samples: number[],
1012
- windowMs: number,
1013
- nowMs: number,
1014
- ): void
1010
+ createMinorGcObserver(
1011
+ minorGcTimestampsMs: number[],
1012
+ ): PerformanceObserver | undefined
1015
1013
  ```
1016
1014
 
1017
- Trims timestamp samples to a sliding time window.
1015
+ Creates a PerformanceObserver that tracks minor GC events when supported.
1018
1016
 
1019
1017
  Parameters:
1020
- - `samples` - - Mutable timestamp buffer.
1021
- - `windowMs` - - Window width in milliseconds.
1022
- - `nowMs` - - Current timestamp.
1018
+ - `minorGcTimestampsMs` - - Mutable minor-GC timestamp buffer.
1023
1019
 
1024
- Returns: Nothing.
1020
+ Returns: Observer when supported; otherwise `undefined`.
1025
1021
 
1026
- ### resolveHudUpdatesPerSecond
1022
+ ### resolveEventsPerMinute
1027
1023
 
1028
1024
  ```ts
1029
- resolveHudUpdatesPerSecond(
1025
+ resolveEventsPerMinute(
1030
1026
  samples: number[],
1031
1027
  ): number
1032
1028
  ```
1033
1029
 
1034
- Resolves HUD updates per second from the latest sample window.
1030
+ Resolves events per minute from the latest sample window.
1035
1031
 
1036
1032
  Parameters:
1037
- - `samples` - - HUD update timestamps.
1033
+ - `samples` - - Event timestamps.
1038
1034
 
1039
- Returns: Updates-per-second estimate.
1035
+ Returns: Events-per-minute estimate.
1040
1036
 
1041
- ### resolveEventsPerMinute
1037
+ ### resolveHudUpdatesPerSecond
1042
1038
 
1043
1039
  ```ts
1044
- resolveEventsPerMinute(
1040
+ resolveHudUpdatesPerSecond(
1045
1041
  samples: number[],
1046
1042
  ): number
1047
1043
  ```
1048
1044
 
1049
- Resolves events per minute from the latest sample window.
1045
+ Resolves HUD updates per second from the latest sample window.
1050
1046
 
1051
1047
  Parameters:
1052
- - `samples` - - Event timestamps.
1048
+ - `samples` - - HUD update timestamps.
1053
1049
 
1054
- Returns: Events-per-minute estimate.
1050
+ Returns: Updates-per-second estimate.
1055
1051
 
1056
- ### createMinorGcObserver
1052
+ ### trimSamplesToWindow
1057
1053
 
1058
1054
  ```ts
1059
- createMinorGcObserver(
1060
- minorGcTimestampsMs: number[],
1061
- ): PerformanceObserver | undefined
1055
+ trimSamplesToWindow(
1056
+ samples: number[],
1057
+ windowMs: number,
1058
+ nowMs: number,
1059
+ ): void
1062
1060
  ```
1063
1061
 
1064
- Creates a PerformanceObserver that tracks minor GC events when supported.
1062
+ Trims timestamp samples to a sliding time window.
1065
1063
 
1066
1064
  Parameters:
1067
- - `minorGcTimestampsMs` - - Mutable minor-GC timestamp buffer.
1065
+ - `samples` - - Mutable timestamp buffer.
1066
+ - `windowMs` - - Window width in milliseconds.
1067
+ - `nowMs` - - Current timestamp.
1068
1068
 
1069
- Returns: Observer when supported; otherwise `undefined`.
1069
+ Returns: Nothing.
1070
1070
 
1071
1071
  ## browser-entry/browser-entry.text-frame.utils.ts
1072
1072
 
1073
- ### resolveTextFrameMetrics
1073
+ ### buildCenteredTitleBoxLines
1074
1074
 
1075
1075
  ```ts
1076
- resolveTextFrameMetrics(
1077
- frameWidthPx: number,
1078
- frameHeightPx: number,
1079
- glyphWidthPx: number,
1080
- rowHeightPx: number,
1081
- minimumColumns: number,
1082
- ): TextFrameMetrics
1076
+ buildCenteredTitleBoxLines(
1077
+ centeredColumns: number,
1078
+ titleText: string,
1079
+ ): string[]
1083
1080
  ```
1084
1081
 
1085
- Resolves core text-frame metrics for glyph box rendering.
1082
+ Builds an ASCII centered title box.
1086
1083
 
1087
1084
  Parameters:
1088
- - `frameWidthPx` - - Frame width.
1089
- - `frameHeightPx` - - Frame height.
1090
- - `glyphWidthPx` - - Measured glyph width.
1091
- - `rowHeightPx` - - Glyph row height.
1092
- - `minimumColumns` - - Minimum column count.
1085
+ - `centeredColumns` - - Available centered column count.
1086
+ - `titleText` - - Title text.
1093
1087
 
1094
- Returns: Text frame metrics.
1088
+ Returns: Three-row title box.
1095
1089
 
1096
1090
  ### buildOuterBoxLines
1097
1091
 
@@ -1110,22 +1104,20 @@ Parameters:
1110
1104
 
1111
1105
  Returns: Frame lines.
1112
1106
 
1113
- ### buildCenteredTitleBoxLines
1107
+ ### renderClosedOuterBox
1114
1108
 
1115
1109
  ```ts
1116
- buildCenteredTitleBoxLines(
1117
- centeredColumns: number,
1118
- titleText: string,
1119
- ): string[]
1110
+ renderClosedOuterBox(
1111
+ input: RenderClosedOuterBoxInput,
1112
+ ): void
1120
1113
  ```
1121
1114
 
1122
- Builds an ASCII centered title box.
1115
+ Renders a complete closed outer glyph box.
1123
1116
 
1124
1117
  Parameters:
1125
- - `centeredColumns` - - Available centered column count.
1126
- - `titleText` - - Title text.
1118
+ - `input` - - Rendering input object.
1127
1119
 
1128
- Returns: Three-row title box.
1120
+ Returns: Nothing.
1129
1121
 
1130
1122
  ### renderStandaloneTitleBox
1131
1123
 
@@ -1142,21 +1134,6 @@ Parameters:
1142
1134
 
1143
1135
  Returns: Nothing.
1144
1136
 
1145
- ### renderClosedOuterBox
1146
-
1147
- ```ts
1148
- renderClosedOuterBox(
1149
- input: RenderClosedOuterBoxInput,
1150
- ): void
1151
- ```
1152
-
1153
- Renders a complete closed outer glyph box.
1154
-
1155
- Parameters:
1156
- - `input` - - Rendering input object.
1157
-
1158
- Returns: Nothing.
1159
-
1160
1137
  ### resolveGlyphWidthPx
1161
1138
 
1162
1139
  ```ts
@@ -1172,36 +1149,30 @@ Parameters:
1172
1149
 
1173
1150
  Returns: Floored glyph width clamped to a minimum pixel value.
1174
1151
 
1175
- ## browser-entry/browser-entry.observation.utils.ts
1176
-
1177
- ### resolveObservationVector
1152
+ ### resolveTextFrameMetrics
1178
1153
 
1179
1154
  ```ts
1180
- resolveObservationVector(
1181
- birdYPx: number,
1182
- velocityYPxPerFrame: number,
1183
- pipes: BrowserPopulationPipeLike[],
1184
- visibleWorldWidthPx: number,
1185
- worldHeightPx: number,
1186
- difficultyProfile: BrowserDifficultyProfile,
1187
- activeSpawnIntervalFrames: number,
1188
- observationMemoryState: SharedObservationMemoryState,
1189
- ): { observationVector: number[]; observationFeatures: SharedObservationFeatures; }
1155
+ resolveTextFrameMetrics(
1156
+ frameWidthPx: number,
1157
+ frameHeightPx: number,
1158
+ glyphWidthPx: number,
1159
+ rowHeightPx: number,
1160
+ minimumColumns: number,
1161
+ ): TextFrameMetrics
1190
1162
  ```
1191
1163
 
1192
- Builds the normalized observation vector consumed by bird networks.
1164
+ Resolves core text-frame metrics for glyph box rendering.
1193
1165
 
1194
1166
  Parameters:
1195
- - `birdYPx` - - Bird y position.
1196
- - `velocityYPxPerFrame` - - Bird vertical velocity.
1197
- - `pipes` - - Current pipe list.
1198
- - `visibleWorldWidthPx` - - Current visible world width.
1199
- - `worldHeightPx` - - Current world height used for normalization and bounds.
1200
- - `difficultyProfile` - - Active difficulty profile.
1201
- - `activeSpawnIntervalFrames` - - Current spawn interval.
1202
- - `observationMemoryState` - - Temporal memory state for recurrent observation features.
1167
+ - `frameWidthPx` - - Frame width.
1168
+ - `frameHeightPx` - - Frame height.
1169
+ - `glyphWidthPx` - - Measured glyph width.
1170
+ - `rowHeightPx` - - Glyph row height.
1171
+ - `minimumColumns` - - Minimum column count.
1203
1172
 
1204
- Returns: Ordered normalized observation vector.
1173
+ Returns: Text frame metrics.
1174
+
1175
+ ## browser-entry/browser-entry.observation.utils.ts
1205
1176
 
1206
1177
  ### commitObservationMemoryStep
1207
1178
 
@@ -1222,20 +1193,35 @@ Parameters:
1222
1193
 
1223
1194
  Returns: Nothing.
1224
1195
 
1225
- ### resolveUpcomingPipes
1196
+ ### hasAliveBirds
1226
1197
 
1227
1198
  ```ts
1228
- resolveUpcomingPipes(
1229
- pipes: BrowserPopulationPipeLike[],
1230
- ): [BrowserPopulationPipeLike | undefined, BrowserPopulationPipeLike | undefined]
1199
+ hasAliveBirds(
1200
+ birds: BrowserPopulationBirdLike[],
1201
+ ): boolean
1202
+ ```
1203
+
1204
+ Checks whether at least one bird remains alive.
1205
+
1206
+ Parameters:
1207
+ - `birds` - - Population birds.
1208
+
1209
+ Returns: True when any bird is alive.
1210
+
1211
+ ### resolveAliveBirdCount
1212
+
1213
+ ```ts
1214
+ resolveAliveBirdCount(
1215
+ birds: BrowserPopulationBirdLike[],
1216
+ ): number
1231
1217
  ```
1232
1218
 
1233
- Resolves the next two upcoming pipes in front of the bird.
1219
+ Counts birds that are still alive.
1234
1220
 
1235
1221
  Parameters:
1236
- - `pipes` - - Current pipe list.
1222
+ - `birds` - - Population birds.
1237
1223
 
1238
- Returns: Tuple of first and second upcoming pipes.
1224
+ Returns: Alive bird count.
1239
1225
 
1240
1226
  ### resolveFlapDecision
1241
1227
 
@@ -1252,20 +1238,22 @@ Parameters:
1252
1238
 
1253
1239
  Returns: True when flap should trigger.
1254
1240
 
1255
- ### resolveAliveBirdCount
1241
+ ### resolveFramePrimaryWinnerIndex
1256
1242
 
1257
1243
  ```ts
1258
- resolveAliveBirdCount(
1244
+ resolveFramePrimaryWinnerIndex(
1259
1245
  birds: BrowserPopulationBirdLike[],
1246
+ includeAliveOnly: boolean,
1260
1247
  ): number
1261
1248
  ```
1262
1249
 
1263
- Counts birds that are still alive.
1250
+ Resolves winner index for current frame.
1264
1251
 
1265
1252
  Parameters:
1266
1253
  - `birds` - - Population birds.
1254
+ - `includeAliveOnly` - - When true, ignores dead birds.
1267
1255
 
1268
- Returns: Alive bird count.
1256
+ Returns: Winner index, or `-1` when unavailable.
1269
1257
 
1270
1258
  ### resolveLeaderPipesPassed
1271
1259
 
@@ -1282,37 +1270,49 @@ Parameters:
1282
1270
 
1283
1271
  Returns: Maximum pipes passed.
1284
1272
 
1285
- ### resolveFramePrimaryWinnerIndex
1273
+ ### resolveObservationVector
1286
1274
 
1287
1275
  ```ts
1288
- resolveFramePrimaryWinnerIndex(
1289
- birds: BrowserPopulationBirdLike[],
1290
- includeAliveOnly: boolean,
1291
- ): number
1276
+ resolveObservationVector(
1277
+ birdYPx: number,
1278
+ velocityYPxPerFrame: number,
1279
+ pipes: BrowserPopulationPipeLike[],
1280
+ visibleWorldWidthPx: number,
1281
+ worldHeightPx: number,
1282
+ difficultyProfile: BrowserDifficultyProfile,
1283
+ activeSpawnIntervalFrames: number,
1284
+ observationMemoryState: SharedObservationMemoryState,
1285
+ ): { observationVector: number[]; observationFeatures: SharedObservationFeatures; }
1292
1286
  ```
1293
1287
 
1294
- Resolves winner index for current frame.
1288
+ Builds the normalized observation vector consumed by bird networks.
1295
1289
 
1296
1290
  Parameters:
1297
- - `birds` - - Population birds.
1298
- - `includeAliveOnly` - - When true, ignores dead birds.
1291
+ - `birdYPx` - - Bird y position.
1292
+ - `velocityYPxPerFrame` - - Bird vertical velocity.
1293
+ - `pipes` - - Current pipe list.
1294
+ - `visibleWorldWidthPx` - - Current visible world width.
1295
+ - `worldHeightPx` - - Current world height used for normalization and bounds.
1296
+ - `difficultyProfile` - - Active difficulty profile.
1297
+ - `activeSpawnIntervalFrames` - - Current spawn interval.
1298
+ - `observationMemoryState` - - Temporal memory state for recurrent observation features.
1299
1299
 
1300
- Returns: Winner index, or `-1` when unavailable.
1300
+ Returns: Ordered normalized observation vector.
1301
1301
 
1302
- ### hasAliveBirds
1302
+ ### resolveUpcomingPipes
1303
1303
 
1304
1304
  ```ts
1305
- hasAliveBirds(
1306
- birds: BrowserPopulationBirdLike[],
1307
- ): boolean
1305
+ resolveUpcomingPipes(
1306
+ pipes: BrowserPopulationPipeLike[],
1307
+ ): [BrowserPopulationPipeLike | undefined, BrowserPopulationPipeLike | undefined]
1308
1308
  ```
1309
1309
 
1310
- Checks whether at least one bird remains alive.
1310
+ Resolves the next two upcoming pipes in front of the bird.
1311
1311
 
1312
1312
  Parameters:
1313
- - `birds` - - Population birds.
1313
+ - `pipes` - - Current pipe list.
1314
1314
 
1315
- Returns: True when any bird is alive.
1315
+ Returns: Tuple of first and second upcoming pipes.
1316
1316
 
1317
1317
  ## browser-entry/browser-entry.network-view.utils.ts
1318
1318
 
@@ -1436,6 +1436,26 @@ Compatibility facade for browser-entry network visualization helpers.
1436
1436
  Legacy imports still flow through this file while the visualization subsystem
1437
1437
  is organized into smaller, clearer modules under the dedicated folder.
1438
1438
 
1439
+ ### createColorLegendRows
1440
+
1441
+ ```ts
1442
+ createColorLegendRows(
1443
+ scale: DynamicColorScale,
1444
+ symbol: "w" | "b",
1445
+ ): ColorLegendRow[]
1446
+ ```
1447
+
1448
+ Creates legend rows from ordered tiers.
1449
+
1450
+ Each row describes one closed numeric interval and the swatch used to paint
1451
+ it, making the dynamic color scale legible to a human reader.
1452
+
1453
+ Parameters:
1454
+ - `scale` - - Dynamic color scale containing bounds, tiers, and overflow color.
1455
+ - `symbol` - - Label symbol.
1456
+
1457
+ Returns: Legend rows.
1458
+
1439
1459
  ### createLogDivergingColorTiers
1440
1460
 
1441
1461
  ```ts
@@ -1455,83 +1475,6 @@ Parameters:
1455
1475
 
1456
1476
  Returns: Ordered tier list.
1457
1477
 
1458
- ### resolveBiasRangeColor
1459
-
1460
- ```ts
1461
- resolveBiasRangeColor(
1462
- nodeBias: number,
1463
- ): string
1464
- ```
1465
-
1466
- Resolves bias color for a raw node bias.
1467
-
1468
- Bias colors follow the same diverging logic as connection colors so the legend
1469
- remains conceptually consistent across channels.
1470
-
1471
- Parameters:
1472
- - `nodeBias` - - Node bias.
1473
-
1474
- Returns: Tier color.
1475
-
1476
- ### resolveConnectionRangeColor
1477
-
1478
- ```ts
1479
- resolveConnectionRangeColor(
1480
- connectionWeight: number,
1481
- ): string
1482
- ```
1483
-
1484
- Resolves connection color for a raw weight.
1485
-
1486
- This small helper is useful when one-off drawing code wants the same color
1487
- semantics as the full dynamic scale machinery.
1488
-
1489
- Parameters:
1490
- - `connectionWeight` - - Connection weight.
1491
-
1492
- Returns: Tier color.
1493
-
1494
- ### resolveNetworkVisualizationColorScales
1495
-
1496
- ```ts
1497
- resolveNetworkVisualizationColorScales(
1498
- network: default | undefined,
1499
- ): NetworkVisualizationColorScales
1500
- ```
1501
-
1502
- Resolves dynamic connection/bias color scales from the active network range.
1503
-
1504
- The active network may contain only a narrow slice of the full theoretical
1505
- value range, so the legend adapts to what is currently present instead of
1506
- always rendering a fixed generic scale.
1507
-
1508
- Parameters:
1509
- - `network` - - Active network.
1510
-
1511
- Returns: Dynamic scales used by graph drawing and legend rows.
1512
-
1513
- ### resolveTierColor
1514
-
1515
- ```ts
1516
- resolveTierColor(
1517
- value: number,
1518
- tiers: ColorTier[],
1519
- aboveTierColor: string,
1520
- ): string
1521
- ```
1522
-
1523
- Resolves a color from ordered tier definitions.
1524
-
1525
- This is the final classification step that maps one numeric weight or bias to
1526
- the swatch color the renderer should paint.
1527
-
1528
- Parameters:
1529
- - `value` - - Numeric value to classify.
1530
- - `tiers` - - Ordered tier list.
1531
- - `aboveTierColor` - - Fallback color for values above the last tier.
1532
-
1533
- Returns: Resolved color string.
1534
-
1535
1478
  ### drawBiasNodesLayer
1536
1479
 
1537
1480
  ```ts
@@ -1624,25 +1567,59 @@ Parameters:
1624
1567
 
1625
1568
  Returns: Nothing.
1626
1569
 
1627
- ### createColorLegendRows
1570
+ ### formatNodeBiasLabel
1628
1571
 
1629
1572
  ```ts
1630
- createColorLegendRows(
1631
- scale: DynamicColorScale,
1632
- symbol: "w" | "b",
1633
- ): ColorLegendRow[]
1573
+ formatNodeBiasLabel(
1574
+ nodeBias: number,
1575
+ ): string
1634
1576
  ```
1635
1577
 
1636
- Creates legend rows from ordered tiers.
1578
+ Formats node bias labels with fixed sign and precision.
1637
1579
 
1638
- Each row describes one closed numeric interval and the swatch used to paint
1639
- it, making the dynamic color scale legible to a human reader.
1580
+ Consistent sign and precision make dense node labels easier to scan quickly in
1581
+ the rendered network panel.
1640
1582
 
1641
1583
  Parameters:
1642
- - `scale` - - Dynamic color scale containing bounds, tiers, and overflow color.
1643
- - `symbol` - - Label symbol.
1584
+ - `nodeBias` - - Node bias value.
1644
1585
 
1645
- Returns: Legend rows.
1586
+ Returns: Label text.
1587
+
1588
+ ### resolveBiasRangeColor
1589
+
1590
+ ```ts
1591
+ resolveBiasRangeColor(
1592
+ nodeBias: number,
1593
+ ): string
1594
+ ```
1595
+
1596
+ Resolves bias color for a raw node bias.
1597
+
1598
+ Bias colors follow the same diverging logic as connection colors so the legend
1599
+ remains conceptually consistent across channels.
1600
+
1601
+ Parameters:
1602
+ - `nodeBias` - - Node bias.
1603
+
1604
+ Returns: Tier color.
1605
+
1606
+ ### resolveConnectionRangeColor
1607
+
1608
+ ```ts
1609
+ resolveConnectionRangeColor(
1610
+ connectionWeight: number,
1611
+ ): string
1612
+ ```
1613
+
1614
+ Resolves connection color for a raw weight.
1615
+
1616
+ This small helper is useful when one-off drawing code wants the same color
1617
+ semantics as the full dynamic scale machinery.
1618
+
1619
+ Parameters:
1620
+ - `connectionWeight` - - Connection weight.
1621
+
1622
+ Returns: Tier color.
1646
1623
 
1647
1624
  ### resolveDefaultNetworkLegendLayout
1648
1625
 
@@ -1688,23 +1665,24 @@ Parameters:
1688
1665
 
1689
1666
  Returns: Computed legend layout.
1690
1667
 
1691
- ### formatNodeBiasLabel
1668
+ ### resolveNetworkVisualizationColorScales
1692
1669
 
1693
1670
  ```ts
1694
- formatNodeBiasLabel(
1695
- nodeBias: number,
1696
- ): string
1671
+ resolveNetworkVisualizationColorScales(
1672
+ network: default | undefined,
1673
+ ): NetworkVisualizationColorScales
1697
1674
  ```
1698
1675
 
1699
- Formats node bias labels with fixed sign and precision.
1676
+ Resolves dynamic connection/bias color scales from the active network range.
1700
1677
 
1701
- Consistent sign and precision make dense node labels easier to scan quickly in
1702
- the rendered network panel.
1678
+ The active network may contain only a narrow slice of the full theoretical
1679
+ value range, so the legend adapts to what is currently present instead of
1680
+ always rendering a fixed generic scale.
1703
1681
 
1704
1682
  Parameters:
1705
- - `nodeBias` - - Node bias value.
1683
+ - `network` - - Active network.
1706
1684
 
1707
- Returns: Label text.
1685
+ Returns: Dynamic scales used by graph drawing and legend rows.
1708
1686
 
1709
1687
  ### resolveNetworkVisualizationLayers
1710
1688
 
@@ -1734,6 +1712,28 @@ Parameters:
1734
1712
 
1735
1713
  Returns: Layered nodes for rendering.
1736
1714
 
1715
+ ### resolveTierColor
1716
+
1717
+ ```ts
1718
+ resolveTierColor(
1719
+ value: number,
1720
+ tiers: ColorTier[],
1721
+ aboveTierColor: string,
1722
+ ): string
1723
+ ```
1724
+
1725
+ Resolves a color from ordered tier definitions.
1726
+
1727
+ This is the final classification step that maps one numeric weight or bias to
1728
+ the swatch color the renderer should paint.
1729
+
1730
+ Parameters:
1731
+ - `value` - - Numeric value to classify.
1732
+ - `tiers` - - Ordered tier list.
1733
+ - `aboveTierColor` - - Fallback color for values above the last tier.
1734
+
1735
+ Returns: Resolved color string.
1736
+
1737
1737
  ## browser-entry/browser-entry.worker-channel.utils.ts
1738
1738
 
1739
1739
  ### createEvolutionWorker