[−][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 survive die out.
Variants
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
Only the best in each species are allowed to reproduce
Implementations
impl ParentalCriteria
[src]
implement picking parents
pub fn pick_parents<T, E>(
&self,
inbreed_rate: f32,
families: &[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: &[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 scores 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]
impl<'de> Deserialize<'de> for ParentalCriteria
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize 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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,
pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
[src]
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,