Changeset 14747 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/PushProblem.cs
- Timestamp:
- 03/12/17 13:16:56 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Problem/PushProblem.cs
r14746 r14747 8 8 using Core; 9 9 using Encodings.IntegerVectorEncoding; 10 using Expressions;11 10 12 11 using HeuristicLab.BenchmarkSuite; 13 12 using HeuristicLab.Data; 14 using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool;15 13 16 14 using Instances; … … 28 26 private readonly PushConfiguration config; 29 27 private PushInterpreterPool pool; 30 private ManagedPoolProvider<PushProgram> pushProgramPoolProvider;31 28 32 29 public PushProblem() { 33 30 config = new PushConfiguration(); 34 pool = new PushInterpreterPool(config); 35 36 pushProgramPoolProvider = new ManagedPoolProvider<PushProgram>(1024); 37 pushProgramPoolProvider.InitDummyPartition(() => new PushProgram()); 31 pool = new PushInterpreterPool(10000, 1024, 65536, config); 38 32 39 33 InitEvents(); … … 50 44 : base(original, cloner) { 51 45 config = cloner.Clone(original.config); 52 pool = new PushInterpreterPool( config);46 pool = new PushInterpreterPool(65536, 1024, 65536, config); 53 47 54 48 Instructions = config; … … 62 56 pool = new PushInterpreterPool(config); 63 57 Instructions = config; 64 65 pushProgramPoolProvider = new ManagedPoolProvider<PushProgram>(1024);66 pushProgramPoolProvider.InitDummyPartition(() => new PushProgram());67 58 68 59 InitEvents(); … … 426 417 interpreter.FloatStack.Push(example.InputFloat); 427 418 428 using (interpreter.PushProgramPool = pushProgramPoolProvider.CreatePool()) { 429 interpreter.Run(program); 430 } 419 interpreter.Run(program); 431 420 432 421 result += GetDiff(example.OutputInt, interpreter.IntegerStack, DataDescriptor.WorstResult, LongDiffer)
Note: See TracChangeset
for help on using the changeset viewer.