# Neat-Ex v1.3.0 Neat.Options

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

Paramater | Default | Description |
---|---|---|

:seed | Required | The 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_function | Required | The function used to evaluate the fitness of ANNs. |

:single_fitness_function | Required | Should 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_size | 150 | The number of ANNs in any given generation. |

:target_species_number | 15 | The ideal number of species to exist. |

:structure_diff_coefficient | 2.0 | Coefficient for how much structure differences matter in speciation. |

:weight_diff_coefficient | 1.0 | Coefficient for how much weight differences matter in speciation. |

:compatibility_threshold | 6.0 | Initial threshold used for speciation, changes quickly. |

:compatibility_modifier | 0.3 | Value used to change :compatibility_threshold. |

:dropoff_age | 15 | If a species does not progress for this many generations, it dies. |

:survival_ratio | 0.2 | Ratio of the population that persists each generation. |

:weight_range_min | -1.0 | Minimum for initial weight creation. |

:weight_range_max | 1.0 | Maximum for initial weight creation. |

:weight_mutation_power | 1/6 | Standard deviation for the random modifiers used to mutate weights. |

:new_weight_chance | 0.1 | Ratio of weight mutations that get assigned totally new values. |

:child_from_mutation_chance | 0.25 | Ratio of children that result from mutation (not mating). |

:interspecies_mating_chance | 0.01 | Ratio of children that result from interspecies mating. |

:new_node_chance | 0.03 | Ratio of mutations that add a new node (the rest mutate weights). |

:new_link_chance | 0.05 | Ratio of mutations that add a new link (the rest mutate weights). |

:recurrent_nodes | true | Whether 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

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])`