pub struct CoEAState<StA, StB> {
pub state_a: StA,
pub state_b: StB,
pub generation: u64,
pub best_a: f32,
pub best_b: f32,
pub mean_a: f32,
pub mean_b: f32,
}Expand description
Joined state carrying both sub-strategy states plus per-population best/mean trackers.
Generic over the two inner strategy state types (StA, StB) rather
than the strategies themselves, so it derives Clone/Debug without
spurious bounds on the strategy types. Used by CompetitiveCoEA;
CooperativeCoEA wraps it in CooperativeState to add
representative archives.
Fields§
§state_a: StAInner state of population A’s strategy.
state_b: StBInner state of population B’s strategy.
generation: u64Number of completed simultaneous-update generations.
best_a: f32Best (highest, canonical maximise) fitness population A has seen across all generations.
best_b: f32Best (highest, canonical maximise) fitness population B has seen across all generations.
mean_a: f32Mean fitness of population A in the most recent generation.
mean_b: f32Mean fitness of population B in the most recent generation.
Trait Implementations§
Auto Trait Implementations§
impl<StA, StB> Freeze for CoEAState<StA, StB>
impl<StA, StB> RefUnwindSafe for CoEAState<StA, StB>where
StA: RefUnwindSafe,
StB: RefUnwindSafe,
impl<StA, StB> Send for CoEAState<StA, StB>
impl<StA, StB> Sync for CoEAState<StA, StB>
impl<StA, StB> Unpin for CoEAState<StA, StB>
impl<StA, StB> UnsafeUnpin for CoEAState<StA, StB>where
StA: UnsafeUnpin,
StB: UnsafeUnpin,
impl<StA, StB> UnwindSafe for CoEAState<StA, StB>where
StA: UnwindSafe,
StB: 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
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