====== Genetic programming ====== The goal of this lab exercise is to get some experience with using genetic programming on various test problems. You are going to use the genetic programming tool implemented in [[https://dev.heuristiclab.com/trac.fcgi/|HeuristicLab]]. You will use it to solve the following problems: * artificial ant problem, the Santa Fe trail * symbolic regression * classification ===== HeuristicLab ===== [[https://dev.heuristiclab.com/trac.fcgi/|HeuristicLab]] is a framework for heuristic and evolutionary algorithms developed by members of the [[https://heal.heuristiclab.com/|Heuristic and Evolutionary Algorithms Laboratory]] since 2002. There are many machine learning and (meta)heuristic algorithms, not only the evolutionary ones, plus many problems already implemented in the HeuristicLab. Moreover, HeuristicLab comes with a user friendly graphical interface that serves to set the algorithm's parameters and provides the user with various visualizations. ===== Instalation ===== If using Windows, just download the binaries from [[https://dev.heuristiclab.com/trac.fcgi/wiki/Download|download]] and then run **HeuristicLab 3.3.exe**. Please note that HeuristicLab also runs on Linux with [[https://www.mono-project.com/|Mono]] but with a limited support available. Check out the [[https://dev.heuristiclab.com/trac.fcgi/wiki/Documentation/DevelopmentCenter/Compile%20HeuristicLab%20under%20Linux|HeuristicLab and Mono Howto]] for more information. ===== Running test problems ===== Execute the **HeuristicLab 3.3.exe** and then: * run //HL Optimizer// * choose one of the following test problems in the window //Samples// on the tab //Start Page// * Genetic Programming - Artificial Ant * Genetic Programming - Symbolic regression * Genetic Programming - Symbolic Classification Videos: * [[https://www.youtube.com/playlist?list=PL547A94670DA695EE|HeuristicLab playlist]] * [[https://www.youtube.com/watch?v=2kbCMWC_EgA|Symbolic Regression with HeuristicLab]] * [[https://www.youtube.com/watch?v=iV0i8SS0fmg| Symbolic Classification with HeuristicLab]] ===== Changing GP parameters ===== GP parameters can be set on tabs Problem and Algorithm. **Function set**: * Artificial Ant - //Problem// -> //Encoding SymbolicExpressionTree// -> //SymbolicExpressionTree.Grammar: Simple Grammar// * Symbolic regression, Symbolic Classification -> //Problem// -> //SymbolicExpressionTreeGrammar: TypeCoherentExpressionGrammar// **Fitness**: * //Problem// -> //Evaluator// -> //Details// -> //Value// **Use your own csv input file** for Symbolic Regression: * Note: Correct Separator and Decimal Separator must be chosen ===== Results ===== All results, the running as well as the final ones, are under the tab //Results//. Besides other statistics there is always the //Best Solution// or the //Best training solution//, that you can explore in detail. ===== What you should try ===== * different function sets * different training data, e.g. {{:courses:a0m33eoa:cviceni:sr_data.zip |SR_data}} * different parameter values * population size, * maximum depth of the generated expressions, * crossover and mutation rates, * selection * ... And of course, feel free to play with other algorithms and other problems as well!