Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/10/17 00:27:31 (8 years ago)
Author:
pkimmesw
Message:

#2665 LexicaseSelector, Performance improvements, UI Fixes, Debugger only shows used stacks, fixed Debugger stepping, Added vector expressions, ERCOptions,

Location:
branches/PushGP/HeuristicLab.PushGP/FeatureTests
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/FeatureTests/FeatureTests.csproj

    r14777 r14834  
    4040      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
    4141    </Reference>
     42    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     43      <SpecificVersion>False</SpecificVersion>
     44      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
     45    </Reference>
    4246    <Reference Include="HeuristicLab.Random-3.3">
    4347      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
     
    5761    <Compile Include="DirtyList\PushStack3.cs" />
    5862    <Compile Include="DirtyList\PushStack.cs" />
    59     <Compile Include="Pool\IPooledObject.cs" />
    60     <Compile Include="Pool\ManagedPool.cs" />
    61     <Compile Include="Pool\ManagedPoolProvider.cs" />
    62     <Compile Include="Pool\ObjectPool.cs" />
    63     <Compile Include="Pool\PooledList.cs" />
    6463    <Compile Include="Program.cs" />
    6564    <Compile Include="Properties\AssemblyInfo.cs" />
  • branches/PushGP/HeuristicLab.PushGP/FeatureTests/Program.cs

    r14777 r14834  
    88  using System.Threading;
    99  using DirtyList;
    10 
    1110  using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
     11  using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool;
     12  using HeuristicLab.Problems.ProgramSynthesis.Push.Erc;
    1213  using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions;
    13   using HeuristicLab.Problems.ProgramSynthesis.Push.Generators;
     14  using HeuristicLab.Problems.ProgramSynthesis.Push.Generators.CodeGenerator;
    1415  using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
    1516  using HeuristicLab.Problems.ProgramSynthesis.Push.Parser;
     
    1819  using HeuristicLab.Random;
    1920
    20   using TestPooling.Pool;
    21 
    2221  class Program {
    2322    private const int PartitionSize = 512;
     
    3332      //Test3();
    3433
    35       //TestCollectionPooling();
     34      TestCollectionPooling();
    3635
    3736      //DirtyListTest();
     
    4645      //PerformanceParallelTestInterpreter();
    4746      //PerformanceTestLinearCodeGenerator();
    48       TestRobustness();
     47      //TestRobustness();
    4948      //TestPool();
    5049      //TestPoolPerformance();
     
    5857
    5958    private static void TestExpressionDependencies() {
    60       var enabledExpressions = ExpressionTable.GetEnabledExpressionsByStackTypes(StackTypes.Boolean | StackTypes.Integer);
     59      var enabledExpressions = ExpressionTable.GetExpressionsByStackTypes(StackTypes.Boolean | StackTypes.Integer);
    6160    }
    6261
     
    234233
    235234      Console.WriteLine("Collection Pooling - Duration: {0} - {1} for {2}/{3} instances", sw.ElapsedTicks, sw.Elapsed.TotalSeconds, provider.InstanceCount, TotalInstanceCount);
    236     }
    237 
    238 
    239     private static void Test1() {
    240       var sw = new Stopwatch();
    241 
    242       sw.Start();
    243       Parallel.For(0, PopulationCount, pc => {
    244         for (var e = 0; e < ExampleCount; e++) {
    245           using (var pool = new ManagedPool<Person>(PartitionSize, () => new Person())) {
    246             for (var i = 0; i < InstanceCount; i++) {
    247               var person = pool.Get();
    248               person.Age = pc + e + i;
    249               person.Name = string.Format("{0} - {1} - {2}", pc, e, i);
    250             }
    251           }
    252         }
    253       });
    254       sw.Stop();
    255 
    256       Console.WriteLine("1 - Duration: {0} - {1} for {2}/{3} instances", sw.ElapsedTicks, sw.Elapsed.TotalSeconds, ManagedPool<Person>.InstanceCount, TotalInstanceCount);
    257235    }
    258236
     
    328306      var interpreter = new PushInterpreter();
    329307
    330       interpreter.RunAsync("( 0 2 CODE.QUOTE ( 1 INTEGER.+ 0 3 CODE.QUOTE ( 1 INTEGER.+ INTEGER.* ) CODE.DO*RANGE INTEGER.+ ) CODE.DO*RANGE )", true).Wait();
     308      interpreter.Run("( 0 2 CODE.QUOTE ( 1 INTEGER.+ 0 3 CODE.QUOTE ( 1 INTEGER.+ INTEGER.* ) CODE.DO*RANGE INTEGER.+ ) CODE.DO*RANGE )");
    331309
    332310      while (!interpreter.IsCompleted) {
     
    399377      var sw = new Stopwatch();
    400378      var random = new FastRandom(1337);
    401       var poolProvider = new ManagedPoolProvider<PooledList<Expression>>(65636, () => new PooledList<Expression>());
    402 
    403       sw.Start();
    404       var expressions = LinearCodeGenerator.RandomCode(60000000, null, random).ToList();
     379      var config = new PushConfiguration {
     380        ErcOptions = {
     381          ErcProbability = 0.2,
     382          FloatErcOptions = new FloatErcOptions(-100.5, 100.5, 1000.5, 2000.5),
     383          IntegerErcOptions = new IntegerErcOptions(-10, 10, 100, 200),
     384          StringErcOptions =
     385            new StringErcOptions { AllowSpace = true, SpaceProbability = 0.2 },
     386          BooleanErcOptions = new BooleanErcOptions(),
     387          CharErcOptions = new CharErcOptions(Convert.ToInt32('a'), Convert.ToInt32('Z'))
     388        }
     389      };
     390
     391      sw.Start();
     392      var expressions = LinearCodeGenerator.RandomCode(60000000, null, random, config).ToList();
    405393      sw.Stop();
    406394
     
    417405      var config = new PushConfiguration {
    418406        EvalPushLimit = 1024,
    419         MaxPointsInProgram = 1024,
    420         IsCodeStackEnabled = false,
    421         IsExecStackEnabled = false,
    422         IsBooleanStackEnabled = false,
    423         IsFloatStackEnabled = false,
    424         IsIntegerStackEnabled = false,
    425         IsNameStackEnabled = false,
     407        MaxPointsInProgram = 1024
    426408      };
    427409
Note: See TracChangeset for help on using the changeset viewer.