Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters ]

Arc de Triomphe clipart (2486 bytes)Genetic Algorithm classes


Written by I. M. Ikram

ga.tar.gz (9803 bytes)


Introduction

Some simple genetic algorithm (GA) classes in Eiffel, aimed at solving optimization problems (both minimization and maximization). For a very quick and easy introduction to genetic algorithms, see http://www.cs.und.ac.za/~ikram/Projects/gaintro.html

I. M. Ikram
http://cs.ru.ac.za/homes/g93i0527/
g93i0527@cs.ru.ac.za

You may modify and redistribute this code non-commercially. Please contact me if you wish to offer any comments, error reports, corrections, new classes, etc. Any updates made in future to these classes may be accessed through the URL: http://cs.und.ac.za/~ikram/Projects/GAEiffel/

These classes were developed with the aid of the excellent SmallEiffel freeware compiler, version -0.98, made available by Dominique Colnet and Suzanne Collin (ftp://ftp.loria.fr/pub/loria/genielog/SmallEiffel). Significant omissions from this version of the compiler are the BIT type, a standard random number class, and most of all, garbage collection (so I've been careful to avoid `memory leaks' here).

Files

ran.e interface to `C' standard random number generation functions.
Necessary external code is included in the file.
individual.e individual_copyable.e: deferred classes relating to
bit-string individuals
population.e, ss_population.e, gen_population.e deferred classes
relating to populations of bit strings
one_max.e, two_max.e, many_max.e, dejong_f1.e some actual
implementations of individuals corresponding to simple fitness
functions
ss_pop_1.e, ss_pop_2.e, ss_pop_3.e, gen_pop_1.e some actual
implementations of populations capable of running simple genetic
algorithms to solve optimization problems
ga_demo.e allows any combination of the above fitness functions
and genetic algorithms to be run

Class Hierarchy

RAN
-- random numbers
INDIVIDUAL
-- bit-string individuals
        INDIVIDUAL_COPYABLE
        -- reproducible individuals
                ONE_MAX, TWO_MAX, MANY_MAX, DEJONG_F1
                -- individuals meant to encode solutions to some simple optimization problems
POPULATION
-- populations of bit-string individuals
        SS_POPULATION
        -- populations running steady-state algorithms
                SS_POP_1, SS_POP_2, SS_POP_3
                -- various steady-state strategies
        GEN_POPULATION
        -- populations running generational algorithms
                GEN_POP_1
                -- simple generational strategies
GA_DEMO
-- demo/testing

Usage

See implementation of GA_DEMO class and header comments to the remaining classes.

Some quick notes

Suggested Improvements


Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters ]