pub enum WritebackPolicy {
Lamarckian,
Baldwinian,
Partial(Probability),
}Expand description
Controls how a refined genome’s gains are written back into the population.
See the module docs for the semantics of each policy. The default,
Partial(0.5), is a deliberate middle ground:
half of refined individuals inherit their refined genome, the other half keep
their original genome but pay the refined fitness — a blend that avoids both
Lamarckian premature convergence and the slow Baldwin effect.
Variants§
Lamarckian
Refined genome and refined fitness flow to the inner tell.
Baldwinian
Original genome flows to the inner tell, carrying the refined fitness.
Partial(Probability)
Per refined individual: write the refined genome back (Lamarckian) with
probability p, otherwise keep the original genome (Baldwinian). The
refined fitness is used either way.
p is a Probability, valid by construction ([0, 1], NaN/Inf
rejected), so the writeback draw rng < p can never silently degenerate.
Because Partial writeback draws from a dedicated mask RNG stream that
is independent of the refinement stream, Partial(Probability::new(1.0))
is bit-identical to Lamarckian and
Partial(Probability::new(0.0)) is bit-identical to
Baldwinian on the same seed.
Trait Implementations§
Source§impl Clone for WritebackPolicy
impl Clone for WritebackPolicy
Source§fn clone(&self) -> WritebackPolicy
fn clone(&self) -> WritebackPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for WritebackPolicy
Source§impl Debug for WritebackPolicy
impl Debug for WritebackPolicy
Source§impl Default for WritebackPolicy
impl Default for WritebackPolicy
Source§impl PartialEq for WritebackPolicy
impl PartialEq for WritebackPolicy
impl StructuralPartialEq for WritebackPolicy
Auto Trait Implementations§
impl Freeze for WritebackPolicy
impl RefUnwindSafe for WritebackPolicy
impl Send for WritebackPolicy
impl Sync for WritebackPolicy
impl Unpin for WritebackPolicy
impl UnsafeUnpin for WritebackPolicy
impl UnwindSafe for WritebackPolicy
Blanket Implementations§
impl<T> Boilerplate for T
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
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>
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>
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