opytimizer.optimizers.evolutionary.rra¶
Runner-Root Algorithm.
-
class
opytimizer.optimizers.evolutionary.rra.
RRA
(params: Optional[Dict[str, Any]] = None)¶ An RRA class, inherited from Optimizer.
This is the designed class to define RRA-related variables and methods.
References
F. Merrikh-Bayat. The runner-root algorithm: A metaheuristic for solving unimodal and multimodal optimization problems inspired by runners and roots of plants in nature. Applied Soft Computing (2015).
-
__init__
(params: Optional[Dict[str, Any]] = None) → None¶ Initialization method.
Parameters: params – Contains key-value parameters to the meta-heuristics.
-
d_runner
¶ Length of runners.
-
d_root
¶ Length of roots.
-
tol
¶ Cost function tolerance.
-
max_stall
¶ Maximum number of stalls.
-
n_stall
¶ Current number of stalls.
-
last_best_fit
¶ Previous best fitness value.
-
_stalling_search
(daughters: List[opytimizer.core.agent.Agent], function: opytimizer.core.function.Function, is_large: Optional[bool] = True) → None¶ Performs the stalling random larrge or small search (eq. 4 and 5).
Parameters: - daughters – Daughters.
- function – A Function object that will be used as the objective function.
- is_large – Whether to perform the large or small search.
-
_roulette_selection
(fitness: List[float], a: Optional[float] = 0.1) → int¶ Performs a roulette selection on the population (eq. 8).
Parameters: - fitness – A fitness list of every agent.
- a – Selection regularizer.
Returns: The selected index of the population.
Return type: (int)
-
update
(space: opytimizer.core.space.Space, function: opytimizer.core.function.Function) → None¶ Wraps Runner-Root Algorithm over all agents and variables.
Parameters: - space – Space containing agents and update-related information.
- function – A Function object that will be used as the objective function.
-