public void TestReplaceNeuronMutator() { var mutator = new ReplaceNeuronMutator(1.0f); var mutatedGenotype = new Genotype(genotype); var mutationResults = new MutationResults(); mutator.Mutate(mutatedGenotype, mutationResults); Assert.AreEqual(mutationResults.replacedNeurons, 3); // Compare gene counts var comparer = new GenotypeShapeEqualityComparer(); Assert.That(comparer.Equals(mutatedGenotype, genotype)); }
public void TestReplaceNeuronMutator() { var mutator = new ReplaceNeuronMutator(1.0f); var mutatedGenotype = new Genotype(genotype); var mutationResults = new MutationResults(); mutator.Mutate(mutatedGenotype, mutationResults); Assert.AreEqual(mutationResults.replacedNeurons, 3); // Compare gene counts var comparer = new GenotypeShapeEqualityComparer(); Assert.That(comparer.Equals(mutatedGenotype, genotype)); }