Beispiel #1
0
        public BinaryChromosome CrossoverParents(Parents <BinaryChromosome> parents, CrossoverConfig crossoverConfig)
        {
            if (_rand.Next(0, 100) < crossoverConfig.CrosoverProbability)
            {
            }

            return(parents.FirstParent);
        }
Beispiel #2
0
 public AlgorithmConfig(int mutationSize, int mutationProbability, int numberOfChromosomes, int replaceByGeneration, int trackBest, ISelection <T> selection, ICrossover <T> crossover, CrossoverConfig crossoverConfig)
 {
     MutationSize        = mutationSize;
     MutationProbability = mutationProbability;
     NumberOfChromosomes = numberOfChromosomes;
     ReplaceByGeneration = replaceByGeneration;
     TrackBest           = trackBest;
     Selection           = selection;
     Crossover           = crossover;
     CrossoverConfig     = crossoverConfig;
 }
Beispiel #3
0
 public CrossoverParents(ICrossover <T> crossover, CrossoverConfig crossoverConfig)
 {
     Crossover       = crossover;
     CrossoverConfig = crossoverConfig;
 }
Beispiel #4
0
 public CrossoverChromosome(Parents <T> parents, ICrossover <T> crossover, CrossoverConfig crossoverConfig)
 {
     Parents         = parents;
     Crossover       = crossover;
     CrossoverConfig = crossoverConfig;
 }