genome_mutator (macula_tweann v0.18.1)
View SourceGenetic mutation operators for neural network evolution.
This module is the main entry point for genome mutations. It delegates to specialized modules for different mutation categories:
- topological_mutations: Network structure changes - parametric_mutations: Weight and parameter changes - ltc_mutations: LTC neuron-specific mutations - mutation_helpers: Shared utility functions
Mutations are selected using roulette wheel selection weighted by mutation probabilities from the agent's constraint.
Summary
Functions
Calculate number of mutations based on agent's mutation function.
Apply mutations to an agent.
Apply a specific number of mutations to an agent.
Functions
-spec calculate_mutation_count(term()) -> pos_integer().
Calculate number of mutations based on agent's mutation function.
-spec mutate(term()) -> ok.
Apply mutations to an agent.
Selects and applies mutations based on the agent's constraint. The number of mutations is determined by the tot_topological_mutations_f.
-spec mutate(term(), non_neg_integer()) -> ok.
Apply a specific number of mutations to an agent.