# Modification of Genetic Algorithm Based on Extinction Events and Migration
## 3 Genetic Algorithm Modification  
The main objective of the genetic algorithm modification was to reduce the number of individuals necessary to indicate the global minimum or a value close to it. In the suggested algorithm modification (referred to as the Great Extinction Genetic Algorithm (GEGA)), great extinction was not just implemented in the form of a temporary liquidation of the majority of the solutions, as indicated in [60], but also through the migration of a temporary, permissible solution space, modelled on migrations of living organisms and environmental changes following global disasters. In such cases, the organisms were forced to find new ecological niches, as their existing environment was often degraded. The cause-and-effect relationship was reversed in the suggested algorithm. It can be treated as a transformation of the environment by the best-adapted organism, in line with its adaptation, as was the case during the Great Oxidation Event [61] or the current consequences of human activity.  
Factors such as population size, number of generations of the algorithm before each great extinction event, size of the instantaneous solution space, and maximum number of iterations of the entire algorithm were predetermined in the algorithm [60]. The aforementioned data were subjected to iterative, arbitrary modifications to maximize the convergence of solutions to the globally optimal solution and minimize the number of iterations necessary.  
The genetic algorithm implemented in the MATLAB Global Optimization Toolbox was modified. All parameters that are not mentioned below remained unchanged in relation to the default settings. The first change in relation to the standard algorithm consisted in the dynamic modification of the admissible solution space. As far as the great biological extinctions were concerned, one could assume that the organisms that survived were best adapted to the living conditions present following the sudden change. In the suggested algorithm, the best-adapted solution defined the new space of admissible solutions as an area with a selected extent around it. From a biological point of view, this could also be interpreted as a migration following the alpha individual (best-fit solution) into an area most convenient for it, or a modification of the environment in relation to its own needs. This did not relate to the iteration connected with the great extinction, where the entire permissible solution space was the instantaneous solution space.  
In the suggested algorithm, a \"great extinction event\" took place once every defined number of iterations. In practice, all but a few best and worst solutions were deleted. They also included the three best and three worst solutions from 10 individuals in a population. New missing individuals were randomly generated to complete the initial population based on the admissible solution space. Retaining the worst-fit solutions enabled us to add variety to the gene pool and reduce the probability of \"clone population\" emergence.  
A numerical study of selected combinations of parameters characterizing the algorithm was conducted. It facilitated the determination of the following logarithm parameters:  
* Population size--which was equal to 10 individuals in each generation;
* Number of generations between great extinctions, i.e., three generations;
* Extinction does not apply to the three best and three worst solutions;
* During great extinctions, the instantaneous space of admissible solutions covered the entire space;
* Instantaneous solution space size between great extinction events was defined as an area constituting 20% of the permissible solution space;
* The instantaneous solution space area extending beyond the permissible space was removed.