예제 #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Genus pool = new Genus(2, 1);



            //Genome p1 = new Genome();
            //p1.BuildNode(NodeGene.NodeType.INPUT_NODE, 1);
            //p1.BuildNode(NodeGene.NodeType.INPUT_NODE, 2);
            //p1.BuildNode(NodeGene.NodeType.INPUT_NODE, 3);
            //p1.BuildNode(NodeGene.NodeType.OUTPUT_NODE, 4);
            //p1.BuildNode(NodeGene.NodeType.HIDDEN_NODE, 5);
            //p1.BuildConnection(1, 4, 1, true);
            //p1.BuildConnection(1, 5, 1, true);
            //p1.BuildConnection(3, 4, 1, true);
            //p1.BuildConnection(2, 5, 1, true);
            //p1.BuildConnection(5, 4, 1, true);

            //Genome p2 = p1.Crossover(p1);

            //p2.Mutate();

            //Genome child = p1.Crossover(p2);

            //DrawGenome(forceGraphVisualizer1, p1);
            //DrawGenome(forceGraphVisualizer2, p2);
            //DrawGenome(forceGraphVisualizer3, child);

            //Species s = new Species();

            //s.AddGenome(p1);
            //s.AddGenome(p2);
            //s.AddGenome(child);
        }
예제 #2
0
파일: Genus.cs 프로젝트: s4lt3d/NEAT
        public Genus(int numberOfInputs, int numberOfOutputs)
        {
            Species s = new Species();
            Genome  g = Genome.CreateGenome(numberOfInputs, numberOfOutputs);

            g.MutateConnectionWeights();
            s.AddGenome(g);
            Species.Add(s); // start with one species

            instance = this;
        }
예제 #3
0
파일: Genus.cs 프로젝트: s4lt3d/NEAT
 public Genus()
 {
     instance = this;
 }