示例#1
0
        public void AddNodesToChildGenomeTest()
        {
            Genome newGenome = new Genome(r);

            Assert.AreEqual(0, newGenome.Nodes.Count);

            newGenome.AddInputAndOutputNodesFromGenome(baseGenome: gen1);

            Assert.AreEqual(4, newGenome.Nodes.Count);
            Assert.AreEqual(0, newGenome.ConnectionGenes.Count);
        }
示例#2
0
        public void AddNodesToChildGenomeTest_NullBase_Expected_Exception()
        {
            Genome newGenome = new Genome(r);

            newGenome.AddInputAndOutputNodesFromGenome(baseGenome: null);
        }