Пример #1
0
 public NodeGene(NODETYPE nodeType, int id, int layer, float bias, ACTIVATION_FUNCTION activationFunction)
 {
     this.nodeType           = nodeType;
     this.id                 = id;
     this.layer              = layer;
     this.bias               = bias;
     this.activationFunction = activationFunction;
 }
Пример #2
0
 public NodeGene(NODETYPE nodeType, int id, int layer, bool biasExpressed, ACTIVATION_FUNCTION activationFunction)
 {
     this.nodeType = nodeType;
     this.id       = id;
     this.layer    = layer;
     neat          = GameObject.Find("Scripts").GetComponent <Neat>();
     if (biasExpressed)
     {
         bias = Random.Range(-neat.weightRange, neat.weightRange);
     }
     else
     {
         bias = 0;
     }
     this.activationFunction = activationFunction;
 }