@reicek/neataptic-ts 0.1.21 → 0.1.23
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 +31 -0
- package/.github/agents/docs-scout.agent.md +29 -0
- package/.github/agents/plan-scout.agent.md +31 -0
- package/.github/agents/solid-split.agent.md +143 -0
- package/.github/copilot-instructions.md +119 -0
- package/.github/skills/solid-split-playbook/SKILL.md +220 -0
- package/.github/skills/solid-split-playbook/assets/docs-checklist.md +34 -0
- package/.github/skills/solid-split-playbook/assets/split-plan-template.md +48 -0
- package/.github/skills/solid-split-playbook/assets/split-workflow-checklist.md +51 -0
- package/.github/skills/trace-analyzer-extension/SKILL.md +63 -0
- package/.github/skills/trace-analyzer-extension/assets/extension-checklist.md +24 -0
- package/.github/skills/trace-analyzer-extension/references/analyzer-extension-workflow.md +101 -0
- package/.github/skills/trace-audit-reporting/SKILL.md +96 -0
- package/.github/skills/trace-audit-reporting/assets/performance-report-template.md +123 -0
- package/.github/skills/trace-audit-reporting/references/trace-analysis-workflow.md +132 -0
- package/package.json +7 -3
- package/plans/ES2023 migration +13 -8
- package/plans/Evolution_Training_Interoperability_Contracts.md +1 -1
- package/plans/Flappy_Bird_Folder_Documentation_Pass.md +53 -0
- package/plans/Flappy_Evolution_Worker_Documentation_Pass.md +58 -0
- 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/analyze-trace.ts +590 -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 +127 -222
- package/src/architecture/README.md +117 -184
- package/src/architecture/architect.ts +6 -0
- package/src/architecture/layer/README.md +38 -38
- package/src/architecture/network/README.md +49 -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/network.types.ts +39 -0
- 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/serialize/network.serialize.json.utils.ts +1 -0
- package/src/architecture/network/serialize/network.serialize.utils.ts +6 -1
- package/src/architecture/network/serialize/network.serialize.utils.types.ts +1 -1
- 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/architecture/network.ts +114 -10
- 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 +623 -568
- package/src/neat/neat.evolve.population.utils.ts +29 -5
- package/src/neat/neat.helpers.ts +16 -0
- package/src/neat/neat.topology-intent.utils.ts +160 -0
- 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/README.md +193 -88
- package/test/examples/flappy_bird/browser-entry/README.md +1441 -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 +9 -396
- package/test/examples/flappy_bird/browser-entry/browser-entry.playback.utils.ts +6 -714
- package/test/examples/flappy_bird/browser-entry/browser-entry.render.types.ts +26 -3
- package/test/examples/flappy_bird/browser-entry/browser-entry.runtime.types.ts +16 -1
- package/test/examples/flappy_bird/browser-entry/browser-entry.simulation.types.ts +39 -5
- package/test/examples/flappy_bird/browser-entry/browser-entry.spawn.utils.ts +11 -31
- package/test/examples/flappy_bird/browser-entry/browser-entry.stats.types.ts +32 -4
- package/test/examples/flappy_bird/browser-entry/browser-entry.ts +11 -0
- package/test/examples/flappy_bird/browser-entry/browser-entry.types.ts +8 -0
- package/test/examples/flappy_bird/browser-entry/browser-entry.visualization.types.ts +50 -7
- package/test/examples/flappy_bird/browser-entry/browser-entry.visualization.utils.ts +21 -893
- package/test/examples/flappy_bird/browser-entry/browser-entry.worker.types.ts +91 -10
- package/test/examples/flappy_bird/browser-entry/host/README.md +318 -0
- package/test/examples/flappy_bird/browser-entry/host/host.canvas.service.ts +16 -0
- package/test/examples/flappy_bird/browser-entry/host/host.constants.ts +20 -0
- package/test/examples/flappy_bird/browser-entry/host/host.dom.service.ts +10 -0
- package/test/examples/flappy_bird/browser-entry/host/host.resize.service.ts +1 -295
- package/test/examples/flappy_bird/browser-entry/host/host.stats.service.ts +14 -0
- package/test/examples/flappy_bird/browser-entry/host/host.ts +592 -6
- package/test/examples/flappy_bird/browser-entry/host/host.types.ts +13 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/README.md +309 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.constants.ts +47 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.services.ts +392 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.ts +132 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.types.ts +92 -0
- package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.utils.ts +272 -0
- package/test/examples/flappy_bird/browser-entry/network-view/README.md +389 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.draw.service.ts +13 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.labels.utils.ts +12 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.layout.utils.ts +14 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.topology.utils.ts +267 -0
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.ts +823 -7
- package/test/examples/flappy_bird/browser-entry/network-view/network-view.types.ts +11 -0
- package/test/examples/flappy_bird/browser-entry/playback/README.md +845 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/README.md +355 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/README.md +1068 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.batch.services.ts +64 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.cache.services.ts +207 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.constants.ts +197 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.batch.utils.ts +114 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.layout.utils.test.ts +96 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.layout.utils.ts +204 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.services.ts +49 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.utils.ts +313 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.layer.services.ts +81 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.math.utils.test.ts +33 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.math.utils.ts +201 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.selection.utils.ts +171 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.timing.utils.ts +124 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.utils.test.ts +279 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.utils.ts +132 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.scene.services.ts +26 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.services.ts +65 -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 +342 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.utils.ts +10 -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 +127 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.draw.services.ts +184 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.scene.services.ts +64 -0
- package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.services.ts +6 -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 +105 -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 +541 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.bird.utils.ts +180 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.canvas.services.ts +77 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.entity.services.ts +167 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.scene.services.ts +57 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.service.test.ts +176 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.service.ts +113 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.services.ts +35 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.trail.utils.ts +248 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.types.ts +103 -0
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.utils.ts +11 -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 +10 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.iteration.services.ts +192 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.loop.service.ts +12 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.orchestration.types.ts +78 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.render.pipe-outline.service.ts +128 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.render.service.ts +1 -116
- package/test/examples/flappy_bird/browser-entry/playback/playback.session.services.ts +184 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.snapshot.utils.test.ts +121 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.snapshot.utils.ts +8 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.layer.services.ts +36 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.service.ts +11 -128
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.services.ts +268 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.types.ts +91 -0
- package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.utils.ts +11 -4
- package/test/examples/flappy_bird/browser-entry/playback/playback.trail.utils.ts +9 -86
- package/test/examples/flappy_bird/browser-entry/playback/playback.ts +75 -7
- package/test/examples/flappy_bird/browser-entry/playback/playback.types.ts +12 -9
- package/test/examples/flappy_bird/browser-entry/playback/playback.worker-channel.utils.ts +11 -123
- package/test/examples/flappy_bird/browser-entry/playback/snapshot/README.md +55 -0
- package/test/examples/flappy_bird/browser-entry/playback/snapshot/playback.snapshot.services.ts +103 -0
- package/test/examples/flappy_bird/browser-entry/playback/snapshot/playback.snapshot.summary.utils.test.ts +45 -0
- package/test/examples/flappy_bird/browser-entry/playback/snapshot/playback.snapshot.summary.utils.ts +28 -0
- package/test/examples/flappy_bird/browser-entry/playback/trail/README.md +95 -0
- package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.history.services.test.ts +35 -0
- package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.history.services.ts +64 -0
- package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.opacity.utils.test.ts +37 -0
- package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.opacity.utils.ts +74 -0
- package/test/examples/flappy_bird/browser-entry/playback/worker-channel/README.md +71 -0
- package/test/examples/flappy_bird/browser-entry/playback/worker-channel/playback.worker-channel.request.services.ts +45 -0
- package/test/examples/flappy_bird/browser-entry/playback/worker-channel/playback.worker-channel.summary.services.ts +74 -0
- package/test/examples/flappy_bird/browser-entry/playback/worker-channel/playback.worker-channel.types.ts +53 -0
- package/test/examples/flappy_bird/browser-entry/runtime/README.md +304 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.browser-globals.service.ts +15 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.errors.ts +17 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.evolution-launch.service.ts +56 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.evolution-loop.service.ts +19 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.lifecycle.service.ts +96 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.startup.service.ts +92 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.telemetry.service.ts +24 -0
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.ts +31 -121
- package/test/examples/flappy_bird/browser-entry/runtime/runtime.types.ts +65 -0
- package/test/examples/flappy_bird/browser-entry/visualization/README.md +568 -0
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.colors.utils.ts +26 -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 +979 -19
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.legend.utils.ts +157 -3
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.topology.utils.ts +13 -27
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.ts +7 -20
- package/test/examples/flappy_bird/browser-entry/visualization/visualization.types.ts +14 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/README.md +238 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.errors.ts +11 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.generation.service.ts +12 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.playback.service.test.ts +143 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.playback.service.ts +140 -14
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.request.service.ts +27 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.ts +8 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.types.ts +23 -0
- package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.url.service.ts +5 -0
- package/test/examples/flappy_bird/constants/README.md +1163 -0
- package/test/examples/flappy_bird/constants/constants.birds.ts +16 -38
- package/test/examples/flappy_bird/constants/constants.difficulty.ts +21 -0
- package/test/examples/flappy_bird/constants/constants.network-view.ts +24 -0
- package/test/examples/flappy_bird/constants/constants.network.ts +1 -1
- package/test/examples/flappy_bird/constants/constants.observation.ts +7 -0
- package/test/examples/flappy_bird/constants/constants.palette.ts +9 -2
- package/test/examples/flappy_bird/constants/constants.physics.ts +9 -0
- package/test/examples/flappy_bird/constants/constants.pipe-render.ts +3 -0
- package/test/examples/flappy_bird/constants/constants.pipes.ts +22 -3
- package/test/examples/flappy_bird/constants/constants.runtime.ts +28 -4
- package/test/examples/flappy_bird/constants/constants.starfield.ts +78 -3
- package/test/examples/flappy_bird/constants/constants.ts +6 -0
- package/test/examples/flappy_bird/environment/README.md +182 -0
- package/test/examples/flappy_bird/environment/environment.collision.utils.ts +7 -0
- package/test/examples/flappy_bird/environment/environment.constants.ts +16 -3
- package/test/examples/flappy_bird/environment/environment.observation.utils.ts +12 -19
- package/test/examples/flappy_bird/environment/environment.state.service.ts +10 -0
- package/test/examples/flappy_bird/environment/environment.step.service.ts +15 -66
- package/test/examples/flappy_bird/environment/environment.types.ts +14 -0
- package/test/examples/flappy_bird/evaluation/README.md +155 -0
- package/test/examples/flappy_bird/evaluation/evaluation.constants.ts +23 -4
- package/test/examples/flappy_bird/evaluation/evaluation.fitness.utils.ts +16 -1
- package/test/examples/flappy_bird/evaluation/evaluation.rollout.service.ts +7 -374
- package/test/examples/flappy_bird/evaluation/evaluation.seed.utils.ts +4 -0
- package/test/examples/flappy_bird/evaluation/evaluation.types.ts +18 -2
- package/test/examples/flappy_bird/evaluation/rollout/README.md +355 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.constants.ts +38 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.service.ts +71 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.services.ts +338 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.types.ts +69 -0
- package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.utils.ts +399 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/README.md +845 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.constants.ts +49 -7
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.errors.ts +34 -3
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.evolution.service.ts +22 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.playback.service.ts +62 -26
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.protocol.service.ts +27 -1
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.runtime.service.ts +23 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.frame.service.ts +378 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.types.ts +22 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.utils.ts +20 -203
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.snapshot.utils.test.ts +94 -0
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.snapshot.utils.ts +78 -13
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.ts +235 -344
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.types.ts +170 -22
- package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.warm-start.service.ts +314 -0
- package/test/examples/flappy_bird/flappy.simulation.shared.utils.ts +17 -0
- package/test/examples/flappy_bird/flappyEnvironment.ts +21 -0
- package/test/examples/flappy_bird/flappyEvaluation.ts +12 -0
- package/test/examples/flappy_bird/flappyEvolution.worker.ts +7 -0
- package/test/examples/flappy_bird/index.ts +8 -2
- package/test/examples/flappy_bird/rng.ts +10 -0
- package/test/examples/flappy_bird/simulation-shared/README.md +518 -0
- package/test/examples/flappy_bird/simulation-shared/observation/README.md +255 -0
- package/test/examples/flappy_bird/simulation-shared/observation/observation.features.utils.ts +339 -0
- package/test/examples/flappy_bird/simulation-shared/observation/observation.ts +19 -0
- package/test/examples/flappy_bird/simulation-shared/observation/observation.vector.utils.ts +81 -0
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.constants.ts +3 -0
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.control.utils.ts +6 -0
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.difficulty.utils.ts +9 -0
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.errors.ts +10 -1
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.memory.utils.ts +18 -0
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.observation.utils.ts +7 -402
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.spawn.utils.ts +36 -6
- package/test/examples/flappy_bird/{evaluation/evaluation.statistics.utils.ts → simulation-shared/simulation-shared.statistics.utils.ts} +30 -9
- package/test/examples/flappy_bird/simulation-shared/simulation-shared.types.ts +38 -5
- package/test/examples/flappy_bird/trainFlappyBird.ts +13 -0
- package/test/examples/flappy_bird/trainer/README.md +676 -0
- package/test/examples/flappy_bird/trainer/evaluation/README.md +253 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.constants.ts +15 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.services.ts +86 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.ts +187 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.types.ts +32 -0
- package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.utils.ts +182 -0
- package/test/examples/flappy_bird/trainer/trainer.evaluation.service.ts +13 -0
- package/test/examples/flappy_bird/trainer/trainer.fitness.service.ts +23 -1
- package/test/examples/flappy_bird/trainer/trainer.loop.service.ts +17 -1
- package/test/examples/flappy_bird/trainer/trainer.report.service.services.ts +181 -0
- package/test/examples/flappy_bird/trainer/trainer.report.service.ts +136 -0
- package/test/examples/flappy_bird/trainer/trainer.selection.utils.ts +89 -0
- package/test/examples/flappy_bird/trainer/trainer.setup.service.ts +22 -0
- package/test/examples/flappy_bird/trainer/trainer.signals.service.ts +8 -0
- package/test/examples/flappy_bird/trainer/trainer.ts +38 -553
- package/test/examples/flappy_bird/trainer/trainer.types.ts +44 -7
- package/test/neat/neat.topology-intent.test.ts +129 -0
- package/test/network/network.topology-intent.test.ts +44 -0
- 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
|
@@ -144,6 +144,10 @@ export default class Architect {
|
|
|
144
144
|
* An MLP consists of an input layer, one or more hidden layers, and an output layer,
|
|
145
145
|
* fully connected layer by layer.
|
|
146
146
|
*
|
|
147
|
+
* The returned network is marked with the public `feed-forward` topology
|
|
148
|
+
* intent so acyclic enforcement and slab fast-path eligibility stay aligned
|
|
149
|
+
* with the builder users already chose.
|
|
150
|
+
*
|
|
147
151
|
* @param {...number} layers - A sequence of numbers representing the size (number of nodes) of each layer, starting with the input layer, followed by hidden layers, and ending with the output layer. Must include at least input, one hidden, and output layer sizes.
|
|
148
152
|
* @returns {Network} The constructed MLP network.
|
|
149
153
|
* @throws {Error} If fewer than 3 layer sizes (input, hidden, output) are provided.
|
|
@@ -197,6 +201,8 @@ export default class Architect {
|
|
|
197
201
|
(net as unknown as { layers: Layer[] }).layers = nodes.filter(
|
|
198
202
|
(n) => n instanceof Layer,
|
|
199
203
|
);
|
|
204
|
+
net.setTopologyIntent('feed-forward');
|
|
205
|
+
|
|
200
206
|
return net;
|
|
201
207
|
}
|
|
202
208
|
|
|
@@ -106,7 +106,7 @@ const propagationContext: LayerPropagationContext = { nodes: layer.nodes };
|
|
|
106
106
|
|
|
107
107
|
### activateLayer
|
|
108
108
|
|
|
109
|
-
`(context: import("
|
|
109
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerActivationContext, values: number[] | undefined, training: boolean) => number[]`
|
|
110
110
|
|
|
111
111
|
Orchestrates layer activation behavior with a high-level flow.
|
|
112
112
|
|
|
@@ -140,7 +140,7 @@ Returns: A cloned array of activation values.
|
|
|
140
140
|
|
|
141
141
|
### clearLayer
|
|
142
142
|
|
|
143
|
-
`(context: import("
|
|
143
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerConnectionContext) => void`
|
|
144
144
|
|
|
145
145
|
Orchestrates clearing node activation state with a high-level flow.
|
|
146
146
|
|
|
@@ -154,7 +154,7 @@ clearLayer(layerConnectionContext);
|
|
|
154
154
|
|
|
155
155
|
### connectLayer
|
|
156
156
|
|
|
157
|
-
`(context: import("
|
|
157
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerConnectionContext, target: import("src/architecture/node").default | import("src/architecture/group").default | import("src/architecture/layer/layer.utils.types").LayerLike, method: unknown, weight: number | undefined) => import("src/architecture/connection").default[]`
|
|
158
158
|
|
|
159
159
|
Orchestrates layer connection behavior with a high-level flow.
|
|
160
160
|
|
|
@@ -177,7 +177,7 @@ Returns: The created connection list.
|
|
|
177
177
|
|
|
178
178
|
### createAttentionLayer
|
|
179
179
|
|
|
180
|
-
`(context: import("
|
|
180
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number, heads: number) => TLayer`
|
|
181
181
|
|
|
182
182
|
Orchestrates attention layer creation with a high-level flow.
|
|
183
183
|
|
|
@@ -195,7 +195,7 @@ const attention = createAttentionLayer(factoryContext, 8, 4);
|
|
|
195
195
|
|
|
196
196
|
### createBatchNormLayer
|
|
197
197
|
|
|
198
|
-
`(context: import("
|
|
198
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number) => TLayer`
|
|
199
199
|
|
|
200
200
|
Orchestrates batch normalization layer creation with a high-level flow.
|
|
201
201
|
|
|
@@ -212,7 +212,7 @@ const batchNorm = createBatchNormLayer(factoryContext, 16);
|
|
|
212
212
|
|
|
213
213
|
### createConv1dLayer
|
|
214
214
|
|
|
215
|
-
`(context: import("
|
|
215
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number, kernelSize: number, stride: number, padding: number) => TLayer`
|
|
216
216
|
|
|
217
217
|
Orchestrates 1D convolution layer creation with a high-level flow.
|
|
218
218
|
|
|
@@ -232,7 +232,7 @@ const conv1d = createConv1dLayer(factoryContext, 8, 3);
|
|
|
232
232
|
|
|
233
233
|
### createDenseLayer
|
|
234
234
|
|
|
235
|
-
`(context: import("
|
|
235
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number) => TLayer`
|
|
236
236
|
|
|
237
237
|
Orchestrates dense layer creation with a high-level flow.
|
|
238
238
|
|
|
@@ -249,7 +249,7 @@ const dense = createDenseLayer(factoryContext, 8);
|
|
|
249
249
|
|
|
250
250
|
### createGruLayer
|
|
251
251
|
|
|
252
|
-
`(context: import("
|
|
252
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number) => TLayer`
|
|
253
253
|
|
|
254
254
|
Orchestrates GRU layer creation with a high-level flow.
|
|
255
255
|
|
|
@@ -266,7 +266,7 @@ const gru = createGruLayer(factoryContext, 8);
|
|
|
266
266
|
|
|
267
267
|
### createLayerNormLayer
|
|
268
268
|
|
|
269
|
-
`(context: import("
|
|
269
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number) => TLayer`
|
|
270
270
|
|
|
271
271
|
Orchestrates layer normalization layer creation with a high-level flow.
|
|
272
272
|
|
|
@@ -283,7 +283,7 @@ const layerNorm = createLayerNormLayer(factoryContext, 16);
|
|
|
283
283
|
|
|
284
284
|
### createLstmLayer
|
|
285
285
|
|
|
286
|
-
`(context: import("
|
|
286
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number) => TLayer`
|
|
287
287
|
|
|
288
288
|
Orchestrates LSTM layer creation with a high-level flow.
|
|
289
289
|
|
|
@@ -300,7 +300,7 @@ const lstm = createLstmLayer(factoryContext, 8);
|
|
|
300
300
|
|
|
301
301
|
### createMemoryLayer
|
|
302
302
|
|
|
303
|
-
`(context: import("
|
|
303
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number, memory: number) => TLayer`
|
|
304
304
|
|
|
305
305
|
Orchestrates Memory layer creation with a high-level flow.
|
|
306
306
|
|
|
@@ -318,7 +318,7 @@ const memoryLayer = createMemoryLayer(factoryContext, 4, 3);
|
|
|
318
318
|
|
|
319
319
|
### disconnectLayer
|
|
320
320
|
|
|
321
|
-
`(context: import("
|
|
321
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerConnectionContext, target: import("src/architecture/node").default | import("src/architecture/group").default, twoSided: boolean) => void`
|
|
322
322
|
|
|
323
323
|
Orchestrates disconnection behavior with a high-level flow.
|
|
324
324
|
|
|
@@ -335,7 +335,7 @@ Parameters:
|
|
|
335
335
|
|
|
336
336
|
### gateLayer
|
|
337
337
|
|
|
338
|
-
`(context: import("
|
|
338
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerConnectionContext, connections: import("src/architecture/connection").default[], method: unknown) => void`
|
|
339
339
|
|
|
340
340
|
Orchestrates layer gating behavior with a high-level flow.
|
|
341
341
|
|
|
@@ -352,7 +352,7 @@ Parameters:
|
|
|
352
352
|
|
|
353
353
|
### inputLayer
|
|
354
354
|
|
|
355
|
-
`(context: import("
|
|
355
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerConnectionContext, from: import("src/architecture/group").default | import("src/architecture/layer/layer.utils.types").LayerLike, method: unknown, weight: number | undefined) => import("src/architecture/connection").default[]`
|
|
356
356
|
|
|
357
357
|
Orchestrates layer input wiring with a high-level flow.
|
|
358
358
|
|
|
@@ -372,7 +372,7 @@ Returns: The created connection list.
|
|
|
372
372
|
|
|
373
373
|
### propagateLayer
|
|
374
374
|
|
|
375
|
-
`(context: import("
|
|
375
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerPropagationContext, rate: number, momentum: number, targets: number[] | undefined) => void`
|
|
376
376
|
|
|
377
377
|
Orchestrates layer backpropagation behavior with a high-level flow.
|
|
378
378
|
|
|
@@ -450,7 +450,7 @@ Returns: A pooled output array.
|
|
|
450
450
|
|
|
451
451
|
### applyLayerMask
|
|
452
452
|
|
|
453
|
-
`(nodeList: import("
|
|
453
|
+
`(nodeList: import("src/architecture/node").default[], mask: number) => void`
|
|
454
454
|
|
|
455
455
|
Applies one mask value to every node in the layer.
|
|
456
456
|
|
|
@@ -520,7 +520,7 @@ Returns: A cloned output array.
|
|
|
520
520
|
|
|
521
521
|
### fillActivationOutput
|
|
522
522
|
|
|
523
|
-
`(nodeList: import("
|
|
523
|
+
`(nodeList: import("src/architecture/node").default[], inputValues: number[] | undefined, output: number[]) => void`
|
|
524
524
|
|
|
525
525
|
Activates each node and writes outputs into the provided buffer.
|
|
526
526
|
|
|
@@ -588,7 +588,7 @@ Returns: A mask value of 1 or 0 for all nodes in the layer.
|
|
|
588
588
|
|
|
589
589
|
### clearLayer
|
|
590
590
|
|
|
591
|
-
`(context: import("
|
|
591
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerConnectionContext) => void`
|
|
592
592
|
|
|
593
593
|
Clears activation state for all nodes in a layer.
|
|
594
594
|
|
|
@@ -606,7 +606,7 @@ Parameters:
|
|
|
606
606
|
|
|
607
607
|
### connectLayer
|
|
608
608
|
|
|
609
|
-
`(context: import("
|
|
609
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerConnectionContext, target: import("src/architecture/node").default | import("src/architecture/group").default | import("src/architecture/layer/layer.utils.types").LayerLike, method: unknown, weight: number | undefined) => import("src/architecture/connection").default[]`
|
|
610
610
|
|
|
611
611
|
Connects a layer's output group to a target.
|
|
612
612
|
|
|
@@ -638,7 +638,7 @@ Returns: The created connection list.
|
|
|
638
638
|
|
|
639
639
|
### disconnectFromGroup
|
|
640
640
|
|
|
641
|
-
`(layerNodes: import("
|
|
641
|
+
`(layerNodes: import("src/architecture/node").default[], targetGroup: import("src/architecture/group").default, layerConnections: { in: import("src/architecture/connection").default[]; out: import("src/architecture/connection").default[]; self: import("src/architecture/connection").default[]; }, removeTwoSided: boolean) => void`
|
|
642
642
|
|
|
643
643
|
Disconnects all layer nodes from a target group.
|
|
644
644
|
|
|
@@ -653,7 +653,7 @@ Parameters:
|
|
|
653
653
|
|
|
654
654
|
### disconnectFromNode
|
|
655
655
|
|
|
656
|
-
`(layerNodes: import("
|
|
656
|
+
`(layerNodes: import("src/architecture/node").default[], targetNode: import("src/architecture/node").default, layerConnections: { in: import("src/architecture/connection").default[]; out: import("src/architecture/connection").default[]; self: import("src/architecture/connection").default[]; }, removeTwoSided: boolean) => void`
|
|
657
657
|
|
|
658
658
|
Disconnects all layer nodes from a target node.
|
|
659
659
|
|
|
@@ -665,7 +665,7 @@ Parameters:
|
|
|
665
665
|
|
|
666
666
|
### disconnectLayer
|
|
667
667
|
|
|
668
|
-
`(context: import("
|
|
668
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerConnectionContext, target: import("src/architecture/node").default | import("src/architecture/group").default, twoSided: boolean) => void`
|
|
669
669
|
|
|
670
670
|
Disconnects nodes in this layer from a target group or node.
|
|
671
671
|
|
|
@@ -686,7 +686,7 @@ Parameters:
|
|
|
686
686
|
|
|
687
687
|
### gateLayer
|
|
688
688
|
|
|
689
|
-
`(context: import("
|
|
689
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerConnectionContext, connections: import("src/architecture/connection").default[], method: unknown) => void`
|
|
690
690
|
|
|
691
691
|
Applies gating to the provided connections using the layer output group.
|
|
692
692
|
|
|
@@ -709,7 +709,7 @@ Parameters:
|
|
|
709
709
|
|
|
710
710
|
### inputLayer
|
|
711
711
|
|
|
712
|
-
`(context: import("
|
|
712
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerConnectionContext, from: import("src/architecture/group").default | import("src/architecture/layer/layer.utils.types").LayerLike, method: unknown, weight: number | undefined) => import("src/architecture/connection").default[]`
|
|
713
713
|
|
|
714
714
|
Connects a source group or layer to this layer's input target.
|
|
715
715
|
|
|
@@ -740,7 +740,7 @@ Returns: The created connection list.
|
|
|
740
740
|
|
|
741
741
|
### removeIncomingConnection
|
|
742
742
|
|
|
743
|
-
`(layerConnections: { in: import("
|
|
743
|
+
`(layerConnections: { in: import("src/architecture/connection").default[]; out: import("src/architecture/connection").default[]; self: import("src/architecture/connection").default[]; }, sourceNode: import("src/architecture/node").default, targetNode: import("src/architecture/node").default) => void`
|
|
744
744
|
|
|
745
745
|
Removes an incoming connection from layer tracking.
|
|
746
746
|
|
|
@@ -753,7 +753,7 @@ Parameters:
|
|
|
753
753
|
|
|
754
754
|
### removeOutgoingConnection
|
|
755
755
|
|
|
756
|
-
`(layerConnections: { in: import("
|
|
756
|
+
`(layerConnections: { in: import("src/architecture/connection").default[]; out: import("src/architecture/connection").default[]; self: import("src/architecture/connection").default[]; }, sourceNode: import("src/architecture/node").default, targetNode: import("src/architecture/node").default) => void`
|
|
757
757
|
|
|
758
758
|
Removes an outgoing connection from layer tracking.
|
|
759
759
|
|
|
@@ -788,7 +788,7 @@ Parameters:
|
|
|
788
788
|
|
|
789
789
|
### propagateNodesInReverse
|
|
790
790
|
|
|
791
|
-
`(context: import("
|
|
791
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerPropagationContext, rate: number, momentum: number, targets: number[] | undefined) => void`
|
|
792
792
|
|
|
793
793
|
Propagates errors through all nodes in reverse order.
|
|
794
794
|
|
|
@@ -822,7 +822,7 @@ Parameters:
|
|
|
822
822
|
|
|
823
823
|
### buildDenseLayer
|
|
824
824
|
|
|
825
|
-
`(context: import("
|
|
825
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number) => TLayer`
|
|
826
826
|
|
|
827
827
|
Builds a standard dense (fully connected) layer.
|
|
828
828
|
|
|
@@ -854,7 +854,7 @@ dense.input(previousLayerLike);
|
|
|
854
854
|
|
|
855
855
|
### buildGruLayer
|
|
856
856
|
|
|
857
|
-
`(context: import("
|
|
857
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number) => TLayer`
|
|
858
858
|
|
|
859
859
|
Builds a GRU layer using the provided factory context.
|
|
860
860
|
|
|
@@ -878,7 +878,7 @@ gru.input(previousLayerLike);
|
|
|
878
878
|
|
|
879
879
|
### buildLstmLayer
|
|
880
880
|
|
|
881
|
-
`(context: import("
|
|
881
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number) => TLayer`
|
|
882
882
|
|
|
883
883
|
Builds an LSTM layer using the provided factory context.
|
|
884
884
|
|
|
@@ -908,7 +908,7 @@ lstm.input(previousLayerLike);
|
|
|
908
908
|
|
|
909
909
|
### buildMemoryLayer
|
|
910
910
|
|
|
911
|
-
`(context: import("
|
|
911
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number, memory: number) => TLayer`
|
|
912
912
|
|
|
913
913
|
Builds a Memory layer using the provided factory context.
|
|
914
914
|
|
|
@@ -936,7 +936,7 @@ memoryLayer.input(previousLayerLike);
|
|
|
936
936
|
|
|
937
937
|
### flattenConnections
|
|
938
938
|
|
|
939
|
-
`(connectionLists: import("
|
|
939
|
+
`(connectionLists: import("src/architecture/connection").default[][]) => import("src/architecture/connection").default[]`
|
|
940
940
|
|
|
941
941
|
Flattens grouped connection arrays into a single list.
|
|
942
942
|
|
|
@@ -976,7 +976,7 @@ const method = resolveConnectionMethod(undefined);
|
|
|
976
976
|
|
|
977
977
|
### resolveSourceGroup
|
|
978
978
|
|
|
979
|
-
`(factoryContext: import("
|
|
979
|
+
`(factoryContext: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, from: import("src/architecture/group").default | import("src/architecture/layer/layer.utils.types").LayerLike) => import("src/architecture/group").default`
|
|
980
980
|
|
|
981
981
|
Resolves a source group from a layer-like or group input.
|
|
982
982
|
|
|
@@ -1019,7 +1019,7 @@ const outputs = activateStubNodes(layer);
|
|
|
1019
1019
|
|
|
1020
1020
|
### buildAttentionLayer
|
|
1021
1021
|
|
|
1022
|
-
`(context: import("
|
|
1022
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number, heads: number) => TLayer`
|
|
1023
1023
|
|
|
1024
1024
|
Builds a lightweight attention-style stub layer.
|
|
1025
1025
|
|
|
@@ -1048,7 +1048,7 @@ const out = attention.activate([1, 2, 3, 4]);
|
|
|
1048
1048
|
|
|
1049
1049
|
### buildConv1dLayer
|
|
1050
1050
|
|
|
1051
|
-
`(context: import("
|
|
1051
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number, kernelSize: number, stride: number, padding: number) => TLayer`
|
|
1052
1052
|
|
|
1053
1053
|
Builds a lightweight Conv1D-style stub layer.
|
|
1054
1054
|
|
|
@@ -1130,7 +1130,7 @@ activate([9, 8, 7, 6]); // -> [9, 8, 7]
|
|
|
1130
1130
|
|
|
1131
1131
|
### createStubLayer
|
|
1132
1132
|
|
|
1133
|
-
`(context: import("
|
|
1133
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number) => TLayer`
|
|
1134
1134
|
|
|
1135
1135
|
Creates shared node/output scaffolding for experimental layers.
|
|
1136
1136
|
|
|
@@ -1176,7 +1176,7 @@ Example (conceptual flow):
|
|
|
1176
1176
|
|
|
1177
1177
|
### buildBatchNormLayer
|
|
1178
1178
|
|
|
1179
|
-
`(context: import("
|
|
1179
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number) => TLayer`
|
|
1180
1180
|
|
|
1181
1181
|
Builds a dense layer decorated with batch-style normalization.
|
|
1182
1182
|
|
|
@@ -1204,7 +1204,7 @@ const normalized = buildBatchNormLayer(factoryContext, 16);
|
|
|
1204
1204
|
|
|
1205
1205
|
### buildLayerNormLayer
|
|
1206
1206
|
|
|
1207
|
-
`(context: import("
|
|
1207
|
+
`(context: import("src/architecture/layer/layer.utils.types").LayerFactoryContext<TLayer>, size: number) => TLayer`
|
|
1208
1208
|
|
|
1209
1209
|
Builds a dense layer decorated with layer-style normalization.
|
|
1210
1210
|
|
|
@@ -295,7 +295,7 @@ Internal normalized evolution config.
|
|
|
295
295
|
|
|
296
296
|
### EvolutionFitnessFunction
|
|
297
297
|
|
|
298
|
-
`(arg0: import("
|
|
298
|
+
`(arg0: import("src/architecture/network").default & import("src/architecture/network").default[]) => number | Promise<void>`
|
|
299
299
|
|
|
300
300
|
Unified evolution fitness callback shape.
|
|
301
301
|
|
|
@@ -509,7 +509,7 @@ Smoothing can make early stopping and progress logging less noisy.
|
|
|
509
509
|
|
|
510
510
|
### MutationHandler
|
|
511
511
|
|
|
512
|
-
`(method: import("
|
|
512
|
+
`(method: import("src/architecture/network/network.types").MutationMethod | undefined) => void`
|
|
513
513
|
|
|
514
514
|
Mutation handler function contract.
|
|
515
515
|
|
|
@@ -543,6 +543,14 @@ Provenance of hidden-layer architecture information.
|
|
|
543
543
|
|
|
544
544
|
Constructor signature for runtime Network import.
|
|
545
545
|
|
|
546
|
+
### NetworkConstructorOptions
|
|
547
|
+
|
|
548
|
+
Public constructor options for `Network`.
|
|
549
|
+
|
|
550
|
+
`topologyIntent` is the semantic, DX-first contract. `enforceAcyclic`
|
|
551
|
+
remains available for backward compatibility and must not contradict the
|
|
552
|
+
declared topology intent.
|
|
553
|
+
|
|
546
554
|
### NetworkGeneticProps
|
|
547
555
|
|
|
548
556
|
Runtime properties used during genetic operations.
|
|
@@ -595,6 +603,14 @@ Internal Network properties for slab operations.
|
|
|
595
603
|
|
|
596
604
|
Internal standalone generation network view.
|
|
597
605
|
|
|
606
|
+
### NetworkTopologyIntent
|
|
607
|
+
|
|
608
|
+
Public topology intent exposed by the network API.
|
|
609
|
+
|
|
610
|
+
Use `feed-forward` when the caller wants the library to preserve an acyclic,
|
|
611
|
+
forward-only contract. Use `unconstrained` when recurrent, gated, or other
|
|
612
|
+
cyclic structures may be introduced.
|
|
613
|
+
|
|
598
614
|
### NetworkTopoRuntime
|
|
599
615
|
|
|
600
616
|
Runtime topology contract used to lazily rebuild topological order.
|
|
@@ -951,7 +967,7 @@ while keeping the ONNX parser itself mostly pure.
|
|
|
951
967
|
|
|
952
968
|
### OnnxRuntimeLayerFactory
|
|
953
969
|
|
|
954
|
-
`(size: number) => import("
|
|
970
|
+
`(size: number) => import("src/architecture/layer").default`
|
|
955
971
|
|
|
956
972
|
Runtime layer-constructor signature used for recurrent layer reconstruction.
|
|
957
973
|
|
|
@@ -970,7 +986,7 @@ This is the minimal set of recurrent factories needed by the importer.
|
|
|
970
986
|
|
|
971
987
|
### OnnxRuntimePerceptronFactory
|
|
972
988
|
|
|
973
|
-
`(sizes: number[]) => import("
|
|
989
|
+
`(sizes: number[]) => import("src/architecture/network").default`
|
|
974
990
|
|
|
975
991
|
Runtime perceptron factory signature used by ONNX import orchestration.
|
|
976
992
|
|
|
@@ -1103,7 +1119,7 @@ Per-pool-key allocation & reuse counters (educational / diagnostics).
|
|
|
1103
1119
|
|
|
1104
1120
|
### PopulationFitnessFunction
|
|
1105
1121
|
|
|
1106
|
-
`(population: import("
|
|
1122
|
+
`(population: import("src/architecture/network").default[]) => Promise<void>`
|
|
1107
1123
|
|
|
1108
1124
|
Fitness signature evaluating full population asynchronously.
|
|
1109
1125
|
|
|
@@ -1272,7 +1288,7 @@ Shared parameters for constructing a Gemm node payload.
|
|
|
1272
1288
|
|
|
1273
1289
|
### SingleGenomeFitnessFunction
|
|
1274
1290
|
|
|
1275
|
-
`(genome: import("
|
|
1291
|
+
`(genome: import("src/architecture/network").default) => number`
|
|
1276
1292
|
|
|
1277
1293
|
Fitness signature evaluating one genome.
|
|
1278
1294
|
|
|
@@ -1453,7 +1469,7 @@ Returns: Implementation-defined result of Network.activate (typically an output
|
|
|
1453
1469
|
|
|
1454
1470
|
### applyGradientClippingImpl
|
|
1455
1471
|
|
|
1456
|
-
`(net: import("
|
|
1472
|
+
`(net: import("src/architecture/network").default, cfg: import("src/architecture/network/training/network.training.utils.types").GradientClipRuntimeConfig) => void`
|
|
1457
1473
|
|
|
1458
1474
|
Apply gradient clipping to a network using a normalized runtime configuration.
|
|
1459
1475
|
|
|
@@ -1505,7 +1521,7 @@ Design Notes:
|
|
|
1505
1521
|
|
|
1506
1522
|
### connect
|
|
1507
1523
|
|
|
1508
|
-
`(from: import("
|
|
1524
|
+
`(from: import("src/architecture/node").default, to: import("src/architecture/node").default, weight: number | undefined) => import("src/architecture/connection").default[]`
|
|
1509
1525
|
|
|
1510
1526
|
Create and register one (or multiple) directed connection objects between two nodes.
|
|
1511
1527
|
|
|
@@ -1538,9 +1554,11 @@ Parameters:
|
|
|
1538
1554
|
- `to` - - Target node (receives signal).
|
|
1539
1555
|
- `weight` - - Optional explicit initial weight value.
|
|
1540
1556
|
|
|
1557
|
+
Returns: Array of created {@link Connection} objects (possibly empty if acyclicity rejected the edge).
|
|
1558
|
+
|
|
1541
1559
|
### createMLP
|
|
1542
1560
|
|
|
1543
|
-
`(inputCount: number, hiddenCounts: number[], outputCount: number) => import("
|
|
1561
|
+
`(inputCount: number, hiddenCounts: number[], outputCount: number) => import("src/architecture/network").default`
|
|
1544
1562
|
|
|
1545
1563
|
Build a strictly layered and fully connected MLP network.
|
|
1546
1564
|
|
|
@@ -1554,7 +1572,7 @@ Returns: Newly created MLP network.
|
|
|
1554
1572
|
|
|
1555
1573
|
### crossOver
|
|
1556
1574
|
|
|
1557
|
-
`(parentNetwork1: import("
|
|
1575
|
+
`(parentNetwork1: import("src/architecture/network").default, parentNetwork2: import("src/architecture/network").default, equal: boolean) => import("src/architecture/network").default`
|
|
1558
1576
|
|
|
1559
1577
|
Genetic operator: NEAT‑style crossover (legacy merge operator removed).
|
|
1560
1578
|
|
|
@@ -1571,7 +1589,7 @@ Design notes:
|
|
|
1571
1589
|
|
|
1572
1590
|
### describeArchitecture
|
|
1573
1591
|
|
|
1574
|
-
`(network: import("
|
|
1592
|
+
`(network: import("src/architecture/network").default) => import("src/architecture/network/network.types").NetworkArchitectureDescriptor`
|
|
1575
1593
|
|
|
1576
1594
|
Describes network architecture for diagnostics, telemetry, and UI rendering.
|
|
1577
1595
|
|
|
@@ -1591,11 +1609,11 @@ Returns: Stable architecture descriptor.
|
|
|
1591
1609
|
|
|
1592
1610
|
### deserialize
|
|
1593
1611
|
|
|
1594
|
-
`(data: import("
|
|
1612
|
+
`(data: import("src/architecture/network/network.types").CompactSerializedNetworkTuple, inputSize: number | undefined, outputSize: number | undefined) => import("src/architecture/network").default`
|
|
1595
1613
|
|
|
1596
1614
|
### disconnect
|
|
1597
1615
|
|
|
1598
|
-
`(from: import("
|
|
1616
|
+
`(from: import("src/architecture/node").default, to: import("src/architecture/node").default) => void`
|
|
1599
1617
|
|
|
1600
1618
|
Remove (at most) one directed connection from source 'from' to target 'to'.
|
|
1601
1619
|
|
|
@@ -1626,7 +1644,7 @@ Parameters:
|
|
|
1626
1644
|
|
|
1627
1645
|
### evolveNetwork
|
|
1628
1646
|
|
|
1629
|
-
`(set: import("
|
|
1647
|
+
`(set: import("src/architecture/network/network.types").TrainingSample[], options: import("src/architecture/network/network.types").EvolveOptions) => Promise<{ error: number; iterations: number; time: number; }>`
|
|
1630
1648
|
|
|
1631
1649
|
Evolves a network with a NEAT-style search loop until an error target or generation limit is reached.
|
|
1632
1650
|
|
|
@@ -1671,11 +1689,11 @@ Returns: Output activations (detached plain array) of length `network.output`.
|
|
|
1671
1689
|
|
|
1672
1690
|
### fromJSONImpl
|
|
1673
1691
|
|
|
1674
|
-
`(json: import("
|
|
1692
|
+
`(json: import("src/architecture/network/network.types").NetworkJSON) => import("src/architecture/network").default`
|
|
1675
1693
|
|
|
1676
1694
|
### gate
|
|
1677
1695
|
|
|
1678
|
-
`(node: import("
|
|
1696
|
+
`(node: import("src/architecture/node").default, connection: import("src/architecture/connection").default) => void`
|
|
1679
1697
|
|
|
1680
1698
|
Attach a gater node to a connection so that the connection's effective weight
|
|
1681
1699
|
becomes dynamically modulated by the gater's activation (see {@link Node.gate} for exact math).
|
|
@@ -1704,7 +1722,7 @@ Returns: Standard normal sample with mean 0 and variance 1.
|
|
|
1704
1722
|
|
|
1705
1723
|
### generateStandalone
|
|
1706
1724
|
|
|
1707
|
-
`(net: import("
|
|
1725
|
+
`(net: import("src/architecture/network").default) => string`
|
|
1708
1726
|
|
|
1709
1727
|
Standalone forward pass code generator.
|
|
1710
1728
|
|
|
@@ -1734,7 +1752,7 @@ Not Supported / Simplifications:
|
|
|
1734
1752
|
|
|
1735
1753
|
### getConnectionSlab
|
|
1736
1754
|
|
|
1737
|
-
`() => import("
|
|
1755
|
+
`() => import("src/architecture/network/slab/network.slab.utils.types").ConnectionSlabView`
|
|
1738
1756
|
|
|
1739
1757
|
Obtain (and lazily rebuild if dirty) the current packed SoA view of connections.
|
|
1740
1758
|
|
|
@@ -1782,7 +1800,7 @@ Returns: Numeric RNG state value, or `undefined` when no deterministic state exi
|
|
|
1782
1800
|
|
|
1783
1801
|
### getSlabAllocationStats
|
|
1784
1802
|
|
|
1785
|
-
`() => { pool: { [x: string]: import("
|
|
1803
|
+
`() => { pool: { [x: string]: import("src/architecture/network/slab/network.slab.utils.types").PoolKeyMetrics; }; fresh: number; pooled: number; }`
|
|
1786
1804
|
|
|
1787
1805
|
Slab Packing / Structure‑of‑Arrays Backend (Educational Module)
|
|
1788
1806
|
==============================================================
|
|
@@ -1816,7 +1834,7 @@ console.log('First weight from->to', slab.weights[0], slab.from[0], slab.to[0]);
|
|
|
1816
1834
|
|
|
1817
1835
|
### hasPath
|
|
1818
1836
|
|
|
1819
|
-
`(from: import("
|
|
1837
|
+
`(from: import("src/architecture/node").default, to: import("src/architecture/node").default) => boolean`
|
|
1820
1838
|
|
|
1821
1839
|
Depth-first reachability test (avoids infinite loops via visited set).
|
|
1822
1840
|
|
|
@@ -1844,7 +1862,7 @@ Internal State Fields (attached to Network via `any` casting):
|
|
|
1844
1862
|
|
|
1845
1863
|
### mutateImpl
|
|
1846
1864
|
|
|
1847
|
-
`(method: import("
|
|
1865
|
+
`(method: import("src/architecture/network/network.types").MutationMethod | undefined) => void`
|
|
1848
1866
|
|
|
1849
1867
|
Public entry point: apply a single mutation operator to the network.
|
|
1850
1868
|
|
|
@@ -1903,7 +1921,7 @@ Returns: Array of output neuron activations (length == network.output).
|
|
|
1903
1921
|
|
|
1904
1922
|
### propagate
|
|
1905
1923
|
|
|
1906
|
-
`(rate: number, momentum: number, update: boolean, target: number[], regularization: number, costDerivative: import("
|
|
1924
|
+
`(rate: number, momentum: number, update: boolean, target: number[], regularization: number, costDerivative: import("src/architecture/network/training/network.training.utils.types").CostDerivative | undefined) => void`
|
|
1907
1925
|
|
|
1908
1926
|
Propagate output and hidden errors backward through the network.
|
|
1909
1927
|
|
|
@@ -1918,7 +1936,7 @@ Parameters:
|
|
|
1918
1936
|
|
|
1919
1937
|
### pruneToSparsity
|
|
1920
1938
|
|
|
1921
|
-
`(targetSparsity: number, method: import("
|
|
1939
|
+
`(targetSparsity: number, method: import("src/architecture/network/network.types").PruningMethod) => void`
|
|
1922
1940
|
|
|
1923
1941
|
Evolutionary (generation-based) pruning toward a target sparsity baseline.
|
|
1924
1942
|
Unlike maybePrune this operates immediately relative to the first invocation's connection count
|
|
@@ -1932,7 +1950,7 @@ Returns: Nothing.
|
|
|
1932
1950
|
|
|
1933
1951
|
### rebuildConnections
|
|
1934
1952
|
|
|
1935
|
-
`(networkInstance: import("
|
|
1953
|
+
`(networkInstance: import("src/architecture/network").default) => void`
|
|
1936
1954
|
|
|
1937
1955
|
Rebuild the canonical connection array from per-node outgoing lists.
|
|
1938
1956
|
|
|
@@ -1982,7 +2000,7 @@ Returns: Promise resolving once rebuild completes.
|
|
|
1982
2000
|
|
|
1983
2001
|
### removeNode
|
|
1984
2002
|
|
|
1985
|
-
`(node: import("
|
|
2003
|
+
`(node: import("src/architecture/node").default) => void`
|
|
1986
2004
|
|
|
1987
2005
|
Node removal utilities.
|
|
1988
2006
|
|
|
@@ -2032,7 +2050,7 @@ Returns: Nothing.
|
|
|
2032
2050
|
|
|
2033
2051
|
### serialize
|
|
2034
2052
|
|
|
2035
|
-
`() => import("
|
|
2053
|
+
`() => import("src/architecture/network/network.types").CompactSerializedNetworkTuple`
|
|
2036
2054
|
|
|
2037
2055
|
Serializes a network instance into the compact tuple format.
|
|
2038
2056
|
|
|
@@ -2080,7 +2098,7 @@ Returns: Nothing.
|
|
|
2080
2098
|
|
|
2081
2099
|
### snapshotRNG
|
|
2082
2100
|
|
|
2083
|
-
`() => import("
|
|
2101
|
+
`() => import("src/architecture/network/network.types").RNGSnapshot`
|
|
2084
2102
|
|
|
2085
2103
|
Captures the current deterministic RNG lifecycle state as a portable snapshot.
|
|
2086
2104
|
|
|
@@ -2109,7 +2127,7 @@ Returns: Mean error and evaluation duration.
|
|
|
2109
2127
|
|
|
2110
2128
|
### toJSONImpl
|
|
2111
2129
|
|
|
2112
|
-
`() => import("
|
|
2130
|
+
`() => import("src/architecture/network/network.types").NetworkJSON`
|
|
2113
2131
|
|
|
2114
2132
|
Serializes a network instance into the verbose JSON format.
|
|
2115
2133
|
|
|
@@ -2123,7 +2141,7 @@ Returns: Versioned JSON payload with shape metadata, nodes, and connections.
|
|
|
2123
2141
|
|
|
2124
2142
|
### trainImpl
|
|
2125
2143
|
|
|
2126
|
-
`(net: import("
|
|
2144
|
+
`(net: import("src/architecture/network").default, set: import("src/architecture/network/training/network.training.utils.types").TrainingSample[], options: import("src/architecture/network/network.types").TrainingOptions) => { error: number; iterations: number; time: number; }`
|
|
2127
2145
|
|
|
2128
2146
|
High-level training orchestration with early stopping, smoothing & callbacks.
|
|
2129
2147
|
|
|
@@ -2138,7 +2156,7 @@ Returns: Summary payload containing final error, iteration count, and elapsed ti
|
|
|
2138
2156
|
|
|
2139
2157
|
### trainSetImpl
|
|
2140
2158
|
|
|
2141
|
-
`(net: import("
|
|
2159
|
+
`(net: import("src/architecture/network").default, set: import("src/architecture/network/training/network.training.utils.types").TrainingSample[], batchSize: number, accumulationSteps: number, currentRate: number, momentum: number, regularization: import("src/architecture/network/network.types").RegularizationConfig, costFunction: import("src/architecture/network/network.types").CostFunction | import("src/architecture/network/network.types").CostFunctionOrObject, optimizer: import("src/architecture/network/network.types").OptimizerConfigBase | undefined) => number`
|
|
2142
2160
|
|
|
2143
2161
|
Execute one full pass over dataset (epoch) with optional accumulation & adaptive optimizer.
|
|
2144
2162
|
Returns mean cost across processed samples.
|
|
@@ -2160,7 +2178,7 @@ Returns: Mean cost across the processed samples.
|
|
|
2160
2178
|
|
|
2161
2179
|
### ungate
|
|
2162
2180
|
|
|
2163
|
-
`(connection: import("
|
|
2181
|
+
`(connection: import("src/architecture/connection").default) => void`
|
|
2164
2182
|
|
|
2165
2183
|
Remove gating from a connection, restoring its static weight contribution.
|
|
2166
2184
|
|