コード例 #1
0
    public void Setup()
    {
        tournamentSel = new TournamentSelection();
        crossOver     = new CrossOverSpawnFunction();

        ga = new GeneticAlgorithm(tournamentSel, crossOver);
    }
コード例 #2
0
 public GeneticAlgorithm(ISelectionFunction selectionFunction, ISpawnIndividualFunction spawnFunction)
 {
     this.selectionFunction = selectionFunction;
     this.spawnFunction     = spawnFunction;
     rand = new Random();
 }