Blurb::
Evolutionary Algorithm
Description::
Evolutionary Algorithm

*See the page :ref:`topic-package_scolib` for important information
regarding all SCOLIB methods*

``coliny_pattern_search`` supports concurrency up to the size of
the population

The random ``seed`` control provides a mechanism for making a
stochastic optimization repeatable. That is, the use of the same
random seed in identical studies will generate identical results. The
``population_size`` control specifies how many individuals will
comprise the EA's population.

The ``initialization_type`` defines the type of initialization for the
population of the EA. There are three types: ``simple_random``,
``unique_random``, and ``flat_file``. ``simple_random`` creates initial
solutions with random variable values according to a uniform random
number distribution. It gives no consideration to any previously
generated designs. The number of designs is specified by the
``population_size``. ``unique_random`` is the same as ``simple_random``,
except that when a new solution is generated, it is checked against
the rest of the solutions. If it duplicates any of them, it is
rejected. ``flat_file`` allows the initial population to be read from
a flat file. If ``flat_file`` is specified, a file name must be given.

The ``fitness_type`` controls how strongly differences in "fitness"
(i.e., the objective function) are weighted in the process of
selecting "parents" for crossover:


- the ``linear_rank`` setting uses a linear scaling of probability of selection based on the rank order of each individual's objective function within the population
- the ``merit_function`` setting uses a proportional scaling of probability of selection based on the relative value of each individual's objective function within the population

The ``replacement_type`` controls how current populations and newly
generated individuals are combined to create a new population. Each
of the ``replacement_type`` selections accepts an integer value, which
is referred to below as the ``replacement_size``.


- The ``random`` setting creates a new population using (a) ``replacement_size`` randomly selected individuals from the current population, and (b) ``population_size`` - ``replacement_size`` individuals randomly selected from among the newly generated individuals (the number of which is optionally specified using ``new_solutions_generated``) that are created for each generation (using the selection, crossover, and mutation procedures).
- The ``chc`` setting creates a new population using (a) the ``replacement_size`` best individuals from the *combination* of the current population and the newly generated individuals, and (b) ``population_size`` - ``replacement_size`` individuals randomly selected from among the remaining individuals in this combined pool. The ``chc`` setting is the preferred selection for many engineering problems.
- The ``elitist`` (default) setting creates a new population using (a) the ``replacement_size`` best individuals from the current population, (b) and ``population_size`` - ``replacement_size`` individuals randomly selected from the newly generated individuals. It is possible in this case to lose a good solution from the newly generated individuals if it is not randomly selected for replacement; however, the default ``new_solutions_generated`` value is set such that the entire set of newly generated individuals will be selected for replacement.

Note that ``new_solutions_generated`` is not recognized by Dakota as a
valid keyword unless ``replacement_type`` has been specified.



*Expected HDF5 Output*

If Dakota was built with HDF5 support and run with the
:dakkw:`environment-results_output-hdf5` keyword, this method
writes the following results to HDF5:


- :ref:`hdf5_results-best_params`
- :ref:`hdf5_results-best_obj_fncs` (when :dakkw:`responses-objective_functions`) are specified)
- :ref:`hdf5_results-best_constraints`
- :ref:`hdf5_results-calibration` (when :dakkw:`responses-calibration_terms` are specified)
Topics::
package_scolib, package_coliny, global_optimization_methods
Examples::

Theory::
The basic steps of an evolutionary algorithm are depicted in Figure
5.2.

\image html ga.jpg "Figure 5.2 Depiction of evolutionary algorithm"
\image latex ga.eps "Depiction of evolutionary algorithm" width=10cm

They can be enumerated as follows:


1. Select an initial population randomly and perform function evaluations on these individuals

2. Perform selection for parents based on relative fitness

3. Apply crossover and mutation to generate ``new_solutions_generated`` new individuals from the selected parents


  - Apply crossover with a fixed probability from two selected parents

  - If crossover is applied, apply mutation to the newly generated individual with a fixed probability

  - If crossover is not applied, apply mutation with a fixed probability to a single selected parent


4. Perform function evaluations on the new individuals

5. Perform replacement to determine the new population

6. Return to step 2 and continue the algorithm until convergence criteria are satisfied or iteration limits are exceeded
Faq::

See_Also::
