@reicek/neataptic-ts 0.1.25 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/copilot-instructions.md +11 -0
- package/.github/skills/trace-analyzer-extension/SKILL.md +3 -3
- package/.github/skills/trace-analyzer-extension/assets/extension-checklist.md +1 -1
- package/.github/skills/trace-analyzer-extension/references/analyzer-extension-workflow.md +1 -1
- package/.github/skills/trace-audit-reporting/SKILL.md +3 -3
- package/.github/skills/trace-audit-reporting/references/trace-analysis-workflow.md +1 -1
- package/package.json +19 -13
- package/plans/Flappy_Bird_Folder_Documentation_Pass.md +4 -4
- package/plans/README.md +24 -0
- package/plans/Roadmap.md +62 -40
- package/plans/analyze-trace-solid-split.plans.md +66 -0
- package/plans/architecture-solid-split.plans.md +9 -15
- package/plans/asciiMaze-typescript-repair.plans.md +1 -1
- package/plans/generate-docs-solid-split.plans.md +87 -0
- package/plans/methods-docs.plans.md +25 -1
- package/plans/methods-solid-split.plans.md +14 -14
- package/plans/neat-docs.plans.md +9 -1
- package/plans/neat-test-surface-repair.plans.md +1 -1
- package/plans/render-docs-html-solid-split.plans.md +68 -0
- package/plans/src-no-explicit-any-cleanup.plans.md +1 -1
- package/plans/utils-docs.plans.md +6 -1
- package/scripts/analyze-trace/analyze-trace.analysis.ts +479 -0
- package/scripts/analyze-trace/analyze-trace.constants.ts +35 -0
- package/scripts/analyze-trace/analyze-trace.io.ts +69 -0
- package/scripts/analyze-trace/analyze-trace.report.ts +100 -0
- package/scripts/analyze-trace/analyze-trace.shared.ts +116 -0
- package/scripts/analyze-trace/analyze-trace.ts +45 -0
- package/scripts/analyze-trace/analyze-trace.types.ts +72 -0
- package/scripts/assets/theme.css +80 -23
- package/scripts/copy-examples.ts +239 -0
- package/scripts/export-onnx.ts +223 -0
- package/scripts/generate-bench-tables.ts +378 -37
- package/scripts/generate-docs/generate-docs.constants.ts +107 -0
- package/scripts/generate-docs/generate-docs.order.ts +355 -0
- package/scripts/generate-docs/generate-docs.state.ts +31 -0
- package/scripts/generate-docs/generate-docs.targets.ts +165 -0
- package/scripts/generate-docs/generate-docs.ts +63 -0
- package/scripts/generate-docs/generate-docs.types.ts +112 -0
- package/scripts/generate-docs/output/generate-docs.output.folder-index.utils.ts +167 -0
- package/scripts/generate-docs/output/generate-docs.output.ordering.utils.ts +353 -0
- package/scripts/generate-docs/output/generate-docs.output.readme.utils.ts +420 -0
- package/scripts/generate-docs/output/generate-docs.output.ts +123 -0
- package/scripts/generate-docs/output/generate-docs.output.warnings.utils.ts +219 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.collection.utils.ts +365 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.jsdoc.utils.ts +373 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.normalize.utils.ts +155 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.render.utils.ts +149 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.signature.utils.ts +289 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.ts +11 -0
- package/scripts/mermaid-cli.mjs +102 -22
- package/scripts/mermaid-cli.ts +736 -0
- package/scripts/render-docs-html/render-docs-html.assets.ts +54 -0
- package/scripts/render-docs-html/render-docs-html.mermaid.ts +245 -0
- package/scripts/{render-docs-html.sidebar.ts → render-docs-html/render-docs-html.navigation.ts} +141 -144
- package/scripts/render-docs-html/render-docs-html.pages.ts +333 -0
- package/scripts/render-docs-html/render-docs-html.shared.ts +333 -0
- package/scripts/render-docs-html/render-docs-html.types.ts +42 -0
- package/scripts/render-docs-html.ts +23 -587
- package/scripts/run-docs.ts +238 -0
- package/scripts/write-dist-docs-pkg.ts +40 -0
- package/src/README.md +75 -75
- package/src/architecture/connection/README.md +5 -5
- package/src/architecture/layer/README.md +508 -508
- package/src/architecture/network/README.md +1458 -1458
- package/src/architecture/network/activate/README.md +694 -694
- package/src/architecture/network/bootstrap/README.md +77 -77
- package/src/architecture/network/connect/README.md +74 -74
- package/src/architecture/network/deterministic/README.md +135 -135
- package/src/architecture/network/evolve/README.md +364 -364
- package/src/architecture/network/gating/README.md +130 -130
- package/src/architecture/network/genetic/README.md +399 -399
- package/src/architecture/network/mutate/README.md +897 -897
- package/src/architecture/network/onnx/README.md +720 -720
- package/src/architecture/network/onnx/export/README.md +728 -728
- package/src/architecture/network/onnx/export/layers/README.md +450 -450
- package/src/architecture/network/onnx/import/README.md +618 -618
- package/src/architecture/network/onnx/schema/README.md +32 -32
- package/src/architecture/network/prune/README.md +245 -245
- package/src/architecture/network/remove/README.md +135 -135
- package/src/architecture/network/runtime/README.md +106 -106
- package/src/architecture/network/serialize/README.md +542 -542
- package/src/architecture/network/slab/README.md +608 -608
- package/src/architecture/network/standalone/README.md +212 -212
- package/src/architecture/network/stats/README.md +84 -84
- package/src/architecture/network/topology/README.md +465 -465
- package/src/architecture/network/training/README.md +200 -200
- package/src/architecture/node/README.md +5 -5
- package/src/architecture/nodePool/README.md +14 -14
- package/src/methods/README.md +99 -99
- package/src/methods/activation/README.md +189 -189
- package/src/methods/cost/README.md +131 -131
- package/src/methods/rate/README.md +86 -86
- package/src/multithreading/README.md +77 -77
- package/src/multithreading/workers/browser/README.md +8 -8
- package/src/multithreading/workers/node/README.md +8 -8
- package/src/neat/README.md +148 -148
- package/src/neat/adaptive/README.md +120 -120
- package/src/neat/adaptive/acceptance/README.md +40 -40
- package/src/neat/adaptive/complexity/README.md +137 -137
- package/src/neat/adaptive/core/README.md +197 -197
- package/src/neat/adaptive/lineage/README.md +90 -90
- package/src/neat/adaptive/mutation/README.md +284 -284
- package/src/neat/compat/README.md +43 -43
- package/src/neat/compat/core/README.md +90 -90
- package/src/neat/diversity/README.md +35 -35
- package/src/neat/diversity/core/README.md +88 -88
- package/src/neat/evaluate/README.md +85 -85
- package/src/neat/evaluate/auto-distance/README.md +75 -75
- package/src/neat/evaluate/entropy-compat/README.md +37 -37
- package/src/neat/evaluate/entropy-sharing/README.md +43 -43
- package/src/neat/evaluate/fitness/README.md +23 -23
- package/src/neat/evaluate/novelty/README.md +120 -120
- package/src/neat/evaluate/objectives/README.md +17 -17
- package/src/neat/evaluate/shared/README.md +94 -94
- package/src/neat/evolve/README.md +96 -96
- package/src/neat/evolve/adaptive/README.md +60 -60
- package/src/neat/evolve/objectives/README.md +63 -63
- package/src/neat/evolve/offspring/README.md +56 -56
- package/src/neat/evolve/population/README.md +171 -171
- package/src/neat/evolve/runtime/README.md +79 -79
- package/src/neat/evolve/speciation/README.md +74 -74
- package/src/neat/evolve/warnings/README.md +10 -10
- package/src/neat/export/README.md +114 -114
- package/src/neat/helpers/README.md +50 -50
- package/src/neat/init/README.md +9 -9
- package/src/neat/lineage/core/README.md +101 -101
- package/src/neat/multiobjective/category/README.md +74 -74
- package/src/neat/multiobjective/crowding/README.md +272 -272
- package/src/neat/multiobjective/dominance/README.md +171 -171
- package/src/neat/multiobjective/fronts/README.md +68 -68
- package/src/neat/multiobjective/metrics/README.md +43 -43
- package/src/neat/multiobjective/objectives/README.md +31 -31
- package/src/neat/multiobjective/shared/README.md +27 -27
- package/src/neat/mutation/README.md +97 -97
- package/src/neat/mutation/add-conn/README.md +115 -115
- package/src/neat/mutation/add-node/README.md +126 -126
- package/src/neat/mutation/flow/README.md +149 -149
- package/src/neat/mutation/repair/README.md +185 -185
- package/src/neat/mutation/select/README.md +117 -117
- package/src/neat/mutation/shared/README.md +32 -32
- package/src/neat/objectives/README.md +25 -25
- package/src/neat/objectives/core/README.md +67 -67
- package/src/neat/pruning/README.md +40 -40
- package/src/neat/pruning/core/README.md +171 -171
- package/src/neat/pruning/facade/README.md +32 -32
- package/src/neat/rng/README.md +104 -104
- package/src/neat/rng/core/README.md +137 -137
- package/src/neat/rng/facade/README.md +50 -50
- package/src/neat/selection/README.md +111 -111
- package/src/neat/selection/core/README.md +227 -227
- package/src/neat/selection/facade/README.md +61 -61
- package/src/neat/shared/README.md +163 -163
- package/src/neat/speciation/README.md +31 -31
- package/src/neat/speciation/threshold/README.md +35 -35
- package/src/neat/species/README.md +25 -25
- package/src/neat/species/core/README.md +20 -20
- package/src/neat/species/core/shared/README.md +18 -18
- package/src/neat/species/history/context/README.md +22 -22
- package/src/neat/telemetry/accessors/README.md +58 -58
- package/src/neat/telemetry/exports/README.md +233 -233
- package/src/neat/telemetry/facade/README.md +252 -252
- package/src/neat/telemetry/facade/archive/README.md +57 -57
- package/src/neat/telemetry/facade/buffer/README.md +43 -43
- package/src/neat/telemetry/facade/lineage/README.md +12 -12
- package/src/neat/telemetry/facade/objectives/README.md +44 -44
- package/src/neat/telemetry/facade/runtime/README.md +26 -26
- package/src/neat/telemetry/facade/species/README.md +27 -27
- package/src/neat/telemetry/metrics/README.md +696 -696
- package/src/neat/telemetry/recorder/README.md +57 -57
- package/src/neat/telemetry/types/README.md +32 -32
- package/src/neat/topology-intent/README.md +75 -75
- package/src/utils/README.md +193 -193
- package/test/examples/asciiMaze/browser-entry/README.md +92 -92
- package/test/examples/asciiMaze/dashboardManager/README.md +109 -109
- package/test/examples/asciiMaze/dashboardManager/telemetry/README.md +28 -28
- package/test/examples/asciiMaze/evolutionEngine/README.md +1527 -1527
- package/test/examples/asciiMaze/mazeMovement/README.md +105 -105
- package/test/examples/asciiMaze/mazeMovement/finalization/README.md +16 -16
- package/test/examples/asciiMaze/mazeMovement/policy/README.md +57 -57
- package/test/examples/asciiMaze/mazeMovement/runtime/README.md +52 -52
- package/test/examples/asciiMaze/mazeMovement/shaping/README.md +46 -46
- package/test/examples/flappy_bird/browser-entry/README.md +508 -508
- package/test/examples/flappy_bird/browser-entry/host/README.md +101 -101
- package/test/examples/flappy_bird/browser-entry/host/resize/README.md +144 -144
- package/test/examples/flappy_bird/browser-entry/network-view/README.md +194 -194
- package/test/examples/flappy_bird/browser-entry/playback/README.md +278 -278
- package/test/examples/flappy_bird/browser-entry/playback/background/README.md +129 -129
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/README.md +502 -502
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/README.md +139 -139
- package/test/examples/flappy_bird/browser-entry/playback/snapshot/README.md +10 -10
- package/test/examples/flappy_bird/browser-entry/playback/trail/README.md +43 -43
- package/test/examples/flappy_bird/browser-entry/playback/worker-channel/README.md +30 -30
- package/test/examples/flappy_bird/browser-entry/runtime/README.md +59 -59
- package/test/examples/flappy_bird/browser-entry/visualization/README.md +276 -276
- package/test/examples/flappy_bird/browser-entry/worker-channel/README.md +16 -16
- package/test/examples/flappy_bird/constants/README.md +1070 -1070
- package/test/examples/flappy_bird/environment/README.md +22 -22
- package/test/examples/flappy_bird/evaluation/README.md +32 -32
- package/test/examples/flappy_bird/evaluation/rollout/README.md +141 -141
- package/test/examples/flappy_bird/flappy-evolution-worker/README.md +425 -425
- package/test/examples/flappy_bird/simulation-shared/README.md +170 -170
- package/test/examples/flappy_bird/simulation-shared/observation/README.md +109 -109
- package/test/examples/flappy_bird/trainer/README.md +325 -325
- package/test/examples/flappy_bird/trainer/evaluation/README.md +74 -74
- package/scripts/analyze-trace.ts +0 -590
- package/scripts/copy-examples.mjs +0 -114
- package/scripts/export-onnx.mjs +0 -86
- package/scripts/generate-bench-tables.mjs +0 -182
- package/scripts/generate-docs.ts +0 -2900
- package/scripts/write-dist-docs-pkg.mjs +0 -16
|
@@ -43,207 +43,196 @@ test can inspect the recorded state without reaching into controller internals.
|
|
|
43
43
|
|
|
44
44
|
## neat/telemetry/facade/telemetry.facade.ts
|
|
45
45
|
|
|
46
|
-
###
|
|
46
|
+
### clearParetoArchive
|
|
47
47
|
|
|
48
48
|
```ts
|
|
49
|
-
|
|
49
|
+
clearParetoArchive(
|
|
50
50
|
host: NeatTelemetryFacadeHost,
|
|
51
|
-
):
|
|
51
|
+
): void
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Clear the Pareto archive metadata stored on the host.
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
Use this when multi-objective inspection should restart from a clean archive
|
|
57
|
+
window, for example between experiments or before capturing a focused new
|
|
58
|
+
frontier snapshot.
|
|
59
59
|
|
|
60
60
|
Parameters:
|
|
61
|
-
- `host` - - `Neat` instance
|
|
61
|
+
- `host` - - `Neat` instance whose Pareto archive should be emptied.
|
|
62
62
|
|
|
63
|
-
Returns:
|
|
63
|
+
Returns: Nothing. The archive buffer is reset in place.
|
|
64
64
|
|
|
65
|
-
###
|
|
65
|
+
### clearTelemetry
|
|
66
66
|
|
|
67
67
|
```ts
|
|
68
|
-
|
|
68
|
+
clearTelemetry(
|
|
69
69
|
host: NeatTelemetryFacadeHost,
|
|
70
|
-
):
|
|
70
|
+
): void
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
Clear cached telemetry entries.
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
Use this when you want a fresh observation window without restarting the run.
|
|
76
|
+
It is especially useful in notebooks, UI sessions, or targeted experiments
|
|
77
|
+
where older telemetry would otherwise drown out the next few generations.
|
|
78
78
|
|
|
79
79
|
Parameters:
|
|
80
|
-
- `host` - - `Neat` instance
|
|
81
|
-
|
|
82
|
-
Returns: Telemetry entries captured so far, or an empty array when telemetry
|
|
83
|
-
is not initialized.
|
|
84
|
-
|
|
85
|
-
Example:
|
|
80
|
+
- `host` - - `Neat` instance whose telemetry buffer should be reset.
|
|
86
81
|
|
|
87
|
-
|
|
88
|
-
console.table(telemetryWindow.map((entry) => ({
|
|
89
|
-
generation: entry.generation,
|
|
90
|
-
bestScore: entry.bestScore,
|
|
91
|
-
species: entry.species,
|
|
92
|
-
})));
|
|
82
|
+
Returns: Nothing. The helper mutates the host buffer in place.
|
|
93
83
|
|
|
94
|
-
###
|
|
84
|
+
### clearTelemetryObjectives
|
|
95
85
|
|
|
96
86
|
```ts
|
|
97
|
-
|
|
87
|
+
clearTelemetryObjectives(
|
|
98
88
|
host: NeatTelemetryFacadeHost,
|
|
99
|
-
):
|
|
89
|
+
): void
|
|
100
90
|
```
|
|
101
91
|
|
|
102
|
-
|
|
92
|
+
Remove all registered custom objectives so only the default objective path remains.
|
|
103
93
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
94
|
+
Read this as the reset companion to {@link registerTelemetryObjective}. It is
|
|
95
|
+
useful when one inspection session temporarily added custom objectives and the
|
|
96
|
+
caller wants to return the controller to its simpler baseline objective view.
|
|
107
97
|
|
|
108
98
|
Parameters:
|
|
109
|
-
- `host` - - `Neat` instance whose
|
|
99
|
+
- `host` - - `Neat` instance whose objective registry should be cleared.
|
|
110
100
|
|
|
111
|
-
Returns:
|
|
101
|
+
Returns: Nothing. The helper mutates the objective registry in place.
|
|
112
102
|
|
|
113
|
-
###
|
|
103
|
+
### exportParetoFrontJSONL
|
|
114
104
|
|
|
115
105
|
```ts
|
|
116
|
-
|
|
106
|
+
exportParetoFrontJSONL(
|
|
117
107
|
host: NeatTelemetryFacadeHost,
|
|
118
|
-
maxEntries: number,
|
|
108
|
+
maxEntries: number | undefined,
|
|
119
109
|
): string
|
|
120
110
|
```
|
|
121
111
|
|
|
122
|
-
Export recent
|
|
112
|
+
Export recent Pareto archive entries as JSON Lines.
|
|
123
113
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
114
|
+
Use this when the archive needs to leave the controller for offline analysis,
|
|
115
|
+
regression fixtures, or notebook-driven frontier inspection. Compared with
|
|
116
|
+
`getParetoArchive()`, the emphasis here is portability rather than immediate
|
|
117
|
+
in-memory inspection.
|
|
127
118
|
|
|
128
119
|
Parameters:
|
|
129
|
-
- `host` - - `Neat` instance
|
|
130
|
-
- `maxEntries` - - Maximum number of
|
|
131
|
-
|
|
132
|
-
Returns: CSV string containing the requested telemetry window.
|
|
133
|
-
|
|
134
|
-
Example:
|
|
120
|
+
- `host` - - `Neat` instance storing Pareto objective snapshots.
|
|
121
|
+
- `maxEntries` - - Maximum number of entries to serialize.
|
|
135
122
|
|
|
136
|
-
|
|
137
|
-
console.log(csv.split('\n').slice(0, 3).join('\n'));
|
|
123
|
+
Returns: JSONL payload for recent Pareto archive entries.
|
|
138
124
|
|
|
139
|
-
###
|
|
125
|
+
### exportSpeciesHistoryCSV
|
|
140
126
|
|
|
141
127
|
```ts
|
|
142
|
-
|
|
128
|
+
exportSpeciesHistoryCSV(
|
|
143
129
|
host: NeatTelemetryFacadeHost,
|
|
144
|
-
|
|
130
|
+
maxEntries: number,
|
|
131
|
+
): string
|
|
145
132
|
```
|
|
146
133
|
|
|
147
|
-
|
|
134
|
+
Export species history as CSV rows.
|
|
148
135
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
136
|
+
Prefer this when the reader is a person first and a program second. CSV is
|
|
137
|
+
the quickest path from species history into spreadsheets, ad-hoc inspection,
|
|
138
|
+
or lightweight experiment notes.
|
|
152
139
|
|
|
153
140
|
Parameters:
|
|
154
|
-
- `host` - - `Neat` instance whose
|
|
141
|
+
- `host` - - `Neat` instance whose species history should be exported.
|
|
142
|
+
- `maxEntries` - - Maximum number of recent history entries to include.
|
|
155
143
|
|
|
156
|
-
Returns:
|
|
144
|
+
Returns: CSV payload for offline species analysis.
|
|
157
145
|
|
|
158
|
-
###
|
|
146
|
+
### exportSpeciesHistoryJSONL
|
|
159
147
|
|
|
160
148
|
```ts
|
|
161
|
-
|
|
149
|
+
exportSpeciesHistoryJSONL(
|
|
162
150
|
host: NeatTelemetryFacadeHost,
|
|
163
|
-
|
|
151
|
+
maxEntries: number,
|
|
152
|
+
): string
|
|
164
153
|
```
|
|
165
154
|
|
|
166
|
-
|
|
155
|
+
Export species history as JSON Lines.
|
|
167
156
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
maximized.
|
|
157
|
+
Prefer this when the next consumer is a script, notebook, or append-friendly
|
|
158
|
+
file sink. JSONL keeps each generation independently parseable while still
|
|
159
|
+
preserving the richer row structure that CSV flattens away.
|
|
172
160
|
|
|
173
161
|
Parameters:
|
|
174
|
-
- `host` - - `Neat` instance
|
|
175
|
-
|
|
176
|
-
Returns: Compact objective summaries in evaluation order.
|
|
177
|
-
|
|
178
|
-
Example:
|
|
162
|
+
- `host` - - `Neat` instance whose species history should be serialized.
|
|
163
|
+
- `maxEntries` - - Maximum number of recent history entries to include.
|
|
179
164
|
|
|
180
|
-
|
|
181
|
-
console.table(objectives);
|
|
165
|
+
Returns: JSONL payload describing recent species history snapshots.
|
|
182
166
|
|
|
183
|
-
###
|
|
167
|
+
### exportTelemetryCSV
|
|
184
168
|
|
|
185
169
|
```ts
|
|
186
|
-
|
|
170
|
+
exportTelemetryCSV(
|
|
187
171
|
host: NeatTelemetryFacadeHost,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
accessor: (genome: default) => number,
|
|
191
|
-
): void
|
|
172
|
+
maxEntries: number,
|
|
173
|
+
): string
|
|
192
174
|
```
|
|
193
175
|
|
|
194
|
-
|
|
176
|
+
Export recent telemetry entries as CSV for quick spreadsheet inspection.
|
|
195
177
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
into the lower-level objective modules first.
|
|
178
|
+
Prefer this when the reader is a person scanning a table instead of a script
|
|
179
|
+
parsing nested JSON. The helper intentionally focuses on a recent window so a
|
|
180
|
+
long run can still produce a compact worksheet.
|
|
200
181
|
|
|
201
182
|
Parameters:
|
|
202
|
-
- `host` - - `Neat` instance whose
|
|
203
|
-
- `
|
|
204
|
-
- `direction` - - Whether lower or higher values are considered better.
|
|
205
|
-
- `accessor` - - Function that reads the objective value from a genome.
|
|
183
|
+
- `host` - - `Neat` instance whose telemetry buffer should be exported.
|
|
184
|
+
- `maxEntries` - - Maximum number of recent entries to include.
|
|
206
185
|
|
|
207
|
-
Returns:
|
|
186
|
+
Returns: CSV string containing the requested telemetry window.
|
|
208
187
|
|
|
209
|
-
|
|
188
|
+
Example:
|
|
189
|
+
|
|
190
|
+
const csv = exportTelemetryCSV(neat, 100);
|
|
191
|
+
console.log(csv.split('\n').slice(0, 3).join('\n'));
|
|
192
|
+
|
|
193
|
+
### exportTelemetryJSONL
|
|
210
194
|
|
|
211
195
|
```ts
|
|
212
|
-
|
|
196
|
+
exportTelemetryJSONL(
|
|
213
197
|
host: NeatTelemetryFacadeHost,
|
|
214
|
-
):
|
|
198
|
+
): string
|
|
215
199
|
```
|
|
216
200
|
|
|
217
|
-
|
|
201
|
+
Export telemetry as JSON Lines so logs can stream into files or post-processors.
|
|
218
202
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
203
|
+
JSONL is the most automation-friendly telemetry surface: one entry per line,
|
|
204
|
+
easy to append to a file, easy to pipe into scripts, and stable enough for
|
|
205
|
+
notebook or CLI post-processing.
|
|
222
206
|
|
|
223
207
|
Parameters:
|
|
224
|
-
- `host` - - `Neat` instance whose
|
|
208
|
+
- `host` - - `Neat` instance whose telemetry buffer should be serialized.
|
|
225
209
|
|
|
226
|
-
Returns:
|
|
210
|
+
Returns: JSONL payload with one telemetry object per line.
|
|
227
211
|
|
|
228
|
-
###
|
|
212
|
+
### getDiversityStats
|
|
229
213
|
|
|
230
214
|
```ts
|
|
231
|
-
|
|
215
|
+
getDiversityStats(
|
|
232
216
|
host: NeatTelemetryFacadeHost,
|
|
233
|
-
):
|
|
217
|
+
): DiversityStats
|
|
234
218
|
```
|
|
235
219
|
|
|
236
|
-
|
|
220
|
+
Return cached diversity metrics, computing a fallback snapshot when needed.
|
|
237
221
|
|
|
238
|
-
This
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
222
|
+
This keeps the public facade resilient: callers can always ask for diversity
|
|
223
|
+
stats even before a full metrics pass has run.
|
|
224
|
+
The resulting snapshot is especially useful when you need to judge whether a
|
|
225
|
+
run is still exploring many structural alternatives or converging too hard.
|
|
242
226
|
|
|
243
227
|
Parameters:
|
|
244
|
-
- `host` - - `Neat` instance
|
|
228
|
+
- `host` - - `Neat` instance exposing cached diversity state.
|
|
245
229
|
|
|
246
|
-
Returns:
|
|
230
|
+
Returns: Diversity metrics for the current population.
|
|
231
|
+
|
|
232
|
+
Example:
|
|
233
|
+
|
|
234
|
+
const diversity = getDiversityStats(neat);
|
|
235
|
+
console.log(diversity.structuralEntropy, diversity.uniqueStructures);
|
|
247
236
|
|
|
248
237
|
### getLineageSnapshot
|
|
249
238
|
|
|
@@ -270,136 +259,110 @@ Parameters:
|
|
|
270
259
|
|
|
271
260
|
Returns: Array of `{ id, parents }` lineage entries.
|
|
272
261
|
|
|
273
|
-
###
|
|
262
|
+
### getMultiObjectiveMetrics
|
|
274
263
|
|
|
275
264
|
```ts
|
|
276
|
-
|
|
265
|
+
getMultiObjectiveMetrics(
|
|
277
266
|
host: NeatTelemetryFacadeHost,
|
|
278
|
-
|
|
279
|
-
): string
|
|
267
|
+
): { rank: number; crowding: number; score: number; nodes: number; connections: number; }[]
|
|
280
268
|
```
|
|
281
269
|
|
|
282
|
-
|
|
270
|
+
Build compact multi-objective metrics for the current population snapshot.
|
|
283
271
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
272
|
+
This helper is meant for inspection surfaces that need the shape of the
|
|
273
|
+
current Pareto landscape without pulling every genome field into view.
|
|
274
|
+
|
|
275
|
+
Read it as the facade's tradeoff-summary helper: enough information to see
|
|
276
|
+
rank layers, crowding pressure, and rough structural size, but not so much
|
|
277
|
+
detail that dashboards or quick diagnostics have to unpack whole genomes.
|
|
287
278
|
|
|
288
279
|
Parameters:
|
|
289
|
-
- `host` - - `Neat` instance whose
|
|
290
|
-
- `maxEntries` - - Maximum number of recent history entries to include.
|
|
280
|
+
- `host` - - `Neat` instance whose population should be summarized.
|
|
291
281
|
|
|
292
|
-
Returns:
|
|
282
|
+
Returns: Rank, crowding, score, and size metrics per genome.
|
|
293
283
|
|
|
294
|
-
###
|
|
284
|
+
### getNoveltyArchiveSize
|
|
295
285
|
|
|
296
286
|
```ts
|
|
297
|
-
|
|
287
|
+
getNoveltyArchiveSize(
|
|
298
288
|
host: NeatTelemetryFacadeHost,
|
|
299
|
-
|
|
300
|
-
): string
|
|
289
|
+
): number
|
|
301
290
|
```
|
|
302
291
|
|
|
303
|
-
|
|
292
|
+
Return the current novelty archive size.
|
|
304
293
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
294
|
+
This is the smallest novelty-health read in the facade. Use it when you do
|
|
295
|
+
not need descriptor payloads, only a quick sense of whether novelty search is
|
|
296
|
+
still collecting distinct behaviors or has gone quiet.
|
|
308
297
|
|
|
309
298
|
Parameters:
|
|
310
|
-
- `host` - - `Neat` instance
|
|
311
|
-
- `maxEntries` - - Maximum number of recent history entries to include.
|
|
299
|
+
- `host` - - `Neat` instance tracking novelty behavior descriptors.
|
|
312
300
|
|
|
313
|
-
Returns:
|
|
301
|
+
Returns: Number of archived novelty descriptors.
|
|
314
302
|
|
|
315
|
-
###
|
|
303
|
+
### getObjectiveEvents
|
|
316
304
|
|
|
317
305
|
```ts
|
|
318
|
-
|
|
306
|
+
getObjectiveEvents(
|
|
319
307
|
host: NeatTelemetryFacadeHost,
|
|
320
|
-
): {
|
|
308
|
+
): { gen: number; type: "add" | "remove"; key: string; }[]
|
|
321
309
|
```
|
|
322
310
|
|
|
323
|
-
|
|
311
|
+
Snapshot recent objective add/remove events for telemetry consumers.
|
|
324
312
|
|
|
325
|
-
This
|
|
326
|
-
|
|
327
|
-
|
|
313
|
+
This gives read-side tooling a lightweight history of objective churn without
|
|
314
|
+
forcing it to replay the full controller lifecycle. Use it when the question
|
|
315
|
+
is "when did the objective set change?" rather than "what are the active
|
|
316
|
+
objectives right now?"
|
|
328
317
|
|
|
329
318
|
Parameters:
|
|
330
|
-
- `host` - - `Neat` instance
|
|
331
|
-
|
|
332
|
-
Returns: Array of current species summaries.
|
|
333
|
-
|
|
334
|
-
Example:
|
|
319
|
+
- `host` - - `Neat` instance storing objective lifecycle events.
|
|
335
320
|
|
|
336
|
-
|
|
337
|
-
console.table(speciesSummary);
|
|
321
|
+
Returns: Shallow copy of the recorded objective events.
|
|
338
322
|
|
|
339
|
-
###
|
|
323
|
+
### getObjectiveKeys
|
|
340
324
|
|
|
341
325
|
```ts
|
|
342
|
-
|
|
326
|
+
getObjectiveKeys(
|
|
343
327
|
host: NeatTelemetryFacadeHost,
|
|
344
|
-
):
|
|
328
|
+
): string[]
|
|
345
329
|
```
|
|
346
330
|
|
|
347
|
-
Return
|
|
331
|
+
Return just the registered objective keys in stable order.
|
|
348
332
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
333
|
+
This is the shortest inspection surface for tests and quick diagnostics that
|
|
334
|
+
only need to confirm which objectives are active, not the full descriptor
|
|
335
|
+
payload.
|
|
352
336
|
|
|
353
337
|
Parameters:
|
|
354
|
-
- `host` - - `Neat` instance
|
|
355
|
-
|
|
356
|
-
Returns: Historical species entries for each recorded generation.
|
|
357
|
-
|
|
358
|
-
Example:
|
|
338
|
+
- `host` - - `Neat` instance exposing objective descriptors.
|
|
359
339
|
|
|
360
|
-
|
|
361
|
-
console.log(historyWindow.length);
|
|
340
|
+
Returns: Ordered list of active objective keys.
|
|
362
341
|
|
|
363
|
-
###
|
|
342
|
+
### getObjectives
|
|
364
343
|
|
|
365
344
|
```ts
|
|
366
|
-
|
|
345
|
+
getObjectives(
|
|
367
346
|
host: NeatTelemetryFacadeHost,
|
|
368
|
-
):
|
|
347
|
+
): { key: string; direction: "max" | "min"; }[]
|
|
369
348
|
```
|
|
370
349
|
|
|
371
|
-
Return
|
|
350
|
+
Return a compact view of active objective descriptors.
|
|
372
351
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
352
|
+
The full objective descriptor includes accessors and internal metadata. This
|
|
353
|
+
read model trims that down to the pieces most useful in UI surfaces and
|
|
354
|
+
debugging output: the key and whether the objective is minimized or
|
|
355
|
+
maximized.
|
|
376
356
|
|
|
377
357
|
Parameters:
|
|
378
|
-
- `host` - - `Neat` instance
|
|
379
|
-
|
|
380
|
-
Returns: Number of archived novelty descriptors.
|
|
381
|
-
|
|
382
|
-
### getMultiObjectiveMetrics
|
|
383
|
-
|
|
384
|
-
```ts
|
|
385
|
-
getMultiObjectiveMetrics(
|
|
386
|
-
host: NeatTelemetryFacadeHost,
|
|
387
|
-
): { rank: number; crowding: number; score: number; nodes: number; connections: number; }[]
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
Build compact multi-objective metrics for the current population snapshot.
|
|
391
|
-
|
|
392
|
-
This helper is meant for inspection surfaces that need the shape of the
|
|
393
|
-
current Pareto landscape without pulling every genome field into view.
|
|
358
|
+
- `host` - - `Neat` instance exposing objective descriptors.
|
|
394
359
|
|
|
395
|
-
|
|
396
|
-
rank layers, crowding pressure, and rough structural size, but not so much
|
|
397
|
-
detail that dashboards or quick diagnostics have to unpack whole genomes.
|
|
360
|
+
Returns: Compact objective summaries in evaluation order.
|
|
398
361
|
|
|
399
|
-
|
|
400
|
-
- `host` - - `Neat` instance whose population should be summarized.
|
|
362
|
+
Example:
|
|
401
363
|
|
|
402
|
-
|
|
364
|
+
const objectives = getObjectives(neat);
|
|
365
|
+
console.table(objectives);
|
|
403
366
|
|
|
404
367
|
### getOperatorStats
|
|
405
368
|
|
|
@@ -420,27 +383,6 @@ Parameters:
|
|
|
420
383
|
|
|
421
384
|
Returns: Operator summaries suitable for dashboards and debugging.
|
|
422
385
|
|
|
423
|
-
### getParetoFronts
|
|
424
|
-
|
|
425
|
-
```ts
|
|
426
|
-
getParetoFronts(
|
|
427
|
-
host: NeatTelemetryFacadeHost,
|
|
428
|
-
maxFronts: number | undefined,
|
|
429
|
-
): default[][]
|
|
430
|
-
```
|
|
431
|
-
|
|
432
|
-
Reconstruct Pareto fronts from current rank annotations.
|
|
433
|
-
|
|
434
|
-
Use this when the question is structural rather than historical: which fronts
|
|
435
|
-
exist right now, and how many genomes are sitting on each layer of the
|
|
436
|
-
current tradeoff surface?
|
|
437
|
-
|
|
438
|
-
Parameters:
|
|
439
|
-
- `host` - - `Neat` instance whose population should be partitioned.
|
|
440
|
-
- `maxFronts` - - Maximum number of fronts to reconstruct.
|
|
441
|
-
|
|
442
|
-
Returns: Pareto fronts ordered from best to worst.
|
|
443
|
-
|
|
444
386
|
### getParetoArchive
|
|
445
387
|
|
|
446
388
|
```ts
|
|
@@ -463,27 +405,26 @@ Parameters:
|
|
|
463
405
|
|
|
464
406
|
Returns: Slice of the recent Pareto archive.
|
|
465
407
|
|
|
466
|
-
###
|
|
408
|
+
### getParetoFronts
|
|
467
409
|
|
|
468
410
|
```ts
|
|
469
|
-
|
|
411
|
+
getParetoFronts(
|
|
470
412
|
host: NeatTelemetryFacadeHost,
|
|
471
|
-
|
|
472
|
-
):
|
|
413
|
+
maxFronts: number | undefined,
|
|
414
|
+
): default[][]
|
|
473
415
|
```
|
|
474
416
|
|
|
475
|
-
|
|
417
|
+
Reconstruct Pareto fronts from current rank annotations.
|
|
476
418
|
|
|
477
|
-
Use this when the
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
in-memory inspection.
|
|
419
|
+
Use this when the question is structural rather than historical: which fronts
|
|
420
|
+
exist right now, and how many genomes are sitting on each layer of the
|
|
421
|
+
current tradeoff surface?
|
|
481
422
|
|
|
482
423
|
Parameters:
|
|
483
|
-
- `host` - - `Neat` instance
|
|
484
|
-
- `
|
|
424
|
+
- `host` - - `Neat` instance whose population should be partitioned.
|
|
425
|
+
- `maxFronts` - - Maximum number of fronts to reconstruct.
|
|
485
426
|
|
|
486
|
-
Returns:
|
|
427
|
+
Returns: Pareto fronts ordered from best to worst.
|
|
487
428
|
|
|
488
429
|
### getPerformanceStats
|
|
489
430
|
|
|
@@ -508,67 +449,82 @@ Example:
|
|
|
508
449
|
const timing = getPerformanceStats(neat);
|
|
509
450
|
console.log(timing.lastEvalMs, timing.lastEvolveMs);
|
|
510
451
|
|
|
511
|
-
###
|
|
452
|
+
### getSpeciesHistory
|
|
512
453
|
|
|
513
454
|
```ts
|
|
514
|
-
|
|
455
|
+
getSpeciesHistory(
|
|
515
456
|
host: NeatTelemetryFacadeHost,
|
|
516
|
-
):
|
|
457
|
+
): SpeciesHistoryEntry[]
|
|
517
458
|
```
|
|
518
459
|
|
|
519
|
-
Return
|
|
460
|
+
Return recorded species history, lazily backfilling extended metrics when enabled.
|
|
520
461
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
run is still exploring many structural alternatives or converging too hard.
|
|
462
|
+
Use this when you need the story across generations rather than the current
|
|
463
|
+
snapshot. It is the better surface for plots, regressions, and post-run
|
|
464
|
+
analysis of stagnation or speciation churn.
|
|
525
465
|
|
|
526
466
|
Parameters:
|
|
527
|
-
- `host` - - `Neat` instance
|
|
467
|
+
- `host` - - `Neat` instance storing species history snapshots.
|
|
528
468
|
|
|
529
|
-
Returns:
|
|
469
|
+
Returns: Historical species entries for each recorded generation.
|
|
530
470
|
|
|
531
471
|
Example:
|
|
532
472
|
|
|
533
|
-
const
|
|
534
|
-
console.log(
|
|
473
|
+
const historyWindow = getSpeciesHistory(neat).slice(-10);
|
|
474
|
+
console.log(historyWindow.length);
|
|
535
475
|
|
|
536
|
-
###
|
|
476
|
+
### getSpeciesStats
|
|
537
477
|
|
|
538
478
|
```ts
|
|
539
|
-
|
|
479
|
+
getSpeciesStats(
|
|
540
480
|
host: NeatTelemetryFacadeHost,
|
|
541
|
-
):
|
|
481
|
+
): { id: number; size: number; bestScore: number; lastImproved: number; }[]
|
|
542
482
|
```
|
|
543
483
|
|
|
544
|
-
|
|
484
|
+
Return a concise summary for each current species.
|
|
545
485
|
|
|
546
|
-
This is
|
|
547
|
-
|
|
486
|
+
This is the fastest species-level diagnostic when you want to see whether the
|
|
487
|
+
population is still split across several improving families or collapsing
|
|
488
|
+
toward one dominant cluster.
|
|
548
489
|
|
|
549
490
|
Parameters:
|
|
550
|
-
- `host` - - `Neat` instance whose
|
|
491
|
+
- `host` - - `Neat` instance whose live species registry should be summarized.
|
|
551
492
|
|
|
552
|
-
Returns:
|
|
493
|
+
Returns: Array of current species summaries.
|
|
553
494
|
|
|
554
|
-
|
|
495
|
+
Example:
|
|
496
|
+
|
|
497
|
+
const speciesSummary = getSpeciesStats(neat);
|
|
498
|
+
console.table(speciesSummary);
|
|
499
|
+
|
|
500
|
+
### getTelemetry
|
|
555
501
|
|
|
556
502
|
```ts
|
|
557
|
-
|
|
503
|
+
getTelemetry(
|
|
558
504
|
host: NeatTelemetryFacadeHost,
|
|
559
|
-
):
|
|
505
|
+
): TelemetryEntry[]
|
|
560
506
|
```
|
|
561
507
|
|
|
562
|
-
|
|
508
|
+
Return the in-memory telemetry buffer.
|
|
563
509
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
510
|
+
This is the fastest way to inspect the recent rhythm of a run: score trends,
|
|
511
|
+
diversity changes, objective snapshots, and timing evidence exactly as they
|
|
512
|
+
were recorded generation by generation.
|
|
567
513
|
|
|
568
514
|
Parameters:
|
|
569
|
-
- `host` - - `Neat` instance
|
|
515
|
+
- `host` - - `Neat` instance storing generation telemetry snapshots.
|
|
570
516
|
|
|
571
|
-
Returns:
|
|
517
|
+
Returns: Telemetry entries captured so far, or an empty array when telemetry
|
|
518
|
+
is not initialized.
|
|
519
|
+
|
|
520
|
+
Example:
|
|
521
|
+
|
|
522
|
+
const telemetryWindow = getTelemetry(neat).slice(-5);
|
|
523
|
+
console.table(telemetryWindow.map((entry) => ({
|
|
524
|
+
generation: entry.generation,
|
|
525
|
+
bestScore: entry.bestScore,
|
|
526
|
+
species: entry.species,
|
|
527
|
+
})));
|
|
572
528
|
|
|
573
529
|
### NeatTelemetryFacadeHost
|
|
574
530
|
|
|
@@ -580,3 +536,47 @@ read-heavy diagnostics and export helpers into one focused module without
|
|
|
580
536
|
exposing the entire controller implementation. The host shape keeps the
|
|
581
537
|
contract small: population snapshots, telemetry caches, objective accessors,
|
|
582
538
|
and archive buffers.
|
|
539
|
+
|
|
540
|
+
### registerTelemetryObjective
|
|
541
|
+
|
|
542
|
+
```ts
|
|
543
|
+
registerTelemetryObjective(
|
|
544
|
+
host: NeatTelemetryFacadeHost,
|
|
545
|
+
key: string,
|
|
546
|
+
direction: "max" | "min",
|
|
547
|
+
accessor: (genome: default) => number,
|
|
548
|
+
): void
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
Register or replace a custom objective.
|
|
552
|
+
|
|
553
|
+
This is the facade's write-side escape hatch for objective inspection flows.
|
|
554
|
+
Use it when a dashboard, script, or experiment wants the telemetry and
|
|
555
|
+
archive surfaces to start tracking a new tradeoff dimension without dropping
|
|
556
|
+
into the lower-level objective modules first.
|
|
557
|
+
|
|
558
|
+
Parameters:
|
|
559
|
+
- `host` - - `Neat` instance whose multi-objective registry should change.
|
|
560
|
+
- `key` - - Unique objective key.
|
|
561
|
+
- `direction` - - Whether lower or higher values are considered better.
|
|
562
|
+
- `accessor` - - Function that reads the objective value from a genome.
|
|
563
|
+
|
|
564
|
+
Returns: Nothing. The objective registry on `host` is updated in place.
|
|
565
|
+
|
|
566
|
+
### resetNoveltyArchive
|
|
567
|
+
|
|
568
|
+
```ts
|
|
569
|
+
resetNoveltyArchive(
|
|
570
|
+
host: NeatTelemetryFacadeHost,
|
|
571
|
+
): void
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
Clear the novelty archive.
|
|
575
|
+
|
|
576
|
+
This is useful when a caller wants to restart the novelty observation window
|
|
577
|
+
without also resetting the rest of telemetry or the broader controller state.
|
|
578
|
+
|
|
579
|
+
Parameters:
|
|
580
|
+
- `host` - - `Neat` instance whose novelty archive should be reset.
|
|
581
|
+
|
|
582
|
+
Returns: Nothing. The archive is mutated in place.
|