Neat-Ex v1.3.0 Neat.Options

Below are the options that can be configured the Neat evolution process.

ParamaterDefaultDescription
:seedRequiredThe seed ANN used to generate the initial population. This is used for specifying the input/output neurons that all ANNs should have, as well as any priliminary topology ANNs should start with.
:fitness_functionRequiredThe function used to evaluate the fitness of ANNs.
:single_fitness_functionRequiredShould equal true or false. If true, fitness function is given a single neural network to evaluate, and it should return a positive fitness value (where greater numbers are better). The call looks like fitness_function(ann). If false, the fitness function is given the entire population to evaluate. The call looks like fitness_function([{species_rep1, [ann1, {ann2, old_fitness}, ann3, ...]}, ...]). Note, the species_rep should be left alone. Also, some ann’s in the population (such as ann2 in this example) will already have assigned fitnesses, and can either be re-evaluated, or left with the same fitness. All ann’s should be replaced by {ann, fitness} tuples, and the entire structure should be returned. Single-fitness functions are far easier to implement, but multi-fitness functions provide more flexibility.
:population_size150The number of ANNs in any given generation.
:target_species_number15The ideal number of species to exist.
:structure_diff_coefficient2.0Coefficient for how much structure differences matter in speciation.
:weight_diff_coefficient1.0Coefficient for how much weight differences matter in speciation.
:compatibility_threshold6.0Initial threshold used for speciation, changes quickly.
:compatibility_modifier0.3Value used to change :compatibility_threshold.
:dropoff_age15If a species does not progress for this many generations, it dies.
:survival_ratio0.2Ratio of the population that persists each generation.
:weight_range_min-1.0Minimum for initial weight creation.
:weight_range_max1.0Maximum for initial weight creation.
:weight_mutation_power1/6Standard deviation for the random modifiers used to mutate weights.
:new_weight_chance0.1Ratio of weight mutations that get assigned totally new values.
:child_from_mutation_chance0.25Ratio of children that result from mutation (not mating).
:interspecies_mating_chance0.01Ratio of children that result from interspecies mating.
:new_node_chance0.03Ratio of mutations that add a new node (the rest mutate weights).
:new_link_chance0.05Ratio of mutations that add a new link (the rest mutate weights).
:recurrent_nodestrueWhether or not recurrent nodes are allowed.

Summary

Functions

Creates an new Neat.Options given a seed network (in which the initial population is based), the fitness_function, and a map of other (optional) paramaters

Functions

new(seed, fitness_function, single_fitness_function, opts \\ [])

Creates an new Neat.Options given a seed network (in which the initial population is based), the fitness_function, and a map of other (optional) paramaters.

If :population_size is specified, and :target_species_number is not, it’s value is 1/10th of the :population_size.

Example Usage:

iex> Neat.Options.new(Ann.new([1, 2, 3], [4]), &fitness/1, [population_size: 20])