pub struct PopulationSnapshot {
pub generation: u32,
pub fitnesses: Vec<f32>,
pub diversity: Option<f32>,
pub best_index: u32,
pub best_genome_digest: Option<[u8; 16]>,
pub parents_of_best: Vec<[u8; 16]>,
}Expand description
Per-generation population snapshot delivered to a
PopulationObserver.
Fields mirror the on-disk PopulationSample schema; the harness
emits one of these after every successful
Strategy::tell call when an observer is
attached.
Field semantics:
fitnessesis the full per-individual fitness vector in natural (user-sense) space — the values are recorded before the harness canonicalises, so they read in the objective’s declaredObjectiveSense(aMinimizelandscape’s costs, aMaximizeobjective’s rewards).best_indexpoints at the best individual in that sense.diversityis currentlyNone— the harness has no strategy-agnostic geometry over the population tensor. A futureStrategy::diversityextension fills it in.best_genome_digestandparents_of_bestare emitted empty /Noneuntil per-strategy digest + parent-tracking lands (will feed a lineage DAG panel).
Fields§
§generation: u32§fitnesses: Vec<f32>§diversity: Option<f32>§best_index: u32§best_genome_digest: Option<[u8; 16]>§parents_of_best: Vec<[u8; 16]>Trait Implementations§
Source§impl Clone for PopulationSnapshot
impl Clone for PopulationSnapshot
Source§fn clone(&self) -> PopulationSnapshot
fn clone(&self) -> PopulationSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PopulationSnapshot
impl Debug for PopulationSnapshot
Source§impl PartialEq for PopulationSnapshot
impl PartialEq for PopulationSnapshot
impl StructuralPartialEq for PopulationSnapshot
Auto Trait Implementations§
impl Freeze for PopulationSnapshot
impl RefUnwindSafe for PopulationSnapshot
impl Send for PopulationSnapshot
impl Sync for PopulationSnapshot
impl Unpin for PopulationSnapshot
impl UnsafeUnpin for PopulationSnapshot
impl UnwindSafe for PopulationSnapshot
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