1pub mod strange_loops;
27pub mod dreams;
28pub mod free_energy;
29pub mod morphogenesis;
30pub mod collective;
31pub mod temporal_qualia;
32pub mod multiple_selves;
33pub mod thermodynamics;
34pub mod emergence;
35pub mod black_holes;
36
37pub use strange_loops::{StrangeLoop, SelfReference, TangledHierarchy};
39pub use dreams::{DreamEngine, DreamState, DreamReport};
40pub use free_energy::{FreeEnergyMinimizer, PredictiveModel, ActiveInference};
41pub use morphogenesis::{MorphogeneticField, TuringPattern, CognitiveEmbryogenesis};
42pub use collective::{CollectiveConsciousness, HiveMind, DistributedPhi};
43pub use temporal_qualia::{TemporalQualia, SubjectiveTime, TimeCrystal};
44pub use multiple_selves::{MultipleSelvesSystem, SubPersonality, SelfCoherence};
45pub use thermodynamics::{CognitiveThermodynamics, ThoughtEntropy, MaxwellDemon};
46pub use emergence::{EmergenceDetector, CausalEmergence, PhaseTransition};
47pub use black_holes::{CognitiveBlackHole, AttractorState, EscapeDynamics};
48
49pub struct ExoticExperiments {
51 pub strange_loops: StrangeLoop,
52 pub dreams: DreamEngine,
53 pub free_energy: FreeEnergyMinimizer,
54 pub morphogenesis: MorphogeneticField,
55 pub collective: CollectiveConsciousness,
56 pub temporal: TemporalQualia,
57 pub selves: MultipleSelvesSystem,
58 pub thermodynamics: CognitiveThermodynamics,
59 pub emergence: EmergenceDetector,
60 pub black_holes: CognitiveBlackHole,
61}
62
63impl ExoticExperiments {
64 pub fn new() -> Self {
66 Self {
67 strange_loops: StrangeLoop::new(5),
68 dreams: DreamEngine::new(),
69 free_energy: FreeEnergyMinimizer::new(0.1),
70 morphogenesis: MorphogeneticField::new(32, 32),
71 collective: CollectiveConsciousness::new(),
72 temporal: TemporalQualia::new(),
73 selves: MultipleSelvesSystem::new(),
74 thermodynamics: CognitiveThermodynamics::new(300.0), emergence: EmergenceDetector::new(),
76 black_holes: CognitiveBlackHole::new(),
77 }
78 }
79
80 pub fn run_all(&mut self) -> ExperimentResults {
82 ExperimentResults {
83 strange_loop_depth: self.strange_loops.measure_depth(),
84 dream_creativity: self.dreams.measure_creativity(),
85 free_energy: self.free_energy.compute_free_energy(),
86 morphogenetic_complexity: self.morphogenesis.measure_complexity(),
87 collective_phi: self.collective.compute_global_phi(),
88 temporal_dilation: self.temporal.measure_dilation(),
89 self_coherence: self.selves.measure_coherence(),
90 cognitive_temperature: self.thermodynamics.measure_temperature(),
91 emergence_score: self.emergence.detect_emergence(),
92 attractor_strength: self.black_holes.measure_attraction(),
93 }
94 }
95}
96
97impl Default for ExoticExperiments {
98 fn default() -> Self {
99 Self::new()
100 }
101}
102
103#[derive(Debug, Clone)]
105pub struct ExperimentResults {
106 pub strange_loop_depth: usize,
107 pub dream_creativity: f64,
108 pub free_energy: f64,
109 pub morphogenetic_complexity: f64,
110 pub collective_phi: f64,
111 pub temporal_dilation: f64,
112 pub self_coherence: f64,
113 pub cognitive_temperature: f64,
114 pub emergence_score: f64,
115 pub attractor_strength: f64,
116}
117
118impl ExperimentResults {
119 pub fn overall_score(&self) -> f64 {
121 let scores = [
122 (self.strange_loop_depth as f64 / 10.0).min(1.0),
123 self.dream_creativity,
124 1.0 - self.free_energy.min(1.0), self.morphogenetic_complexity,
126 self.collective_phi,
127 self.temporal_dilation.abs().min(1.0),
128 self.self_coherence,
129 1.0 / (1.0 + self.cognitive_temperature / 1000.0), self.emergence_score,
131 1.0 - self.attractor_strength.min(1.0), ];
133 scores.iter().sum::<f64>() / scores.len() as f64
134 }
135}
136
137#[cfg(test)]
138mod tests {
139 use super::*;
140
141 #[test]
142 fn test_experiment_suite_creation() {
143 let experiments = ExoticExperiments::new();
144 assert!(experiments.strange_loops.measure_depth() >= 0);
145 }
146
147 #[test]
148 fn test_run_all_experiments() {
149 let mut experiments = ExoticExperiments::new();
150 let results = experiments.run_all();
151 assert!(results.overall_score() >= 0.0);
152 assert!(results.overall_score() <= 1.0);
153 }
154}