Module metaheuristics::hill_climbing [] [src]

Find an approximate solution to your optimisation problem using Hill Climbing

One of the simplest metaheuristics algorithms to understand is Hill Climbing. Just like climbing a hill in real life, the aim is to get to the top. Here, we only walk forward if the next step we take is higher than our current position on the hill. In other words, at each iteration, we only accept a candidate solution as our best so far, if it ranks higher than our current best solution.

Note: As Hill Climbing restricts our movement to only ever going up, we guarantee that we will sometimes get stuck at a local maximum.

For more info on Hill Climbing, please see the Hill Climbing Wikipedia article.

Examples

let solution = metaheuristics::hill_climbing::solve(&mut problem, runtime);

Modules

random_restarts

Find an approximate solution to your optimisation problem using Hill Climbing with random restarts

Functions

solve

Returns an approximate solution to your optimisation problem using Hill Climbing