public void TestPerturbSynapseMutator()
        {
            var mutator = new PerturbSynapseMutator(1.0f, 0.25f);

              var mutatedGenotype = new Genotype(genotype);
              var mutationResults = new MutationResults();
              mutator.Mutate(mutatedGenotype, mutationResults);

              Assert.AreEqual(3, mutationResults.perturbedSynapses);

              // Compare gene counts
              var comparer = new GenotypeShapeEqualityComparer();
              Assert.That(comparer.Equals(mutatedGenotype, genotype));
        }
Ejemplo n.º 2
0
        public void TestPerturbSynapseMutator()
        {
            var mutator = new PerturbSynapseMutator(1.0f, 0.25f);

            var mutatedGenotype = new Genotype(genotype);
            var mutationResults = new MutationResults();

            mutator.Mutate(mutatedGenotype, mutationResults);

            Assert.AreEqual(3, mutationResults.perturbedSynapses);

            // Compare gene counts
            var comparer = new GenotypeShapeEqualityComparer();

            Assert.That(comparer.Equals(mutatedGenotype, genotype));
        }