public Genotype(GeneticAlgorithmSettings settings) { Rng = settings.Rng; Value = new bool[settings.GenotypeLength]; MutationRate = 1.0 / settings.GenotypeLength; CrossoverRate = settings.CrossoverRate; }
public GeneticAlgorithm(GeneticAlgorithmSettings settings) { Settings = settings; ThePopulation = new Population(settings); ThePopulation.Initialize(); ThePopulation.Randomize(); StopFunction = settings.StopFunction; Logger = settings.Logger; }
public Population(GeneticAlgorithmSettings settings) { Settings = settings; FitnessFunction = settings.FitnessFunction; FittestSelectionAlgorithm = settings.FittestSelectionAlgorithm; Rng = settings.Rng; Initialize(); Randomize(); }