macop.operators.policies.UCBPolicy

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

Classes

UCBPolicy(_operators[, _C, _exp_rate])

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, _exp_rate=0.5)[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

exp_rate

{float} – exploration rate (probability to choose randomly next operator)

rewards

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

occurrences

{[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}