pub enum CoveragePolicy {
Full,
TopK {
k: usize,
},
}Expand description
Determines which population members are refined each generation.
§Cost and tuning
Coverage is the dominant cost knob: each refined row spends up to
Params::max_iters fitness evaluations, so Full costs
pop_size× a TopK { k: 1 } generation. When the budget that
matters is
evaluations to reach a target (not wall-clock or final-gen fitness), wide
coverage with a heavy searcher can lose to bare evolution: it spends its
eval budget polishing individuals that selection would have discarded
anyway. Tune against evals-to-target, not against a fixed generation
count — a fixed-gens comparison hides the refinement evals and flatters wide
coverage. The default, TopK { k: 1 }, refines only the
single best individual and is the cheapest sane starting point.
One caveat cuts the other way: on a separable landscape with basin-width
search steps, axis-aligned hill climbing is nearly a direct solver, so wide
coverage with an untuned high-max_iters searcher can dominate. That is a
landscape artifact, not a config to copy — re-tune per problem.
The wrapper avoids the seeding-eval waste that an unaware caller would pay:
it hands each searcher the fitness the harness already computed via
LocalSearch::refine_with_known_fitness, so a refined row spends its evals
on probes rather than re-scoring its own input (ADR 0016 reversal criteria).
Variants§
Full
Refine every individual.
TopK
Refine only the k fittest (largest-fitness, canonical maximise)
individuals, ties broken by lower index. k is clamped to the
population size.
Trait Implementations§
Source§impl Clone for CoveragePolicy
impl Clone for CoveragePolicy
Source§fn clone(&self) -> CoveragePolicy
fn clone(&self) -> CoveragePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CoveragePolicy
Source§impl Debug for CoveragePolicy
impl Debug for CoveragePolicy
Source§impl Default for CoveragePolicy
impl Default for CoveragePolicy
impl Eq for CoveragePolicy
Source§impl PartialEq for CoveragePolicy
impl PartialEq for CoveragePolicy
impl StructuralPartialEq for CoveragePolicy
Auto Trait Implementations§
impl Freeze for CoveragePolicy
impl RefUnwindSafe for CoveragePolicy
impl Send for CoveragePolicy
impl Sync for CoveragePolicy
impl Unpin for CoveragePolicy
impl UnsafeUnpin for CoveragePolicy
impl UnwindSafe for CoveragePolicy
Blanket Implementations§
impl<T> Boilerplate for T
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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