pub struct NeatState {
pub population: Vec<TopologyGenome>,
pub fitness: Vec<f32>,
pub species: Vec<Species>,
pub registry: Arc<InnovationRegistry>,
pub generation: u64,
pub next_species_id: SpeciesId,
pub best: Option<TopologyGenome>,
pub best_fitness: f32,
}Expand description
Generation-to-generation NEAT state.
#[derive(Clone)] is cheap and correct: all fields are host-side data, and
the registry field clones the shared Arc handle (the per-run registry
itself is not duplicated).
Fields§
§population: Vec<TopologyGenome>Current resident population.
fitness: Vec<f32>Resident fitness (maximization); empty until the first tell.
species: Vec<Species>Current species partition over population.
registry: Arc<InnovationRegistry>Per-run innovation registry, shared across the harness.
generation: u64Completed-generation counter (number of tell calls).
next_species_id: SpeciesIdNext species id to allocate.
best: Option<TopologyGenome>Best genome seen across all generations, if any.
best_fitness: f32Best fitness seen across all generations (−∞ before the first tell).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NeatState
impl !UnwindSafe for NeatState
impl Freeze for NeatState
impl Send for NeatState
impl Sync for NeatState
impl Unpin for NeatState
impl UnsafeUnpin for NeatState
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
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more