source: branches/HeuristicLab.Problems.GrammaticalOptimization/Main/Program.cs @ 11973

Last change on this file since 11973 was 11973, checked in by gkronber, 7 years ago

#2283: preparation for seq-search with fun approx symbreg experiment

File size: 21.9 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Diagnostics;
4using System.Globalization;
5using System.Runtime.Remoting.Messaging;
6using System.Text;
7using System.Threading;
8using System.Threading.Tasks;
9using HeuristicLab.Algorithms.Bandits;
10using HeuristicLab.Algorithms.Bandits.BanditPolicies;
11using HeuristicLab.Algorithms.Bandits.GrammarPolicies;
12using HeuristicLab.Algorithms.Bandits.Models;
13using HeuristicLab.Algorithms.GeneticProgramming;
14using HeuristicLab.Algorithms.GrammaticalOptimization;
15using HeuristicLab.Problems.GrammaticalOptimization;
16using HeuristicLab.Problems.GrammaticalOptimization.SymbReg;
17using BoltzmannExplorationPolicy = HeuristicLab.Algorithms.Bandits.BanditPolicies.BoltzmannExplorationPolicy;
18using EpsGreedyPolicy = HeuristicLab.Algorithms.Bandits.BanditPolicies.EpsGreedyPolicy;
19using IProblem = HeuristicLab.Problems.GrammaticalOptimization.IProblem;
20using RandomPolicy = HeuristicLab.Algorithms.Bandits.BanditPolicies.RandomPolicy;
21using UCTPolicy = HeuristicLab.Algorithms.Bandits.BanditPolicies.UCTPolicy;
22
23namespace Main {
24  class Program {
25    static void Main(string[] args) {
26      CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
27
28      //RunDemo();
29      //RunGpDemo();
30      //RunGridTest();
31      //RunGpGridTest();
32      RunFunApproxTest();
33    }
34
35    private static void RunGridTest() {
36      int maxIterations = 200000; // for poly-10 with 50000 evaluations no successful try with hl yet
37      //var globalRandom = new Random(31415);
38      var localRandSeed = 31415;
39      var reps = 20;
40
41      var policyFactories = new Func<IBanditPolicy>[]
42        {
43         () => new RandomPolicy(),
44          () => new ActiveLearningPolicy(), 
45         () => new EpsGreedyPolicy(0.01, (aInfo)=> aInfo.MaxReward, "max"),
46         () => new EpsGreedyPolicy(0.05, (aInfo)=> aInfo.MaxReward, "max"),
47         () => new EpsGreedyPolicy(0.1, (aInfo)=> aInfo.MaxReward, "max"),
48         () => new EpsGreedyPolicy(0.2, (aInfo)=> aInfo.MaxReward, "max"),
49         //() => new GaussianThompsonSamplingPolicy(),
50         () => new GaussianThompsonSamplingPolicy(true),
51         () => new GenericThompsonSamplingPolicy(new GaussianModel(0.5, 10, 1)),
52         () => new GenericThompsonSamplingPolicy(new GaussianModel(0.5, 10, 1, 1)),
53         //() => new BernoulliThompsonSamplingPolicy(),
54         () => new GenericThompsonSamplingPolicy(new BernoulliModel(1, 1)),
55         () => new EpsGreedyPolicy(0.01),
56         () => new EpsGreedyPolicy(0.05),
57         () => new EpsGreedyPolicy(0.1),
58         () => new EpsGreedyPolicy(0.2),
59         () => new EpsGreedyPolicy(0.5),
60         () => new UCTPolicy(0.01),
61         () => new UCTPolicy(0.05),
62         () => new UCTPolicy(0.1),
63         () => new UCTPolicy(0.5),
64         () => new UCTPolicy(1),
65         () => new UCTPolicy(2),
66         () => new UCTPolicy( 5),
67         () => new UCTPolicy( 10),
68         () => new ModifiedUCTPolicy(0.01),
69         () => new ModifiedUCTPolicy(0.05),
70         () => new ModifiedUCTPolicy(0.1),
71         () => new ModifiedUCTPolicy(0.5),
72         () => new ModifiedUCTPolicy(1),
73         () => new ModifiedUCTPolicy(2),
74         () => new ModifiedUCTPolicy( 5),
75         () => new ModifiedUCTPolicy( 10),
76         () => new UCB1Policy(),
77         () => new UCB1TunedPolicy(),
78         () => new UCBNormalPolicy(),
79         () => new BoltzmannExplorationPolicy(1),
80         () => new BoltzmannExplorationPolicy(10),
81         () => new BoltzmannExplorationPolicy(20),
82         () => new BoltzmannExplorationPolicy(100),
83         () => new BoltzmannExplorationPolicy(200),
84         () => new BoltzmannExplorationPolicy(500),
85         () => new ChernoffIntervalEstimationPolicy( 0.01),
86         () => new ChernoffIntervalEstimationPolicy( 0.05),
87         () => new ChernoffIntervalEstimationPolicy( 0.1),
88         () => new ChernoffIntervalEstimationPolicy( 0.2),
89         () => new ThresholdAscentPolicy(5, 0.01),
90         () => new ThresholdAscentPolicy(5, 0.05),
91         () => new ThresholdAscentPolicy(5, 0.1),
92         () => new ThresholdAscentPolicy(5, 0.2),
93         () => new ThresholdAscentPolicy(10, 0.01),
94         () => new ThresholdAscentPolicy(10, 0.05),
95         () => new ThresholdAscentPolicy(10, 0.1),
96         () => new ThresholdAscentPolicy(10, 0.2),
97         () => new ThresholdAscentPolicy(50, 0.01),
98         () => new ThresholdAscentPolicy(50, 0.05),
99         () => new ThresholdAscentPolicy(50, 0.1),
100         () => new ThresholdAscentPolicy(50, 0.2),
101         () => new ThresholdAscentPolicy(100, 0.01),
102         () => new ThresholdAscentPolicy(100, 0.05),
103         () => new ThresholdAscentPolicy(100, 0.1),
104         () => new ThresholdAscentPolicy(100, 0.2),
105         () => new ThresholdAscentPolicy(500, 0.01),
106         () => new ThresholdAscentPolicy(500, 0.05),
107         () => new ThresholdAscentPolicy(500, 0.1),
108         () => new ThresholdAscentPolicy(500, 0.2),
109         //() => new ThresholdAscentPolicy(5000, 0.01),
110         //() => new ThresholdAscentPolicy(10000, 0.01),
111        };
112
113      var instanceFactories = new Func<Random, Tuple<IProblem, int>>[]
114      {
115        (rand) => Tuple.Create((IProblem)new SantaFeAntProblem(), 17),
116        //(rand) => Tuple.Create((IProblem)new FindPhrasesProblem(rand, 10, numPhrases:5, phraseLen:3, numOptimalPhrases:5, numDecoyPhrases:0, correctReward:1, decoyReward:0, phrasesAsSets:false ), 15),
117        //(rand) => Tuple.Create((IProblem)new FindPhrasesProblem(rand, 10, numPhrases:5, phraseLen:3, numOptimalPhrases:5, numDecoyPhrases:0, correctReward:1, decoyReward:0, phrasesAsSets:true ), 15),
118        //(rand) => Tuple.Create((IProblem)new FindPhrasesProblem(rand, 10, numPhrases:5, phraseLen:3, numOptimalPhrases:5, numDecoyPhrases:200, correctReward:1, decoyReward:0.5, phrasesAsSets:false), 15),
119        //(rand) => Tuple.Create((IProblem)new FindPhrasesProblem(rand, 10, numPhrases:5, phraseLen:3, numOptimalPhrases:5, numDecoyPhrases:200, correctReward:1, decoyReward:0.5, phrasesAsSets:true), 15),
120        (rand) => Tuple.Create((IProblem)new SymbolicRegressionPoly10Problem(), 23)
121      };
122
123      foreach (var instanceFactory in instanceFactories) {
124        foreach (var useCanonical in new bool[] { true, false }) {
125          foreach (var randomTries in new int[] { 0, 1, 10 /*, /* 5, 100 /*, 500, 1000 */}) {
126            foreach (var policyFactory in policyFactories) {
127              var myRandomTries = randomTries;
128              var localRand = new Random(localRandSeed);
129              var options = new ParallelOptions();
130              options.MaxDegreeOfParallelism = 4;
131              Parallel.For(0, reps, options, (i) => {
132                Random myLocalRand;
133                lock (localRand)
134                  myLocalRand = new Random(localRand.Next());
135
136                int iterations = 0;
137                var globalStatistics = new SentenceSetStatistics();
138
139                // var problem = new SymbolicRegressionPoly10Problem();
140                // var problem = new SantaFeAntProblem();
141                //var problem = new PalindromeProblem();
142                //var problem = new HardPalindromeProblem();
143                //var problem = new RoyalPairProblem();
144                //var problem = new EvenParityProblem();
145                // var alg = new MctsSampler(problem.Item1, problem.Item2, myLocalRand, myRandomTries, policy());
146                var instance = instanceFactory(myLocalRand);
147                var problem = instance.Item1;
148                var maxLen = instance.Item2;
149                var alg = new SequentialSearch(problem, maxLen, myLocalRand, myRandomTries,
150                  new GenericGrammarPolicy(problem, policyFactory(), useCanonical));
151                // var alg = new SequentialSearch(problem, maxLen, myLocalRand,
152                //   myRandomTries,
153                //   new GenericFunctionApproximationGrammarPolicy(problem,
154                //     useCanonical));
155                //var alg = new ExhaustiveBreadthFirstSearch(problem, 25);
156                //var alg = new AlternativesContextSampler(problem, 25);
157
158                alg.SolutionEvaluated += (sentence, quality) => {
159                  iterations++;
160                  globalStatistics.AddSentence(sentence, quality);
161                  if (iterations % 1000 == 0) {
162                    Console.WriteLine("{0,3} {1,5} \"{2,25}\" {3} {4} {5}", i, myRandomTries, policyFactory(), useCanonical, problem.ToString(), globalStatistics);
163                  }
164                };
165                alg.FoundNewBestSolution += (sentence, quality) => {
166                  //Console.WriteLine("{0,5} {1,25} {2} {3}",
167                  //  myRandomTries, policyFactory(), useCanonical,
168                  //  globalStatistics);
169                };
170
171                alg.Run(maxIterations);
172              });
173            }
174          }
175        }
176      }
177    }
178
179    private static void RunDemo() {
180      // TODO: unify MCTS, TD and ContextMCTS Solvers (stateInfos)
181      // TODO: test with eps-greedy using max instead of average as value (seems to work well for symb-reg! explore further!)
182      // TODO: separate value function from policy
183      // TODO: warum funktioniert die alte Implementierung von GaussianThompson besser fÃŒr SantaFe als neue? Siehe Vergleich: alte vs. neue implementierung GaussianThompsonSampling
184      // TODO: why does GaussianThompsonSampling work so well with MCTS for the artificial ant problem?
185      // TODO: research thompson sampling for max bandit?
186      // TODO: verify TA implementation using example from the original paper     
187      // TODO: implement thompson sampling for gaussian mixture models
188      // TODO: gleichzeitige modellierung von transformierter zielvariable (y, 1/y, log(y), exp(y), sqrt(y), ...)
189      // TODO: vergleich bei complete-randomly möglichst kurze sÀtze generieren vs. einfach zufÀllig alternativen wÀhlen
190      // TODO: reward discounting (fÃŒr verÀnderliche reward distributions ÃŒber zeit). speziellen unit-test dafÃŒr erstellen
191      // TODO: constant optimization
192
193
194      int maxIterations = 1000000;
195      int iterations = 0;
196      var sw = new Stopwatch();
197
198      var globalStatistics = new SentenceSetStatistics();
199      var random = new Random();
200
201
202      //var problem = new RoyalSequenceProblem(random, 10, 30, 2, 1, 0);
203      // var phraseLen = 3;
204      // var numPhrases = 5;
205      // var problem = new RoyalPhraseSequenceProblem(random, 10, numPhrases, phraseLen: phraseLen, numCorrectPhrases: 1, correctReward: 1, incorrectReward: 0.0, phrasesAsSets: false);
206
207      //var phraseLen = 3;
208      //var numPhrases = 5;
209      //var problem = new FindPhrasesProblem(random, 10, numPhrases, phraseLen, numOptimalPhrases: numPhrases, numDecoyPhrases: 0, correctReward: 1.0, decoyReward: 0, phrasesAsSets: false);
210
211      // good results for symb-reg
212      // prev results: e.g. 10 randomtries and EpsGreedyPolicy(0.2, (aInfo)=>aInfo.MaxReward)
213      // 2015 01 19: grid test with canonical states:
214      // - EpsGreedyPolicy(0.20,max)
215      // - GenericThompsonSamplingPolicy("")
216      // - UCTPolicy(0.10) (5 of 5 runs, 35000 iters avg.), 10 successful runs of 10 with rand-tries 0, bei 40000 iters 9 / 10, bei 30000 1 / 10
217      // 2015 01 22: symb-reg: grid test on find-phrases problem showed good results for UCB1TunedPolicy and SequentialSearch with canonical states
218      // - symb-reg: consistent results with UCB1Tuned. finds optimal solution in ~50k iters (new GenericGrammarPolicy(problem, new UCB1TunedPolicy(), true));
219      // 2015 01 23: grid test with canonical states:
220      // - UCTPolicy(0.10) und UCBNormalPolicy 10/10 optimale Lösungen bei max. 50k iters, etwas schlechter: generic-thompson with variable sigma und bolzmannexploration (100)
221
222
223      // good results for artificial ant:
224      // prev results:
225      // - var alg = new MctsSampler(problem, 17, random, 1, (rand, numActions) => new ThresholdAscentPolicy(numActions, 500, 0.01));
226      // - GaussianModelWithUnknownVariance (and Q= 0.99-quantil) also works well for Ant
227      // 2015 01 19: grid test with canonical states (non-canonical slightly worse)
228      // - ant: Threshold Ascent (best 100, 0.01; all variants relatively good)
229      // - ant: Policies where the variance has a large weight compared to the mean? (Gaussian(compatible), Gaussian with fixed variance, UCT with large c, alle TA)
230      // - ant: UCB1Tuned with canonical states also works very well for the artificial ant! constistent solutions in less than 10k iters     
231
232      //var problem = new SymbolicRegressionPoly10Problem();
233      //var problem = new SantaFeAntProblem();
234      var problem = new SymbolicRegressionProblem(random, "Breiman");
235      //var problem = new PalindromeProblem();
236      //var problem = new HardPalindromeProblem();
237      //var problem = new RoyalPairProblem();
238      //var problem = new EvenParityProblem();
239      // symbreg length = 11 q = 0.824522210419616
240      //var alg = new MctsSampler(problem, 23, random, 0, new BoltzmannExplorationPolicy(100));
241      //var alg = new MctsSampler(problem, 23, random, 0, new EpsGreedyPolicy(0.1));
242      //var alg = new SequentialSearch(problem, 23, random, 0,
243      //  new HeuristicLab.Algorithms.Bandits.GrammarPolicies.QLearningGrammarPolicy(problem, new BoltzmannExplorationPolicy(10),
244      //    1, 1, true));
245      //var alg = new SequentialSearch(problem, 23, random, 0,
246      //  new HeuristicLab.Algorithms.Bandits.GrammarPolicies.GenericContextualGrammarPolicy(problem, new GenericThompsonSamplingPolicy(new GaussianModel(0.5, 10, 1, 1)), true));
247      var alg = new SequentialSearch(problem, 30, random, 0,
248        new HeuristicLab.Algorithms.Bandits.GrammarPolicies.GenericFunctionApproximationGrammarPolicy(problem, true));
249      //var alg = new MctsQLearningSampler(problem, sentenceLen, random, 0, null);
250      //var alg = new MctsQLearningSampler(problem, 30, random, 0, new EpsGreedyPolicy(0.2));
251      //var alg = new MctsContextualSampler(problem, 23, random, 0); // must visit each canonical solution only once
252      //var alg = new TemporalDifferenceTreeSearchSampler(problem, 30, random, 1);
253      //var alg = new ExhaustiveBreadthFirstSearch(problem, 7);
254      //var alg = new AlternativesContextSampler(problem, random, 17, 4, (rand, numActions) => new RandomPolicy(rand, numActions));
255      //var alg = new ExhaustiveDepthFirstSearch(problem, 17);
256      // var alg = new AlternativesSampler(problem, 17);
257      // var alg = new RandomSearch(problem, random, 17);
258      //var alg = new ExhaustiveRandomFirstSearch(problem, random, 17);
259
260      alg.FoundNewBestSolution += (sentence, quality) => {
261        //Console.WriteLine("{0}", globalStatistics);
262        //Console.ReadLine();
263      };
264      alg.SolutionEvaluated += (sentence, quality) => {
265        iterations++;
266        globalStatistics.AddSentence(sentence, quality);
267
268        //if (iterations % 100 == 0) {
269        //  if (iterations % 10000 == 0) Console.Clear();
270        //  Console.SetCursorPosition(0, 0);
271        //  alg.PrintStats();
272        //}
273
274        //Console.WriteLine(sentence);
275
276        if (iterations % 100 == 0) {
277          Console.WriteLine("{0}", globalStatistics);
278        }
279      };
280
281
282      sw.Start();
283
284      alg.Run(maxIterations);
285
286      sw.Stop();
287
288      Console.Clear();
289      alg.PrintStats();
290      Console.WriteLine(globalStatistics);
291      Console.WriteLine("{0:F2} sec {1,10:F1} sols/sec {2,10:F1} ns/sol",
292        sw.Elapsed.TotalSeconds,
293        maxIterations / (double)sw.Elapsed.TotalSeconds,
294        (double)sw.ElapsedMilliseconds * 1000 / maxIterations);
295    }
296
297    public static void RunGpDemo() {
298      int iterations = 0;
299      const int seed = 31415;
300      const int maxIterations = 100000;
301
302      //var prob = new SymbolicRegressionProblem(new Random(31415), "Tower");
303      var prob = new SymbolicRegressionPoly10Problem();
304      var sgp = new OffspringSelectionGP(prob, new Random(seed), true);
305      RunGP(sgp, prob, 200000, 500, 0.15, 50);
306    }
307
308
309    private static void RunFunApproxTest() {
310      const int nReps = 20;
311      const int seed = 31415;
312      //const int maxIters = 50000;
313      var rand = new Random(seed);
314      var problemFactories = new Func<Tuple<int, int, ISymbolicExpressionTreeProblem>>[]
315      {
316        () => Tuple.Create(100000, 23,  (ISymbolicExpressionTreeProblem)new SymbolicRegressionPoly10Problem()),
317        //() => Tuple.Create(100000, 17, (ISymbolicExpressionTreeProblem)new SantaFeAntProblem()),
318        //() => Tuple.Create(50000, 32,(ISymbolicExpressionTreeProblem)new RoyalSymbolProblem()),
319        //() => Tuple.Create(50000, 64, (ISymbolicExpressionTreeProblem)new RoyalPairProblem()),
320        //() => Tuple.Create(50000, 64,(ISymbolicExpressionTreeProblem)new RoyalSymbolProblem()),
321        //() => Tuple.Create(50000, 128, (ISymbolicExpressionTreeProblem)new RoyalPairProblem()),
322        //() => Tuple.Create(50000, 128,(ISymbolicExpressionTreeProblem)new RoyalSymbolProblem()),
323        //() => Tuple.Create(50000, 256, (ISymbolicExpressionTreeProblem)new RoyalPairProblem()),
324        //() => Tuple.Create(50000, 256,(ISymbolicExpressionTreeProblem)new RoyalSymbolProblem()),
325        //() => new RoyalPairProblem(),
326        //() => new FindPhrasesProblem(rand, 20, 5, 3, 5, 0, 1, 0, true),
327        //() => new FindPhrasesProblem(rand, 20, 5, 3, 5, 0, 1, 0, false),
328        //() => new FindPhrasesProblem(rand, 20, 5, 3, 5, 50, 1, 0.8, false),
329      };
330
331      // skip experiments that are already done
332      foreach (var problemFactory in problemFactories) {
333        for (int i = 0; i < nReps; i++) {
334          {
335            var solverSeed = rand.Next();
336            var tupel = problemFactory();
337            var maxIters = tupel.Item1;
338            var maxSize = tupel.Item2;
339            var prob = tupel.Item3;
340
341            var alg = new SequentialSearch(prob, maxSize, new Random(solverSeed), 0,
342          new HeuristicLab.Algorithms.Bandits.GrammarPolicies.GenericFunctionApproximationGrammarPolicy(prob, true));
343
344            int iterations = 0;
345            var globalStatistics = new SentenceSetStatistics(prob.BestKnownQuality(maxSize));
346            var algName = alg.GetType().Name;
347            var probName = prob.GetType().Name;
348            alg.SolutionEvaluated += (sentence, quality) => {
349              iterations++;
350              globalStatistics.AddSentence(sentence, quality);
351
352              if (iterations % 1000 == 0) {
353                Console.WriteLine("\"{0,25}\" {1} \"{2,25}\" {3}", algName, maxSize, probName, globalStatistics);
354              }
355            };
356
357            alg.Run(maxIters);
358
359          }
360
361        }
362      }
363    }
364
365    private static void RunGpGridTest() {
366      const int nReps = 20;
367      const int seed = 31415;
368      //const int maxIters = 50000;
369      var rand = new Random(seed);
370      var problemFactories = new Func<Tuple<int, int, ISymbolicExpressionTreeProblem>>[]
371      {
372        () => Tuple.Create(50000, 32, (ISymbolicExpressionTreeProblem)new PermutationProblem()),
373        () => Tuple.Create(50000, 32, (ISymbolicExpressionTreeProblem)new RoyalPairProblem()),
374        () => Tuple.Create(50000, 32,(ISymbolicExpressionTreeProblem)new RoyalSymbolProblem()),
375        () => Tuple.Create(50000, 64, (ISymbolicExpressionTreeProblem)new RoyalPairProblem()),
376        () => Tuple.Create(50000, 64,(ISymbolicExpressionTreeProblem)new RoyalSymbolProblem()),
377        () => Tuple.Create(50000, 128, (ISymbolicExpressionTreeProblem)new RoyalPairProblem()),
378        () => Tuple.Create(50000, 128,(ISymbolicExpressionTreeProblem)new RoyalSymbolProblem()),
379        () => Tuple.Create(50000, 256, (ISymbolicExpressionTreeProblem)new RoyalPairProblem()),
380        () => Tuple.Create(50000, 256,(ISymbolicExpressionTreeProblem)new RoyalSymbolProblem()),
381        //() => new RoyalPairProblem(),
382        //() => new FindPhrasesProblem(rand, 20, 5, 3, 5, 0, 1, 0, true),
383        //() => new FindPhrasesProblem(rand, 20, 5, 3, 5, 0, 1, 0, false),
384        //() => new FindPhrasesProblem(rand, 20, 5, 3, 5, 50, 1, 0.8, false),
385      };
386
387      foreach (var popSize in new int[] { 100 /*, 250, 500, 1000, 2500, 5000, 10000 */ }) {
388        foreach (var mutationRate in new double[] { /* 0.05, /* 0.10, */ 0.15, /* 0.25, 0.3 */}) {
389          // skip experiments that are already done
390          foreach (var problemFactory in problemFactories) {
391            for (int i = 0; i < nReps; i++) {
392              {
393                var solverSeed = rand.Next();
394                var tupel = problemFactory();
395                var maxIters = tupel.Item1;
396                var maxSize = tupel.Item2;
397                var prob = tupel.Item3;
398                var sgp = new StandardGP(prob, new Random(solverSeed));
399                RunGP(sgp, prob, maxIters, popSize, mutationRate, maxSize);
400              }
401              //{
402              //  var prob = problemFactory();
403              //  var osgp = new OffspringSelectionGP(prob, new Random(solverSeed));
404              //  RunGP(osgp, prob, maxIters, popSize, mutationRate, maxSize);
405              //}
406            }
407          }
408        }
409
410      }
411    }
412
413    private static void RunGP(IGPSolver gp, ISymbolicExpressionTreeProblem prob, int maxIters, int popSize, double mutationRate, int maxSize) {
414      int iterations = 0;
415      var globalStatistics = new SentenceSetStatistics(prob.BestKnownQuality(maxSize));
416      var gpName = gp.GetType().Name;
417      var probName = prob.GetType().Name;
418      gp.SolutionEvaluated += (sentence, quality) => {
419        iterations++;
420        globalStatistics.AddSentence(sentence, quality);
421
422        if (iterations % 100 == 0) {
423          Console.WriteLine("\"{0,25}\" {1} {2:N2} {3} \"{4,25}\" {5}", gpName, popSize, mutationRate, maxSize, probName, globalStatistics);
424        }
425      };
426
427      gp.PopulationSize = popSize;
428      gp.MutationRate = mutationRate;
429      gp.MaxSolutionSize = maxSize + 2;
430      gp.MaxSolutionDepth = maxSize + 2;
431
432      gp.Run(maxIters);
433    }
434  }
435}
Note: See TracBrowser for help on using the repository browser.