public void Setup()
    {
        tournamentSel = new TournamentSelection();
        crossOver     = new CrossOverSpawnFunction();

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