Neat-Ex v1.3.0 Neat.Reproduction

Summary

Functions

Breeds together two networks, given the Neat struct, then network 1, then network 2. If the networks happen to be identical, then the child is created from mutation rather than mating

Given the neat options, chooses a random repopulation type from [:interspecies_mating, :mutation, :mating] with probabilities derived from the options

Mates two networks, provided with their fitness. Takes two {ann, fitnes} pairs. The topology of the child matches that of the fitter parent. In cases where fitness is identical, topologies are merged. For all connection genes that exist in both parents (under the same id), the child picks from the two randomely (the weight will probably differ between parents)

Mutates a given network, provided with the Neat struct, and the network. Returns the newly mutated network

Performs a new_link mutation on a network, provided with the Neat struct, and the network. Returns the new network with the new link

Performs a new_node mutation on a network, provided with the Neat struct, and the network. Returns the new network with the new node

Randomley re-enables a connection in the network. Returns the newly mutated network

Mutates all the weights in a network, provided with the Neat struct, and the network. Returns the newly mutated network

Given Neat, a repopulated species list is returned. Reproduction is very configurable by changing Neat.Options

Functions

breed(ann1, ann2, opts)

Breeds together two networks, given the Neat struct, then network 1, then network 2. If the networks happen to be identical, then the child is created from mutation rather than mating.

get_rand_repopulation_type(opts)

Given the neat options, chooses a random repopulation type from [:interspecies_mating, :mutation, :mating] with probabilities derived from the options.

mate(pair1, pair2)

Mates two networks, provided with their fitness. Takes two {ann, fitnes} pairs. The topology of the child matches that of the fitter parent. In cases where fitness is identical, topologies are merged. For all connection genes that exist in both parents (under the same id), the child picks from the two randomely (the weight will probably differ between parents).

mutate(ann, opts)

Mutates a given network, provided with the Neat struct, and the network. Returns the newly mutated network.

mutate_new_link(ann, opts)

Performs a new_link mutation on a network, provided with the Neat struct, and the network. Returns the new network with the new link.

mutate_new_node(ann, opts)

Performs a new_node mutation on a network, provided with the Neat struct, and the network. Returns the new network with the new node.

mutate_random_enable(ann, opts)

Randomley re-enables a connection in the network. Returns the newly mutated network.

mutate_weights(ann, opts)

Mutates all the weights in a network, provided with the Neat struct, and the network. Returns the newly mutated network.

popRand(list)
randSearch(list, fun)
repopulate(neat)

Given Neat, a repopulated species list is returned. Reproduction is very configurable by changing Neat.Options.