pub enum RepresentativePolicy {
Best,
Random,
Archive {
capacity: usize,
},
}Expand description
Which member of the opposing population completes a partial candidate during fitness evaluation.
These map onto the standard CCGA coupling strategies: Best is the
canonical single representative; Random is sampled coupling with a
fresh draw per generation; Archive keeps a bounded ring of past
champions and cycles through it.
Variants§
Best
Always pair against the best individual seen so far (previous generation’s best). Canonical CCGA.
Random
Pair against a uniformly random member of the opposing population, re-drawn each generation.
Archive
Maintain a bounded archive of past champions and cycle through it.
Trait Implementations§
Source§impl Clone for RepresentativePolicy
impl Clone for RepresentativePolicy
Source§fn clone(&self) -> RepresentativePolicy
fn clone(&self) -> RepresentativePolicy
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 moreimpl Copy for RepresentativePolicy
Source§impl Debug for RepresentativePolicy
impl Debug for RepresentativePolicy
Source§impl Default for RepresentativePolicy
impl Default for RepresentativePolicy
Source§fn default() -> RepresentativePolicy
fn default() -> RepresentativePolicy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RepresentativePolicy
impl RefUnwindSafe for RepresentativePolicy
impl Send for RepresentativePolicy
impl Sync for RepresentativePolicy
impl Unpin for RepresentativePolicy
impl UnsafeUnpin for RepresentativePolicy
impl UnwindSafe for RepresentativePolicy
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