macop.operators.policies.Policy

Abstract class which is used for applying strategy when selecting and applying operator

Classes

Policy(operators)

Abstract class which is used for applying strategy when selecting and applying operator

class macop.operators.policies.Policy.Policy(operators)[source]

Abstract class which is used for applying strategy when selecting and applying operator

operators

{[Operator]} – list of selected operators for the algorithm

apply(solution)[source]

Apply specific operator chosen to create new solution, computes its fitness and returns solution

Parameters

_solution – {Solution} – the solution to use for generating new solution

Returns

{Solution} – new generated solution

abstract select()[source]

Select specific operator

Returns

{Operator} – selected operator

setAlgo(algo)[source]
Keep into policy reference of the whole algorithm

The reason is to better manage the operator choices (use of rewards as example)

Parameters

algo – {Algorithm} – the algorithm reference runned