dict_selectors_tournament {miesmuschel}R Documentation

Tournament Selector

Description

Selector that repeatedly samples k individuals and selects the best ouf of these.

Configuration Parameters

Supported Operand Types

Supported Domain classes are: p_lgl ('ParamLgl'), p_int ('ParamInt'), p_dbl ('ParamDbl'), p_fct ('ParamFct')

Dictionary

This Selector can be created with the short access form sel() (sels() to get a list), or through the the dictionary dict_selectors in the following way:

# preferred:
sel("tournament")
sels("tournament")  # takes vector IDs, returns list of Selectors

# long form:
dict_selectors$get("tournament")

Super classes

miesmuschel::MiesOperator -> miesmuschel::Selector -> miesmuschel::SelectorScalar -> SelectorTournament

Methods

Public methods

Inherited methods

Method new()

Initialize the SelectorTournament object.

Usage
SelectorTournament$new(scalor = ScalorSingleObjective$new())
Arguments
scalor

(Scalor)
Scalor to use to generate scalar values from multiple objectives, if multi-objective optimization is performed. Initialized to ScalorSingleObjective: Doing single-objective optimization normally, throwing an error if used in multi-objective setting: In that case, a Scalor needs to be explicitly chosen.


Method clone()

The objects of this class are cloneable with this method.

Usage
SelectorTournament$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other selectors: Selector, SelectorScalar, dict_selectors_best, dict_selectors_maybe, dict_selectors_null, dict_selectors_proxy, dict_selectors_random, dict_selectors_sequential

Examples

sb = sel("tournament", k = 4)
p = ps(x = p_dbl(-5, 5))
# dummy data; note that SelectorBest does not depend on data content
data = data.frame(x = rep(0, 7))
fitnesses = c(1, 5, 2, 3, 0, 4, 6)

sb$prime(p)

sb$operate(data, fitnesses, 2)

sb$operate(data, fitnesses, 4, group_size = 2)

[Package miesmuschel version 0.0.4-2 Index]