pub struct ConvergenceDetector {
pub plateau_threshold: usize,
pub fitness_tolerance: f64,
pub species_stability_threshold: usize,
pub fitness_history: Vec<f64>,
}Expand description
Detects convergence based on fitness plateau and species stability.
Fields§
§plateau_threshold: usizeHow many generations of flat fitness before declaring convergence.
fitness_tolerance: f64Minimum relative change in avg fitness to count as “improving”.
species_stability_threshold: usizeHow many generations of stable species before declaring convergence.
fitness_history: Vec<f64>History of average fitness per generation.
Implementations§
Source§impl ConvergenceDetector
impl ConvergenceDetector
pub fn new(plateau_threshold: usize, fitness_tolerance: f64) -> Self
Sourcepub fn default_detector() -> Self
pub fn default_detector() -> Self
Default detector: 15 generations, 0.001 tolerance.
Sourcepub fn check(&self, species: &SpeciesTracker) -> ConvergenceStatus
pub fn check(&self, species: &SpeciesTracker) -> ConvergenceStatus
Check convergence based on fitness history and species tracker.
Trait Implementations§
Source§impl Clone for ConvergenceDetector
impl Clone for ConvergenceDetector
Auto Trait Implementations§
impl Freeze for ConvergenceDetector
impl RefUnwindSafe for ConvergenceDetector
impl Send for ConvergenceDetector
impl Sync for ConvergenceDetector
impl Unpin for ConvergenceDetector
impl UnsafeUnpin for ConvergenceDetector
impl UnwindSafe for ConvergenceDetector
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