Changeset 15017 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteProblem.cs
- Timestamp:
- 06/01/17 09:28:34 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/BenchmarkSuite/PushBenchmarkSuiteProblem.cs
r14952 r15017 5 5 6 6 using HeuristicLab.BenchmarkSuite; 7 using HeuristicLab. Encodings.IntegerVectorEncoding;7 using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions; 8 8 9 9 using Instances; … … 38 38 PushEvaluator.LoadData(data); 39 39 40 BestKnownQuality = data.BestResult;41 MaxPointsInProgram = data.MaxSize;42 MinPointsInProgram = data.MaxSize;43 EvalPushLimit = data.EvalLimit;44 ErcOptions = data.ErcOptions;45 40 Name = "Push Problem: " + data.Name; 46 41 Description = data.Description; 42 BestKnownQuality = data.BestResult; 43 config.MaxPointsInProgram = data.MaxSize; 44 config.EvalPushLimit = data.EvalLimit; 45 config.ErcOptions = data.ErcOptions; 46 config.FloatStringFormat = data.FloatStringFormat; 47 47 48 48 config.SetEnabledStacks((StackTypes)data.EnabledDataTypes); … … 50 50 Encoding.Bounds[0, 0] = 0; 51 51 Encoding.Bounds[0, 1] = config.EnabledExpressions.Count; 52 Encoding.Length = config.MaxPointsInProgram; 52 53 InitProgramLength = data.MaxSize / 2; 53 54 } 54 55 55 56 protected override PushSolution CreatePushSolution( 56 IntegerVector vector,57 PushProgram program, 57 58 double bestQuality, 58 59 IRandom random, 59 60 IReadOnlyPushConfiguration config, 60 61 IPushEvaluator evaluator) { 61 return new PushBenchmarkSuiteSolution( vector, bestQuality, random, (IReadOnlyPushConfiguration)config.Clone(), (PushBenchmarkSuiteEvaluator)PushEvaluator.Clone());62 return new PushBenchmarkSuiteSolution(program, bestQuality, random, (IReadOnlyPushConfiguration)config.Clone(), (PushBenchmarkSuiteEvaluator)PushEvaluator.Clone()); 62 63 } 63 64 }
Note: See TracChangeset
for help on using the changeset viewer.