I'm developing a JS library with the ability to create 'flexible' neural networks. Flexible meaning that they don't consist of layers, but merely of single neurons or neuron 'groups'.
I don't want to activate neurons layer by layer, as this does not give a lot of options for layer mutation/modification.
So I'm looking for an algorithm which decides the neuron activation order. Example of a neural net:
This is quite a complex net. But I want to decide the activation order of this neural network with an algorithm, of course I can figure it out myself, some of the correct orders are:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
1, 2, 4, 3, 5, 6, 8, 7, 10, 9
3, 5, 8, 1, 2, 4, 6, 7, 9, 10
I need an algorithm which returns a possible activation order! Any hints? (The algorithm is given the connections between neurons.)
But it gets more complex... say we have some short term memory:
The algorithm should not take any connections that serve as memory into consideration. So these two added memory connections shouldn't alter the activation order!