@reicek/neataptic-ts 0.1.21 → 0.1.22
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.
- package/.github/agents/boundary-mapper.agent.md +29 -0
- package/.github/agents/docs-scout.agent.md +29 -0
- package/.github/agents/plan-scout.agent.md +29 -0
- package/.github/agents/solid-split.agent.md +138 -0
- package/.github/copilot-instructions.md +103 -0
- package/package.json +6 -3
- package/plans/ES2023 migration +13 -8
- package/plans/Evolution_Training_Interoperability_Contracts.md +1 -1
- package/plans/Interactive_Examples_and_Learning_Path.md +10 -2
- package/plans/Memory_Optimization.md +3 -3
- package/plans/README.md +63 -0
- package/plans/Roadmap.md +15 -3
- package/plans/asciiMaze_SOLID_split.done.md +130 -0
- package/plans/flappy_bird_SOLID_split.done.md +67 -0
- package/scripts/assets/theme.css +221 -34
- package/scripts/copy-examples.mjs +9 -5
- package/scripts/export-onnx.mjs +3 -3
- package/scripts/generate-bench-tables.mjs +10 -10
- package/scripts/generate-bench-tables.ts +10 -10
- package/scripts/generate-docs.ts +1415 -449
- package/scripts/render-docs-html.ts +15 -8
- package/src/README.md +101 -223
- package/src/architecture/README.md +57 -185
- package/src/architecture/layer/README.md +38 -38
- package/src/architecture/network/README.md +33 -31
- package/src/architecture/network/activate/README.md +77 -77
- package/src/architecture/network/connect/README.md +15 -13
- package/src/architecture/network/deterministic/README.md +7 -7
- package/src/architecture/network/evolve/README.md +44 -44
- package/src/architecture/network/gating/README.md +20 -20
- package/src/architecture/network/genetic/README.md +51 -51
- package/src/architecture/network/mutate/README.md +97 -97
- package/src/architecture/network/onnx/README.md +264 -264
- package/src/architecture/network/prune/README.md +39 -39
- package/src/architecture/network/remove/README.md +26 -26
- package/src/architecture/network/serialize/README.md +56 -56
- package/src/architecture/network/slab/README.md +61 -61
- package/src/architecture/network/standalone/README.md +24 -24
- package/src/architecture/network/stats/README.md +9 -9
- package/src/architecture/network/topology/README.md +46 -46
- package/src/architecture/network/training/README.md +21 -21
- package/src/methods/README.md +9 -87
- package/src/multithreading/README.md +8 -77
- package/src/multithreading/workers/README.md +2 -2
- package/src/multithreading/workers/browser/README.md +0 -6
- package/src/multithreading/workers/node/README.md +0 -3
- package/src/neat/README.md +562 -568
- package/src/utils/README.md +18 -18
- package/test/examples/asciiMaze/README.md +59 -59
- package/test/examples/asciiMaze/asciiMaze.e2e.test.ts +14 -9
- package/test/examples/asciiMaze/browser-entry/README.md +196 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.abort.services.ts +95 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.constants.ts +23 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.curriculum.services.ts +115 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.globals.services.ts +106 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.host.services.ts +157 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.services.ts +14 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.ts +129 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.types.ts +120 -0
- package/test/examples/asciiMaze/browser-entry/browser-entry.utils.ts +98 -0
- package/test/examples/asciiMaze/browser-entry.ts +10 -576
- package/test/examples/asciiMaze/dashboardManager/README.md +276 -0
- package/test/examples/asciiMaze/dashboardManager/archive/README.md +16 -0
- package/test/examples/asciiMaze/dashboardManager/archive/dashboardManager.archive.services.ts +267 -0
- package/test/examples/asciiMaze/dashboardManager/dashboardManager.constants.ts +35 -0
- package/test/examples/asciiMaze/dashboardManager/dashboardManager.services.ts +103 -0
- package/test/examples/asciiMaze/dashboardManager/dashboardManager.ts +181 -0
- package/test/examples/asciiMaze/dashboardManager/dashboardManager.types.ts +267 -0
- package/test/examples/asciiMaze/dashboardManager/dashboardManager.utils.ts +254 -0
- package/test/examples/asciiMaze/dashboardManager/live/README.md +14 -0
- package/test/examples/asciiMaze/dashboardManager/live/dashboardManager.live.services.ts +264 -0
- package/test/examples/asciiMaze/dashboardManager/telemetry/README.md +47 -0
- package/test/examples/asciiMaze/dashboardManager/telemetry/dashboardManager.telemetry.services.ts +513 -0
- package/test/examples/asciiMaze/dashboardManager.ts +13 -2335
- package/test/examples/asciiMaze/evolutionEngine/README.md +1058 -0
- package/test/examples/asciiMaze/evolutionEngine/curriculumPhase.ts +90 -0
- package/test/examples/asciiMaze/evolutionEngine/engineState.constants.ts +36 -0
- package/test/examples/asciiMaze/evolutionEngine/engineState.ts +58 -513
- package/test/examples/asciiMaze/evolutionEngine/engineState.types.ts +212 -0
- package/test/examples/asciiMaze/evolutionEngine/engineState.utils.ts +301 -0
- package/test/examples/asciiMaze/evolutionEngine/evolutionEngine.types.ts +445 -0
- package/test/examples/asciiMaze/evolutionEngine/evolutionLoop.ts +81 -50
- package/test/examples/asciiMaze/evolutionEngine/optionsAndSetup.ts +2 -4
- package/test/examples/asciiMaze/evolutionEngine/populationDynamics.ts +17 -33
- package/test/examples/asciiMaze/evolutionEngine/populationPruning.ts +1 -1
- package/test/examples/asciiMaze/evolutionEngine/rngAndTiming.ts +1 -2
- package/test/examples/asciiMaze/evolutionEngine/sampling.ts +1 -1
- package/test/examples/asciiMaze/evolutionEngine/scratchPools.ts +2 -5
- package/test/examples/asciiMaze/evolutionEngine/setupHelpers.ts +30 -37
- package/test/examples/asciiMaze/evolutionEngine/telemetryMetrics.ts +16 -58
- package/test/examples/asciiMaze/evolutionEngine/trainingWarmStart.ts +2 -2
- package/test/examples/asciiMaze/evolutionEngine.ts +55 -55
- package/test/examples/asciiMaze/fitness.ts +2 -2
- package/test/examples/asciiMaze/fitness.types.ts +65 -0
- package/test/examples/asciiMaze/interfaces.ts +64 -1352
- package/test/examples/asciiMaze/mazeMovement/README.md +356 -0
- package/test/examples/asciiMaze/mazeMovement/finalization/README.md +49 -0
- package/test/examples/asciiMaze/mazeMovement/finalization/mazeMovement.finalization.ts +138 -0
- package/test/examples/asciiMaze/mazeMovement/mazeMovement.constants.ts +101 -0
- package/test/examples/asciiMaze/mazeMovement/mazeMovement.services.ts +230 -0
- package/test/examples/asciiMaze/mazeMovement/mazeMovement.ts +299 -0
- package/test/examples/asciiMaze/mazeMovement/mazeMovement.types.ts +185 -0
- package/test/examples/asciiMaze/mazeMovement/mazeMovement.utils.ts +153 -0
- package/test/examples/asciiMaze/mazeMovement/policy/README.md +91 -0
- package/test/examples/asciiMaze/mazeMovement/policy/mazeMovement.policy.ts +467 -0
- package/test/examples/asciiMaze/mazeMovement/runtime/README.md +95 -0
- package/test/examples/asciiMaze/mazeMovement/runtime/mazeMovement.runtime.ts +354 -0
- package/test/examples/asciiMaze/mazeMovement/shaping/README.md +124 -0
- package/test/examples/asciiMaze/mazeMovement/shaping/mazeMovement.shaping.ts +459 -0
- package/test/examples/asciiMaze/mazeMovement.ts +12 -2978
- package/test/examples/flappy_bird/Trace-20260309T191949.json +24124 -0
- package/test/examples/flappy_bird/browser-entry/README.md +1129 -0
- package/test/examples/flappy_bird/browser-entry/browser-entry.host.utils.ts +4 -324
- package/test/examples/flappy_bird/browser-entry/browser-entry.network-view.utils.ts +6 -399
- package/test/examples/flappy_bird/browser-entry/browser-entry.playback.utils.ts +1 -717
- package/test/examples/flappy_bird/browser-entry/browser-entry.spawn.utils.ts +11 -31
- package/test/examples/flappy_bird/browser-entry/browser-entry.visualization.utils.ts +15 -893
- package/test/examples/flappy_bird/browser-entry/host/README.md +307 -0
- package/test/examples/flappy_bird/browser-entry/host/host.resize.service.ts +1 -295
- package/test/examples/flappy_bird/browser-entry/host/host.ts +562 -6
- package/test/examples/flappy_bird/browser-entry/host/resize/README.md +274 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.constants.ts +31 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.services.ts +360 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.ts +117 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.types.ts +63 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.utils.ts +250 -0
- package/test/examples/flappy_bird/browser-entry/network-view/README.md +399 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.topology.utils.ts +255 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.ts +802 -7
- package/test/examples/flappy_bird/browser-entry/playback/README.md +684 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/README.md +277 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/README.md +770 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.cache.services.ts +178 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.constants.ts +107 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.utils.ts +518 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.math.utils.ts +117 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.utils.ts +233 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.services.ts +211 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.ts +48 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.types.ts +212 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.utils.ts +81 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.cache.services.ts +96 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.constants.ts +62 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.services.ts +244 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.ts +53 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.types.ts +68 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.utils.ts +100 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/README.md +310 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.service.ts +92 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.services.ts +272 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.types.ts +39 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.utils.ts +493 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.constants.ts +1 -1
- package/test/examples/flappy_bird/browser-entry/playback/playback.frame-render.service.ts +4 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.snapshot.utils.ts +44 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.service.ts +39 -122
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.services.ts +272 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.types.ts +62 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.utils.ts +11 -4
- package/test/examples/flappy_bird/browser-entry/playback/playback.ts +409 -8
- package/test/examples/flappy_bird/browser-entry/playback/playback.types.ts +4 -12
- package/test/examples/flappy_bird/browser-entry/runtime/README.md +235 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.evolution-launch.service.ts +45 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.lifecycle.service.ts +81 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.startup.service.ts +74 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.ts +31 -121
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.types.ts +36 -0
- package/test/examples/flappy_bird/browser-entry/visualization/README.md +557 -0
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.constants.ts +110 -0
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.draw.service.ts +957 -19
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.legend.utils.ts +138 -3
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.topology.utils.ts +3 -27
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.ts +1 -23
- package/test/examples/flappy_bird/browser-entry/worker-channel/README.md +156 -0
- package/test/examples/flappy_bird/constants/README.md +1179 -0
- package/test/examples/flappy_bird/constants/constants.network-view.ts +24 -0
- package/test/examples/flappy_bird/constants/constants.palette.ts +7 -0
- package/test/examples/flappy_bird/constants/constants.starfield.ts +78 -3
- package/test/examples/flappy_bird/environment/README.md +143 -0
- package/test/examples/flappy_bird/environment/environment.observation.utils.ts +1 -19
- package/test/examples/flappy_bird/environment/environment.step.service.ts +3 -66
- package/test/examples/flappy_bird/evaluation/README.md +130 -0
- package/test/examples/flappy_bird/evaluation/evaluation.fitness.utils.ts +1 -1
- package/test/examples/flappy_bird/evaluation/evaluation.rollout.service.ts +5 -375
- package/test/examples/flappy_bird/evaluation/rollout/README.md +291 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.constants.ts +30 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.service.ts +58 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.services.ts +310 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.types.ts +56 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.utils.ts +368 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/README.md +618 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.playback.service.ts +7 -7
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.frame.service.ts +364 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.types.ts +14 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.utils.ts +4 -201
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.ts +184 -345
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.warm-start.service.ts +291 -0
- package/test/examples/flappy_bird/flappy.simulation.shared.utils.ts +5 -0
- package/test/examples/flappy_bird/simulation-shared/README.md +417 -0
- package/test/examples/flappy_bird/simulation-shared/observation/README.md +183 -0
- package/test/examples/flappy_bird/simulation-shared/observation/observation.features.utils.ts +301 -0
- package/test/examples/flappy_bird/simulation-shared/observation/observation.ts +9 -0
- package/test/examples/flappy_bird/simulation-shared/observation/observation.vector.utils.ts +59 -0
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.observation.utils.ts +5 -403
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.spawn.utils.ts +20 -6
- package/test/examples/flappy_bird/{evaluation/evaluation.statistics.utils.ts → simulation-shared/simulation-shared.statistics.utils.ts} +23 -8
- package/test/examples/flappy_bird/trainer/README.md +563 -0
- package/test/examples/flappy_bird/trainer/evaluation/README.md +199 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.constants.ts +9 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.services.ts +73 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.ts +165 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.types.ts +25 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.utils.ts +161 -0
- package/test/examples/flappy_bird/trainer/trainer.evaluation.service.ts +13 -0
- package/test/examples/flappy_bird/trainer/trainer.report.service.services.ts +181 -0
- package/test/examples/flappy_bird/trainer/trainer.report.service.ts +126 -0
- package/test/examples/flappy_bird/trainer/trainer.selection.utils.ts +89 -0
- package/test/examples/flappy_bird/trainer/trainer.ts +11 -553
- package/test/examples/flappy_bird/browser-entry/browser-entry.utils.ts +0 -12
- package/test/examples/flappy_bird/environment/environment.ts +0 -7
- package/test/examples/flappy_bird/evaluation/evaluation.ts +0 -7
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.ts +0 -15
- package/test/examples/flappy_bird/trainer/trainer.statistics.utils.ts +0 -78
|
@@ -0,0 +1,1129 @@
|
|
|
1
|
+
# browser-entry
|
|
2
|
+
|
|
3
|
+
## browser-entry/browser-entry.types.ts
|
|
4
|
+
|
|
5
|
+
### BrowserDifficultyProfile
|
|
6
|
+
|
|
7
|
+
Difficulty profile consumed by simulation observation helpers.
|
|
8
|
+
|
|
9
|
+
### BrowserPopulationBirdLike
|
|
10
|
+
|
|
11
|
+
Bird shape used by utility winner/leader resolver helpers.
|
|
12
|
+
|
|
13
|
+
### BrowserPopulationPipeLike
|
|
14
|
+
|
|
15
|
+
Pipe shape used by utility observation-vector helpers.
|
|
16
|
+
|
|
17
|
+
### ColorLegendRow
|
|
18
|
+
|
|
19
|
+
Legend row model for network visualization color legends.
|
|
20
|
+
|
|
21
|
+
### ColorTier
|
|
22
|
+
|
|
23
|
+
Connection or bias tier used for color mapping ramps.
|
|
24
|
+
|
|
25
|
+
### CreateFlappyStatsTableRowsInput
|
|
26
|
+
|
|
27
|
+
Input contract for declarative runtime stats table row builder.
|
|
28
|
+
|
|
29
|
+
### EvolutionGenerationPayload
|
|
30
|
+
|
|
31
|
+
Worker payload describing evolved generation summary values.
|
|
32
|
+
|
|
33
|
+
### EvolutionGenerationReadyMessage
|
|
34
|
+
|
|
35
|
+
Worker message emitted when a generation has completed evolving.
|
|
36
|
+
|
|
37
|
+
### EvolutionPlaybackStepMessage
|
|
38
|
+
|
|
39
|
+
Worker message carrying one playback step and aggregate markers.
|
|
40
|
+
|
|
41
|
+
### EvolutionPlaybackStepSnapshot
|
|
42
|
+
|
|
43
|
+
Per-frame snapshot received from the worker playback channel.
|
|
44
|
+
|
|
45
|
+
### EvolutionWorkerErrorMessage
|
|
46
|
+
|
|
47
|
+
Worker message emitted for simulation/playback errors.
|
|
48
|
+
|
|
49
|
+
### EvolutionWorkerMessage
|
|
50
|
+
|
|
51
|
+
Union of all supported worker messages consumed by browser entry.
|
|
52
|
+
|
|
53
|
+
### FlappyBirdRunHandle
|
|
54
|
+
|
|
55
|
+
Handle returned by `start` for controlling demo execution lifecycle.
|
|
56
|
+
|
|
57
|
+
### FlappyStatsCategoryColors
|
|
58
|
+
|
|
59
|
+
Color pair used for stats category key/value styling.
|
|
60
|
+
|
|
61
|
+
### FlappyStatsKey
|
|
62
|
+
|
|
63
|
+
Runtime stats table key union used across browser-entry helpers.
|
|
64
|
+
|
|
65
|
+
### FlappyStatsRowDescriptor
|
|
66
|
+
|
|
67
|
+
Declarative row descriptor for the runtime stats table.
|
|
68
|
+
|
|
69
|
+
### FlappyStatsTableCells
|
|
70
|
+
|
|
71
|
+
Runtime lookup map of stat keys to writable value cells.
|
|
72
|
+
|
|
73
|
+
### NetworkLegendLayout
|
|
74
|
+
|
|
75
|
+
Precomputed legend panel layout used by visualization renderer.
|
|
76
|
+
|
|
77
|
+
### NetworkNodeDimensionsLike
|
|
78
|
+
|
|
79
|
+
Pixel dimensions used for network-node rectangle rendering.
|
|
80
|
+
|
|
81
|
+
### NetworkVisualizationHandle
|
|
82
|
+
|
|
83
|
+
Draw callback contract for network architecture panel updates.
|
|
84
|
+
|
|
85
|
+
### PlaybackFrameStats
|
|
86
|
+
|
|
87
|
+
Lightweight per-frame telemetry emitted to HUD update callback.
|
|
88
|
+
|
|
89
|
+
### PopulationBird
|
|
90
|
+
|
|
91
|
+
Renderable bird state snapshot emitted by the playback worker.
|
|
92
|
+
|
|
93
|
+
### PopulationPipe
|
|
94
|
+
|
|
95
|
+
Renderable pipe state snapshot emitted by the playback worker.
|
|
96
|
+
|
|
97
|
+
### PopulationRenderState
|
|
98
|
+
|
|
99
|
+
Mutable render-state model consumed by the population frame renderer.
|
|
100
|
+
|
|
101
|
+
### PositionedNetworkNodeLike
|
|
102
|
+
|
|
103
|
+
Positioned node instance used by network visualization drawing.
|
|
104
|
+
|
|
105
|
+
### RenderClosedOuterBoxInput
|
|
106
|
+
|
|
107
|
+
Input contract for outer frame rendering helper.
|
|
108
|
+
|
|
109
|
+
### RenderStandaloneTitleBoxInput
|
|
110
|
+
|
|
111
|
+
Input contract for standalone title frame rendering helper.
|
|
112
|
+
|
|
113
|
+
### RngLike
|
|
114
|
+
|
|
115
|
+
Minimal random source contract used by utility random helpers.
|
|
116
|
+
|
|
117
|
+
### RuntimeWindow
|
|
118
|
+
|
|
119
|
+
Runtime window contract for the Flappy Bird browser demo.
|
|
120
|
+
|
|
121
|
+
### SerializedNetwork
|
|
122
|
+
|
|
123
|
+
Loose JSON-compatible network payload used by worker messages.
|
|
124
|
+
|
|
125
|
+
### TextFrameMetrics
|
|
126
|
+
|
|
127
|
+
Canvas text-grid metrics used for frame rendering layout helpers.
|
|
128
|
+
|
|
129
|
+
### TrailPoint
|
|
130
|
+
|
|
131
|
+
Trail point used by playback trail rendering cache.
|
|
132
|
+
|
|
133
|
+
### TrailState
|
|
134
|
+
|
|
135
|
+
Mutable trail cache keyed by bird index for frame rendering.
|
|
136
|
+
|
|
137
|
+
### ViewportInfo
|
|
138
|
+
|
|
139
|
+
Viewport transform values for world-to-canvas rendering.
|
|
140
|
+
|
|
141
|
+
### VisualNetworkConnectionLike
|
|
142
|
+
|
|
143
|
+
Lightweight connection shape used by network visualization drawing.
|
|
144
|
+
|
|
145
|
+
### VisualNetworkNodeLike
|
|
146
|
+
|
|
147
|
+
Lightweight node shape used by network visualization drawing.
|
|
148
|
+
|
|
149
|
+
## browser-entry/browser-entry.stats.types.ts
|
|
150
|
+
|
|
151
|
+
### browser-entry.stats.types
|
|
152
|
+
|
|
153
|
+
Runtime stats table key union used across browser-entry helpers.
|
|
154
|
+
|
|
155
|
+
### CreateFlappyStatsTableRowsInput
|
|
156
|
+
|
|
157
|
+
Input contract for declarative runtime stats table row builder.
|
|
158
|
+
|
|
159
|
+
### FlappyStatsCategoryColors
|
|
160
|
+
|
|
161
|
+
Color pair used for stats category key/value styling.
|
|
162
|
+
|
|
163
|
+
### FlappyStatsKey
|
|
164
|
+
|
|
165
|
+
Runtime stats table key union used across browser-entry helpers.
|
|
166
|
+
|
|
167
|
+
### FlappyStatsRowDescriptor
|
|
168
|
+
|
|
169
|
+
Declarative row descriptor for the runtime stats table.
|
|
170
|
+
|
|
171
|
+
### FlappyStatsTableCells
|
|
172
|
+
|
|
173
|
+
Runtime lookup map of stat keys to writable value cells.
|
|
174
|
+
|
|
175
|
+
## browser-entry/browser-entry.render.types.ts
|
|
176
|
+
|
|
177
|
+
### browser-entry.render.types
|
|
178
|
+
|
|
179
|
+
Input contract for standalone title frame rendering helper.
|
|
180
|
+
|
|
181
|
+
### RenderClosedOuterBoxInput
|
|
182
|
+
|
|
183
|
+
Input contract for outer frame rendering helper.
|
|
184
|
+
|
|
185
|
+
### RenderStandaloneTitleBoxInput
|
|
186
|
+
|
|
187
|
+
Input contract for standalone title frame rendering helper.
|
|
188
|
+
|
|
189
|
+
### TextFrameMetrics
|
|
190
|
+
|
|
191
|
+
Canvas text-grid metrics used for frame rendering layout helpers.
|
|
192
|
+
|
|
193
|
+
### ViewportInfo
|
|
194
|
+
|
|
195
|
+
Viewport transform values for world-to-canvas rendering.
|
|
196
|
+
|
|
197
|
+
## browser-entry/browser-entry.worker.types.ts
|
|
198
|
+
|
|
199
|
+
### browser-entry.worker.types
|
|
200
|
+
|
|
201
|
+
Loose JSON-compatible network payload used by worker messages.
|
|
202
|
+
|
|
203
|
+
### EvolutionGenerationPayload
|
|
204
|
+
|
|
205
|
+
Worker payload describing evolved generation summary values.
|
|
206
|
+
|
|
207
|
+
### EvolutionGenerationReadyMessage
|
|
208
|
+
|
|
209
|
+
Worker message emitted when a generation has completed evolving.
|
|
210
|
+
|
|
211
|
+
### EvolutionPlaybackStepMessage
|
|
212
|
+
|
|
213
|
+
Worker message carrying one playback step and aggregate markers.
|
|
214
|
+
|
|
215
|
+
### EvolutionPlaybackStepSnapshot
|
|
216
|
+
|
|
217
|
+
Per-frame snapshot received from the worker playback channel.
|
|
218
|
+
|
|
219
|
+
### EvolutionWorkerErrorMessage
|
|
220
|
+
|
|
221
|
+
Worker message emitted for simulation/playback errors.
|
|
222
|
+
|
|
223
|
+
### EvolutionWorkerMessage
|
|
224
|
+
|
|
225
|
+
Union of all supported worker messages consumed by browser entry.
|
|
226
|
+
|
|
227
|
+
### PlaybackFrameStats
|
|
228
|
+
|
|
229
|
+
Lightweight per-frame telemetry emitted to HUD update callback.
|
|
230
|
+
|
|
231
|
+
### PopulationBird
|
|
232
|
+
|
|
233
|
+
Renderable bird state snapshot emitted by the playback worker.
|
|
234
|
+
|
|
235
|
+
### PopulationPipe
|
|
236
|
+
|
|
237
|
+
Renderable pipe state snapshot emitted by the playback worker.
|
|
238
|
+
|
|
239
|
+
### SerializedNetwork
|
|
240
|
+
|
|
241
|
+
Loose JSON-compatible network payload used by worker messages.
|
|
242
|
+
|
|
243
|
+
## browser-entry/browser-entry.runtime.types.ts
|
|
244
|
+
|
|
245
|
+
### browser-entry.runtime.types
|
|
246
|
+
|
|
247
|
+
Handle returned by `start` for controlling demo execution lifecycle.
|
|
248
|
+
|
|
249
|
+
### FlappyBirdRunHandle
|
|
250
|
+
|
|
251
|
+
Handle returned by `start` for controlling demo execution lifecycle.
|
|
252
|
+
|
|
253
|
+
### RuntimeWindow
|
|
254
|
+
|
|
255
|
+
Runtime window contract for the Flappy Bird browser demo.
|
|
256
|
+
|
|
257
|
+
## browser-entry/browser-entry.simulation.types.ts
|
|
258
|
+
|
|
259
|
+
### BrowserDifficultyProfile
|
|
260
|
+
|
|
261
|
+
Difficulty profile consumed by simulation observation helpers.
|
|
262
|
+
|
|
263
|
+
### BrowserPopulationBirdLike
|
|
264
|
+
|
|
265
|
+
Bird shape used by utility winner/leader resolver helpers.
|
|
266
|
+
|
|
267
|
+
### BrowserPopulationPipeLike
|
|
268
|
+
|
|
269
|
+
Pipe shape used by utility observation-vector helpers.
|
|
270
|
+
|
|
271
|
+
### PopulationRenderState
|
|
272
|
+
|
|
273
|
+
Mutable render-state model consumed by the population frame renderer.
|
|
274
|
+
|
|
275
|
+
### RngLike
|
|
276
|
+
|
|
277
|
+
Minimal random source contract used by utility random helpers.
|
|
278
|
+
|
|
279
|
+
### TrailPoint
|
|
280
|
+
|
|
281
|
+
Trail point used by playback trail rendering cache.
|
|
282
|
+
|
|
283
|
+
### TrailState
|
|
284
|
+
|
|
285
|
+
Mutable trail cache keyed by bird index for frame rendering.
|
|
286
|
+
|
|
287
|
+
## browser-entry/browser-entry.visualization.types.ts
|
|
288
|
+
|
|
289
|
+
### ColorLegendRow
|
|
290
|
+
|
|
291
|
+
Legend row model for network visualization color legends.
|
|
292
|
+
|
|
293
|
+
### ColorTier
|
|
294
|
+
|
|
295
|
+
Connection or bias tier used for color mapping ramps.
|
|
296
|
+
|
|
297
|
+
### NetworkLegendLayout
|
|
298
|
+
|
|
299
|
+
Precomputed legend panel layout used by visualization renderer.
|
|
300
|
+
|
|
301
|
+
### NetworkNodeDimensionsLike
|
|
302
|
+
|
|
303
|
+
Pixel dimensions used for network-node rectangle rendering.
|
|
304
|
+
|
|
305
|
+
### NetworkVisualizationHandle
|
|
306
|
+
|
|
307
|
+
Draw callback contract for network architecture panel updates.
|
|
308
|
+
|
|
309
|
+
### PositionedNetworkNodeLike
|
|
310
|
+
|
|
311
|
+
Positioned node instance used by network visualization drawing.
|
|
312
|
+
|
|
313
|
+
### VisualNetworkConnectionLike
|
|
314
|
+
|
|
315
|
+
Lightweight connection shape used by network visualization drawing.
|
|
316
|
+
|
|
317
|
+
### VisualNetworkNodeLike
|
|
318
|
+
|
|
319
|
+
Lightweight node shape used by network visualization drawing.
|
|
320
|
+
|
|
321
|
+
## browser-entry/browser-entry.ts
|
|
322
|
+
|
|
323
|
+
### FlappyBirdRunHandle
|
|
324
|
+
|
|
325
|
+
Handle returned by `start` for controlling demo execution lifecycle.
|
|
326
|
+
|
|
327
|
+
### start
|
|
328
|
+
|
|
329
|
+
`(container: import("test/examples/flappy_bird/browser-entry/runtime/runtime.types").RuntimeContainerTarget) => Promise<import("test/examples/flappy_bird/browser-entry/browser-entry.runtime.types").FlappyBirdRunHandle>`
|
|
330
|
+
|
|
331
|
+
## browser-entry/browser-entry.host.utils.ts
|
|
332
|
+
|
|
333
|
+
### createCanvasHostInternal
|
|
334
|
+
|
|
335
|
+
`(containerElement: HTMLElement) => import("test/examples/flappy_bird/browser-entry/host/host.types").CanvasHostResult`
|
|
336
|
+
|
|
337
|
+
Builds the browser demo host tree and returns rendering handles.
|
|
338
|
+
|
|
339
|
+
Parameters:
|
|
340
|
+
|
|
341
|
+
- `containerElement` - - Root host container.
|
|
342
|
+
|
|
343
|
+
Returns: Canvas handles, stats cells and network render callback.
|
|
344
|
+
|
|
345
|
+
### updateStatsTableValues
|
|
346
|
+
|
|
347
|
+
`(statsValueByKey: Partial<Record<import("test/examples/flappy_bird/browser-entry/browser-entry.stats.types").FlappyStatsKey, HTMLTableCellElement>>, partialValues: Partial<Record<import("test/examples/flappy_bird/browser-entry/browser-entry.stats.types").FlappyStatsKey, string>>) => void`
|
|
348
|
+
|
|
349
|
+
Applies partial stat updates to the rendered stats table.
|
|
350
|
+
|
|
351
|
+
Parameters:
|
|
352
|
+
|
|
353
|
+
- `statsValueByKey` - - Lookup of stat keys to value cells.
|
|
354
|
+
- `partialValues` - - Subset of values to write this tick.
|
|
355
|
+
|
|
356
|
+
Returns: Nothing.
|
|
357
|
+
|
|
358
|
+
## browser-entry/browser-entry.math.utils.ts
|
|
359
|
+
|
|
360
|
+
### applyAlphaToHexColor
|
|
361
|
+
|
|
362
|
+
`(hexColor: string, alphaValue: number) => string`
|
|
363
|
+
|
|
364
|
+
Converts a six-digit hex color to rgba with the requested alpha.
|
|
365
|
+
|
|
366
|
+
Parameters:
|
|
367
|
+
|
|
368
|
+
- `hexColor` - - Color in `#RRGGBB` form.
|
|
369
|
+
- `alphaValue` - - Alpha value to apply.
|
|
370
|
+
|
|
371
|
+
Returns: rgba color string, or original value when not 6-digit hex.
|
|
372
|
+
|
|
373
|
+
### clamp
|
|
374
|
+
|
|
375
|
+
`(value: number, min: number, max: number) => number`
|
|
376
|
+
|
|
377
|
+
Clamps a numeric value to the inclusive `[min, max]` interval.
|
|
378
|
+
|
|
379
|
+
Parameters:
|
|
380
|
+
|
|
381
|
+
- `value` - - Candidate value.
|
|
382
|
+
- `min` - - Inclusive lower bound.
|
|
383
|
+
- `max` - - Inclusive upper bound.
|
|
384
|
+
|
|
385
|
+
Returns: Clamped value.
|
|
386
|
+
|
|
387
|
+
### clamp01
|
|
388
|
+
|
|
389
|
+
`(value: number) => number`
|
|
390
|
+
|
|
391
|
+
Clamps a numeric value to the inclusive `[0, 1]` interval.
|
|
392
|
+
|
|
393
|
+
Parameters:
|
|
394
|
+
|
|
395
|
+
- `value` - - Candidate value.
|
|
396
|
+
|
|
397
|
+
Returns: Value clamped between 0 and 1.
|
|
398
|
+
|
|
399
|
+
### interpolateValue
|
|
400
|
+
|
|
401
|
+
`(startValue: number, endValue: number, progress: number) => number`
|
|
402
|
+
|
|
403
|
+
Linear interpolation helper.
|
|
404
|
+
|
|
405
|
+
Parameters:
|
|
406
|
+
|
|
407
|
+
- `startValue` - - Start value at progress `0`.
|
|
408
|
+
- `endValue` - - End value at progress `1`.
|
|
409
|
+
- `progress` - - Normalized interpolation progress.
|
|
410
|
+
|
|
411
|
+
Returns: Interpolated value.
|
|
412
|
+
|
|
413
|
+
## browser-entry/browser-entry.spawn.utils.ts
|
|
414
|
+
|
|
415
|
+
### createBirdColor
|
|
416
|
+
|
|
417
|
+
`(birdIndex: number, totalBirds: number) => string`
|
|
418
|
+
|
|
419
|
+
Resolves deterministic bird color from palette index.
|
|
420
|
+
|
|
421
|
+
Parameters:
|
|
422
|
+
|
|
423
|
+
- `birdIndex` - - Bird index in current population.
|
|
424
|
+
- `totalBirds` - - Population size.
|
|
425
|
+
|
|
426
|
+
Returns: Hex color string.
|
|
427
|
+
|
|
428
|
+
### resolveGapCenterUpperBoundYPx
|
|
429
|
+
|
|
430
|
+
`(worldHeightPx: number) => number`
|
|
431
|
+
|
|
432
|
+
Resolves the exclusive upper bound used for gap-center sampling.
|
|
433
|
+
|
|
434
|
+
Educational note:
|
|
435
|
+
We cap dynamic viewport-derived bounds at the shared simulation maximum to
|
|
436
|
+
keep browser playback distribution aligned with trainer/evaluation defaults,
|
|
437
|
+
while still supporting smaller world heights.
|
|
438
|
+
|
|
439
|
+
Parameters:
|
|
440
|
+
|
|
441
|
+
- `worldHeightPx` - - Current world height.
|
|
442
|
+
|
|
443
|
+
Returns: Exclusive upper bound for `nextInt(minInclusive, maxExclusive)`.
|
|
444
|
+
|
|
445
|
+
### resolveNextSpawnGapCenterY
|
|
446
|
+
|
|
447
|
+
`(previousGapCenterYPx: number, rng: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").RngLike, worldHeightPx: number) => number`
|
|
448
|
+
|
|
449
|
+
Resolves next gap center with bounded per-pipe delta.
|
|
450
|
+
|
|
451
|
+
Parameters:
|
|
452
|
+
|
|
453
|
+
- `previousGapCenterYPx` - - Previous spawn gap center.
|
|
454
|
+
- `rng` - - Deterministic RNG.
|
|
455
|
+
- `worldHeightPx` - - World height used to clamp candidate gap centers.
|
|
456
|
+
|
|
457
|
+
Returns: Next gap center y-position.
|
|
458
|
+
|
|
459
|
+
### resolveNextSpawnGapSize
|
|
460
|
+
|
|
461
|
+
`(previousSpawnGapPx: number | undefined, difficultyProfile: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").BrowserDifficultyProfile, rng: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").RngLike) => number`
|
|
462
|
+
|
|
463
|
+
Resolves next spawn gap size using progressive shrink and jitter.
|
|
464
|
+
|
|
465
|
+
Parameters:
|
|
466
|
+
|
|
467
|
+
- `previousSpawnGapPx` - - Previous spawn gap size.
|
|
468
|
+
- `difficultyProfile` - - Active difficulty profile.
|
|
469
|
+
- `rng` - - Deterministic RNG.
|
|
470
|
+
|
|
471
|
+
Returns: Next spawn gap size.
|
|
472
|
+
|
|
473
|
+
### resolveNextSpawnIntervalFrames
|
|
474
|
+
|
|
475
|
+
`(previousSpawnIntervalFrames: number | undefined, difficultyProfile: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").BrowserDifficultyProfile) => number`
|
|
476
|
+
|
|
477
|
+
Resolves next spawn interval using progressive shrink.
|
|
478
|
+
|
|
479
|
+
Parameters:
|
|
480
|
+
|
|
481
|
+
- `previousSpawnIntervalFrames` - - Previous spawn interval.
|
|
482
|
+
- `difficultyProfile` - - Active difficulty profile.
|
|
483
|
+
|
|
484
|
+
Returns: Next spawn interval in frames.
|
|
485
|
+
|
|
486
|
+
### sampleGapCenterY
|
|
487
|
+
|
|
488
|
+
`(rng: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").RngLike, worldHeightPx: number) => number`
|
|
489
|
+
|
|
490
|
+
Samples a random gap center y-position.
|
|
491
|
+
|
|
492
|
+
Parameters:
|
|
493
|
+
|
|
494
|
+
- `rng` - - Deterministic RNG.
|
|
495
|
+
- `worldHeightPx` - - World height used to derive valid gap-center bounds.
|
|
496
|
+
|
|
497
|
+
Returns: Sampled y-position.
|
|
498
|
+
|
|
499
|
+
## browser-entry/browser-entry.stats.utils.ts
|
|
500
|
+
|
|
501
|
+
### createFlappyStatsTableRows
|
|
502
|
+
|
|
503
|
+
`(input: import("test/examples/flappy_bird/browser-entry/browser-entry.stats.types").CreateFlappyStatsTableRowsInput) => Partial<Record<import("test/examples/flappy_bird/browser-entry/browser-entry.stats.types").FlappyStatsKey, HTMLTableCellElement>>`
|
|
504
|
+
|
|
505
|
+
Builds stats table rows and returns value-cell lookup by key.
|
|
506
|
+
|
|
507
|
+
Parameters:
|
|
508
|
+
|
|
509
|
+
- `input` - - Table construction inputs.
|
|
510
|
+
|
|
511
|
+
Returns: Mapping from stat key to value cell.
|
|
512
|
+
|
|
513
|
+
### formatArchitectureStatsValue
|
|
514
|
+
|
|
515
|
+
`(architectureValue: string) => string`
|
|
516
|
+
|
|
517
|
+
Splits architecture suffix onto a second line for readability in the stats table.
|
|
518
|
+
|
|
519
|
+
Parameters:
|
|
520
|
+
|
|
521
|
+
- `architectureValue` - - Full architecture label.
|
|
522
|
+
|
|
523
|
+
Returns: Line-broken label value.
|
|
524
|
+
|
|
525
|
+
## browser-entry/browser-entry.playback.utils.ts
|
|
526
|
+
|
|
527
|
+
### animatePopulationEpisodeInternal
|
|
528
|
+
|
|
529
|
+
`(canvas: HTMLCanvasElement, context: CanvasRenderingContext2D, evolutionWorker: Worker, onFrameStats: (stats: import("test/examples/flappy_bird/browser-entry/browser-entry.worker.types").PlaybackFrameStats) => void) => Promise<import("test/examples/flappy_bird/browser-entry/playback/playback").PlaybackEpisodeSummary>`
|
|
530
|
+
|
|
531
|
+
Internal playback orchestration entry retained for compatibility re-exports.
|
|
532
|
+
|
|
533
|
+
Parameters:
|
|
534
|
+
|
|
535
|
+
- `canvas` - - Target playback canvas.
|
|
536
|
+
- `context` - - Canvas 2D context.
|
|
537
|
+
- `evolutionWorker` - - Worker owning playback simulation state.
|
|
538
|
+
- `onFrameStats` - - Callback receiving per-frame playback telemetry.
|
|
539
|
+
|
|
540
|
+
Returns: Aggregate playback summary for the current episode.
|
|
541
|
+
|
|
542
|
+
## browser-entry/browser-entry.viewport.utils.ts
|
|
543
|
+
|
|
544
|
+
### resolvePipeSpawnXPx
|
|
545
|
+
|
|
546
|
+
`(visibleWorldWidthPx: number) => number`
|
|
547
|
+
|
|
548
|
+
Resolves the world-space x spawn position for new pipes.
|
|
549
|
+
|
|
550
|
+
Parameters:
|
|
551
|
+
|
|
552
|
+
- `visibleWorldWidthPx` - - Current visible world width.
|
|
553
|
+
|
|
554
|
+
Returns: Spawn x-position.
|
|
555
|
+
|
|
556
|
+
### resolveVisibleWorldHeightPx
|
|
557
|
+
|
|
558
|
+
`(canvas: HTMLCanvasElement) => number`
|
|
559
|
+
|
|
560
|
+
Resolves visible world height represented by the current canvas.
|
|
561
|
+
|
|
562
|
+
Educational note:
|
|
563
|
+
The current viewport model uses a 1:1 mapping between canvas pixels and
|
|
564
|
+
world-space pixels, so visible height is the canvas height directly.
|
|
565
|
+
|
|
566
|
+
Parameters:
|
|
567
|
+
|
|
568
|
+
- `canvas` - - Playback canvas.
|
|
569
|
+
|
|
570
|
+
Returns: Visible height in world-space pixels.
|
|
571
|
+
|
|
572
|
+
### resolveVisibleWorldWidthPx
|
|
573
|
+
|
|
574
|
+
`(canvas: HTMLCanvasElement) => number`
|
|
575
|
+
|
|
576
|
+
Resolves visible world width represented by the current canvas.
|
|
577
|
+
|
|
578
|
+
Educational note:
|
|
579
|
+
The current viewport model uses a 1:1 mapping between canvas pixels and
|
|
580
|
+
world-space pixels, so visible width is the canvas width directly.
|
|
581
|
+
|
|
582
|
+
Parameters:
|
|
583
|
+
|
|
584
|
+
- `canvas` - - Playback canvas.
|
|
585
|
+
|
|
586
|
+
Returns: Visible width in world-space pixels.
|
|
587
|
+
|
|
588
|
+
### resolveWorldViewport
|
|
589
|
+
|
|
590
|
+
`(canvas: HTMLCanvasElement) => import("test/examples/flappy_bird/browser-entry/browser-entry.render.types").ViewportInfo`
|
|
591
|
+
|
|
592
|
+
Resolves world viewport transformation based on canvas size.
|
|
593
|
+
|
|
594
|
+
Parameters:
|
|
595
|
+
|
|
596
|
+
- `canvas` - - Playback canvas.
|
|
597
|
+
|
|
598
|
+
Returns: Viewport scale and offsets.
|
|
599
|
+
|
|
600
|
+
## browser-entry/browser-entry.telemetry.utils.ts
|
|
601
|
+
|
|
602
|
+
### createMinorGcObserver
|
|
603
|
+
|
|
604
|
+
`(minorGcTimestampsMs: number[]) => PerformanceObserver | undefined`
|
|
605
|
+
|
|
606
|
+
Creates a PerformanceObserver that tracks minor GC events when supported.
|
|
607
|
+
|
|
608
|
+
Parameters:
|
|
609
|
+
|
|
610
|
+
- `minorGcTimestampsMs` - - Mutable minor-GC timestamp buffer.
|
|
611
|
+
|
|
612
|
+
Returns: Observer when supported; otherwise `undefined`.
|
|
613
|
+
|
|
614
|
+
### resolveEventsPerMinute
|
|
615
|
+
|
|
616
|
+
`(samples: number[]) => number`
|
|
617
|
+
|
|
618
|
+
Resolves events per minute from the latest sample window.
|
|
619
|
+
|
|
620
|
+
Parameters:
|
|
621
|
+
|
|
622
|
+
- `samples` - - Event timestamps.
|
|
623
|
+
|
|
624
|
+
Returns: Events-per-minute estimate.
|
|
625
|
+
|
|
626
|
+
### resolveHudUpdatesPerSecond
|
|
627
|
+
|
|
628
|
+
`(samples: number[]) => number`
|
|
629
|
+
|
|
630
|
+
Resolves HUD updates per second from the latest sample window.
|
|
631
|
+
|
|
632
|
+
Parameters:
|
|
633
|
+
|
|
634
|
+
- `samples` - - HUD update timestamps.
|
|
635
|
+
|
|
636
|
+
Returns: Updates-per-second estimate.
|
|
637
|
+
|
|
638
|
+
### trimSamplesToWindow
|
|
639
|
+
|
|
640
|
+
`(samples: number[], windowMs: number, nowMs: number) => void`
|
|
641
|
+
|
|
642
|
+
Trims timestamp samples to a sliding time window.
|
|
643
|
+
|
|
644
|
+
Parameters:
|
|
645
|
+
|
|
646
|
+
- `samples` - - Mutable timestamp buffer.
|
|
647
|
+
- `windowMs` - - Window width in milliseconds.
|
|
648
|
+
- `nowMs` - - Current timestamp.
|
|
649
|
+
|
|
650
|
+
Returns: Nothing.
|
|
651
|
+
|
|
652
|
+
## browser-entry/browser-entry.text-frame.utils.ts
|
|
653
|
+
|
|
654
|
+
### buildCenteredTitleBoxLines
|
|
655
|
+
|
|
656
|
+
`(centeredColumns: number, titleText: string) => string[]`
|
|
657
|
+
|
|
658
|
+
Builds an ASCII centered title box.
|
|
659
|
+
|
|
660
|
+
Parameters:
|
|
661
|
+
|
|
662
|
+
- `centeredColumns` - - Available centered column count.
|
|
663
|
+
- `titleText` - - Title text.
|
|
664
|
+
|
|
665
|
+
Returns: Three-row title box.
|
|
666
|
+
|
|
667
|
+
### buildOuterBoxLines
|
|
668
|
+
|
|
669
|
+
`(centeredColumns: number, totalRows: number) => string[]`
|
|
670
|
+
|
|
671
|
+
Builds an ASCII outer frame with closed borders.
|
|
672
|
+
|
|
673
|
+
Parameters:
|
|
674
|
+
|
|
675
|
+
- `centeredColumns` - - Centered column count.
|
|
676
|
+
- `totalRows` - - Total row count.
|
|
677
|
+
|
|
678
|
+
Returns: Frame lines.
|
|
679
|
+
|
|
680
|
+
### renderClosedOuterBox
|
|
681
|
+
|
|
682
|
+
`(input: import("test/examples/flappy_bird/browser-entry/browser-entry.render.types").RenderClosedOuterBoxInput) => void`
|
|
683
|
+
|
|
684
|
+
Renders a complete closed outer glyph box.
|
|
685
|
+
|
|
686
|
+
Parameters:
|
|
687
|
+
|
|
688
|
+
- `input` - - Rendering input object.
|
|
689
|
+
|
|
690
|
+
Returns: Nothing.
|
|
691
|
+
|
|
692
|
+
### renderStandaloneTitleBox
|
|
693
|
+
|
|
694
|
+
`(input: import("test/examples/flappy_bird/browser-entry/browser-entry.render.types").RenderStandaloneTitleBoxInput) => void`
|
|
695
|
+
|
|
696
|
+
Renders only the centered title box.
|
|
697
|
+
|
|
698
|
+
Parameters:
|
|
699
|
+
|
|
700
|
+
- `input` - - Rendering input object.
|
|
701
|
+
|
|
702
|
+
Returns: Nothing.
|
|
703
|
+
|
|
704
|
+
### resolveGlyphWidthPx
|
|
705
|
+
|
|
706
|
+
`(context: CanvasRenderingContext2D) => number`
|
|
707
|
+
|
|
708
|
+
Resolves a stable glyph width used for frame-column math.
|
|
709
|
+
|
|
710
|
+
Parameters:
|
|
711
|
+
|
|
712
|
+
- `context` - - Rendering context used to measure text.
|
|
713
|
+
|
|
714
|
+
Returns: Floored glyph width clamped to a minimum pixel value.
|
|
715
|
+
|
|
716
|
+
### resolveTextFrameMetrics
|
|
717
|
+
|
|
718
|
+
`(frameWidthPx: number, frameHeightPx: number, glyphWidthPx: number, rowHeightPx: number, minimumColumns: number) => import("test/examples/flappy_bird/browser-entry/browser-entry.render.types").TextFrameMetrics`
|
|
719
|
+
|
|
720
|
+
Resolves core text-frame metrics for glyph box rendering.
|
|
721
|
+
|
|
722
|
+
Parameters:
|
|
723
|
+
|
|
724
|
+
- `frameWidthPx` - - Frame width.
|
|
725
|
+
- `frameHeightPx` - - Frame height.
|
|
726
|
+
- `glyphWidthPx` - - Measured glyph width.
|
|
727
|
+
- `rowHeightPx` - - Glyph row height.
|
|
728
|
+
- `minimumColumns` - - Minimum column count.
|
|
729
|
+
|
|
730
|
+
Returns: Text frame metrics.
|
|
731
|
+
|
|
732
|
+
## browser-entry/browser-entry.observation.utils.ts
|
|
733
|
+
|
|
734
|
+
### commitObservationMemoryStep
|
|
735
|
+
|
|
736
|
+
`(observationMemoryState: import("test/examples/flappy_bird/simulation-shared/simulation-shared.types").SharedObservationMemoryState, observationFeatures: import("test/examples/flappy_bird/simulation-shared/simulation-shared.types").SharedObservationFeatures, shouldFlap: boolean) => void`
|
|
737
|
+
|
|
738
|
+
Commits one browser decision step into temporal memory.
|
|
739
|
+
|
|
740
|
+
Parameters:
|
|
741
|
+
|
|
742
|
+
- `observationMemoryState` - - Mutable memory state for one bird.
|
|
743
|
+
- `observationFeatures` - - Structured features used for this decision.
|
|
744
|
+
- `shouldFlap` - - Action selected by the policy.
|
|
745
|
+
|
|
746
|
+
Returns: Nothing.
|
|
747
|
+
|
|
748
|
+
### hasAliveBirds
|
|
749
|
+
|
|
750
|
+
`(birds: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").BrowserPopulationBirdLike[]) => boolean`
|
|
751
|
+
|
|
752
|
+
Checks whether at least one bird remains alive.
|
|
753
|
+
|
|
754
|
+
Parameters:
|
|
755
|
+
|
|
756
|
+
- `birds` - - Population birds.
|
|
757
|
+
|
|
758
|
+
Returns: True when any bird is alive.
|
|
759
|
+
|
|
760
|
+
### resolveAliveBirdCount
|
|
761
|
+
|
|
762
|
+
`(birds: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").BrowserPopulationBirdLike[]) => number`
|
|
763
|
+
|
|
764
|
+
Counts birds that are still alive.
|
|
765
|
+
|
|
766
|
+
Parameters:
|
|
767
|
+
|
|
768
|
+
- `birds` - - Population birds.
|
|
769
|
+
|
|
770
|
+
Returns: Alive bird count.
|
|
771
|
+
|
|
772
|
+
### resolveFlapDecision
|
|
773
|
+
|
|
774
|
+
`(rawOutputs: unknown) => boolean`
|
|
775
|
+
|
|
776
|
+
Resolves flap/no-flap decision from network outputs.
|
|
777
|
+
|
|
778
|
+
Parameters:
|
|
779
|
+
|
|
780
|
+
- `rawOutputs` - - Activation output payload.
|
|
781
|
+
|
|
782
|
+
Returns: True when flap should trigger.
|
|
783
|
+
|
|
784
|
+
### resolveFramePrimaryWinnerIndex
|
|
785
|
+
|
|
786
|
+
`(birds: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").BrowserPopulationBirdLike[], includeAliveOnly: boolean) => number`
|
|
787
|
+
|
|
788
|
+
Resolves winner index for current frame.
|
|
789
|
+
|
|
790
|
+
Parameters:
|
|
791
|
+
|
|
792
|
+
- `birds` - - Population birds.
|
|
793
|
+
- `includeAliveOnly` - - When true, ignores dead birds.
|
|
794
|
+
|
|
795
|
+
Returns: Winner index, or `-1` when unavailable.
|
|
796
|
+
|
|
797
|
+
### resolveLeaderPipesPassed
|
|
798
|
+
|
|
799
|
+
`(birds: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").BrowserPopulationBirdLike[]) => number`
|
|
800
|
+
|
|
801
|
+
Resolves leading pipes-passed score in the population.
|
|
802
|
+
|
|
803
|
+
Parameters:
|
|
804
|
+
|
|
805
|
+
- `birds` - - Population birds.
|
|
806
|
+
|
|
807
|
+
Returns: Maximum pipes passed.
|
|
808
|
+
|
|
809
|
+
### resolveObservationVector
|
|
810
|
+
|
|
811
|
+
`(birdYPx: number, velocityYPxPerFrame: number, pipes: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").BrowserPopulationPipeLike[], visibleWorldWidthPx: number, worldHeightPx: number, difficultyProfile: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").BrowserDifficultyProfile, activeSpawnIntervalFrames: number, observationMemoryState: import("test/examples/flappy_bird/simulation-shared/simulation-shared.types").SharedObservationMemoryState) => { observationVector: number[]; observationFeatures: import("test/examples/flappy_bird/simulation-shared/simulation-shared.types").SharedObservationFeatures; }`
|
|
812
|
+
|
|
813
|
+
Builds the normalized observation vector consumed by bird networks.
|
|
814
|
+
|
|
815
|
+
Parameters:
|
|
816
|
+
|
|
817
|
+
- `birdYPx` - - Bird y position.
|
|
818
|
+
- `velocityYPxPerFrame` - - Bird vertical velocity.
|
|
819
|
+
- `pipes` - - Current pipe list.
|
|
820
|
+
- `visibleWorldWidthPx` - - Current visible world width.
|
|
821
|
+
- `worldHeightPx` - - Current world height used for normalization and bounds.
|
|
822
|
+
- `difficultyProfile` - - Active difficulty profile.
|
|
823
|
+
- `activeSpawnIntervalFrames` - - Current spawn interval.
|
|
824
|
+
- `observationMemoryState` - - Temporal memory state for recurrent observation features.
|
|
825
|
+
|
|
826
|
+
Returns: Ordered normalized observation vector.
|
|
827
|
+
|
|
828
|
+
### resolveUpcomingPipes
|
|
829
|
+
|
|
830
|
+
`(pipes: import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").BrowserPopulationPipeLike[]) => [import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").BrowserPopulationPipeLike | undefined, import("test/examples/flappy_bird/browser-entry/browser-entry.simulation.types").BrowserPopulationPipeLike | undefined]`
|
|
831
|
+
|
|
832
|
+
Resolves the next two upcoming pipes in front of the bird.
|
|
833
|
+
|
|
834
|
+
Parameters:
|
|
835
|
+
|
|
836
|
+
- `pipes` - - Current pipe list.
|
|
837
|
+
|
|
838
|
+
Returns: Tuple of first and second upcoming pipes.
|
|
839
|
+
|
|
840
|
+
## browser-entry/browser-entry.network-view.utils.ts
|
|
841
|
+
|
|
842
|
+
### drawNetworkVisualization
|
|
843
|
+
|
|
844
|
+
`(context: CanvasRenderingContext2D, network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => void`
|
|
845
|
+
|
|
846
|
+
Draws a complete, layer-based visualization of the active network.
|
|
847
|
+
|
|
848
|
+
Parameters:
|
|
849
|
+
|
|
850
|
+
- `context` - - Canvas 2D drawing context.
|
|
851
|
+
- `network` - - Network to visualize.
|
|
852
|
+
- `inputSize` - - Input-layer size.
|
|
853
|
+
- `outputSize` - - Output-layer size.
|
|
854
|
+
|
|
855
|
+
Returns: Nothing.
|
|
856
|
+
|
|
857
|
+
### resolveNetworkArchitectureLabel
|
|
858
|
+
|
|
859
|
+
`(network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => string`
|
|
860
|
+
|
|
861
|
+
Resolves compact architecture label text for headers and HUD rows.
|
|
862
|
+
|
|
863
|
+
Parameters:
|
|
864
|
+
|
|
865
|
+
- `network` - - Network to describe.
|
|
866
|
+
- `inputSize` - - Configured input size.
|
|
867
|
+
- `outputSize` - - Configured output size.
|
|
868
|
+
|
|
869
|
+
Returns: Readable architecture label.
|
|
870
|
+
|
|
871
|
+
### resolveNetworkVisualizationHeightPx
|
|
872
|
+
|
|
873
|
+
`(network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => number`
|
|
874
|
+
|
|
875
|
+
Resolves responsive visualization canvas height from network shape.
|
|
876
|
+
|
|
877
|
+
Parameters:
|
|
878
|
+
|
|
879
|
+
- `network` - - Network to visualize.
|
|
880
|
+
- `inputSize` - - Input-layer size.
|
|
881
|
+
- `outputSize` - - Output-layer size.
|
|
882
|
+
|
|
883
|
+
Returns: Recommended height in pixels.
|
|
884
|
+
|
|
885
|
+
### resolveNetworkVisualizationLayers
|
|
886
|
+
|
|
887
|
+
`(network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").VisualNetworkNodeLike[][]`
|
|
888
|
+
|
|
889
|
+
Resolves layered node groups for network-view layout and rendering.
|
|
890
|
+
|
|
891
|
+
Educational note:
|
|
892
|
+
Layer grouping is a network-view concern because it drives sizing, node
|
|
893
|
+
placement, and architecture presentation. Visualization code can still reuse
|
|
894
|
+
the result, but this helper now lives with the module that owns layout.
|
|
895
|
+
|
|
896
|
+
Parameters:
|
|
897
|
+
|
|
898
|
+
- `network` - - Runtime network instance.
|
|
899
|
+
- `inputSize` - - Input count fallback.
|
|
900
|
+
- `outputSize` - - Output count fallback.
|
|
901
|
+
|
|
902
|
+
Returns: Layered nodes for rendering.
|
|
903
|
+
|
|
904
|
+
## browser-entry/browser-entry.visualization.utils.ts
|
|
905
|
+
|
|
906
|
+
### createColorLegendRows
|
|
907
|
+
|
|
908
|
+
`(scale: import("test/examples/flappy_bird/browser-entry/visualization/visualization.types").DynamicColorScale, symbol: "w" | "b") => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").ColorLegendRow[]`
|
|
909
|
+
|
|
910
|
+
Creates legend rows from ordered tiers.
|
|
911
|
+
|
|
912
|
+
Parameters:
|
|
913
|
+
|
|
914
|
+
- `scale` - - Dynamic color scale containing bounds, tiers, and overflow color.
|
|
915
|
+
- `symbol` - - Label symbol.
|
|
916
|
+
|
|
917
|
+
Returns: Legend rows.
|
|
918
|
+
|
|
919
|
+
### createLogDivergingColorTiers
|
|
920
|
+
|
|
921
|
+
`(input: { maxAbsValue: number; centerBlueThreshold: number; negativePalette: readonly string[]; centerBluePalette: readonly string[]; positivePalette: readonly string[]; logarithmicSteepness: number; edgeStartAbsValue?: number | undefined; edgeTierCount?: number | undefined; }) => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").ColorTier[]`
|
|
922
|
+
|
|
923
|
+
Builds logarithmic diverging color tiers with a center band and edge extension.
|
|
924
|
+
|
|
925
|
+
Parameters:
|
|
926
|
+
|
|
927
|
+
- `input` - - Tier creation options.
|
|
928
|
+
|
|
929
|
+
Returns: Ordered tier list.
|
|
930
|
+
|
|
931
|
+
### drawBiasNodesLayer
|
|
932
|
+
|
|
933
|
+
`(context: CanvasRenderingContext2D, positionedNodes: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").PositionedNetworkNodeLike[], nodeDimensions: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").NetworkNodeDimensionsLike, biasScale: import("test/examples/flappy_bird/browser-entry/visualization/visualization.types").DynamicColorScale) => void`
|
|
934
|
+
|
|
935
|
+
Draws all network nodes with bias labels.
|
|
936
|
+
|
|
937
|
+
Parameters:
|
|
938
|
+
|
|
939
|
+
- `context` - - Render context.
|
|
940
|
+
- `positionedNodes` - - Positioned nodes.
|
|
941
|
+
- `nodeDimensions` - - Node dimensions.
|
|
942
|
+
- `biasScale` - - Dynamic bias color scale.
|
|
943
|
+
|
|
944
|
+
Returns: Nothing.
|
|
945
|
+
|
|
946
|
+
### drawNetworkColorLegend
|
|
947
|
+
|
|
948
|
+
`(context: CanvasRenderingContext2D, architectureLabel: string, colorScales: import("test/examples/flappy_bird/browser-entry/visualization/visualization.types").NetworkVisualizationColorScales) => void`
|
|
949
|
+
|
|
950
|
+
Draws the color legend for connections and node bias values.
|
|
951
|
+
|
|
952
|
+
Parameters:
|
|
953
|
+
|
|
954
|
+
- `context` - - Render context.
|
|
955
|
+
- `architectureLabel` - - Compact architecture description.
|
|
956
|
+
- `colorScales` - - Connection and bias color scales.
|
|
957
|
+
|
|
958
|
+
Returns: Nothing.
|
|
959
|
+
|
|
960
|
+
### drawNetworkVisualizationHeader
|
|
961
|
+
|
|
962
|
+
`(context: CanvasRenderingContext2D, architectureLabel: string) => void`
|
|
963
|
+
|
|
964
|
+
Draws network architecture header text.
|
|
965
|
+
|
|
966
|
+
Parameters:
|
|
967
|
+
|
|
968
|
+
- `context` - - Render context.
|
|
969
|
+
- `architectureLabel` - - Header label.
|
|
970
|
+
|
|
971
|
+
Returns: Nothing.
|
|
972
|
+
|
|
973
|
+
### drawWeightedConnectionsLayer
|
|
974
|
+
|
|
975
|
+
`(context: CanvasRenderingContext2D, runtimeConnections: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").VisualNetworkConnectionLike[], positionByNodeIndex: Map<number, import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").PositionedNetworkNodeLike>, connectionScale: import("test/examples/flappy_bird/browser-entry/visualization/visualization.types").DynamicColorScale) => void`
|
|
976
|
+
|
|
977
|
+
Draws weighted connection lines.
|
|
978
|
+
|
|
979
|
+
Parameters:
|
|
980
|
+
|
|
981
|
+
- `context` - - Render context.
|
|
982
|
+
- `runtimeConnections` - - Runtime connection list.
|
|
983
|
+
- `positionByNodeIndex` - - Node layout map.
|
|
984
|
+
- `connectionScale` - - Dynamic connection color scale.
|
|
985
|
+
|
|
986
|
+
Returns: Nothing.
|
|
987
|
+
|
|
988
|
+
### formatNodeBiasLabel
|
|
989
|
+
|
|
990
|
+
`(nodeBias: number) => string`
|
|
991
|
+
|
|
992
|
+
Formats node bias labels with fixed sign and precision.
|
|
993
|
+
|
|
994
|
+
Parameters:
|
|
995
|
+
|
|
996
|
+
- `nodeBias` - - Node bias value.
|
|
997
|
+
|
|
998
|
+
Returns: Label text.
|
|
999
|
+
|
|
1000
|
+
### resolveBiasRangeColor
|
|
1001
|
+
|
|
1002
|
+
`(nodeBias: number) => string`
|
|
1003
|
+
|
|
1004
|
+
Resolves bias color for a raw node bias.
|
|
1005
|
+
|
|
1006
|
+
Parameters:
|
|
1007
|
+
|
|
1008
|
+
- `nodeBias` - - Node bias.
|
|
1009
|
+
|
|
1010
|
+
Returns: Tier color.
|
|
1011
|
+
|
|
1012
|
+
### resolveConnectionRangeColor
|
|
1013
|
+
|
|
1014
|
+
`(connectionWeight: number) => string`
|
|
1015
|
+
|
|
1016
|
+
Resolves connection color for a raw weight.
|
|
1017
|
+
|
|
1018
|
+
Parameters:
|
|
1019
|
+
|
|
1020
|
+
- `connectionWeight` - - Connection weight.
|
|
1021
|
+
|
|
1022
|
+
Returns: Tier color.
|
|
1023
|
+
|
|
1024
|
+
### resolveDefaultNetworkLegendLayout
|
|
1025
|
+
|
|
1026
|
+
`(context: CanvasRenderingContext2D, network: import("src/architecture/network").default | undefined) => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").NetworkLegendLayout`
|
|
1027
|
+
|
|
1028
|
+
Resolves default legend layout from internal tier definitions.
|
|
1029
|
+
|
|
1030
|
+
Parameters:
|
|
1031
|
+
|
|
1032
|
+
- `context` - - Render context.
|
|
1033
|
+
- `network` - - Active network instance.
|
|
1034
|
+
|
|
1035
|
+
Returns: Legend layout.
|
|
1036
|
+
|
|
1037
|
+
### resolveNetworkLegendLayout
|
|
1038
|
+
|
|
1039
|
+
`(context: CanvasRenderingContext2D, connectionLegendRows: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").ColorLegendRow[], biasLegendRows: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").ColorLegendRow[]) => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").NetworkLegendLayout`
|
|
1040
|
+
|
|
1041
|
+
Resolves network legend layout from canvas constraints.
|
|
1042
|
+
|
|
1043
|
+
Parameters:
|
|
1044
|
+
|
|
1045
|
+
- `context` - - Render context.
|
|
1046
|
+
- `connectionLegendRows` - - Connection legend rows.
|
|
1047
|
+
- `biasLegendRows` - - Bias legend rows.
|
|
1048
|
+
|
|
1049
|
+
Returns: Computed legend layout.
|
|
1050
|
+
|
|
1051
|
+
### resolveNetworkVisualizationColorScales
|
|
1052
|
+
|
|
1053
|
+
`(network: import("src/architecture/network").default | undefined) => import("test/examples/flappy_bird/browser-entry/visualization/visualization.types").NetworkVisualizationColorScales`
|
|
1054
|
+
|
|
1055
|
+
Resolves dynamic connection/bias color scales from the active network range.
|
|
1056
|
+
|
|
1057
|
+
Parameters:
|
|
1058
|
+
|
|
1059
|
+
- `network` - - Active network.
|
|
1060
|
+
|
|
1061
|
+
Returns: Dynamic scales used by graph drawing and legend rows.
|
|
1062
|
+
|
|
1063
|
+
### resolveNetworkVisualizationLayers
|
|
1064
|
+
|
|
1065
|
+
`(network: import("src/architecture/network").default | undefined, inputSize: number, outputSize: number) => import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").VisualNetworkNodeLike[][]`
|
|
1066
|
+
|
|
1067
|
+
Resolves layered node groups for network-view layout and rendering.
|
|
1068
|
+
|
|
1069
|
+
Educational note:
|
|
1070
|
+
Layer grouping is a network-view concern because it drives sizing, node
|
|
1071
|
+
placement, and architecture presentation. Visualization code can still reuse
|
|
1072
|
+
the result, but this helper now lives with the module that owns layout.
|
|
1073
|
+
|
|
1074
|
+
Parameters:
|
|
1075
|
+
|
|
1076
|
+
- `network` - - Runtime network instance.
|
|
1077
|
+
- `inputSize` - - Input count fallback.
|
|
1078
|
+
- `outputSize` - - Output count fallback.
|
|
1079
|
+
|
|
1080
|
+
Returns: Layered nodes for rendering.
|
|
1081
|
+
|
|
1082
|
+
### resolveTierColor
|
|
1083
|
+
|
|
1084
|
+
`(value: number, tiers: import("test/examples/flappy_bird/browser-entry/browser-entry.visualization.types").ColorTier[], aboveTierColor: string) => string`
|
|
1085
|
+
|
|
1086
|
+
Resolves a color from ordered tier definitions.
|
|
1087
|
+
|
|
1088
|
+
Parameters:
|
|
1089
|
+
|
|
1090
|
+
- `value` - - Numeric value to classify.
|
|
1091
|
+
- `tiers` - - Ordered tier list.
|
|
1092
|
+
- `aboveTierColor` - - Fallback color for values above the last tier.
|
|
1093
|
+
|
|
1094
|
+
Returns: Resolved color string.
|
|
1095
|
+
|
|
1096
|
+
## browser-entry/browser-entry.worker-channel.utils.ts
|
|
1097
|
+
|
|
1098
|
+
### createEvolutionWorker
|
|
1099
|
+
|
|
1100
|
+
`() => Worker`
|
|
1101
|
+
|
|
1102
|
+
Creates the evolution worker used to keep heavy NEAT compute off the UI thread.
|
|
1103
|
+
|
|
1104
|
+
Returns: Initialized worker instance.
|
|
1105
|
+
|
|
1106
|
+
### requestWorkerGeneration
|
|
1107
|
+
|
|
1108
|
+
`(evolutionWorker: Worker) => Promise<import("test/examples/flappy_bird/browser-entry/browser-entry.worker.types").EvolutionGenerationPayload>`
|
|
1109
|
+
|
|
1110
|
+
Waits for the next generation payload emitted by the evolution worker.
|
|
1111
|
+
|
|
1112
|
+
Parameters:
|
|
1113
|
+
|
|
1114
|
+
- `evolutionWorker` - - Worker emitting generation-ready messages.
|
|
1115
|
+
|
|
1116
|
+
Returns: Next generation payload.
|
|
1117
|
+
|
|
1118
|
+
### requestWorkerPlaybackStep
|
|
1119
|
+
|
|
1120
|
+
`(evolutionWorker: Worker, playbackStepRequest: import("test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.types").WorkerChannelPlaybackStepRequest) => Promise<{ snapshot: import("test/examples/flappy_bird/browser-entry/browser-entry.worker.types").EvolutionPlaybackStepSnapshot; instrumentation?: { activationCallsPerFrame: number; simulationStepsPerRaf: number; } | undefined; done: boolean; averagePipesPassed?: number | undefined; p90FramesSurvived?: number | undefined; winnerPipesPassed?: number | undefined; winnerFramesSurvived?: number | undefined; }>`
|
|
1121
|
+
|
|
1122
|
+
Requests one playback batch step from the worker.
|
|
1123
|
+
|
|
1124
|
+
Parameters:
|
|
1125
|
+
|
|
1126
|
+
- `evolutionWorker` - - Worker that owns playback simulation state.
|
|
1127
|
+
- `playbackStepRequest` - - Requested simulation budget and viewport width.
|
|
1128
|
+
|
|
1129
|
+
Returns: Playback-step payload including snapshot and completion marker.
|