Skip to main content

GA

Module: opytimizer.optimizers.single_objective.evolutionary.ga

An GA class, inherited from Optimizer.

This is the designed class to define GA-related variables and methods.

References: M. Mitchell. An introduction to genetic algorithms. MIT Press (1998).

Constructor​

GA(params: Optional[Dict[str, Any]] = None, crossover_operator=None, mutation_operator=None) -> None

Parameters​

ParameterTypeDefaultDescription
paramsOptional[Dict[str, Any]]None—
crossover_operatorNone—
mutation_operatorNone—

Methods​

update​

update(self, space: opytimizer.core.space._SingleObjectiveSpace, function: opytimizer.core.function.Function) -> None

Wraps Genetic Algorithm over all agents and variables.

Parameters​

ParameterTypeDefaultDescription
spaceopytimizer.core.space._SingleObjectiveSpaceSpace containing agents and update-related information.
functionopytimizer.core.function.FunctionA Function object that will be used as the objective function.