GEATbx: Main page  Tutorial  Algorithms  M-functions  Parameter/Options  Example functions 

GEATbx: Tutorial 3 Variable Representation

Previous PageTable Of ContentsIndexList Of FiguresNext Page

3 Variable Representation

The first step in deciding which evolutionary algorithm is to use is a close look to the format/representation of your variables. The 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 3 different representations are supported:

  1. real value representation
  2. binary value representation
  3. integer value 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 (tbxmpga). 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, xovsp) are applied, and before the evaluation of the objective function the binary values are converted to real values (bin2real).

One more example. In this case the variables are in integer representation. The evolutionary algorithm can work on integer values (mutint and recdis), however, there are no really specialized operators for integer variable representation. Thus, the best decision would be to work 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 parameter GOPTIONS(19) of the options structure.

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

EA works on

variable representation

conversion

    real

    real

    -

    integer

    integer

    -

    binary

    real

    binary

    integer

    binary

    binary

    -

In the end it can be stated:

Matlab Examples:

Real --- Real:

Binary --- Binary:

Real --- Binary:

Integer --- Binary:

Previous PageTop Of PageTable Of ContentsIndexList Of FiguresNext Page

GEATbx: Main page  Tutorial  Algorithms  M-functions  Parameter/Options  Example functions 

This document is part of version 3.3 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-2000 Hartmut Pohlheim, All Rights Reserved, (support@geatbx.com).