pub struct EvolutionEngine {
pub current_cycle: u64,
pub selection_pressure: f64,
pub mutation_rate: f64,
pub evolution_history: Vec<EvolutionEvent>,
pub fitness_stats: FitnessStats,
pub parameters: EvolutionParameters,
}
Expand description
Evolution engine for managing organism evolution
Fieldsยง
ยงcurrent_cycle: u64
Current evolution cycle
selection_pressure: f64
Selection pressure (0.0-1.0)
mutation_rate: f64
Mutation rate (0.0-1.0)
evolution_history: Vec<EvolutionEvent>
Evolution history
fitness_stats: FitnessStats
Fitness statistics
parameters: EvolutionParameters
Evolution parameters
Implementationsยง
Sourceยงimpl EvolutionEngine
impl EvolutionEngine
Sourcepub fn new() -> Result<Self, EvolutionError>
pub fn new() -> Result<Self, EvolutionError>
Create new evolution engine
Sourcepub fn evolve_organism(
&mut self,
organism: &mut TRON,
) -> Result<EvolutionEvent, EvolutionError>
pub fn evolve_organism( &mut self, organism: &mut TRON, ) -> Result<EvolutionEvent, EvolutionError>
Evolve a single organism
Sourcepub fn apply_selection_pressure(
&mut self,
organisms: &mut Vec<TRON>,
) -> Result<Vec<String>, EvolutionError>
pub fn apply_selection_pressure( &mut self, organisms: &mut Vec<TRON>, ) -> Result<Vec<String>, EvolutionError>
Apply selection pressure to population
Sourcepub fn get_stats(&self) -> EvolutionStats
pub fn get_stats(&self) -> EvolutionStats
Get evolution statistics
Sourcepub fn advance_cycle(&mut self)
pub fn advance_cycle(&mut self)
Advance evolution cycle
Trait Implementationsยง
Sourceยงimpl Clone for EvolutionEngine
impl Clone for EvolutionEngine
Sourceยงfn clone(&self) -> EvolutionEngine
fn clone(&self) -> EvolutionEngine
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementationsยง
impl Freeze for EvolutionEngine
impl RefUnwindSafe for EvolutionEngine
impl Send for EvolutionEngine
impl Sync for EvolutionEngine
impl Unpin for EvolutionEngine
impl UnwindSafe for EvolutionEngine
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more