Evoptool: Evolutionary Optimization Tool

From AIRWiki
Revision as of 19:02, 21 October 2011 by LuigiMalago (Talk | contribs) (Tool Description)

Jump to: navigation, search

Project profile

Name: Evoptool: Evolutionary Optimization Tool.
People involved: Matteo Matteucci - matteucci [AT] elet.polimi.it

Luigi Malagò - malago [AT] elet.polimi.it

Gabriele Valentini - gvalentini [AT] iridia.ulb.ac.be

Cucci Davide - cucci [AT] elet.polimi.it

Formerly involved: Emanuele Corsano

Tool Description

Evolutionary Optimization Tool (Evoptool) is an open source optimization tool, distributed under GNU General Public License, implementing meta-heuristics based on the Evolutionary Algorithms paradigm, that aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.

Tool Usage

Evoptool is distributed under GNU General Public License and, so far, available for GNU/Linux platforms. Evoptool exploits several open source libraries and software, and it allows to wrap external algorithm implementations, as for Simple Bayesian Agorithm, reducing the efforts for the development. In this section, are described in the details the procedures to install the tool on your system.

Download

As metioned above, Evoptool implements several optimization algorithms, and it can also wrap external algorithm implementations through patches. This characteristic of the tool need to be correctly considered: if you plan to write an new algorithm then it is prefered to write it directly into Evoptool packages, if you just have the source code of an algorithm, and you want to save the time to implement it again, you can modify your code in order to work within Evoptool.

Description Version Date Link
Evoptool with sBOA support. 1.1 11/03/2010 Evoptool1.1
Evoptool without sBOA support. 1.0 24/02/2010 Evoptool1.0

External algorithm implementations cannot be directly distributed within Evoptool, but need to be downloaded from their original position, and, to be adjusted to work with Evoptool by applying a patch. Here you can find reference to wrapped algorithms and their patches to work within Evoptool.

Description External link Patch
Simple Bayesian Algorithm sBOA sBOA.patch

Requirements

In order to compile Evoptool, you need to install on your system some open source software and libraries, needed by the tool.

  • Libraries:
    • gtkmm-2.4
    • glademm-2.4
    • gthread-2.0
    • sigc++-2.0
    • cv
    • highgui
    • cvaux
    • gsl
    • gslcblas
    • libxml++-2.6
  • Software:
    • gnuplot

Compilation

Evoptool source files and external algorithm implementations need to be compiled separately. In this section are described, step by step, all you need to compile the tool.

Evoptool package

If you want to compile the entire package, including the whole set of Evoptool libraries, you need to:

  1. In the main folder ../evoptool/trunk/ give a make cleanall command in order to remove all the binary files and library dependencies, and be sure to compile the entire project in the right way.
  2. In the main folder ../evoptool/trunk/ give a make all command in order to compile all the libraries and build the executable file.

If you need only to compile a single library, you need to:

  1. In the folder ../evoptool/trunk/mylib/src/ give a make lib command in order to compile and build library associated with that module. Repeat this operation for each library you want to compile.
  2. In the folder ../evoptool/trunk/gui/src give a make exe command in order to build the executable file.

Wrapped Algorithms

Evoptool is able to wrap external algorithm implementations thanks to patch mechanism. Actually, it is possible to wrap the original implementation of the Simple Bayesian Algorithm, so, we are going to explain how to add external algorithm implementations using sBOA as an example. All you need to do is to perform the following steps:

  1. In the folder ../trunk/evoptool-file/wrapped/ create the directory sBOA.
  2. Extract the original implementation of sBOA to the just created directory.
  3. Applay the patch with the command patch -p1 <PATCH_FILE, where PATCH_FILE is the sBOA patch file provided by us complete of the correct path.
  4. Compile the sBOA source code by the command make all.
  5. Compile Evoptool following the previous instruction.

Execution

Evoptool is available as command line software, providing a configuration file, or with a graphic user interface. In order to run Evoptool in GUI mode you need only to:

  1. Go to folder ../evoptool/trunk/gui/bin.
  2. Run Evoptool by ./evoptool command.

If you want to run Evoptool as a command line tool you need to:

  1. Go to folder ../evoptool/trunk/gui/bin.
  2. Run Evoptool by ./evoptool --nogui PATH1, where the argument PATH1 is a complete path for a configuration file.

Within Evoptool is provided a simple configuration file in the folder ../evoptool/trunk/evoptool-file/configuration-file/.


How to Extend Evoptool

Create an Algorithm

Add an Algorithm to GUI

In folder ../trunk/gui/src/:

  • Create the new decorator files ExampleDecorator.h and ExampleDecorator.cpp. You can simply copy another decorator structure and modify it where necessary.
  • Add Decorator header file to AlgorithmsDecorator.h main header.
  • Add decorator to GUI by modifying the initializeResolutorsPanel function of the EvoptoolGUI.cpp file.

Add an Algorithm to Command Line Parser

In folder ..trunk/gui/src/:

  • Add the header file of the new algorithm to the main header Algorithms.h.
  • Add a new entry for the algorithm into the algorithms enumeration in Evoptool.h file.
  • Modify the parseResolutor function of XMLParser.cpp file:
    • Add a new entry in the AlgorithmParameters structure list.
    • Treat the new case in the main switch as for other algorithms.
  • Take care about update the example configuration file with instructions for the parametrization of your algorithm (../evoptool-file/configuration-examples/testConf.xml).

Create a Benchmark

If you want to implement a new benchmark within Evoptool, you need to follow the next steps:

  • In the folder ../opt-pbl/src create a new benchmark class, e.g, NewBenchmark.cpp and NewBenchmark.h.
  • The NewBenchmark must inherits from ObjectiveFunction.h and must implement the function f (call to the fitness).
  • Configure headers. Add the NewBenchmark.h to ObjectiveFunctions.h (look the 's'!) that is placed in the ../gui/src/ folder. This will avoid to include a long list of headers to the main GUI class.

Add a Benchmark to GUI

In order to add the NewBenchmark to the Evoptool GUI you need to:

  • Add a new entry in the Evoptool::Tasks enumeration, let say NEW_BENCHMARK.
  • In the EvoptoolGUI::initializeTaskBar function within the ../gui/src/Evoptool.cpp file, add the newly created benchmark to the list of objective functions showed by the GUI.
  • In the EvoptoolGUI::taskBoxHandler function within the ../gui/src/Evoptool.cpp file, treat the new case in order to correctly load the benchmark parameters within the task bar.
  • In the EvoptoolGUI::initializeTask function within the ../gui/src/Evoptool.cpp file, treat the new case in order to correctly create the benchmark object when the test is executed.

Add a Benchmark to Command Line Parser

In order to add the NewBenchmark to the Evoptool XMLParser you need to:

  • Add a new entry in the Evoptool::Tasks enumeration, let say NEW_BENCHMARK.
  • In the XMLParser::parseTask function within the ../gui/src/XMLParser.cpp file, add the newly created benchmark to the list of objective functions that can be parsed by the parser.
  • Update the example configuration file within ../evoptool-file/configuration-examples/testConf.xml, by adding a new entry to the list of avaiable benchmark (This simplify the use of configuration file).