Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Evolution Chamber #2

Closed
vbop9834 opened this issue Oct 15, 2016 · 1 comment
Closed

Add Evolution Chamber #2

vbop9834 opened this issue Oct 15, 2016 · 1 comment
Assignees

Comments

@vbop9834
Copy link
Owner

vbop9834 commented Oct 15, 2016

The Evolution Chamber will be a module that allows for evolving neural networks through genetic algorithms

##From the book on page 263-265
All of these are not needed due to the modifications in the architecture of the system.

1. add_bias:
Choose a random neuron A, check if it has a bias in its weights list, if it does
not, add the bias value. If the neuron already has a bias value, do nothing.
2. remove_bias:
Choose a random neuron A, check if it has a bias in its weights list, if it does,
remove it. If the neuron does not have a bias value, do nothing.
3. mutate_weights:
Choose a random neuron A, and perturb each weight in its weight list with a
probability of 1/sqrt(length(weights)), with the perturbation intensity randomly
chosen between -Pi/2 and Pi/2.
4. reset_weights:
Choose a random neuron A, and reset all its synaptic weights to random values
ranging between -Pi/2 and Pi/2.
5. mutate_af:
Choose a random neuron A, and change its activation function to a new random
activation function chosen from the af_list in the constraint record belonging to
the NN.
6. add_inlink:
Choose a random neuron A, and an element B, and then add a connection from
element B (possibly an existing sensor) to neuron A.
7. add_outlink:
Choose a random neuron A, and an element B, and then add a connection from
neuron A to element B (possibly an existing actuator). The difference between
this mutation operator and the add_inlink mutation operator, is that in one we
choose a random neuron and then choose a random element from which we
make a connection to the chosen neuron. While in the other we choose a random
neuron, and then choose a random element to which the neuron makes a
connection. The first (add_inlink) is capable of making links to sensors, while
the second (add_outlink) is capable of potentially making links to actuators.
8. add_neuron:
Create a new neuron A, giving it a unique id and positioning it in a randomly
selected layer of the NN. Then give the neuron A a randomly chosen activation
function. Then choose a random neuron B in the NN and connect neuron A’s
inport to the neuron B’s outport. Then choose a random neuron C in the NN
and connect neuron A’s outport to the neuron C’s inport.
9. splice: There are 2 versions of this mutation operator, outsplice, and insplice:
– outsplice: Create a new neuron A with a random activation function. Then
choose a random neuron B in the NN. Randomly select neuron B’s outport
leading to some element C’s (neuron or actuator) inport. Then disconnect
neuron B from element C, and reconnect them through the newly created
neuron A.
– insplice: Create a new neuron A with a random activation function. Then
choose a random neuron B in the NN. Randomly select neuron B’s inport
from some element C’s (neuron or sensor) outport. Then disconnect neu-
264 Chapter 8 Developing a Simple Neuroevolutionary Platform
ron B from element C, and reconnect them through the newly created neuron
A. The reason for having an outsplice and an insplice, is that the
outsplice can insert a new neuron between some random element and an
actuator, while the insplice can insert a new neuron between an element
and a sensor.
10. add_sensorlink:
Compared to the number of neurons, there are very few sensors, and so the
probability of the add_inlink connecting a neuron to a sensor is very low. To
increase the probability that the NN connects to a sensor, we can create the
add_sensorlink mutation operator. This mutation operator first chooses a random
existing sensor A, it then chooses a random neuron B to which A is not yet
connected, and then connects A to B.
11. add_actuatorlink:
As in add_sensorlink, when compared to the number of neurons, there are very
few actuators, and so the probability of the add_outlink connecting a neuron to
an actuator is very low. Thus, we can implement the add_actuatorlink to increase
the probability of connecting a neuron to an actuator. In this mutation
operator, first a random actuator A is chosen which is connected to less neurons
than its vl element dictates (an incompletely connected actuator). Then a random
neuron B is chosen to which the actuator is not yet connected. Then A is
connected from B.
12. remove_sensorlink:
First a random sensor A is chosen. From the sensor’s fanout_ids list, a random
neuron id is chosen, and then the sensor is disconnected from the corresponding
neuron.
13. remove_actuatorlink:
First a random actuator A is chosen. From the actuator’s fanin_ids list, a random
neuron id is chosen, and then the actuator is disconnected from the corresponding
neuron.
14. add_sensor:
Choose a random sensor from the sensor list belonging to the NN’s morphology,
but which is not yet used. Then connect the sensor to a random neuron A in
the NN, thus adding a new sensory organ to the NN system.
15. add_actuator:
Choose a random actuator from the actuator list belonging to the NN’s morphology,
but which is not yet used. Then connect a random neuron A in the NN
to this actuator, thus adding a new morphological feature to the NN that can be
used to interact with the world.
16. remove_inlink:
Choose a random neuron A, and disconnect it from a randomly chosen element
in its input_idps list.
17. remove_outlink:
Choose a random neuron A, and disconnect it from a randomly chosen element
in its output_ids list. 
8.5 Developing the genotype_mutator 265
18. remove_neuron:
Choose a random neuron A in the NN, and remove it from the topology. Then
fix the presynaptic neuron B’s and postsynaptic neuron C’s outports and inports
respectively to accommodate the removal of the connection with neuron A.
19. desplice: There are 2 versions of this operator, deoutspolice, and deinsplice:
– deoutsplice: Choose a random neuron B in the NN, such that B’s outport
is connected to an element (neuron or actuator) C through some neuron A.
Then delete neuron A and reconnect neuron B and element C directly.
– deintsplice: Choose a random neuron B in the NN, such that B’s inport is
connected to by an element (neuron or sensor) C through some neuron A.
Then delete neuron A and connect neuron B and element C directly.
20. remove_sensor:
If a NN has more than one sensor, choose a random sensor belonging to the
NN, and remove it by first disconnecting it from the neurons it is connected to,
and then removing the tuple representing it from the genotype altogether.
21. remove_actuator:
If a NN has more than one actuator, choose a random actuator belonging the
NN, and remove it by first disconnecting it from the neurons it is connected
from, and then removing the tuple representing it from the genotype altogether. 
@vbop9834 vbop9834 added this to the 0.1 Evolve a Neural Network milestone Oct 15, 2016
@vbop9834 vbop9834 self-assigned this Oct 15, 2016
vbop9834 added a commit that referenced this issue Oct 22, 2016
vbop9834 added a commit that referenced this issue Nov 1, 2016
- Added AddNeuron Mutation
- Changed layer ids to floats (for splicing)
- Added activationFunctions to mutate nn func parameters
- Added types for ActivationFunctions, SyncFunctions, and OutputHookFunctions
@vbop9834
Copy link
Owner Author

vbop9834 commented Nov 4, 2016

Minimal Mutation sequence has been finished. Moving on to the next issue. Will circle back to implement everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant