Configuration
Genex offers a number of configuration options. This is a comprehensive list.
To adjust radiation, crossover, and mutation rates, please see the Customization guide.
Configuration options are provided after the use Genex line in your module.
defmodule MyGeneticAlgorithm do
use Genex, crossover_type: :two_point, mutation_type: :invert
...
end
Defaults
:population_size:100:crossover_type::single_point:parent_selection::natural:survivor_selection::natural:mutation_type::scramble:minimize:false
crossover_type
This option determines what kind of Crossover to use. For a detailed explanation of each Crossover method, see the Crossover guide.
:single_point:two_point:uniform(requires:uniform_crossover_rateparameter set):blend(requires:alphaparameter set):simulated_binary(requires:etaparameter set):messy_single_point:davis_order
parent_selection and survivor_selection
This option determines what kind of Selection to use. For a detailed explanation of each Selection method, see the Selection guide.
:natural:random:worst:roulette:tournament(requires:tournsizeparameter set):stochastic
mutation_type
This option determines what kind of mutation to use. For a detailed explanation of each Mutation method, see the Mutation guide.
:bit_flip:invert:scramble:gaussian:uniform_integer(requiresupper_boundandlower_boundparameters set):polynomial_bounded(requiresupper_bound,lower_boundandetaparameters set):none
minimize
This option tells Genex if you want to minimize or maximize fitness. When set to true, Genex will sort population fitness in ascending order. The "strongest" chromosome will be the one with the lowest fitness.