pub struct EsState<B: Backend> {
pub parents: Tensor<B, 2>,
pub sigmas: Tensor<B, 1>,
pub parent_fitness: Vec<f32>,
pub best_genome: Option<Tensor<B, 2>>,
pub best_fitness: f32,
pub generation: usize,
pub successes_in_window: u32,
pub window_len: u32,
}Expand description
Generation state for EvolutionStrategy.
Fields§
§parents: Tensor<B, 2>Parent population. (μ, D) for μ-parent variants; (1, D) for
(1+1) and (1+λ).
sigmas: Tensor<B, 1>Per-parent σ values.
Shape between generations is (μ,) for log-normal adaptation and
(1,) for (1+1)/(1+λ) with shared σ. Between an ask and the
matching tell the tensor is temporarily (μ + λ,): parent σ
followed by per-offspring σ. See ask for the rationale.
parent_fitness: Vec<f32>Parent fitnesses.
best_genome: Option<Tensor<B, 2>>Best-so-far genome, shape (1, D).
best_fitness: f32Best-so-far fitness.
generation: usizeCompleted-generation counter.
successes_in_window: u32(1+1) only: running success-rate counter for the 1/5th rule.
window_len: u32(1+1) only: window length observed so far.
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for EsState<B>where
<B as BackendTypes>::FloatTensorPrimitive: Freeze,
<B as BackendTypes>::QuantizedTensorPrimitive: Freeze,
impl<B> RefUnwindSafe for EsState<B>where
<B as BackendTypes>::FloatTensorPrimitive: RefUnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B> Send for EsState<B>
impl<B> Sync for EsState<B>
impl<B> Unpin for EsState<B>where
<B as BackendTypes>::FloatTensorPrimitive: Unpin,
<B as BackendTypes>::QuantizedTensorPrimitive: Unpin,
impl<B> UnsafeUnpin for EsState<B>where
<B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B> UnwindSafe for EsState<B>where
<B as BackendTypes>::FloatTensorPrimitive: UnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: UnwindSafe,
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