Module metaheuristics::hill_climbing::random_restarts [−][src]
Expand description
Find an approximate solution to your optimisation problem using Hill Climbing with random restarts
Here we duplicate the functionality of the metaheuristics::hill_climbing
module but with
slight modification - we introduce a probability of restarting the algorithm (whilst
remembering the best candidate solution seen so far).
The advantage here over vanilla Hill Climbing is that this guarantees we’ll never get stuck at a local maximum. In fact, given enough time, Hill Climbing with random restarts will find the globally optimal solution.
Examples
ⓘ
let solution = metaheuristics::hill_climbing::random_restarts::solve(
&mut problem,
runtime,
probability
);
Functions
Returns an approximate solution to your optimisation problem using Hill Climbing with random restarts