Exemplo n.º 1
0
 private static void AddPopulationSizeExperiment(ExperimentSet newSet, int populationSize)
 {
     var newExperiment = new Experiment();
     newSet.Experiments.Add(newExperiment);
     newExperiment.PopulationSize = populationSize;
     newExperiment.Label = "Population Size: " + populationSize;
 }
Exemplo n.º 2
0
 private static void AddMutationPercentExperiment(ExperimentSet newSet, double mutationPercent)
 {
     var newExperiment = new Experiment();
     newSet.Experiments.Add(newExperiment);
     newExperiment.PercentToMutate = mutationPercent;
     newExperiment.Label = "Mutation Percent: " + mutationPercent;
 }
Exemplo n.º 3
0
 private static void AddCrossoverPercentExperiment(ExperimentSet newSet, double crossoverPercent)
 {
     var newExperiment = new Experiment();
     newSet.Experiments.Add(newExperiment);
     newExperiment.PercentToCrossover = crossoverPercent;
     newExperiment.Label = "Crossover Percent: " + crossoverPercent;
 }
Exemplo n.º 4
0
 private static void AddCrossoverMethodExperiment(ExperimentSet newSet, ICrossoverMethod crossoverMethod, string title)
 {
     var newExperiment = new Experiment();
     newSet.Experiments.Add(newExperiment);
     newExperiment.CrossoverMethod = crossoverMethod;
     newExperiment.Label = "Crossover Method: " + title;
 }
Exemplo n.º 5
0
 private static void AddCrossoverHandlerExperiment(ExperimentSet newSet, ICrossoverHandler crossoverHandler, string title)
 {
     var newExperiment = new Experiment();
     newSet.Experiments.Add(newExperiment);
     newExperiment.CrossoverHandler = crossoverHandler;
     newExperiment.Label = "Selection Process: " + title;
 }
Exemplo n.º 6
0
        private static void AddCrossoverHandlerExperiment(ExperimentSet newSet, ICrossoverHandler crossoverHandler, string title)
        {
            var newExperiment = new Experiment();

            newSet.Experiments.Add(newExperiment);
            newExperiment.CrossoverHandler = crossoverHandler;
            newExperiment.Label            = "Selection Process: " + title;
        }
Exemplo n.º 7
0
        private static void AddCrossoverMethodExperiment(ExperimentSet newSet, ICrossoverMethod crossoverMethod, string title)
        {
            var newExperiment = new Experiment();

            newSet.Experiments.Add(newExperiment);
            newExperiment.CrossoverMethod = crossoverMethod;
            newExperiment.Label           = "Crossover Method: " + title;
        }
Exemplo n.º 8
0
        private static void AddMutationPercentExperiment(ExperimentSet newSet, double mutationPercent)
        {
            var newExperiment = new Experiment();

            newSet.Experiments.Add(newExperiment);
            newExperiment.PercentToMutate = mutationPercent;
            newExperiment.Label           = "Mutation Percent: " + mutationPercent;
        }
Exemplo n.º 9
0
        private static void AddCrossoverPercentExperiment(ExperimentSet newSet, double crossoverPercent)
        {
            var newExperiment = new Experiment();

            newSet.Experiments.Add(newExperiment);
            newExperiment.PercentToCrossover = crossoverPercent;
            newExperiment.Label = "Crossover Percent: " + crossoverPercent;
        }
Exemplo n.º 10
0
        private static void AddPopulationSizeExperiment(ExperimentSet newSet, int populationSize)
        {
            var newExperiment = new Experiment();

            newSet.Experiments.Add(newExperiment);
            newExperiment.PopulationSize = populationSize;
            newExperiment.Label          = "Population Size: " + populationSize;
        }
Exemplo n.º 11
0
        private static List <ExperimentSet> InitExperimentSets()
        {
            var experimentSets = new List <ExperimentSet>();

            //Population Size
            var newSet = new ExperimentSet {
                FileName = "C:/Repos/CS4470/GeneticAlgorithm/results/popsize.csv"
            };

            experimentSets.Add(newSet);

            AddPopulationSizeExperiment(newSet, 10);
            AddPopulationSizeExperiment(newSet, 20);
            AddPopulationSizeExperiment(newSet, 30);
            AddPopulationSizeExperiment(newSet, 40);
            AddPopulationSizeExperiment(newSet, 50);
            AddPopulationSizeExperiment(newSet, 60);
            AddPopulationSizeExperiment(newSet, 70);
            AddPopulationSizeExperiment(newSet, 80);
            AddPopulationSizeExperiment(newSet, 90);
            AddPopulationSizeExperiment(newSet, 100);

            //Crossover Percent
            newSet = new ExperimentSet {
                FileName = "C:/Repos/CS4470/GeneticAlgorithm/results/crossoverpercent.csv"
            };
            experimentSets.Add(newSet);

            AddCrossoverPercentExperiment(newSet, 0.1);
            AddCrossoverPercentExperiment(newSet, 0.2);
            AddCrossoverPercentExperiment(newSet, 0.3);
            AddCrossoverPercentExperiment(newSet, 0.4);
            AddCrossoverPercentExperiment(newSet, 0.5);
            AddCrossoverPercentExperiment(newSet, 0.6);
            AddCrossoverPercentExperiment(newSet, 0.7);
            AddCrossoverPercentExperiment(newSet, 0.8);
            AddCrossoverPercentExperiment(newSet, 0.9);

            //Mutation Percent
            newSet = new ExperimentSet {
                FileName = "C:/Repos/CS4470/GeneticAlgorithm/results/mutationpercent.csv"
            };
            experimentSets.Add(newSet);

            AddMutationPercentExperiment(newSet, 0.1);
            AddMutationPercentExperiment(newSet, 0.2);
            AddMutationPercentExperiment(newSet, 0.3);
            AddMutationPercentExperiment(newSet, 0.4);
            AddMutationPercentExperiment(newSet, 0.5);
            AddMutationPercentExperiment(newSet, 0.6);
            AddMutationPercentExperiment(newSet, 0.7);
            AddMutationPercentExperiment(newSet, 0.8);
            AddMutationPercentExperiment(newSet, 0.9);

            //Crossover Method
            newSet = new ExperimentSet {
                FileName = "C:/Repos/CS4470/GeneticAlgorithm/results/crossovermethod.csv"
            };
            experimentSets.Add(newSet);

            AddCrossoverMethodExperiment(newSet, new UniformCrossoverMethod(), "Uniform");
            AddCrossoverMethodExperiment(newSet, new SingleSplitCrossoverMethod(), "Single Split");
            AddCrossoverMethodExperiment(newSet, new DoubleSplitCrossoverMethod(), "Double Split");

            //Crossover Handler
            newSet = new ExperimentSet {
                FileName = "C:/Repos/CS4470/GeneticAlgorithm/results/selectionmethod.csv"
            };
            experimentSets.Add(newSet);

            AddCrossoverHandlerExperiment(newSet, new AlphaBetaCrossoverHandler(), "Alpha-Beta");
            AddCrossoverHandlerExperiment(newSet, new FitnessPercentageCrossoverHandler(), "Fitness Percentage");
            AddCrossoverHandlerExperiment(newSet, new FitnessRankCrossoverHandler(), "Fitness Rank");
            AddCrossoverHandlerExperiment(newSet, new TournamentCrossoverHandler(), "Tournament");

            return(experimentSets);
        }
