SharpNeat.Decoders.HyperNeat.Substrate.Substrate C# (CSharp) Method

Substrate() public method

Construct a substrate with the provided node sets and a predetermined set of connections.
public Substrate ( List nodeSetList, IActivationFunctionLibrary activationFnLibrary, int activationFnId, double weightThreshold, double maxWeight, List connectionList ) : System
nodeSetList List Substrate nodes, represented as distinct sets of nodes. By convention the first and second /// sets in the list represent the input and output noes respectively. All other sets represent hidden nodes.
activationFnLibrary IActivationFunctionLibrary The activation function library allocated to the networks that are 'grown' from the substrate.
activationFnId int The ID of an activation function in activationFnLibrary. This is the activation function /// ID assigned to all nodes in networks that are 'grown' from the substrate.
weightThreshold double The weight threshold below which substrate connections are not created in grown networks.
maxWeight double Defines the weight range of grown connections (+-maxWeight).
connectionList List A predetermined list of substrate connections.
return System
        public Substrate(List<SubstrateNodeSet> nodeSetList, 
                         IActivationFunctionLibrary activationFnLibrary, int activationFnId,
                         double weightThreshold, double maxWeight,
                         List<SubstrateConnection> connectionList)
        {
            VaildateSubstrateNodes(nodeSetList);

            _nodeSetList = nodeSetList;
            _inputNodeCount =  _nodeSetList[0].NodeList.Count;
            _outputNodeCount =  _nodeSetList[1].NodeList.Count;
            _dimensionality = _nodeSetList[0].NodeList[0]._position.GetUpperBound(0) + 1;

            _activationFnLibrary = activationFnLibrary;
            _activationFnId = activationFnId;

            _weightThreshold = weightThreshold;
            _maxWeight = maxWeight;
            _weightRescalingCoeff = _maxWeight / (1.0 - _weightThreshold);

            // Set total connection count hint value (includes additional connections to a bias node).
            _connectionList = connectionList;
            _connectionCountHint = connectionList.Count + CalcBiasConnectionCountHint(nodeSetList);

            // Pre-create the network definition node list. This is re-used each time a network is created from the substrate.
            _netNodeList = CreateNetworkNodeList();
        }

Same methods

Substrate::Substrate ( List nodeSetList, IActivationFunctionLibrary activationFnLibrary, int activationFnId, double weightThreshold, double maxWeight, List nodeSetMappingList ) : System