pub fn hill_climbing<S, N, O>(
initial: S,
neighbors: N,
objective: O,
max_iter: usize,
) -> (S, f64)Expand description
Generic hill-climbing: from initial, repeatedly move to the best improving
neighbour until none improves (a local minimum) or max_iter is reached.
neighbors enumerates candidate moves; objective is minimized.