Пример #1
0
        private static ExperimentParameters GetExperimentParameters(int numberOfDimensions, int offspringPopulationSize, int numberOfGenerations, int seed, BenchmarkType typeOfBenchmark, bool allowQuadraticTerms, int numberOfPositivePoints, bool useDataNormalization, bool useSeeding)
        {
            return(new ExperimentParameters(
                       numberOfDimensions: numberOfDimensions,
                       basePopulationSize: 100,
                       offspringPopulationSize: offspringPopulationSize,
                       numberOfGenerations: numberOfGenerations,
                       seed: seed,
                       typeOfBenchmark: typeOfBenchmark,

                       trackEvolutionSteps: false,
                       useRedundantConstraintsRemoving: true,
                       useDataNormalization: useDataNormalization,
                       allowQuadraticTerms: allowQuadraticTerms,
                       useSeeding: useSeeding,

                       ballnBoundaryValue: 2.7,
                       cubenBoundaryValue: 2.7,
                       simplexnBoundaryValue: 2.7,

                       numberOfDomainSamples: 100000,
                       numberOfTestPoints: 100000,
                       numberOfPositivePoints: numberOfPositivePoints,
                       numberOfNegativePoints: numberOfPositivePoints * numberOfDimensions * numberOfDimensions,
                       maxNumberOfPointsInSingleArray: 800000,

                       globalLearningRate: EvolutionDefaults.GlobalLearningRate(numberOfDimensions),
                       individualLearningRate: EvolutionDefaults.IndividualLearningRate(numberOfDimensions),
                       stepThreshold: 0.0001,
                       rotationAngle: EvolutionDefaults.RotationAngle,
                       typeOfMutation: MutationType.Correlated,

                       numberOfParentsSolutionsToSelect: 5,
                       typeOfParentsSelection: ParentsSelectionType.Even,
                       typeOfSurvivorsSelection: SurvivorsSelectionType.Distinct,

                       //oneFifthRuleCheckInterval: 5,
                       //oneFifthRuleScalingFactor: 0.9,

                       useRecombination: false,
                       typeOfObjectsRecombination: RecombinationType.Discrete,
                       typeOfStdDeviationsRecombination: RecombinationType.Intermediate,
                       typeOfRotationsRecombination: RecombinationType.Intermediate
                       ));
        }
