parametric_mutations (macula_tweann v0.18.1)

View Source

Parametric mutation operators for neural network evolution.

This module provides mutations that modify network parameters without changing structure: - mutate_weights: Perturb synaptic weights - mutate_af: Change activation function - mutate_aggr_f: Change aggregation function

Also includes evolutionary strategy mutations: - mutate_tuning_selection: Change weight selection strategy - mutate_annealing: Modify simulated annealing schedule - mutate_heredity_type: Switch between darwinian/lamarckian

Summary

Functions

Mutate activation function of a random neuron.

Generic function to mutate an agent parameter.

Mutate aggregation function of a random neuron.

Mutate heredity type (darwinian/lamarckian).

Mutate total topological mutations function.

Mutate annealing parameter.

Mutate tuning selection function.

Mutate weights of a random neuron.

Functions

mutate_af(AgentId)

-spec mutate_af(term()) -> ok | {error, term()}.

Mutate activation function of a random neuron.

Selects a random neuron and changes its activation function to another available function from the constraint.

mutate_agent_parameter(AgentId, FieldName, ConstraintField)

-spec mutate_agent_parameter(term(), atom(), atom()) -> ok | {error, no_alternatives}.

Generic function to mutate an agent parameter.

Reads the current value of a field, gets alternatives from constraint, and selects a new random value.

mutate_aggr_f(AgentId)

-spec mutate_aggr_f(term()) -> ok | {error, term()}.

Mutate aggregation function of a random neuron.

mutate_heredity_type(AgentId)

-spec mutate_heredity_type(term()) -> ok | {error, no_alternatives}.

Mutate heredity type (darwinian/lamarckian).

mutate_tot_topological_mutations(AgentId)

-spec mutate_tot_topological_mutations(term()) -> ok | {error, no_alternatives}.

Mutate total topological mutations function.

mutate_tuning_annealing(AgentId)

-spec mutate_tuning_annealing(term()) -> ok | {error, no_alternatives}.

Mutate annealing parameter.

mutate_tuning_selection(AgentId)

-spec mutate_tuning_selection(term()) -> ok | {error, no_alternatives}.

Mutate tuning selection function.

mutate_weights(AgentId)

-spec mutate_weights(term()) -> ok.

Mutate weights of a random neuron.

Selects a random neuron and perturbs its input weights using the agent's perturbation range.