FOCUS AREAS

SAS/IML Software's Genetic Algorithms

Genetic algorithms are a family of search algorithms that seek optimal solutions to problems using the principles of natural selection and evolution. Genetic algorithms can be applied to almost any optimization problem, and they are especially useful for problems where other calculus-based techniques do not work, such as when the objective function has many local optimums, or is not differentiable or continuous, or when solution elements are constrained to be integers or sequences. In most cases genetic algorithms require more computation than specialized techniques that take advantage of specific problem structure or characteristics. However, for optimization problems with no such techniques available, genetic algorithms provide a robust general method of solution. The current genetic algorithm implementation in SAS/IML is experimental, and will be further developed and tested in later SAS releases.

To perform an optimization, you use separate calls to the genetic algorithm subroutines to specify the problem encoding (GASETUP), genetic operators (GASETMUT) and (GASETCRO), objective function (GASETOBJ), and selection criteria (GASETSEL). You then call the GAINIT routine to initialize the problem population. After that, you advance the optimization process by calling GAREGEN (for the regeneration step) within a PROC IML loop. Within the loop you can use GAGETMEM and GAGETVAL calls to retrieve population members and objective function values for examination. This strategy enables you to monitor the convergence of the algorithm, adjust optimization parameters with subroutine calls within the loop, and exit the loop when the algorithm is not producing furthur improvement in the objective function.