Пример #2
0
        private static ExperimentParameters GetExperimentParameters()
        {
            var numberOfDimensions = Arguments.Get <int>(nameof(ExperimentParameters.NumberOfDimensions));

            return(new ExperimentParameters(
                       numberOfDimensions: numberOfDimensions,
                       basePopulationSize: Arguments.Get <int>(nameof(EvolutionParameters.BasePopulationSize)),
                       offspringPopulationSize: Arguments.Get <int>(nameof(EvolutionParameters.OffspringPopulationSize)),
                       numberOfGenerations: Arguments.Get <int>(nameof(EvolutionParameters.NumberOfGenerations)),
                       seed: Arguments.Get <int>(nameof(ExperimentParameters.Seed)),
                       typeOfBenchmark: Arguments.Get <BenchmarkType>(nameof(ExperimentParameters.TypeOfBenchmark)),

                       trackEvolutionSteps: Arguments.Get(nameof(ExperimentParameters.TrackEvolutionSteps), EvolutionDefaults.TrackEvolutionSteps),
                       useRedundantConstraintsRemoving: Arguments.Get(nameof(ExperimentParameters.UseRedundantConstraintsRemoving), Defaults.UseRedundantConstraintsRemoving),
                       useDataNormalization: Arguments.Get(nameof(ExperimentParameters.UseDataNormalization), Defaults.UseDataNormalization),
                       allowQuadraticTerms: Arguments.Get(nameof(ExperimentParameters.AllowQuadraticTerms), Defaults.AllowQuadraticTerms),
                       useSeeding: Arguments.Get(nameof(ExperimentParameters.UseSeeding), Defaults.UseSeeding),

                       ballnBoundaryValue: Arguments.Get(nameof(ExperimentParameters.BallnBoundaryValue), Defaults.BallnBoundaryValue),
                       cubenBoundaryValue: Arguments.Get(nameof(ExperimentParameters.CubenBoundaryValue), Defaults.CubenBoundaryValue),
                       simplexnBoundaryValue: Arguments.Get(nameof(ExperimentParameters.SimplexnBoundaryValue), Defaults.SimplexnBoundaryValue),

                       numberOfDomainSamples: Arguments.Get(nameof(ExperimentParameters.NumberOfDomainSamples), Defaults.NumberOfDomainSamples),
                       numberOfTestPoints: Arguments.Get(nameof(ExperimentParameters.NumberOfTestPoints), Defaults.NumberOfTestPoints),
                       numberOfPositivePoints: Arguments.Get(nameof(ExperimentParameters.NumberOfPositivePoints), Defaults.NumberOfPositivePoints),
                       numberOfNegativePoints: Arguments.Get(nameof(ExperimentParameters.NumberOfNegativePoints), Defaults.NumberOfNegativePoints),
                       maxNumberOfPointsInSingleArray: Arguments.Get(nameof(ExperimentParameters.MaxNumberOfPointsInSingleArray), Defaults.MaxNumberOfPointsInSingleArray),

                       globalLearningRate: Arguments.Get(nameof(EvolutionParameters.GlobalLearningRate), EvolutionDefaults.GlobalLearningRate(numberOfDimensions)),
                       individualLearningRate: Arguments.Get(nameof(EvolutionParameters.IndividualLearningRate), EvolutionDefaults.IndividualLearningRate(numberOfDimensions)),
                       stepThreshold: Arguments.Get(nameof(EvolutionParameters.StepThreshold), 0.0001),
                       //stepThreshold: Arguments.Get(nameof(EvolutionParameters.StepThreshold), double.Epsilon * 1.0E+170),
                       rotationAngle: Arguments.Get(nameof(EvolutionParameters.RotationAngle), EvolutionDefaults.RotationAngle),
                       //rotationAngle: Arguments.Get(nameof(EvolutionParameters.RotationAngle), double.Epsilon * 1.0E+170),//EvolutionDefaults.RotationAngle),
                       typeOfMutation: Arguments.Get(nameof(EvolutionParameters.TypeOfMutation), MutationType.Correlated),//EvolutionDefaults.TypeOfMutation),
                       //typeOfMutation: Arguments.Get(nameof(EvolutionParameters.TypeOfMutation), MutationType.Correlated),//EvolutionDefaults.TypeOfMutation),

                       numberOfParentsSolutionsToSelect: Arguments.Get(nameof(EvolutionParameters.NumberOfParentsSolutionsToSelect), EvolutionDefaults.NumberOfParentsSolutionsToSelect),
                       typeOfParentsSelection: Arguments.Get(nameof(EvolutionParameters.TypeOfParentsSelection), ParentsSelectionType.Even),
                       typeOfSurvivorsSelection: Arguments.Get(nameof(EvolutionParameters.TypeOfSurvivorsSelection), SurvivorsSelectionType.Distinct),//EvolutionDefaults.TypeOfSurvivorsSelection),

                       oneFifthRuleCheckInterval: Arguments.Get(nameof(EvolutionParameters.OneFifthRuleCheckInterval), EvolutionDefaults.OneFifthRuleCheckInterval),
                       oneFifthRuleScalingFactor: Arguments.Get(nameof(EvolutionParameters.OneFifthRuleScalingFactor), EvolutionDefaults.OneFifthRuleScalingFactor),

                       useRecombination: Arguments.Get(nameof(EvolutionParameters.UseRecombination), EvolutionDefaults.UseRecombination),
                       typeOfObjectsRecombination: Arguments.Get(nameof(EvolutionParameters.TypeOfObjectsRecombination), EvolutionDefaults.TypeOfObjectsRecombination),
                       typeOfStdDeviationsRecombination: Arguments.Get(nameof(EvolutionParameters.TypeOfStdDeviationsRecombination), EvolutionDefaults.TypeOfStdDeviationsRecombination),
                       typeOfRotationsRecombination: Arguments.Get(nameof(EvolutionParameters.TypeOfRotationsRecombination), EvolutionDefaults.TypeOfRotationsRecombination)
                       ));
        }