pub trait ConstructionForager<S, M>: Send + Debugwhere
S: PlanningSolution,
M: Move<S>,{
// Required method
fn pick_move(
&self,
placement: &Placement<S, M>,
score_director: &mut dyn ScoreDirector<S>,
) -> Option<M>;
}Expand description
Trait for selecting a move during construction.
Foragers evaluate candidate moves and pick one based on their strategy.
§Type Parameters
S- The planning solution typeM- The move type
Required Methods§
Sourcefn pick_move(
&self,
placement: &Placement<S, M>,
score_director: &mut dyn ScoreDirector<S>,
) -> Option<M>
fn pick_move( &self, placement: &Placement<S, M>, score_director: &mut dyn ScoreDirector<S>, ) -> Option<M>
Picks a move from the placement’s candidates.
Returns None if no suitable move is found.