Individual Operators¶
MicroGP4 package offers some basic operators that can be found in
microgp.individual_operators
. Three of them are crossover operators,
four are mutation operators and one has the goal to create a random individual.
As you can see in Darwin, the methods that are listed in this module can be
passed to the constructor of a GenOperator an then added to the list of
operators used by the microgp.darwin.Darwin
object.
microgp.individual_operators
Initialization operator¶
This kind of operator doesn’t receive any individual as input and returns a new individual.
Create random individual¶
Mutation operators¶
This kind of operator change one or more genes that describe an individual. The intensity of the change and the probability that it takes place depend on sigma. This is a parameter specified during the creation of the Darwin object and it can assume values in [0, 1].
The available mutation operators are:
microgp.individual_operators.remove_node_mutation
microgp.individual_operators.add_node_mutation
microgp.individual_operators.hierarchical_mutation
microgp.individual_operators.flat_mutation
Remove node mutation¶
Add node mutation¶
Hierarchical mutation¶
Flat mutation¶
Crossover operators¶
The available crossover operators are:
- Switch procedure crossover:
microgp.individual_operators.switch_proc_crossover
- MacroPool OneCut crossover:
microgp.individual_operators.macro_pool_one_cut_point_crossover
- MacroPool Uniform crossover:
microgp.individual_operators.macro_pool_uniform_crossover