I'm trying to write my own implementation of NEAT and I'm stuck on the network evaluate function, which calculates the output of the network.
NEAT as you may know contains a group of neural networks with continuously evolving topologies by the addition of new nodes and new connections. But with the addition of new connections between previously unconnected nodes, I see a problem that will occur when I go to evaluate, let me explain with an example:
INPUTS = 2 yellow nodes HIDDEN = 3 blue nodes OUTPUT = 1 red node
In the image a new connection has been added connecting node3 to node5, how can I calculate the output for node5 if I have not yet calculated the output for node3, which depends on the output from node5?
(not considering activation functions)
node5 output = (1 * 0.5) + (1 * 0.2) + (node3 output * 0.8) node3 output = ((node5 output * 0.7) * 0.4)