next up previous
Next: Applications Up: GAGSa flexible Previous: Object-oriented programming and Genetic

A new framework for evolutionary programming: GAGS 


Figure 1: Chromosome hierarchy, with class names. 

GAGS  (Genetic Algorithms from Granada, Spain) offers a framework for evolutionary computation programming, and was released for the first time (version 0.9) in 1994. Its class library can be used not only for GA programming, but also for other EC population-based paradigms and simulated annealing. It is formed basically by a chromosome hierarchy and a population hierarchy ( see figure 1); only the former has been completely developed. Chromosomes include a platform-independent bitstring class, so that only binary haploid representation is used. This could be a restriction to the range of EC problems it can be applied, but, in fact, population can use any kind of chromosomes that conform to the chromosome interface. It has been designed having the following features in mind:

Portability has been taken into account by developing and testing in different environments, like GNU's gcc and Borland C++ ; no OS-specific libraries have been used, and compiler peculiarities have been taken into account. In this way, binaries for many UNIX boxes as well as MS-DOS and Windows can be generated.

Genetic operators are placed in a different class from chromosomes, acting as functors, i.e., objects with function syntax. If an special-purpose operator is needed, other than the operators provided, it is added to the operator hierarchy, and only the base class of that hierarchy needs to be modified, without needing to design a brand-new chromosome. Operators act on the raw chromosome bits, without taking into account, as is usual in other libraries, any chromosome structure, like genes within a chromosome.

Figure 2: Graph showing the way views work. Views act on a number of bits, converting them to the range specified in the view definition. 

Since population is internally represented as a linked list (as opposed to a fixed-size array or chunk or memory), and genetic opertors are also on a list, by using iterators over those lists they can be easily altered in runtime, instead of having to generate new chromosome classes to use new operators; the population can be extended or shrunk, or population members transferred to a different population object, and operators can be added, suppresed or their values or rates altered in runtime. Besides, chromosomes can be ``viewed'' in many different ways, by using views (see figure 2; this separates the user's or programmer's point of view of the chromosome from its implementation. Views allow the chromosome to be seen, for instance, as a float array, a Gray-coded bitstring, or a variable-size gene chromosome; they can also be extended, although two of the most usual are provided (fixed gene size with floating point view and variable gene size).

Although it uses many advanced C++ features, it is easy to use, since most of its complexity is hidden from the programmer. Interfaces are canonically defined, and minimal[Meyers, 1992]. Besides, C++ is a mainstream language known to many programmers all over the world. For those who do not want to program C++, it includes an application generator written in TCL/TK and PERL, from which the user has to program only the evaluation function, in ANSI C or C++.

GAGS  is available as public domain software from the author, and from the Web page

next up previous
Next: Applications Up: GAGSa flexible Previous: Object-oriented programming and Genetic

[JJ J. J. Merelo *[E-MAIL]
Equipo GeNeura -- GeNeura Team
Departamento de Electrónica y Tecnología de los Computadores
Universidad de Granada Granada (Espaņa)
Phone: +34-58-243162; Fax: +34-58-243230