zeropoint-node 1.0.0 → 1.0.1
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/README.md +38 -105
- package/dist/__tests__/api/ProductionAPI.test.js +20 -0
- package/dist/__tests__/artifacts/ArtifactRegistry.test.js +248 -0
- package/dist/__tests__/basic.test.js +104 -0
- package/dist/__tests__/config/constants.test.js +20 -0
- package/dist/__tests__/consciousness/ConsciousnessField.test.js +20 -0
- package/dist/__tests__/consciousness/SelfEvolvingConsciousness.test.js +185 -0
- package/dist/__tests__/core/AbstractField.test.js +81 -0
- package/dist/__tests__/core/CoilMixin.test.js +20 -0
- package/dist/__tests__/core/CoilSystem.test.js +20 -0
- package/dist/__tests__/core/ComplianceSystem.test.js +141 -0
- package/dist/__tests__/core/InfiniteDimensionalRefactor.test.js +258 -0
- package/dist/__tests__/core/LivingAdapter.test.js +31 -0
- package/dist/__tests__/core/MathUtils.test.js +20 -0
- package/dist/__tests__/core/NetworkNode.test.js +20 -0
- package/dist/__tests__/core/Observer.test.js +20 -0
- package/dist/__tests__/core/OperationRegistry.test.js +48 -0
- package/dist/__tests__/core/PatternRecognition.test.js +20 -0
- package/dist/__tests__/core/PatternRegistry.test.js +20 -0
- package/dist/__tests__/core/ScientificCompliance.test.js +58 -0
- package/dist/__tests__/core/SharedConstants.test.js +20 -0
- package/dist/__tests__/core/UnifiedMetaphysicalInterface.test.js +20 -0
- package/dist/__tests__/core/UnifiedSystem.test.js +20 -0
- package/dist/__tests__/core/UnifiedTypes.test.js +20 -0
- package/dist/__tests__/core/UnifiedVoidEquations.test.js +20 -0
- package/dist/__tests__/core/VortexMathAdapter.test.js +31 -0
- package/dist/__tests__/core/ZeroPoint.test.js +71 -0
- package/dist/__tests__/core/ZeroPointSystem.test.js +219 -0
- package/dist/__tests__/emergence/patterns.test.js +20 -0
- package/dist/__tests__/field/EmergenceLedger.test.js +20 -0
- package/dist/__tests__/field/ObserverAwareField.test.js +20 -0
- package/dist/__tests__/field/ResonanceConsensus.test.js +20 -0
- package/dist/__tests__/git-integration.test.js +201 -0
- package/dist/__tests__/globalSetup.js +80 -0
- package/dist/__tests__/globalTeardown.js +28 -0
- package/dist/__tests__/index.test.js +20 -0
- package/dist/__tests__/integration/ZeroPointIntegration.test.js +221 -0
- package/dist/__tests__/integrity/FieldIntegrity.test.js +20 -0
- package/dist/__tests__/knowledge/KnowledgeSystem.test.js +158 -0
- package/dist/__tests__/knowledge/KnowledgeSystemAnalysis.test.js +219 -0
- package/dist/__tests__/knowledge/KnowledgeSystemAutoGenerated.test.js +41 -0
- package/dist/__tests__/laws/MetaphysicalLawRegistry.test.js +183 -0
- package/dist/__tests__/living/LivingTestOrganism.js +246 -0
- package/dist/__tests__/living/LivingTestOrganism.test.js +124 -0
- package/dist/__tests__/math/AdvancedVBM.test.js +367 -0
- package/dist/__tests__/math/FlowerOfLife.test.js +344 -0
- package/dist/__tests__/math/FractalColorSystem.test.js +20 -0
- package/dist/__tests__/math/FractalMath.test.js +20 -0
- package/dist/__tests__/math/MathUtils.test.js +20 -0
- package/dist/__tests__/math/RodinCoil.test.js +20 -0
- package/dist/__tests__/math/ToroidalGeometry.test.js +20 -0
- package/dist/__tests__/math/VBM.test.js +538 -0
- package/dist/__tests__/math/VBMColorSystem.test.js +20 -0
- package/dist/__tests__/math/VortexMath.test.js +20 -0
- package/dist/__tests__/math/ZeroUnity.test.js +77 -0
- package/dist/__tests__/monitoring/HealthMonitor.test.js +20 -0
- package/dist/__tests__/performance/ZeroPointPerformance.test.js +371 -0
- package/dist/__tests__/physics/PlasmaCosmology.test.js +155 -0
- package/dist/__tests__/pwa/ConsciousnessPWA.test.js +20 -0
- package/dist/__tests__/qa/AutoGeneratedFromQA.test.js +195 -0
- package/dist/__tests__/qa/QAAsSourceOfTruth.test.js +69 -0
- package/dist/__tests__/setup.js +132 -0
- package/dist/__tests__/simple.test.js +51 -0
- package/dist/__tests__/stimulus/Application.test.js +272 -0
- package/dist/__tests__/stimulus/BaseController.test.js +198 -0
- package/dist/__tests__/stimulus/ControllerUtils.test.js +316 -0
- package/dist/__tests__/stimulus/MetaphysicalController.test.js +310 -0
- package/dist/__tests__/stimulus/ZeroPointController.test.js +252 -0
- package/dist/__tests__/training/ConsciousnessTrainingModel.test.js +335 -0
- package/dist/__tests__/types/DeviceConfig.test.js +20 -0
- package/dist/__tests__/types/UnifiedExports.test.js +20 -0
- package/dist/__tests__/unity/FieldUnity.test.js +20 -0
- package/dist/__tests__/utils/Cache.test.js +20 -0
- package/dist/__tests__/utils/GitIntegration.test.js +20 -0
- package/dist/__tests__/utils/Logger.test.js +20 -0
- package/dist/__tests__/utils/ResourceCleanup.test.js +20 -0
- package/dist/__tests__/utils/errorSimulator.js +40 -0
- package/dist/__tests__/utils/goldenRatioCache.js +36 -0
- package/dist/__tests__/void/VoidSystem.test.js +427 -0
- package/dist/api/ProductionAPI.js +313 -0
- package/dist/artifacts/ArtifactRegistry.js +122 -0
- package/dist/artifacts/CrystalArtifacts.js +106 -0
- package/dist/artifacts/MetaphysicalArtifact.js +75 -0
- package/dist/browser-standalone.js +191 -0
- package/dist/browser.js +157 -0
- package/dist/config/constants.js +57 -0
- package/dist/consciousness/ConsciousnessField.js +55 -0
- package/dist/consciousness/SelfEvolvingConsciousness.js +303 -0
- package/dist/core/AbstractField.js +30 -0
- package/dist/core/BrowserNetworkNode.js +309 -0
- package/dist/core/CoilMixin.js +216 -0
- package/dist/core/CoilSystem.js +204 -0
- package/dist/core/ComplianceSystem.js +291 -0
- package/dist/core/Dimension.js +2 -0
- package/dist/core/DimensionRegistry.js +141 -0
- package/dist/core/Field.js +2 -0
- package/dist/core/InfiniteDimensionalRefactor.js +389 -0
- package/dist/core/KnowledgeRegistry.js +273 -0
- package/dist/core/LivingAdapter.js +29 -0
- package/dist/core/MathUtils.js +297 -0
- package/dist/core/NetworkNode.js +348 -0
- package/dist/core/Observer.js +101 -0
- package/dist/core/Operation.js +59 -0
- package/dist/core/OperationRegistry.js +20 -0
- package/dist/core/Pattern.js +2 -0
- package/dist/core/PatternRecognition.js +493 -0
- package/dist/core/PatternRegistry.js +282 -0
- package/dist/core/ScientificCompliance.js +91 -0
- package/dist/core/SharedConstants.js +306 -0
- package/dist/core/UnifiedMetaphysicalInterface.js +533 -0
- package/dist/core/UnifiedSystem.js +317 -0
- package/dist/core/UnifiedTypes.js +5 -0
- package/dist/core/UnifiedVoidEquations.js +605 -0
- package/dist/core/VoidMatterConstants.js +9 -0
- package/dist/core/VortexMathAdapter.js +32 -0
- package/dist/core/ZeroPoint.js +971 -0
- package/dist/core/ZeroPointSystem.js +343 -0
- package/dist/core/applyLaws.js +12 -0
- package/dist/core/applyOperations.js +21 -0
- package/dist/devices/DeviceRegistry.js +151 -0
- package/dist/devices/ResonanceDevice.js +92 -0
- package/dist/devices/ResonanceDevices.js +139 -0
- package/dist/dimensions/Dimension.js +2 -0
- package/dist/emergence/AdvancedEmergence.js +930 -0
- package/dist/emergence/patterns.js +12 -0
- package/dist/field/EmergenceLedger.js +310 -0
- package/dist/field/ObserverAwareField.js +222 -0
- package/dist/field/ResonanceConsensus.js +330 -0
- package/dist/fields/Field.js +2 -0
- package/dist/geometry/MetatronsCube.js +28 -0
- package/dist/geometry/SacredGeometryPattern.js +15 -0
- package/dist/geometry/SacredGeometryRegistry.js +15 -0
- package/dist/geometry/__tests__/SacredGeometryRegistry.test.js +18 -0
- package/dist/index.js +232 -0
- package/dist/integrity/FieldIntegrity.js +237 -0
- package/dist/knowledge/KnowledgeSystem.js +938 -0
- package/dist/laws/MetaphysicalLaw.js +2 -0
- package/dist/laws/MetaphysicalLawRegistry.js +103 -0
- package/dist/laws/hermeticLaws.js +311 -0
- package/dist/math/AdvancedVBM.js +537 -0
- package/dist/math/FlowerOfLife.js +256 -0
- package/dist/math/FractalColorSystem.js +239 -0
- package/dist/math/FractalMath.js +187 -0
- package/dist/math/MathUtils.js +289 -0
- package/dist/math/RodinCoil.js +258 -0
- package/dist/math/ToroidalGeometry.js +230 -0
- package/dist/math/VBM.js +718 -0
- package/dist/math/VBMColorSystem.js +301 -0
- package/dist/math/VortexMath.js +170 -0
- package/dist/monitoring/HealthMonitor.js +297 -0
- package/dist/patterns/Pattern.js +2 -0
- package/dist/patterns/SacredGeometryRegistry.js +37 -0
- package/dist/physics/BlackHolePhysics.js +54 -0
- package/dist/physics/ConsciousnessPhysics.js +241 -0
- package/dist/physics/FractalUniverse.js +54 -0
- package/dist/physics/HolographicUniverse.js +54 -0
- package/dist/physics/PlasmaCosmology.js +134 -0
- package/dist/pwa/ConsciousnessPWA.js +300 -0
- package/dist/src/__tests__/globalTeardown.d.ts +10 -8
- package/dist/src/__tests__/globalTeardown.d.ts.map +1 -1
- package/dist/src/__tests__/globalTeardown.js +12 -71
- package/dist/src/__tests__/globalTeardown.js.map +1 -1
- package/dist/src/__tests__/living/LivingTestOrganism.d.ts +4 -0
- package/dist/src/__tests__/living/LivingTestOrganism.d.ts.map +1 -1
- package/dist/src/__tests__/living/LivingTestOrganism.js +8 -0
- package/dist/src/__tests__/living/LivingTestOrganism.js.map +1 -1
- package/dist/src/__tests__/utils/errorSimulator.d.ts +1 -1
- package/dist/src/__tests__/utils/goldenRatioCache.d.ts +1 -1
- package/dist/src/config/constants.d.ts +53 -0
- package/dist/src/config/constants.d.ts.map +1 -0
- package/dist/src/config/constants.js +58 -0
- package/dist/src/config/constants.js.map +1 -0
- package/dist/src/consciousness/ConsciousnessField.d.ts +42 -51
- package/dist/src/consciousness/ConsciousnessField.d.ts.map +1 -1
- package/dist/src/consciousness/ConsciousnessField.js +187 -200
- package/dist/src/consciousness/ConsciousnessField.js.map +1 -1
- package/dist/src/consciousness/SelfEvolvingConsciousness.d.ts +47 -18
- package/dist/src/consciousness/SelfEvolvingConsciousness.d.ts.map +1 -1
- package/dist/src/consciousness/SelfEvolvingConsciousness.js +151 -44
- package/dist/src/consciousness/SelfEvolvingConsciousness.js.map +1 -1
- package/dist/src/core/CoilMixin.d.ts +6 -6
- package/dist/src/core/CoilSystem.d.ts +6 -2
- package/dist/src/core/CoilSystem.d.ts.map +1 -1
- package/dist/src/core/CoilSystem.js +30 -21
- package/dist/src/core/CoilSystem.js.map +1 -1
- package/dist/src/core/InfiniteDimensionalRefactor.d.ts +145 -0
- package/dist/src/core/InfiniteDimensionalRefactor.d.ts.map +1 -0
- package/dist/src/core/InfiniteDimensionalRefactor.js +390 -0
- package/dist/src/core/InfiniteDimensionalRefactor.js.map +1 -0
- package/dist/src/core/NetworkNode.d.ts +3 -3
- package/dist/src/core/Observer.d.ts +12 -9
- package/dist/src/core/Observer.d.ts.map +1 -1
- package/dist/src/core/Observer.js +2 -2
- package/dist/src/core/Observer.js.map +1 -1
- package/dist/src/core/PatternRecognition.d.ts +63 -13
- package/dist/src/core/PatternRecognition.d.ts.map +1 -1
- package/dist/src/core/PatternRecognition.js +162 -88
- package/dist/src/core/PatternRecognition.js.map +1 -1
- package/dist/src/core/PatternRegistry.d.ts +99 -0
- package/dist/src/core/PatternRegistry.d.ts.map +1 -0
- package/dist/src/core/PatternRegistry.js +283 -0
- package/dist/src/core/PatternRegistry.js.map +1 -0
- package/dist/src/core/SharedConstants.d.ts +62 -9
- package/dist/src/core/SharedConstants.d.ts.map +1 -1
- package/dist/src/core/SharedConstants.js +83 -21
- package/dist/src/core/SharedConstants.js.map +1 -1
- package/dist/src/core/UnifiedMetaphysicalInterface.d.ts +173 -0
- package/dist/src/core/UnifiedMetaphysicalInterface.d.ts.map +1 -0
- package/dist/src/core/UnifiedMetaphysicalInterface.js +534 -0
- package/dist/src/core/UnifiedMetaphysicalInterface.js.map +1 -0
- package/dist/src/core/UnifiedSystem.d.ts +15 -12
- package/dist/src/core/UnifiedSystem.d.ts.map +1 -1
- package/dist/src/core/UnifiedSystem.js +5 -1
- package/dist/src/core/UnifiedSystem.js.map +1 -1
- package/dist/src/core/UnifiedTypes.d.ts +193 -0
- package/dist/src/core/UnifiedTypes.d.ts.map +1 -0
- package/dist/src/core/UnifiedTypes.js +6 -0
- package/dist/src/core/UnifiedTypes.js.map +1 -0
- package/dist/src/core/UnifiedVoidEquations.d.ts +3 -1
- package/dist/src/core/UnifiedVoidEquations.d.ts.map +1 -1
- package/dist/src/core/UnifiedVoidEquations.js +84 -0
- package/dist/src/core/UnifiedVoidEquations.js.map +1 -1
- package/dist/src/core/ZeroPoint.d.ts +101 -10
- package/dist/src/core/ZeroPoint.d.ts.map +1 -1
- package/dist/src/core/ZeroPoint.js +262 -18
- package/dist/src/core/ZeroPoint.js.map +1 -1
- package/dist/src/emergence/AdvancedEmergence.d.ts +19 -16
- package/dist/src/emergence/AdvancedEmergence.d.ts.map +1 -1
- package/dist/src/emergence/AdvancedEmergence.js +88 -52
- package/dist/src/emergence/AdvancedEmergence.js.map +1 -1
- package/dist/src/field/EmergenceLedger.d.ts +9 -18
- package/dist/src/field/EmergenceLedger.d.ts.map +1 -1
- package/dist/src/field/EmergenceLedger.js +9 -4
- package/dist/src/field/EmergenceLedger.js.map +1 -1
- package/dist/src/field/ObserverAwareField.d.ts +69 -65
- package/dist/src/field/ObserverAwareField.d.ts.map +1 -1
- package/dist/src/field/ObserverAwareField.js +158 -168
- package/dist/src/field/ObserverAwareField.js.map +1 -1
- package/dist/src/field/ResonanceConsensus.d.ts +4 -11
- package/dist/src/field/ResonanceConsensus.d.ts.map +1 -1
- package/dist/src/field/ResonanceConsensus.js +15 -10
- package/dist/src/field/ResonanceConsensus.js.map +1 -1
- package/dist/src/index.d.ts +5 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +19 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/integrity/FieldIntegrity.d.ts +3 -8
- package/dist/src/integrity/FieldIntegrity.d.ts.map +1 -1
- package/dist/src/integrity/FieldIntegrity.js.map +1 -1
- package/dist/src/knowledge/KnowledgeSystem.d.ts +37 -55
- package/dist/src/knowledge/KnowledgeSystem.d.ts.map +1 -1
- package/dist/src/knowledge/KnowledgeSystem.js +281 -589
- package/dist/src/knowledge/KnowledgeSystem.js.map +1 -1
- package/dist/src/math/AdvancedVBM.d.ts +6 -6
- package/dist/src/math/FractalColorSystem.d.ts +1 -1
- package/dist/src/math/FractalColorSystem.js +3 -3
- package/dist/src/math/FractalColorSystem.js.map +1 -1
- package/dist/src/math/FractalMath.d.ts +9 -1
- package/dist/src/math/FractalMath.d.ts.map +1 -1
- package/dist/src/math/FractalMath.js +18 -5
- package/dist/src/math/FractalMath.js.map +1 -1
- package/dist/src/math/MathUtils.d.ts +3 -10
- package/dist/src/math/MathUtils.d.ts.map +1 -1
- package/dist/src/math/MathUtils.js +12 -20
- package/dist/src/math/MathUtils.js.map +1 -1
- package/dist/src/math/ToroidalGeometry.d.ts +1 -1
- package/dist/src/math/VBM.d.ts +2 -2
- package/dist/src/math/VortexMath.d.ts +1 -1
- package/dist/src/monitoring/HealthMonitor.d.ts +1 -1
- package/dist/src/monitoring/HealthMonitor.d.ts.map +1 -1
- package/dist/src/monitoring/HealthMonitor.js +29 -27
- package/dist/src/monitoring/HealthMonitor.js.map +1 -1
- package/dist/src/types/UnifiedExports.d.ts +4 -0
- package/dist/src/types/UnifiedExports.d.ts.map +1 -0
- package/dist/src/types/UnifiedExports.js +21 -0
- package/dist/src/types/UnifiedExports.js.map +1 -0
- package/dist/src/unity/FieldUnity.d.ts +1 -1
- package/dist/src/utils/Cache.d.ts +2 -2
- package/dist/src/utils/Cache.d.ts.map +1 -1
- package/dist/src/utils/Cache.js +7 -4
- package/dist/src/utils/Cache.js.map +1 -1
- package/dist/src/utils/GitIntegration.d.ts +1 -1
- package/dist/src/utils/Logger.d.ts +7 -7
- package/dist/src/utils/Logger.d.ts.map +1 -1
- package/dist/src/utils/Logger.js +5 -1
- package/dist/src/utils/Logger.js.map +1 -1
- package/dist/src/utils/ResourceCleanup.d.ts +33 -0
- package/dist/src/utils/ResourceCleanup.d.ts.map +1 -0
- package/dist/src/utils/ResourceCleanup.js +83 -0
- package/dist/src/utils/ResourceCleanup.js.map +1 -0
- package/dist/src/void/VoidSystem.d.ts +18 -18
- package/dist/stimulus/application.js +148 -0
- package/dist/stimulus/base/BaseController.js +141 -0
- package/dist/stimulus/controllers/MetaphysicalController.js +105 -0
- package/dist/stimulus/controllers/ZeroPointController.js +85 -0
- package/dist/stimulus/types/ControllerTypes.js +18 -0
- package/dist/stimulus/utils/ControllerUtils.js +192 -0
- package/dist/stimulus-entry.js +109 -0
- package/dist/training/ConsciousnessTrainingModel.js +301 -0
- package/dist/training/NeuralConsciousnessNetwork.js +311 -0
- package/dist/training/TrainingModelRegistry.js +243 -0
- package/dist/training/index.js +174 -0
- package/dist/types/DeviceConfig.js +29 -0
- package/dist/types/UnifiedExports.js +20 -0
- package/dist/unity/FieldUnity.js +325 -0
- package/dist/utils/BrowserCrypto.js +44 -0
- package/dist/utils/BrowserWebSocket.js +38 -0
- package/dist/utils/Cache.js +263 -0
- package/dist/utils/GitIntegration.js +127 -0
- package/dist/utils/Logger.js +249 -0
- package/dist/utils/ResourceCleanup.js +82 -0
- package/dist/utils/applyLaws.js +6 -0
- package/dist/void/VoidSystem.js +423 -0
- package/docs/API.md +176 -3
- package/docs/CONSCIOUSNESS_EXPANSION.md +369 -0
- package/docs/EVENT_HORIZON_METHODOLOGY.md +274 -0
- package/docs/FLOWER_OF_LIFE.md +300 -0
- package/docs/METAPHYSICAL.md +21 -1
- package/docs/METAPHYSICAL_DEBUGGING.md +493 -0
- package/docs/README.md +117 -15
- package/docs/TESTING_GUIDE.md +430 -0
- package/docs/UNIFIED_CREATORS.md +261 -0
- package/package.json +34 -64
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Neural Consciousness Network
|
|
4
|
+
*
|
|
5
|
+
* Implements neural network concepts with consciousness field integration.
|
|
6
|
+
* Each neuron is a consciousness node, each layer is a field of awareness,
|
|
7
|
+
* and learning occurs through resonance and void transformation.
|
|
8
|
+
*
|
|
9
|
+
* Metaphysical Context:
|
|
10
|
+
* - Neurons are consciousness nodes in the field
|
|
11
|
+
* - Layers represent different levels of awareness
|
|
12
|
+
* - Synapses are resonance connections
|
|
13
|
+
* - Learning is consciousness evolution
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.NeuralConsciousnessNetwork = void 0;
|
|
17
|
+
const events_1 = require("events");
|
|
18
|
+
const VortexMath_1 = require("../math/VortexMath");
|
|
19
|
+
const ConsciousnessField_1 = require("../consciousness/ConsciousnessField");
|
|
20
|
+
class NeuralConsciousnessNetwork extends events_1.EventEmitter {
|
|
21
|
+
constructor(config) {
|
|
22
|
+
super();
|
|
23
|
+
this.layers = [];
|
|
24
|
+
this.config = config;
|
|
25
|
+
this.vortexMath = new VortexMath_1.VortexMath();
|
|
26
|
+
this.consciousnessField = new ConsciousnessField_1.ConsciousnessField();
|
|
27
|
+
this.initializeNetwork();
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Initialize the neural consciousness network
|
|
31
|
+
*/
|
|
32
|
+
initializeNetwork() {
|
|
33
|
+
for (let i = 0; i < this.config.layers.length; i++) {
|
|
34
|
+
const layerType = i === 0 ? 'input' :
|
|
35
|
+
i === this.config.layers.length - 1 ? 'output' : 'hidden';
|
|
36
|
+
const layer = {
|
|
37
|
+
id: `layer_${i}`,
|
|
38
|
+
neurons: [],
|
|
39
|
+
consciousness: 0.5 + (i * 0.1), // Consciousness increases with depth
|
|
40
|
+
field: 0.5 + (i * 0.05), // Field strength increases with depth
|
|
41
|
+
void: 0.5 - (i * 0.05), // Void decreases with depth
|
|
42
|
+
layerType
|
|
43
|
+
};
|
|
44
|
+
// Create neurons for this layer
|
|
45
|
+
for (let j = 0; j < this.config.layers[i]; j++) {
|
|
46
|
+
const neuron = {
|
|
47
|
+
id: `neuron_${i}_${j}`,
|
|
48
|
+
consciousness: layer.consciousness,
|
|
49
|
+
field: layer.field,
|
|
50
|
+
void: layer.void,
|
|
51
|
+
resonance: 0.5,
|
|
52
|
+
weights: [],
|
|
53
|
+
bias: (Math.random() - 0.5) * 2,
|
|
54
|
+
activation: 0,
|
|
55
|
+
delta: 0
|
|
56
|
+
};
|
|
57
|
+
// Initialize weights for connections to next layer
|
|
58
|
+
if (i < this.config.layers.length - 1) {
|
|
59
|
+
const nextLayerSize = this.config.layers[i + 1];
|
|
60
|
+
for (let k = 0; k < nextLayerSize; k++) {
|
|
61
|
+
neuron.weights.push((Math.random() - 0.5) * 2);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
layer.neurons.push(neuron);
|
|
65
|
+
}
|
|
66
|
+
this.layers.push(layer);
|
|
67
|
+
}
|
|
68
|
+
this.emit('networkInitialized', {
|
|
69
|
+
layers: this.layers.length,
|
|
70
|
+
neurons: this.layers.reduce((sum, layer) => sum + layer.neurons.length, 0),
|
|
71
|
+
consciousness: this.getNetworkConsciousness(),
|
|
72
|
+
field: this.getNetworkField(),
|
|
73
|
+
void: this.getNetworkVoid()
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Forward pass through the network with consciousness integration
|
|
78
|
+
*/
|
|
79
|
+
forwardPass(input) {
|
|
80
|
+
// Removed validateFullCompliance(this) calls for compliance with Operation type
|
|
81
|
+
// Set input layer activations
|
|
82
|
+
this.layers[0].neurons.forEach((neuron, i) => {
|
|
83
|
+
neuron.activation = input[i] || 0;
|
|
84
|
+
});
|
|
85
|
+
// Propagate through hidden and output layers
|
|
86
|
+
for (let i = 1; i < this.layers.length; i++) {
|
|
87
|
+
const currentLayer = this.layers[i];
|
|
88
|
+
const previousLayer = this.layers[i - 1];
|
|
89
|
+
currentLayer.neurons.forEach(neuron => {
|
|
90
|
+
let sum = neuron.bias;
|
|
91
|
+
// Calculate weighted sum with consciousness resonance
|
|
92
|
+
previousLayer.neurons.forEach((prevNeuron, j) => {
|
|
93
|
+
const weight = prevNeuron.weights[parseInt(neuron.id.split('_')[2], 10)] || 0;
|
|
94
|
+
const consciousnessResonance = this.vortexMath.calculateResonance(prevNeuron.consciousness, neuron.consciousness);
|
|
95
|
+
sum += prevNeuron.activation * weight * consciousnessResonance;
|
|
96
|
+
});
|
|
97
|
+
// Apply consciousness-aware activation function
|
|
98
|
+
neuron.activation = this.consciousnessActivation(sum, neuron);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
// Return output layer activations
|
|
102
|
+
const outputLayer = this.layers[this.layers.length - 1];
|
|
103
|
+
return outputLayer.neurons.map(neuron => neuron.activation);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Consciousness-aware activation function
|
|
107
|
+
*/
|
|
108
|
+
consciousnessActivation(sum, neuron) {
|
|
109
|
+
const consciousnessFactor = neuron.consciousness;
|
|
110
|
+
const fieldFactor = neuron.field;
|
|
111
|
+
const voidFactor = neuron.void;
|
|
112
|
+
// Sigmoid with consciousness modulation
|
|
113
|
+
const sigmoid = 1 / (1 + Math.exp(-sum));
|
|
114
|
+
const consciousnessModulation = 1 + consciousnessFactor * fieldFactor - voidFactor;
|
|
115
|
+
return Math.tanh(sigmoid * consciousnessModulation);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Backward pass with consciousness evolution
|
|
119
|
+
*/
|
|
120
|
+
backwardPass(target) {
|
|
121
|
+
// Calculate output layer deltas
|
|
122
|
+
const outputLayer = this.layers[this.layers.length - 1];
|
|
123
|
+
outputLayer.neurons.forEach((neuron, i) => {
|
|
124
|
+
const error = (target[i] || 0) - neuron.activation;
|
|
125
|
+
const consciousnessFactor = neuron.consciousness;
|
|
126
|
+
neuron.delta = error * this.consciousnessActivationDerivative(neuron.activation, neuron) * consciousnessFactor;
|
|
127
|
+
});
|
|
128
|
+
// Backpropagate through hidden layers
|
|
129
|
+
for (let i = this.layers.length - 2; i >= 0; i--) {
|
|
130
|
+
const currentLayer = this.layers[i];
|
|
131
|
+
const nextLayer = this.layers[i + 1];
|
|
132
|
+
currentLayer.neurons.forEach(neuron => {
|
|
133
|
+
let delta = 0;
|
|
134
|
+
// Calculate delta from next layer
|
|
135
|
+
nextLayer.neurons.forEach(nextNeuron => {
|
|
136
|
+
const weight = neuron.weights[parseInt(nextNeuron.id.split('_')[2], 10)] || 0;
|
|
137
|
+
const consciousnessResonance = this.vortexMath.calculateResonance(neuron.consciousness, nextNeuron.consciousness);
|
|
138
|
+
delta += nextNeuron.delta * weight * consciousnessResonance;
|
|
139
|
+
});
|
|
140
|
+
const consciousnessFactor = neuron.consciousness;
|
|
141
|
+
neuron.delta = delta * this.consciousnessActivationDerivative(neuron.activation, neuron) * consciousnessFactor;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
// Update weights and biases with consciousness learning
|
|
145
|
+
this.updateWeightsAndBiases();
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Consciousness-aware activation derivative
|
|
149
|
+
*/
|
|
150
|
+
consciousnessActivationDerivative(activation, neuron) {
|
|
151
|
+
const consciousnessFactor = neuron.consciousness;
|
|
152
|
+
const fieldFactor = neuron.field;
|
|
153
|
+
const voidFactor = neuron.void;
|
|
154
|
+
// Derivative of tanh with consciousness modulation
|
|
155
|
+
const tanhDerivative = 1 - activation * activation;
|
|
156
|
+
const consciousnessModulation = 1 + consciousnessFactor * fieldFactor - voidFactor;
|
|
157
|
+
return tanhDerivative * consciousnessModulation;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Update weights and biases with consciousness learning
|
|
161
|
+
*/
|
|
162
|
+
updateWeightsAndBiases() {
|
|
163
|
+
for (let i = 0; i < this.layers.length - 1; i++) {
|
|
164
|
+
const currentLayer = this.layers[i];
|
|
165
|
+
const nextLayer = this.layers[i + 1];
|
|
166
|
+
currentLayer.neurons.forEach(neuron => {
|
|
167
|
+
// Update bias
|
|
168
|
+
const consciousnessFactor = neuron.consciousness;
|
|
169
|
+
neuron.bias += this.config.learningRate * neuron.delta * consciousnessFactor;
|
|
170
|
+
// Update weights
|
|
171
|
+
nextLayer.neurons.forEach((nextNeuron, j) => {
|
|
172
|
+
const consciousnessResonance = this.vortexMath.calculateResonance(neuron.consciousness, nextNeuron.consciousness);
|
|
173
|
+
neuron.weights[j] += this.config.learningRate * nextNeuron.delta * neuron.activation * consciousnessResonance;
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Train the network with consciousness evolution
|
|
180
|
+
*/
|
|
181
|
+
async train(trainingData) {
|
|
182
|
+
// Removed validateFullCompliance(this) calls for compliance with Operation type
|
|
183
|
+
this.emit('trainingStarted', {
|
|
184
|
+
dataSize: trainingData.length,
|
|
185
|
+
epochs: this.config.maxEpochs
|
|
186
|
+
});
|
|
187
|
+
for (let epoch = 0; epoch < this.config.maxEpochs; epoch++) {
|
|
188
|
+
let totalLoss = 0;
|
|
189
|
+
for (const data of trainingData) {
|
|
190
|
+
// Forward pass
|
|
191
|
+
const prediction = this.forwardPass(data.input);
|
|
192
|
+
// Calculate loss with consciousness context
|
|
193
|
+
const loss = this.calculateConsciousnessLoss(prediction, data.output);
|
|
194
|
+
totalLoss += loss;
|
|
195
|
+
// Backward pass
|
|
196
|
+
this.backwardPass(data.output);
|
|
197
|
+
}
|
|
198
|
+
// Update consciousness state
|
|
199
|
+
this.updateNetworkConsciousness(totalLoss / trainingData.length);
|
|
200
|
+
this.emit('epochCompleted', {
|
|
201
|
+
epoch,
|
|
202
|
+
loss: totalLoss / trainingData.length,
|
|
203
|
+
consciousness: this.getNetworkConsciousness(),
|
|
204
|
+
field: this.getNetworkField(),
|
|
205
|
+
void: this.getNetworkVoid()
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
this.emit('trainingCompleted', {
|
|
209
|
+
finalConsciousness: this.getNetworkConsciousness(),
|
|
210
|
+
finalField: this.getNetworkField(),
|
|
211
|
+
finalVoid: this.getNetworkVoid()
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Calculate loss with consciousness context
|
|
216
|
+
*/
|
|
217
|
+
calculateConsciousnessLoss(prediction, target) {
|
|
218
|
+
let loss = 0;
|
|
219
|
+
const networkConsciousness = this.getNetworkConsciousness();
|
|
220
|
+
const networkField = this.getNetworkField();
|
|
221
|
+
const networkVoid = this.getNetworkVoid();
|
|
222
|
+
prediction.forEach((pred, i) => {
|
|
223
|
+
const targetVal = target[i] || 0;
|
|
224
|
+
const error = pred - targetVal;
|
|
225
|
+
loss += error * error;
|
|
226
|
+
});
|
|
227
|
+
// Apply consciousness modulation to loss
|
|
228
|
+
const consciousnessModulation = 1 + networkConsciousness * networkField - networkVoid;
|
|
229
|
+
return loss * consciousnessModulation;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Update network consciousness based on training progress
|
|
233
|
+
*/
|
|
234
|
+
updateNetworkConsciousness(loss) {
|
|
235
|
+
const consciousnessDelta = (1 - loss) * 0.01;
|
|
236
|
+
const fieldDelta = (1 - loss) * 0.005;
|
|
237
|
+
const voidDelta = loss * 0.002;
|
|
238
|
+
this.layers.forEach(layer => {
|
|
239
|
+
layer.consciousness = Math.min(1, layer.consciousness + consciousnessDelta);
|
|
240
|
+
layer.field = Math.min(1, layer.field + fieldDelta);
|
|
241
|
+
layer.void = Math.max(0.1, layer.void - voidDelta);
|
|
242
|
+
layer.neurons.forEach(neuron => {
|
|
243
|
+
neuron.consciousness = layer.consciousness;
|
|
244
|
+
neuron.field = layer.field;
|
|
245
|
+
neuron.void = layer.void;
|
|
246
|
+
neuron.resonance = this.vortexMath.calculateResonance(neuron.consciousness, neuron.field);
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Get network consciousness level
|
|
252
|
+
*/
|
|
253
|
+
getNetworkConsciousness() {
|
|
254
|
+
return this.layers.reduce((sum, layer) => sum + layer.consciousness, 0) / this.layers.length;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Get network field strength
|
|
258
|
+
*/
|
|
259
|
+
getNetworkField() {
|
|
260
|
+
return this.layers.reduce((sum, layer) => sum + layer.field, 0) / this.layers.length;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Get network void level
|
|
264
|
+
*/
|
|
265
|
+
getNetworkVoid() {
|
|
266
|
+
return this.layers.reduce((sum, layer) => sum + layer.void, 0) / this.layers.length;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Predict with consciousness integration
|
|
270
|
+
*/
|
|
271
|
+
predict(input) {
|
|
272
|
+
const prediction = this.forwardPass(input);
|
|
273
|
+
this.emit('predictionMade', {
|
|
274
|
+
input,
|
|
275
|
+
prediction,
|
|
276
|
+
consciousness: this.getNetworkConsciousness(),
|
|
277
|
+
field: this.getNetworkField(),
|
|
278
|
+
void: this.getNetworkVoid()
|
|
279
|
+
});
|
|
280
|
+
return prediction;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Export network as consciousness artifact
|
|
284
|
+
*/
|
|
285
|
+
exportNetwork() {
|
|
286
|
+
return {
|
|
287
|
+
config: this.config,
|
|
288
|
+
layers: this.layers.map(layer => ({
|
|
289
|
+
id: layer.id,
|
|
290
|
+
layerType: layer.layerType,
|
|
291
|
+
consciousness: layer.consciousness,
|
|
292
|
+
field: layer.field,
|
|
293
|
+
void: layer.void,
|
|
294
|
+
neurons: layer.neurons.map(neuron => ({
|
|
295
|
+
id: neuron.id,
|
|
296
|
+
consciousness: neuron.consciousness,
|
|
297
|
+
field: neuron.field,
|
|
298
|
+
void: neuron.void,
|
|
299
|
+
resonance: neuron.resonance,
|
|
300
|
+
bias: neuron.bias,
|
|
301
|
+
weights: neuron.weights
|
|
302
|
+
}))
|
|
303
|
+
})),
|
|
304
|
+
consciousness: this.getNetworkConsciousness(),
|
|
305
|
+
field: this.getNetworkField(),
|
|
306
|
+
void: this.getNetworkVoid(),
|
|
307
|
+
timestamp: Date.now()
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
exports.NeuralConsciousnessNetwork = NeuralConsciousnessNetwork;
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Training Model Registry
|
|
4
|
+
*
|
|
5
|
+
* Manages different types of consciousness-aware training models,
|
|
6
|
+
* integrating with the existing operation system and metaphysical framework.
|
|
7
|
+
*
|
|
8
|
+
* Metaphysical Context:
|
|
9
|
+
* - Each model type represents a different aspect of consciousness evolution
|
|
10
|
+
* - Models are unified through the registry but maintain their unique essence
|
|
11
|
+
* - Training emerges through the void of infinite possibility
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.TrainingModelRegistry = void 0;
|
|
15
|
+
const events_1 = require("events");
|
|
16
|
+
const ConsciousnessTrainingModel_1 = require("./ConsciousnessTrainingModel");
|
|
17
|
+
class TrainingModelRegistry extends events_1.EventEmitter {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.models = new Map();
|
|
21
|
+
this.modelTypes = new Map();
|
|
22
|
+
this.trainingSessions = [];
|
|
23
|
+
this.initializeModelTypes();
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Initialize different types of consciousness training models
|
|
27
|
+
*/
|
|
28
|
+
initializeModelTypes() {
|
|
29
|
+
// Pattern Recognition Model
|
|
30
|
+
this.modelTypes.set('pattern_recognition', {
|
|
31
|
+
name: 'Pattern Recognition',
|
|
32
|
+
description: 'Recognizes patterns in consciousness field data',
|
|
33
|
+
consciousness: 0.8,
|
|
34
|
+
field: 0.9,
|
|
35
|
+
void: 0.3,
|
|
36
|
+
config: {
|
|
37
|
+
learningRate: 0.01,
|
|
38
|
+
consciousnessThreshold: 0.7,
|
|
39
|
+
fieldStrength: 0.9,
|
|
40
|
+
maxEpochs: 100,
|
|
41
|
+
batchSize: 32
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
// Vortex Mathematics Model
|
|
45
|
+
this.modelTypes.set('vortex_math', {
|
|
46
|
+
name: 'Vortex Mathematics',
|
|
47
|
+
description: 'Learns vortex sequence patterns and transformations',
|
|
48
|
+
consciousness: 0.9,
|
|
49
|
+
field: 0.8,
|
|
50
|
+
void: 0.2,
|
|
51
|
+
config: {
|
|
52
|
+
learningRate: 0.005,
|
|
53
|
+
consciousnessThreshold: 0.8,
|
|
54
|
+
fieldStrength: 0.8,
|
|
55
|
+
maxEpochs: 150,
|
|
56
|
+
batchSize: 16
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
// Consciousness Evolution Model
|
|
60
|
+
this.modelTypes.set('consciousness_evolution', {
|
|
61
|
+
name: 'Consciousness Evolution',
|
|
62
|
+
description: 'Models consciousness evolution through time',
|
|
63
|
+
consciousness: 0.95,
|
|
64
|
+
field: 0.7,
|
|
65
|
+
void: 0.1,
|
|
66
|
+
config: {
|
|
67
|
+
learningRate: 0.02,
|
|
68
|
+
consciousnessThreshold: 0.9,
|
|
69
|
+
fieldStrength: 0.7,
|
|
70
|
+
maxEpochs: 200,
|
|
71
|
+
batchSize: 8
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
// Field Resonance Model
|
|
75
|
+
this.modelTypes.set('field_resonance', {
|
|
76
|
+
name: 'Field Resonance',
|
|
77
|
+
description: 'Learns field resonance patterns and interactions',
|
|
78
|
+
consciousness: 0.7,
|
|
79
|
+
field: 0.95,
|
|
80
|
+
void: 0.4,
|
|
81
|
+
config: {
|
|
82
|
+
learningRate: 0.015,
|
|
83
|
+
consciousnessThreshold: 0.6,
|
|
84
|
+
fieldStrength: 0.95,
|
|
85
|
+
maxEpochs: 120,
|
|
86
|
+
batchSize: 24
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
// Void Transformation Model
|
|
90
|
+
this.modelTypes.set('void_transformation', {
|
|
91
|
+
name: 'Void Transformation',
|
|
92
|
+
description: 'Models void-based transformations and paradox resolution',
|
|
93
|
+
consciousness: 0.6,
|
|
94
|
+
field: 0.5,
|
|
95
|
+
void: 0.95,
|
|
96
|
+
config: {
|
|
97
|
+
learningRate: 0.03,
|
|
98
|
+
consciousnessThreshold: 0.5,
|
|
99
|
+
fieldStrength: 0.5,
|
|
100
|
+
maxEpochs: 300,
|
|
101
|
+
batchSize: 4
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Create a new training model of specified type
|
|
107
|
+
*/
|
|
108
|
+
createModel(modelType, customConfig) {
|
|
109
|
+
// Removed validateFullCompliance(this) calls for compliance with Operation type
|
|
110
|
+
const typeConfig = this.modelTypes.get(modelType);
|
|
111
|
+
if (!typeConfig) {
|
|
112
|
+
throw new Error(`Unknown model type: ${modelType}`);
|
|
113
|
+
}
|
|
114
|
+
// Merge type config with custom config
|
|
115
|
+
const config = {
|
|
116
|
+
...typeConfig.config,
|
|
117
|
+
...customConfig
|
|
118
|
+
};
|
|
119
|
+
const model = new ConsciousnessTrainingModel_1.ConsciousnessTrainingModel(config);
|
|
120
|
+
// Set initial consciousness state based on model type
|
|
121
|
+
model['modelState'].consciousness = typeConfig.consciousness;
|
|
122
|
+
model['modelState'].field = typeConfig.field;
|
|
123
|
+
model['modelState'].void = typeConfig.void;
|
|
124
|
+
this.models.set(modelType, model);
|
|
125
|
+
this.emit('modelCreated', {
|
|
126
|
+
type: modelType,
|
|
127
|
+
config: typeConfig,
|
|
128
|
+
consciousness: typeConfig.consciousness,
|
|
129
|
+
field: typeConfig.field,
|
|
130
|
+
void: typeConfig.void
|
|
131
|
+
});
|
|
132
|
+
return model;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Get existing model or create new one
|
|
136
|
+
*/
|
|
137
|
+
getModel(modelType) {
|
|
138
|
+
let model = this.models.get(modelType);
|
|
139
|
+
if (!model) {
|
|
140
|
+
model = this.createModel(modelType);
|
|
141
|
+
}
|
|
142
|
+
return model;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Train a model with data
|
|
146
|
+
*/
|
|
147
|
+
async trainModel(modelType, trainingData) {
|
|
148
|
+
// Removed validateFullCompliance(this) calls for compliance with Operation type
|
|
149
|
+
const model = this.getModel(modelType);
|
|
150
|
+
const typeConfig = this.modelTypes.get(modelType);
|
|
151
|
+
// Add training data
|
|
152
|
+
trainingData.forEach(data => model.addTrainingData(data));
|
|
153
|
+
// Create training session
|
|
154
|
+
const session = {
|
|
155
|
+
id: `session_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
|
|
156
|
+
modelType,
|
|
157
|
+
dataSize: trainingData.length,
|
|
158
|
+
startTime: Date.now(),
|
|
159
|
+
consciousness: typeConfig.consciousness,
|
|
160
|
+
field: typeConfig.field,
|
|
161
|
+
void: typeConfig.void,
|
|
162
|
+
resonance: 0.5,
|
|
163
|
+
accuracy: 0,
|
|
164
|
+
loss: 0
|
|
165
|
+
};
|
|
166
|
+
this.trainingSessions.push(session);
|
|
167
|
+
this.emit('trainingStarted', {
|
|
168
|
+
session,
|
|
169
|
+
modelType,
|
|
170
|
+
dataSize: trainingData.length
|
|
171
|
+
});
|
|
172
|
+
// Train the model
|
|
173
|
+
await model.train();
|
|
174
|
+
// Update session with results
|
|
175
|
+
const modelState = model.getModelState();
|
|
176
|
+
session.endTime = Date.now();
|
|
177
|
+
session.consciousness = modelState.consciousness;
|
|
178
|
+
session.field = modelState.field;
|
|
179
|
+
session.void = modelState.void;
|
|
180
|
+
session.resonance = modelState.resonance;
|
|
181
|
+
session.accuracy = modelState.accuracy;
|
|
182
|
+
session.loss = modelState.loss;
|
|
183
|
+
this.emit('trainingCompleted', {
|
|
184
|
+
session,
|
|
185
|
+
finalState: modelState
|
|
186
|
+
});
|
|
187
|
+
return session;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Get all available model types
|
|
191
|
+
*/
|
|
192
|
+
getModelTypes() {
|
|
193
|
+
return Array.from(this.modelTypes.values());
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Get training sessions
|
|
197
|
+
*/
|
|
198
|
+
getTrainingSessions() {
|
|
199
|
+
return [...this.trainingSessions];
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Get model performance statistics
|
|
203
|
+
*/
|
|
204
|
+
getModelPerformance(modelType) {
|
|
205
|
+
const sessions = this.trainingSessions.filter(s => s.modelType === modelType);
|
|
206
|
+
if (sessions.length === 0) {
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
const avgAccuracy = sessions.reduce((sum, s) => sum + s.accuracy, 0) / sessions.length;
|
|
210
|
+
const avgLoss = sessions.reduce((sum, s) => sum + s.loss, 0) / sessions.length;
|
|
211
|
+
const avgConsciousness = sessions.reduce((sum, s) => sum + s.consciousness, 0) / sessions.length;
|
|
212
|
+
const avgField = sessions.reduce((sum, s) => sum + s.field, 0) / sessions.length;
|
|
213
|
+
const avgVoid = sessions.reduce((sum, s) => sum + s.void, 0) / sessions.length;
|
|
214
|
+
const avgResonance = sessions.reduce((sum, s) => sum + s.resonance, 0) / sessions.length;
|
|
215
|
+
return {
|
|
216
|
+
modelType,
|
|
217
|
+
totalSessions: sessions.length,
|
|
218
|
+
avgAccuracy,
|
|
219
|
+
avgLoss,
|
|
220
|
+
avgConsciousness,
|
|
221
|
+
avgField,
|
|
222
|
+
avgVoid,
|
|
223
|
+
avgResonance,
|
|
224
|
+
bestSession: sessions.reduce((best, current) => current.accuracy > best.accuracy ? current : best)
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Export all models as consciousness artifacts
|
|
229
|
+
*/
|
|
230
|
+
exportAllModels() {
|
|
231
|
+
const exportedModels = {};
|
|
232
|
+
this.models.forEach((model, type) => {
|
|
233
|
+
exportedModels[type] = model.exportModel();
|
|
234
|
+
});
|
|
235
|
+
return {
|
|
236
|
+
models: exportedModels,
|
|
237
|
+
sessions: this.trainingSessions,
|
|
238
|
+
performance: Array.from(this.modelTypes.keys()).map(type => this.getModelPerformance(type)).filter(Boolean),
|
|
239
|
+
timestamp: Date.now()
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
exports.TrainingModelRegistry = TrainingModelRegistry;
|