macop.algorithms.mono.HillClimberBestImprovment

Hill Climber Best Improvment algorithm starting from new solution and explore using neighborhood and loop over the best one obtained from neighborhood search space

Classes

HillClimberBestImprovment(initalizer, …[, …])

Hill Climber Best Improvment used as exploitation optimisation algorithm

class macop.algorithms.mono.HillClimberBestImprovment.HillClimberBestImprovment(initalizer, evaluator, operators, policy, validator, maximise=True, parent=None)[source]

Hill Climber Best Improvment used as exploitation optimisation algorithm

This algorithm do a neighborhood exploration of a new generated solution (by doing operation on the current solution obtained) in order to find the best solution from the neighborhood space. Then replace the best solution found from the neighbordhood space as current solution to use. Do these steps until a number of evaluation (stopping criterion) is reached.

initalizer

{function} – basic function strategy to initialize solution

evaluator

{function} – basic function in order to obtained fitness (mono or multiple objectives)

operators

{[Operator]} – list of operator to use when launching algorithm

policy

{Policy} – Policy class implementation strategy to select operators

validator

{function} – basic function to check if solution is valid or not under some constraints

maximise

{bool} – specify kind of optimisation problem

currentSolution

{Solution} – current solution managed for current evaluation

bestSolution

{Solution} – best solution found so far during running algorithm

callbacks

{[Callback]} – list of Callback class implementation to do some instructions every number of evaluations and load when initializing algorithm

run(evaluations)[source]

Run the local search algorithm

Parameters

evaluations – {int} – number of Local search evaluations

Returns

{Solution} – best solution found