2.4 Stochastic Sampling Algorithms
2.4.4 Evolutionary and Genetic Algorithms
EAs are widely used optimisation and search algorithms in evolutionary computing, which is a rapidly growing area of artificial intelligence. EAs work based on Darwin’s natural selection theory of evolution, where a population is progressively improved by
42
Algorithm 2.2—PSO Algorithm (taken from [102]).
Step 1 (Initialisation) Generate an initial set of +L+q models (or particles) at random location ( +“o ) in parameter space and with an assigned random velocity (”+“o ) to each particle;
Step 2 Calculate the misfit value for each model (or particle);
Step 3 For each particle , update the position and value of # mu (personal best, the best solution the particle has seen). If current fitness value of one particle is better than its # mu value, then its # mu value and the corresponding position are replaced by the current fitness value and position, respectively;
Step 4 Find the U# mu (global best) fitness value and the corresponding best position of the entire population of # mu, and update if required;
Step 5 Update the velocity for each particle, as in Equation (2.10). The updated velocity is determined by the previous iteration velocity and the distance of the respective particle from the pbest and gbest location; Initially, the velocity is randomly generated with ”+“o ∈ [−”~ Y, ”~ Y]. If a particle violates the velocity limit ”~ Y, its velocity will be
set back to the limit.
”+“– = T”+“+ 0 W × w # mu+“− +“{ + 0 W × wU# mu“− +“{ (2.10)
where:
”+“ is the velocity of particle at iteration -; +“ is the position of particle at iteration -;
0 is the weighting factor, termed as cognitive component that represents the acceleration constant that changes the velocity of the particle towards # mu+“;
0 is the weighting factor, termed as the social component that represents the acceleration constant that changes the velocity of the particle towards U# mu“;
W and W are two random vectors with each component corresponding to a uniform random number between 0 and 1;
# mu+“ is the # mu of particle at iteration -;
U# mu“ is the global best of the entire swarm at iteration -;
and T is an inertia weight that determines the tendency of a particle to continue in the same direction it has been moving.
Step 6 Update the position of each particle, as in Equation (2.11);
+“– = +“+ ”+“– (2.11)
43
selectively discarding the weaker ones and breeding new children from the stronger ones, also known as the “survival of the fittest” strategy.
There have been three main independent implementations of EAs [124]: GAs, developed by John Holland [125] and thoroughly reviewed by Goldberg [126]; ES, developed by Rechenberg [127] and Schwefel [128]; and evolutionary programming, originally developed by L.J. Fogel et al. [129] and refined by D. B. Fogel [130] as referenced to [131]. Each of these three algorithms has been proved capable of obtaining approximately optimal solutions given complex, multi-modal, non-differential, discontinuous parameter space, noisy and time-dependent problems (see [124,130,132]). Since 1992 we saw an explosion in the number of seemingly intractable problems to which EAs have been successfully applied [131].
GAs have been widely used as search and optimisation tools in various problems in petroleum industry domain such as history matching [65,82,84,133], well placement optimisation [134,135], production optimisation [136], and well-workover scheduling [137]. The primary reasons for their success are their broad applicability, ease of use and global perspective (i.e. finding global optima solution) [126].
GAs have five stages to be specified in their implementation: genetic encoding (genotype), evaluation, selection, reproduction, and replacement, as summarised in Figure 2.6. In the literature, we may also find the term phenotype specification as a preliminary stage for GAs. The phenotype stage is similar to the parameterisation in history matching where we define the parameter space of the problem (i.e. parameters, their ranges and prior distributions). A more comprehensive description of GAs, along with other EAs can be found in the compiled ‘Handbook on Evolutionary Computation’ [138].
Genetic encoding (genotype) defines how a solution in the population is represented. Binary, grey coding, real-value, and tree encodings are some of the most encoding schemes used in GAs. We used real-value encoding (see for example [139]) for history matching and field development optimisation application as it is the most suitable one for applications whose representation requires an array of real number parameters.
44
Figure 2.6—GA workflow and a graphical representation of individual selection, crossover, and mutation (modified after [13]).
Evaluation refers to the fitness evaluation of the solutions and can be obtained by measuring the goodness of fit as defined in the objective function.
In selection stage, the algorithm chooses the individuals in the population that will create offspring for the next generation, and determine how many offspring each will create. The selection stage aims to emphasise the fitter individuals in the population in hopes that their offspring will, in turn, have even higher fitness. Fitness proportionate selection with either Roulette Wheel or Stochastic Universal Samplings, sigma scaling, elitism, Boltzmann, rank, tournament, and steady state selections are amongst the most used se- lection methods. In the thesis, we used the tournament selection method as the original implementation of the algorithms used in Chapter 5. Nonetheless, for more thorough comparisons of different selection methods, see [140–143].
Reproduction involves mating the selected individuals (parents) and generating the off-
spring (children) by genetic operators (crossover and mutation). Crossover provides means for information exchange with the hope that new individuals will contain good parts of old ones, thereby making the new individuals more successful. Single-point,
45
two-point, blend, and simulated binary crossovers are amongst the most used for cross- over operator. Mutation introduces variety into the population and generally helps the GA out if the search falls into local extremes. Gaussian and polynomial mutations are the two common methods for mutation operator. Two parameters can be used to tune the algorithm that controls the probability of crossover and mutation operations (S and S~ respectively).
In the thesis, we used the simulated binary crossover (SBX) [144] and polynomial mu- tation [145] genetic operators in the elitist nondominated sorting genetic algorithm (NSGA-II) (described in Section 2.5.7).
Replacement determines how the new offspring (children) are inserted into the popula- tion. Simple and steady state GAs are amongst the most used replacement strategies. Simple GAs replaces the entire population by a new population, whereas steady state GAs replaces only a certain proportion of the population in each generation. Another term related to the replacement is elitism, which means that the best individual from each generation is kept for the next generation.