Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/06/15 19:45:12 (10 years ago)
Author:
gkronber
Message:

worked on expression expander for const opt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GrammaticalOptimization/Main/Program.cs

    r11895 r11966  
    2727
    2828      //RunDemo();
    29       RunGpDemo();
    30       // RunGridTest();
     29      // RunGpDemo();
     30      RunGridTest();
    3131      //RunGpGridTest();
    3232    }
    3333
    3434    private static void RunGridTest() {
    35       int maxIterations = 70000; // for poly-10 with 50000 evaluations no successful try with hl yet
     35      int maxIterations = 200000; // for poly-10 with 50000 evaluations no successful try with hl yet
    3636      //var globalRandom = new Random(31415);
    3737      var localRandSeed = 31415;
    38       var reps = 30;
     38      var reps = 20;
    3939
    4040      var policyFactories = new Func<IBanditPolicy>[]
     
    112112      var instanceFactories = new Func<Random, Tuple<IProblem, int>>[]
    113113      {
    114         //(rand) => Tuple.Create((IProblem)new SantaFeAntProblem(), 17),
     114        (rand) => Tuple.Create((IProblem)new SantaFeAntProblem(), 17),
    115115        //(rand) => Tuple.Create((IProblem)new FindPhrasesProblem(rand, 10, numPhrases:5, phraseLen:3, numOptimalPhrases:5, numDecoyPhrases:0, correctReward:1, decoyReward:0, phrasesAsSets:false ), 15),
    116116        //(rand) => Tuple.Create((IProblem)new FindPhrasesProblem(rand, 10, numPhrases:5, phraseLen:3, numOptimalPhrases:5, numDecoyPhrases:0, correctReward:1, decoyReward:0, phrasesAsSets:true ), 15),
     
    121121
    122122      foreach (var instanceFactory in instanceFactories) {
    123         foreach (var useCanonical in new bool[] { true /*, false */}) {
    124           foreach (var randomTries in new int[] { 0 /*, 1, 10 /*, /* 5, 100 /*, 500, 1000 */}) {
     123        foreach (var useCanonical in new bool[] { true, false }) {
     124          foreach (var randomTries in new int[] { 0, 1, 10 /*, /* 5, 100 /*, 500, 1000 */}) {
    125125            foreach (var policyFactory in policyFactories) {
    126126              var myRandomTries = randomTries;
     
    146146                var problem = instance.Item1;
    147147                var maxLen = instance.Item2;
    148                 //var alg = new SequentialSearch(problem, maxLen, myLocalRand, myRandomTries,
    149                 //  new GenericGrammarPolicy(problem, policyFactory(), useCanonical));
    150                 var alg = new SequentialSearch(problem, maxLen, myLocalRand,
    151                   myRandomTries,
    152                   new GenericFunctionApproximationGrammarPolicy(problem,
    153                     useCanonical));
     148                var alg = new SequentialSearch(problem, maxLen, myLocalRand, myRandomTries,
     149                  new GenericGrammarPolicy(problem, policyFactory(), useCanonical));
     150                // var alg = new SequentialSearch(problem, maxLen, myLocalRand,
     151                //   myRandomTries,
     152                //   new GenericFunctionApproximationGrammarPolicy(problem,
     153                //     useCanonical));
    154154                //var alg = new ExhaustiveBreadthFirstSearch(problem, 25);
    155155                //var alg = new AlternativesContextSampler(problem, 25);
Note: See TracChangeset for help on using the changeset viewer.