- Timestamp:
- 02/06/15 19:45:12 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization/Main/Program.cs
r11895 r11966 27 27 28 28 //RunDemo(); 29 RunGpDemo();30 //RunGridTest();29 // RunGpDemo(); 30 RunGridTest(); 31 31 //RunGpGridTest(); 32 32 } 33 33 34 34 private static void RunGridTest() { 35 int maxIterations = 70000; // for poly-10 with 50000 evaluations no successful try with hl yet35 int maxIterations = 200000; // for poly-10 with 50000 evaluations no successful try with hl yet 36 36 //var globalRandom = new Random(31415); 37 37 var localRandSeed = 31415; 38 var reps = 30;38 var reps = 20; 39 39 40 40 var policyFactories = new Func<IBanditPolicy>[] … … 112 112 var instanceFactories = new Func<Random, Tuple<IProblem, int>>[] 113 113 { 114 //(rand) => Tuple.Create((IProblem)new SantaFeAntProblem(), 17),114 (rand) => Tuple.Create((IProblem)new SantaFeAntProblem(), 17), 115 115 //(rand) => Tuple.Create((IProblem)new FindPhrasesProblem(rand, 10, numPhrases:5, phraseLen:3, numOptimalPhrases:5, numDecoyPhrases:0, correctReward:1, decoyReward:0, phrasesAsSets:false ), 15), 116 116 //(rand) => Tuple.Create((IProblem)new FindPhrasesProblem(rand, 10, numPhrases:5, phraseLen:3, numOptimalPhrases:5, numDecoyPhrases:0, correctReward:1, decoyReward:0, phrasesAsSets:true ), 15), … … 121 121 122 122 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 */}) { 125 125 foreach (var policyFactory in policyFactories) { 126 126 var myRandomTries = randomTries; … … 146 146 var problem = instance.Item1; 147 147 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)); 154 154 //var alg = new ExhaustiveBreadthFirstSearch(problem, 25); 155 155 //var alg = new AlternativesContextSampler(problem, 25);
Note: See TracChangeset
for help on using the changeset viewer.