public NeuralInitialGenerationCreatorBase( INeuralModel neuralModel, INetworkOperationBaker networkOperationBaker) { this.neuralModel = neuralModel; this.networkOperationBaker = networkOperationBaker; }
public NeuralGenome( IEnumerable <Neuron> neurons, NeuralGene[] connections, INetworkOperationBaker networkOperationBaker) { NetworkOperationBaker = networkOperationBaker; Neurons = neurons.ToDictionary(x => x.InnovationNb, x => x); Inputs = neurons.Where(x => typeof(InputNeuron).IsAssignableFrom(x.GetType())) .ToArray(); Outputs = neurons.Where(x => typeof(OutputNeuron).IsAssignableFrom(x.GetType())) .ToArray(); Biasses = neurons.Where(x => typeof(BiasNeuron).IsAssignableFrom(x.GetType())) .ToArray(); Genes = connections; }