diff --git a/src/systems/cell.rs b/src/systems/cell.rs index 78a85c8..0dd230e 100644 --- a/src/systems/cell.rs +++ b/src/systems/cell.rs @@ -48,12 +48,12 @@ impl Cell { neighbors: Vec::new(), energy: 100.0, dimensional_position: DimensionalPosition { - emergence: 50, - coherence: 50, - resilience: 50, - intelligence: 50, - efficiency: 50, - integration: 50, + emergence: 50.0, + coherence: 50.0, + resilience: 50.0, + intelligence: 50.0, + efficiency: 50.0, + integration: 50.0, }, dopamine: 0.5, enhanced_state: EnhancedCellState::new(), @@ -530,10 +530,10 @@ impl Cell { let efficiency_adj = (dimension_adjustment * 10.0) as i32; // Apply adjustments and clamp to 0-100 range - self.dimensional_position.emergence = (self.dimensional_position.emergence + emergence_adj).clamp(0, 100); - self.dimensional_position.coherence = (self.dimensional_position.coherence + coherence_adj).clamp(0, 100); - self.dimensional_position.intelligence = (self.dimensional_position.intelligence + intelligence_adj).clamp(0, 100); - self.dimensional_position.efficiency = (self.dimensional_position.efficiency + efficiency_adj).clamp(0, 100); + self.dimensional_position.emergence = (self.dimensional_position.emergence + emergence_adj as f64).clamp(0.0, 100.0); + self.dimensional_position.coherence = (self.dimensional_position.coherence + coherence_adj as f64).clamp(0.0, 100.0); + self.dimensional_position.intelligence = (self.dimensional_position.intelligence + intelligence_adj as f64).clamp(0.0, 100.0); + self.dimensional_position.efficiency = (self.dimensional_position.efficiency + efficiency_adj as f64).clamp(0.0, 100.0); // Adjust dopamine based on context alignment self.dopamine = self.dopamine * 0.9 + self.context_alignment_score * 0.1; diff --git a/src/systems/colony.rs b/src/systems/colony.rs index c8f30ed..d6a7ebf 100644 --- a/src/systems/colony.rs +++ b/src/systems/colony.rs @@ -1100,13 +1100,12 @@ impl Colony { let integration_adj = (adjustment_factor * 9.0) as i32; // Apply adjustments and clamp to 0-100 range - cell.dimensional_position.emergence = (cell.dimensional_position.emergence + emergence_adj).clamp(0, 100); - cell.dimensional_position.coherence = (cell.dimensional_position.coherence + coherence_adj).clamp(0, 100); - cell.dimensional_position.resilience = (cell.dimensional_position.resilience + resilience_adj).clamp(0, 100); - cell.dimensional_position.intelligence = (cell.dimensional_position.intelligence + intelligence_adj).clamp(0, 100); - cell.dimensional_position.efficiency = (cell.dimensional_position.efficiency + efficiency_adj).clamp(0, 100); - cell.dimensional_position.integration = (cell.dimensional_position.integration + integration_adj).clamp(0, 100); - + cell.dimensional_position.coherence = (cell.dimensional_position.coherence + coherence_adj as f64).clamp(0.0, 100.0); + cell.dimensional_position.resilience = (cell.dimensional_position.resilience + resilience_adj as f64).clamp(0.0, 100.0); + cell.dimensional_position.intelligence = (cell.dimensional_position.intelligence + intelligence_adj as f64).clamp(0.0, 100.0); + cell.dimensional_position.efficiency = (cell.dimensional_position.efficiency + efficiency_adj as f64).clamp(0.0, 100.0); + cell.dimensional_position.integration = (cell.dimensional_position.integration + integration_adj as f64).clamp(0.0, 100.0); + println!("Cell {} dimensional audit:", cell_id); println!(" Plan execution rate: {:.1}%", execution_rate * 100.0); println!(" Emergence: {:.1}", cell.dimensional_position.emergence);