GEATbx: | Main page Tutorial Algorithms M-functions Parameter/Options Example functions www.geatbx.com |
Nearly all data structures of the GEATbx are mapped to 2-D matrizes.
The used data structures in the GEATbx:
Remark:
Many problems don't need a mapping from the chromosome to phenotype structure. For instance, if the variables are real valued and the evolutionary algorithm works with this real valued variables, there is no mapping necessary. Similar for binary variables and an evolutionary algorithm that uses binary variables. Then, chromosomes and phenotypes are identical. Thus, throughout the whole documentation the term individual is used for both, chromosomes and phenotypes. Only if differentiation is necessary between both, the original terms will be used. Please read the section about Variable Representation, Chapter 4 for more information as well.
8.1 Chromosomes (genotype / individuals) |
The chromosome data structure stores an entire population in a single matrix of size Nind x Lind, where Nind is the number of individuals in the population and Lind is the length of the genotypic representation of those individuals (for integer and real valued representation Lind is 1, that means, genotype and phenotype are identical). Each row corresponds to an individual's genotype, consisting of binary, integer or real values.
An example of the chromosome structure
Chrom = g_{1,1} g_{1,2} g_{1,3} ... g_{1,Lind} individual 1 g_{2,1} g_{2,2} g_{2,3} ... g_{2,Lind} individual 2 g_{3,1} g_{3,2} g_{3,3} ... g_{3,Lind} individual 3 . . . ... . g_{Nind,1} g_{Nind,2} g_{Nind,3} ... g_{Nind,Lind} individual Nind
This data representation does not force a structure on the chromosome structure, only requiring that all chromosomes are of equal length. Thus, structured populations or populations with varying genotypic bases may be used in the GEATbx. However, a suitable decoding function, mapping chromosomes onto phenotypes, must be employed.
8.2 Phenotypes (decision variables / individuals) |
The decision variables (phenotypes) in the evolutionary algorithm are obtained by applying some mapping from the chromosome representation into the decision variable space. Here, each string contained in the chromosome structure decodes to a row vector of order Nvar, according to the number of dimensions in the search space and corresponding to the decision variable vector value.
The decision variables are stored in a numerical matrix of size Nind x Nvar. Again, each row corresponds to a particular individual's phenotype. An example of the phenotype data structure is given below, where bin2real is used to represent a decoding function mapping the genotypes onto the phenotypes.
Phen = bin2real(Chrom) % map genotype to phenotype Phen = x_{1,1} x_{1,2} x_{1,3} ... x_{1,Nvar} individual 1 x_{2,1} x_{2,2} x_{2,3} ... x_{2,Nvar} individual 2 x_{3,1} x_{3,2} x_{3,3} ... x_{3,Nvar} individual 3 . . . ... . x_{Nind,1} x_{Nind,2} x_{Nind,3} ... x_{Nind,Nvar} individual Nind
The actual mapping between the chromosome representation and their phenotypic values depends upon the decode function used. It is perfectly feasible using this representation to have vectors of decision variables of different types. For example, it is possible to mix integer, real-valued, and binary decision variables in the same Phen data structure.
8.3 Objective function values |
An objective function is used to evaluate the performance of the phenotypes in the problem domain. Objective function values can be scalar or, in the case of multiobjective problems, vectors. Note that objective function values are not necessarily the same as fitness values.
Objective function values are stored in a numerical matrix of size Nind·Nobj, where Nobj is the number of objectives. Each row corresponds to a particular individual's objective vector. An example of the objective function values data structure is shown below, with mobjfonseca2 representing an example multiobjective function.
ObjV = mobjfonseca2(Phen) % objective function ObjV = y_{1,1} y_{1,2} y_{1,3} ... y_{1,Nobj} individual 1 y_{2,1} y_{2,2} y_{2,3} ... y_{2,Nobj} individual 2 y_{3,1} y_{3,2} y_{3,3} ... y_{3,Nobj} individual 3 . . . ... . y_{Nind,1} y_{Nind,2} y_{Nind,3} ... y_{Nind,Nobj} individual Nind
8.4 Fitness values |
Fitness values are derived from the objective function values through a scaling or ranking function. Fitness values are non-negative scalars and are stored in column vectors of length Nind, an example of which is shown below. ranking is a fitness function contained in the GEATbx.
Fitn = ranking(ObjV) % fitness function Fitn = f_{1} individual 1 f_{2} individual 2 f_{3} individual 3 ... f_{Nind} individual Nind
Note that for multiobjective functions, the fitness of a particular individual is a function of a vector of objective function values. Multiobjective problems are characterized by having no single unique solution, but a family of equally fit solutions with different values of decision variables. Care should therefore be taken to adopt some mechanism to ensure that the population is able to evolve the set of Pareto optimal solutions.
8.5 Multiple subpopulations |
The GEATbx supports the use of a single population divided into a number of subpopulations or demes by modifying the use of data structures so that subpopulations are stored in contiguous blocks within a single matrix. For example, the chromosome data structure, Chrom, composed of Subpop subpopulations, each of length N individuals Ind, is stored as:
Chrom = ... Ind_{1} Subpop_{1} Ind_{2} Subpop_{1} ... Ind_{N} Subpop_{1} Ind_{1} Subpop_{2} Ind_{2} Subpop_{2} ... Ind_{N} Subpop_{2} ... Ind_{1} Subpop_{Subpop} Ind_{2} Subpop_{Subpop} ... Ind_{N} Subpop_{Subpop}
This is known as the regional model, also called migration or island model.
GEATbx: | Main page Tutorial Algorithms M-functions Parameter/Options Example functions www.geatbx.com |