C# Class SharpNeat.Phenomes.NeuralNets.FastAcyclicNetwork

A neural network implementation for acyclic networks. Activation of acyclic networks can be far more efficient than cyclic networks because we can activate the network by propagating a signal 'wave' from the input nodes through each depth layer through to the output nodes, thus each node requires activating only once at most, whereas in cyclic networks we have to activate each node multiple times and we must have a scheme for determining when to stop activating. Algorithm Overview. 1) The nodes are assigned a depth number based on how many connection hops they are from an input node. Where multiple paths to a node exist the longest path determines the node's depth. 2) Connections are similarly assigned a depth value which is defined as the depth of a connection's source node. Note. Steps 1 and 2 are actually performed by FastAcyclicNetworkFactory. 3) Reset all node activation values to zero. This resets any state from a previous activation. 4) Each layer of the network can now be activated in turn to propagate the signals on the input nodes through the network. Input nodes do no apply an activation function so we start by activating the connections on the first layer (depth == 0), this accumulates node pre-activation signals on all of the target nodes which can be anywhere from depth 1 to the highest depth level. Having done this we apply the node activation function for all nodes at the layer 1 because we can now guarantee that there will be no more incoming signals to those nodes. Repeat for all remaining layers in turn.
Inheritance: IBlackBox
Exibir arquivo Open project: colgreen/sharpneat

Public Methods

Method Description
Activate ( ) : void

Activate the network. Activation reads input signals from InputSignalArray and writes output signals to OutputSignalArray.

FastAcyclicNetwork ( IActivationFunction nodeActivationFnArr, double nodeAuxArgsArr, FastConnection connectionArr, LayerInfo layerInfoArr, int outputNodeIdxArr, int nodeCount, int inputNodeCount, int outputNodeCount ) : SharpNeat.Network

Construct a FastAcyclicNetwork with provided network definition data structures.

ResetState ( ) : void

Reset the network's internal state.

Method Details

Activate() public method

Activate the network. Activation reads input signals from InputSignalArray and writes output signals to OutputSignalArray.
public Activate ( ) : void
return void

FastAcyclicNetwork() public method

Construct a FastAcyclicNetwork with provided network definition data structures.
public FastAcyclicNetwork ( IActivationFunction nodeActivationFnArr, double nodeAuxArgsArr, FastConnection connectionArr, LayerInfo layerInfoArr, int outputNodeIdxArr, int nodeCount, int inputNodeCount, int outputNodeCount ) : SharpNeat.Network
nodeActivationFnArr IActivationFunction Array of neuron activation functions.
nodeAuxArgsArr double Array of neuron activation function arguments.
connectionArr FastConnection Array of connections.
layerInfoArr LayerInfo Array of layer information.
outputNodeIdxArr int An array that specifies the index of each output neuron within _activationArr. /// This is necessary because the neurons have been sorted by their depth in the network structure and are therefore /// no longer in their original positions. Note however that the bias and input neurons *are* in their original /// positions as they are defined as being at depth zero.
nodeCount int Number of nodes in the network.
inputNodeCount int Number of input nodes in the network.
outputNodeCount int Number of output nodes in the network.
return SharpNeat.Network

ResetState() public method

Reset the network's internal state.
public ResetState ( ) : void
return void