public Engine(ExperimentParameters experimentParameters, IBenchmark benchmark, ConstraintsBuilderBase constraintsBuilder, IProcessor <Point[]> pointsNormalizer, IProcessor <Constraint[]> redundantConstraintsRemover, IAngleCalculator meanAngleCalculator, Stopwatch stoper) { Parameters = experimentParameters; Benchmark = benchmark; _constraintsBuilder = constraintsBuilder; _redundantConstraintsRemover = redundantConstraintsRemover; _stoper = stoper; _meanAngleCalculator = meanAngleCalculator; _pointsNormalizer = pointsNormalizer; Statistics = new Statistics(); EvolutionSteps = new List <IList <Constraint> >(); NormalizedEvolutionSteps = new List <IList <Constraint> >(); MersenneTwister.Initialize(experimentParameters.Seed); //var normalDis = new NormalDistribution(); //const int count = int.MaxValue / 1000; //var values = new double[count]; //////var sum = 0.0; //for (int i = 0; i < count; i++) //{ // values[i] = MersenneTwister.Instance.NextGaussian(); //} ////values = normalDis.Generate(count); //var mean = values.Mean(); //var stdDev = values.StandardDeviation(); }
public SmartTargetFinder(ICheckpointMemory checkpointMemory, IInputContainer inputContainer, ISpeedCalculator speed, IAngleCalculator angleCalculator) { this.checkpointMemory = checkpointMemory; this.inputContainer = inputContainer; this.speed = speed; this.angleCalculator = angleCalculator; }
public LinearMovementAngleSlowDownCalculator(ISlowDownCalculator slowDownCalculator, IGamestateCalculator gamestateCalculator, IInputContainer inputContainer, IAngleCalculator angleCalculator, ICheckpointMemory checkpointMemory) { this.slowDownCalculator = slowDownCalculator; this.gamestateCalculator = gamestateCalculator; this.inputContainer = inputContainer; this.angleCalculator = angleCalculator; this.checkpointMemory = checkpointMemory; }
public AngleAndDistThrustCalculator(ICheckpointMemory checkpointMemory, IBoostUseCalculator boostUseCalculator, IAngleCalculator angleCalculator, ISlowDownCalculator slowDownCalculator, IGamestateCalculator gamestateCalculator) { this.checkpointMemory = checkpointMemory; this.boostUseCalculator = boostUseCalculator; this.angleCalculator = angleCalculator; this.slowDownCalculator = slowDownCalculator; this.gamestateCalculator = gamestateCalculator; boost = false; }