topological_mutations (macula_tweann v0.18.1)

View Source

Topological mutation operators for neural network evolution.

This module provides mutations that modify network structure: - add_neuron: Insert neuron into existing connection - add_outlink: Add output connection from neuron - add_inlink: Add input connection to neuron - add_sensorlink: Connect sensor to neuron - add_actuatorlink: Connect neuron to actuator - outsplice: Split output connection with new neuron - add_bias: Add bias connection to neuron

Summary

Functions

Add a new actuator to the network.

Add link from a neuron to an actuator.

Add bias input to a random neuron.

Add input link to a random neuron.

Add a new neuron by splitting a connection.

Add output link from a random neuron.

Add a new sensor to the network.

Add link from a sensor to a neuron.

Add neuron by outsplicing (split output connection).

Functions

add_actuator(AgentId)

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

Add a new actuator to the network.

Selects an actuator type from the morphology that isn't already in the network, creates it, and connects a random neuron to it. Enables networks to evolve new action capabilities.

add_actuatorlink(AgentId)

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

Add link from a neuron to an actuator.

add_bias(AgentId)

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

Add bias input to a random neuron.

Adds a bias connection (self-connection) to a neuron that doesn't already have one.

add_inlink(AgentId)

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

Add input link to a random neuron.

Connects a sensor or another neuron to a neuron that it's not currently connected to.

add_neuron(AgentId)

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

Add a new neuron by splitting a connection.

Selects a random connection, removes it, and inserts a new neuron in the middle.

add_outlink(AgentId)

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

Add output link from a random neuron.

Connects a neuron to another neuron or actuator that it's not currently connected to.

add_sensor(AgentId)

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

Add a new sensor to the network.

Selects a sensor type from the morphology that isn't already in the network, creates it, and connects it to a random neuron. Enables networks to evolve new perception capabilities.

add_sensorlink(AgentId)

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

Add link from a sensor to a neuron.

outsplice(AgentId)

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

Add neuron by outsplicing (split output connection).

Similar to add_neuron but specifically targets output connections.