[−][src]Enum radiate::engine::survival::ParentalCriteria
Implement a way to pick parents of children, in other words how is the rest of the population generation after those who don't survice die out.
BiasedRandom - the default option, statistically pick more fit parents however allow for less fit parents to be picked as well. This is kinda like putting the members in a species on a curve and randomly picking from that distribution OnlySurvivers - those who survive are only allowed to reproduce BestInEachSpecies - only the best in each species are allowed to reproduce MostDifferent - Pick one parent, then find the parent most different from it (structurally) and use that as the other parent. Note this could lead to large expansion in population
Variants
Methods
impl ParentalCriteria
[src]
implement the pick parents
pub fn pick_parents<T, E>(
&self,
inbreed_rate: f32,
families: &Vec<Family<T, E>>
) -> Option<((f32, Member<T>), (f32, Member<T>))> where
T: Genome<T, E> + Send + Sync + Clone,
E: Send + Sync,
[src]
&self,
inbreed_rate: f32,
families: &Vec<Family<T, E>>
) -> Option<((f32, Member<T>), (f32, Member<T>))> where
T: Genome<T, E> + Send + Sync + Clone,
E: Send + Sync,
Find two parents to crossover and produce a child
pub fn get_biased_random_member<T, E>(
&self,
r: &mut ThreadRng,
family: &Family<T, E>
) -> (f32, Member<T>) where
T: Genome<T, E> + Send + Sync + Clone,
E: Send + Sync,
[src]
&self,
r: &mut ThreadRng,
family: &Family<T, E>
) -> (f32, Member<T>) where
T: Genome<T, E> + Send + Sync + Clone,
E: Send + Sync,
Get a biased random member from the species. By summing the fitness scores of the members, members with larger fitness scorese are statistically more likely to be picked
Trait Implementations
impl Clone for ParentalCriteria
[src]
fn clone(&self) -> ParentalCriteria
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ParentalCriteria
[src]
Auto Trait Implementations
impl RefUnwindSafe for ParentalCriteria
impl Send for ParentalCriteria
impl Sync for ParentalCriteria
impl Unpin for ParentalCriteria
impl UnwindSafe for ParentalCriteria
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Type for T
[src]
const METATYPE: MetaType
[src]
type Meta = Concrete
Type of metadata for type.
fn meta(self: *const T) -> <T as Type>::Meta
[src]
fn data(self: *const T) -> *const ()
[src]
fn data_mut(self: *mut T) -> *mut ()
[src]
fn dangling(_t: <T as Type>::Meta) -> NonNull<T>
[src]
fn fatten(thin: *mut (), _t: <T as Type>::Meta) -> *mut T
[src]
fn meta_type(self: *const Self) -> MetaType
[src]
impl<T> Type for T where
T: ?Sized,
[src]
T: ?Sized,
default fn meta(self: *const T) -> <T as Type>::Meta
[src]
default fn data(self: *const T) -> *const ()
[src]
default fn data_mut(self: *mut T) -> *mut ()
[src]
default fn dangling(t: <T as Type>::Meta) -> NonNull<T>
[src]
default fn fatten(thin: *mut (), t: <T as Type>::Meta) -> *mut T
[src]
const METATYPE: MetaType
[src]
type Meta: 'static
fn meta_type(self: *const Self) -> MetaType
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,