pub struct EsConfig {
pub kind: EsKind,
pub genome_dim: usize,
pub bounds: Bounds,
pub initial_sigma: f32,
pub sigma_min: f32,
pub sigma_max: f32,
pub tau: f32,
}Expand description
Static configuration for an EvolutionStrategy run.
Fields§
§kind: EsKindVariant to run.
genome_dim: usizeGenome dimensionality.
bounds: BoundsSearch-space bounds; used for initialization and clamping.
initial_sigma: f32Initial σ (log-normal self-adaptation modifies it in state).
sigma_min: f32Lower clamp for the self-adaptive σ.
Both the log-normal update σ' = σ · exp(τ · N(0,1)) (multi-parent
variants) and the Rechenberg 1/5-rule ((1+1)) are unbounded
multiplicative processes; without a floor σ can underflow toward 0,
collapsing the mutation amplitude so the search freezes. Must be
strictly positive and < sigma_max. Default DEFAULT_SIGMA_MIN.
sigma_max: f32Upper clamp for the self-adaptive σ.
Without a ceiling σ can overflow toward +∞ (genes then saturate to a
bound with no error). Default DEFAULT_SIGMA_MAX — far outside any
practical step scale on the [-5.12, 5.12] benchmark domain, so it
never binds in normal operation and only catches a runaway process.
tau: f32Learning-rate scale for log-normal σ update. Standard default is
1.0 / sqrt(2 * sqrt(D)).
Implementations§
Source§impl EsConfig
impl EsConfig
Sourcepub fn default_for(kind: EsKind, genome_dim: usize) -> Self
pub fn default_for(kind: EsKind, genome_dim: usize) -> Self
Default configuration for a given ES variant and dimensionality.
Sets bounds = (-5.12, 5.12) (the standard Rastrigin/sphere domain),
initial_sigma = 1.0, and τ via the standard formula
1 / sqrt(2 · sqrt(D)) (Beyer & Schwefel 2002, eq. 12).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EsConfig
impl RefUnwindSafe for EsConfig
impl Send for EsConfig
impl Sync for EsConfig
impl Unpin for EsConfig
impl UnsafeUnpin for EsConfig
impl UnwindSafe for EsConfig
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
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