Exemplo n.º 12
0
        private static List<ExperimentSet> InitExperimentSets()
        {
            var experimentSets = new List<ExperimentSet>();

            //Population Size
            var newSet = new ExperimentSet {FileName = "C:/Repos/CS4470/GeneticAlgorithm/results/popsize.csv"};
            experimentSets.Add(newSet);

            AddPopulationSizeExperiment(newSet, 10);
            AddPopulationSizeExperiment(newSet, 20);
            AddPopulationSizeExperiment(newSet, 30);
            AddPopulationSizeExperiment(newSet, 40);
            AddPopulationSizeExperiment(newSet, 50);
            AddPopulationSizeExperiment(newSet, 60);
            AddPopulationSizeExperiment(newSet, 70);
            AddPopulationSizeExperiment(newSet, 80);
            AddPopulationSizeExperiment(newSet, 90);
            AddPopulationSizeExperiment(newSet, 100);

            //Crossover Percent
            newSet = new ExperimentSet {FileName = "C:/Repos/CS4470/GeneticAlgorithm/results/crossoverpercent.csv"};
            experimentSets.Add(newSet);

            AddCrossoverPercentExperiment(newSet, 0.1);
            AddCrossoverPercentExperiment(newSet, 0.2);
            AddCrossoverPercentExperiment(newSet, 0.3);
            AddCrossoverPercentExperiment(newSet, 0.4);
            AddCrossoverPercentExperiment(newSet, 0.5);
            AddCrossoverPercentExperiment(newSet, 0.6);
            AddCrossoverPercentExperiment(newSet, 0.7);
            AddCrossoverPercentExperiment(newSet, 0.8);
            AddCrossoverPercentExperiment(newSet, 0.9);

            //Mutation Percent
            newSet = new ExperimentSet {FileName = "C:/Repos/CS4470/GeneticAlgorithm/results/mutationpercent.csv"};
            experimentSets.Add(newSet);

            AddMutationPercentExperiment(newSet, 0.1);
            AddMutationPercentExperiment(newSet, 0.2);
            AddMutationPercentExperiment(newSet, 0.3);
            AddMutationPercentExperiment(newSet, 0.4);
            AddMutationPercentExperiment(newSet, 0.5);
            AddMutationPercentExperiment(newSet, 0.6);
            AddMutationPercentExperiment(newSet, 0.7);
            AddMutationPercentExperiment(newSet, 0.8);
            AddMutationPercentExperiment(newSet, 0.9);

            //Crossover Method
            newSet = new ExperimentSet {FileName = "C:/Repos/CS4470/GeneticAlgorithm/results/crossovermethod.csv"};
            experimentSets.Add(newSet);

            AddCrossoverMethodExperiment(newSet, new UniformCrossoverMethod(), "Uniform");
            AddCrossoverMethodExperiment(newSet, new SingleSplitCrossoverMethod(), "Single Split");
            AddCrossoverMethodExperiment(newSet, new DoubleSplitCrossoverMethod(), "Double Split");

            //Crossover Handler
            newSet = new ExperimentSet {FileName = "C:/Repos/CS4470/GeneticAlgorithm/results/selectionmethod.csv"};
            experimentSets.Add(newSet);

            AddCrossoverHandlerExperiment(newSet, new AlphaBetaCrossoverHandler(), "Alpha-Beta");
            AddCrossoverHandlerExperiment(newSet, new FitnessPercentageCrossoverHandler(), "Fitness Percentage");
            AddCrossoverHandlerExperiment(newSet, new FitnessRankCrossoverHandler(), "Fitness Rank");
            AddCrossoverHandlerExperiment(newSet, new TournamentCrossoverHandler(), "Tournament");

            return experimentSets;
        }