# Matrix Adaptation Evolution Strategy with Multi-Objective Optimization for Multimodal Optimization
## 4 The MA-ESN-MO Algorithm
### Matrix Adaptation Evolution Strategy with Multi-Objective Optimization Algorithm
```
1: Initialize \(D\)(number of dimensions), \(\lambda\), \(\mathbf{y}^{(0)}\), \(\boldsymbol{\sigma}^{(0)}\), \(\mathbf{s}^{(0)}\), \(\mathbf{d}^{(0)}\), M\({}^{(0)}\) and \(NP\), \(g=0\)
2: Initialize \(NP\) parents
3:while the termination condition is not satisfied
4: Generate the individuals according to Equation (1)
5: Calculate the objective function value of each individual
6: Sort the population according to the objective function value
7: Compute the \(f_{1}\) and \(f_{2}\) values of each dimension according to equations (7) and (8)
8:if\(rand>0.5\)
9: Generate the seeds of niching according to the non-dominated sorting procedure
10:else
11: Generate the seeds of niching with the dynamic peak identification algorithm (Algorithm 2)
12:endif
13: Update \(\mathbf{s}^{(g+1)}\) according to Equation (2)
14: Update \(\mathbf{M}^{(g+1)}\) according to Equation (5)
15: Update \(\sigma^{(g+1)}\) according to Equation (6)
16:\(g=g+1\)
17:if\(g=1\)
18: Archive = \(\mathbf{x}^{(g)}\)
19:else
20:if\(\mathbf{C}^{(g)}<\mathbf{C}^{(g-1)}\)
21:\(\mathbf{x}^{(g)}=\) Archive
22:else
23: Archive = \(\mathbf{x}^{(g)}\)
24:endif
25:endif
26:endwhile Output: the global optima with the maximum objective function value in the population. ```  
**Algorithm 2. MA-ESN-MO algorithm. **  
The pseudo-code of dynamic peak identification is presented in Algorithm 3. Firstly, the population is sorted according to the objective function value. For a given individual \(Pop\{i\}\), using an estimated so-called niche radius \(\rho\), \(Pop\{i\}\) is classified into a peak and populates this niche (line 12 to line 15). In addition, every niche includes several individuals (line 7 to line 11). Then, the various fitness peaks are identified dynamically within the for-end for-loop (line 6 to line 16). ```
1: Input niche radius \(\rho\), population \(Pop\), and population size \(NP\)
2: Sort \(Pop\) according to the objective function value
3: NumPeak = 1
4: DPS = \(\{Pop\{1\}\}\)
5: Niche (NumPeak) = \(\{Pop\{1\}\}\)
6:for\(i=2\) to \(NP\)
7:for\(k=1\) to NumPeak
8:if\(Pop\{i\}\) and DPS (\(k\)) belong to the same niche
9: Niche (\(k\)) = Niche (\(k\))\(\cup\{Pop\{i\}\}\)
10:endif
11:endfor
12:if\(Pop\{i\}\) is not within \(\rho\) of peak in DPS
13: NumPeak = NumPeak + 1
14: DPS = DPS \(\cup\{Pop\{i\}\}\)
15:endif
16:endfor
17:DPS and NicheAs mentioned earlier, MA-ESN-MO is proposed by introducing three improvement strategies to solve multimodal optimization problems: a transformation strategy, an archive strategy, and a dynamic peak identification strategy. The transformation strategy is used to transform an MMOP into an MOP. The advantage of the transformation strategy is that it is unnecessary to use the problem-dependent niching parameters. The archive is used to save better individuals, which is effective in preserving the seeds of niching. The dynamic peak identification strategy is employed to prevent the best niche from occupying the population's resources. There are three main differences among the MA-ESN-MO and the other algorithms mentioned before [4; 15; 16; 17; 18; 19]. 1. Two conflicting objective functions are constructed differently. The landscape information of the population is usually helpful for judging the diversity of the population. The fitness of the objective function is helpful for obtaining the global optimum. Therefore, the two strongly conflicting objectives are designed by the landscape information of the population and the fitness of the objective function. In order to find multiple optimal solutions, exploration should be paid attention to in the early stage of evolution, and exploitation should be considered in the later stage of evolution. Therefore, the parameter \(\alpha\), which is proportional to the number of function evaluations, is introduced to adjust for exploration and exploitation. 2. The archive is employed to save the seeds of niching. In the classical CMA-ES algorithm and MA-ES algorithm, the parent will be discarded after the offspring are yielded.