XIII. Recommendations
Parameters of GA
This chapter should give you some basic recommendations if you have decided
to implement your genetic algorithm. These recommendations are very general.
You will probably want to experiment with your own GA for a specific problem,
because there is no general theory available that would help you to tune GA parameters
for any problem.
Recommendations are often results of empiric studies of GAs that were
often performed on binary encoding only.
-
Crossover rate
Crossover rate should be high generally, about 80%-95%. (However some
results show that for some problems crossover rate about 60% is the best.)
-
Mutation rate
On the other side, mutation rate should be very low. Best rates seems to be
about 0.5%-1%.
-
Population size
It may be surprising, that very big population size usually does not improve
performance of GA (in the sense of speed of finding solution). Good population
size is about 20-30, however sometimes sizes 50-100 are reported as
the best. Some research also shows, that the best population size depends on the
size of encoded string (chromosomes). It means that if you have chromosomes with 32
bits, the population should be higher than for chromosomes with 16 bits.
-
Selection
Basic roulette wheel selection can be used, but sometimes rank selection
can be better. Check the chapter about selection for
advantages and disadvantages. There are also some more sophisticated methods
that change parameters of selection during the run of GA. Basically, these behave
similarly like simulated annealing. Elitism should be used for sure if you
do not use other method for saving the best found solution. You can also
try steady state selection.
-
Encoding
Encoding depends on the problem and also on the size of instance of
the problem. Check the chapter about encoding for
some suggestions or look to other resources.
-
Crossover and mutation type
Operators depend on the chosen encoding and on the problem. Check the
chapter about operators for some suggestions. You
can also check other sites.
Applications of GA
Genetic algorithms have been used for difficult problems (such as NP-hard
problems), for machine learning and also for evolving simple programs. They
have been also used for some art, for evolving pictures and music.
The advantage of GAs is in their parallelism. GA is travelling in a search space
using more individuals (and with genotype rather than phenotype) so that they are
less likely to get stuck in a local extreme like the other methods.
They are also easy to implement. Once you have the basic GA algorithm implemented, you have just to
write a new chromosome (just one object) to solve another problem. With the
same encoding you just change the fitness function - and you are done. However, for some problems,
choosing and implementation of encoding and fitness function can be difficult.
The disadvantage of GAs is in the computational time. GAs can be slower than
other methods. But sice we can terminate the computation in any time, the longer run is acceptable (especially with faster and faster computers).
To get an idea about some problems solved by GAs, here is a short list of some
applications:
-
Nonlinear dynamical systems - predicting, data analysis
-
Designing neural networks, both architecture and weights
-
Robot trajectory
-
Evolving LISP programs (genetic programming)
-
Strategy planning
-
Finding shape of protein molecules
-
TSP and sequence scheduling
-
Functions for creating images
More information can be found through links in the
appendix.
(c) Marek
Obitko, 1998