pub trait LocalSearchForager<S, M>: Send + Debugwhere
S: PlanningSolution,
M: Move<S>,{
// Required methods
fn step_started(&mut self, best_score: S::Score, last_step_score: S::Score);
fn add_move_index(&mut self, index: usize, score: S::Score);
fn is_quit_early(&self) -> bool;
fn pick_move_index(&mut self) -> Option<(usize, S::Score)>;
}Expand description
Trait for collecting and selecting moves in local search.
Foragers are responsible for:
- Collecting accepted move indices during move evaluation
- Deciding when to quit evaluating early
- Selecting the best move index to apply
§Type Parameters
S- The planning solution typeM- The move type (for trait bounds only, moves are never stored)