/// <summary> /// gets a mutated copy of the network /// </summary> /// <param name="mutateRate">default 1% mutateRate</param> /// <returns></returns> public void Mutate(double mutateRate = 0.01) { Random mutateGen = new Random(); //Random mutateGen = new Random(1); _inputLayer.Mutate(mutateRate); foreach (Layer hiddenLayer in _hiddenLayers) { hiddenLayer.Mutate(mutateRate); } _outputLayer.Mutate(mutateRate); }
/// <summary> /// gets a mutated copy of the network /// </summary> /// <param name="mutateRate">default 1% mutateRate</param> /// <returns></returns> public void Mutate(double mutateRate = 0.01, bool percentMutate = false) { Random mutateGen = RndGen.rnd; //Random mutateGen = new Random(1); _inputLayer.Mutate(mutateRate, percentMutate); foreach (Layer hiddenLayer in _hiddenLayers) { hiddenLayer.Mutate(mutateRate, percentMutate); } _outputLayer.Mutate(mutateRate, percentMutate); }