macop.operators.policies.UCBPolicy

Policy class implementation which is used for selecting operator using Upper Confidence Bound

Classes

UCBPolicy(_operators[, _C])

UCB policy class which is used for applying UCB strategy when selecting and applying operator

class macop.operators.policies.UCBPolicy.UCBPolicy(_operators, _C=100.0)[source]

UCB policy class which is used for applying UCB strategy when selecting and applying operator

operators

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

C

{float} – tradeoff between EvE parameter for UCB

rewards

{[float]} – list of summed rewards obtained for each operator

occurences

{[int]} – number of use (selected) of each operator

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

select()[source]

Select randomly the next operator to use

Returns

the selected operator

Return type

{Operator}