GEATbx: Main page  Tutorial  Algorithms  M-functions  Parameter/Options  Example functions  www.geatbx.com 

GEATbx: Tutorial 4 Variable Representation

Previous PageTable Of ContentsIndexList Of FiguresNext Page

4 Variable Representation

One important step in deciding which evolutionary algorithm is to use is a close look to the format/representation of your variables. A second step is the direct decision on which format the evolutionary algorithm should work. The representation determines the overall algorithm, that means, the used evolutionary operators.

In the GEATbx different representations are directly supported:

  1. real value representation,
  2. binary value representation,
  3. integer value representation,
  4. ordering representation.

When working with different representations, the toolbox provides functions for conversion between these representations:

Let's give an example: The variables of the objective function are in real value representation. Now it could be chosen between binary and real value representation for the evolutionary algorithm. Recommended is the real value representation (tbx3real). It works much quicker than the binary one. However, if the decision comes to use the binary values inside the evolutionary algorithm, the population is initialized as if the variables would be binary (initbp), the evolutionary operators (mutbin and, for instance, recsp) are applied, and before the evaluation of the objective function the binary values are converted to real values (bin2real). The toolbox function tbx3sga defines all these options.

One more example. In this case the variables are in integer representation. The evolutionary algorithm can work on integer values (mutint and recdis) or with binary values and convert them to integer (bin2int) before evaluation of the objective function.

The use of a representation and necessary conversion is controlled by the parameter VariableRepresentation.

Tab. 4-1: Combinations of variable representation and conversion

VariableRepresentation

EA works on

variable representation

conversion

    0

    real

    real

    -

    1

    integer

    integer

    -

    2

    binary

    real

    bin2real

    3

    binary

    integer

    bin2int

    4

    binary

    binary

    -

In the end it can be stated:

Matlab Examples:

Real --- Real:

Binary --- Binary:

Previous PageTop Of PageTable Of ContentsIndexList Of FiguresNext Page

GEATbx: Main page  Tutorial  Algorithms  M-functions  Parameter/Options  Example functions  www.geatbx.com 

This document is part of version 3.5 of the GEATbx: Genetic and Evolutionary Algorithm Toolbox for use with Matlab - www.geatbx.com.
The Genetic and Evolutionary Algorithm Toolbox is not public domain.
© 1994-2004 Hartmut Pohlheim, All Rights Reserved, (support@geatbx.com).