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)


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

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).


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
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

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


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 ]