# An Enhanced Lightning Attachment Procedure Optimization Algorithm
## 3 The Enhanced Lightning Attachment Procedure Optimization Algorithm
### Improved Downward Leader Movement  
In the downward leader movement of the LAPO algorithm, the individual updates according to formula (2). After an in-depth analysis, it was found that the updating method had the following defects:  
Firstly, since individual i is not directly related to the evolutionary information of individual j and the average individual, it seems unreasonable to determine the updating mode of individual i based solely on the fitness relationship between individual j and the average individual. Secondly, because of the multiplication of individual j and rand, the evolution of each individual is more dependent on the average individual. With the evolution, each individual will gather near the average individual, that is to say, the overall population diversity maintenance ability of the algorithm is not good and easy to fall into local optimum. Thirdly, only one random individual is selected to learn from the average individual and the current individual, which does not guarantee the \"best selection\". If the selected individual is the worst individual or the poorer individual, it will affect the evolution speed of the downward leader. In view of this, this paper improves formula (2), as shown in formula (6). \[X_{ineve}^{t}=\left\{ \begin{array}{l}X_{i}^{t}+rand\times\left(X_{ave}-X_{j} ^{t}\right)+rand\times\left(X_{best}-X_{i}^{t}\right),\;F_{i}^{t}<F_{ave}\\ X_{ave}-rand\times\left(X_{i}^{t}-X_{j}^{t}\right)+rand\times\left(X_{best}-X_{ave }\right),\;F_{i}^{t}>F_{ave}\end{array} \right.. \tag{6}\]  
In the formula, \(X_{j}^{t}\) is a randomly selected particle different from individual \(i\), \(X_{best}\) represents the best individual in the current population, \(X_{ave}\) and \(F_{ave}\) are represented as the average individual and the fitness value of the average individual respectively. As can be seen from formula (6), it has the following advantages:  
Firstly, we regard individuals whose fitness value was better than the average fitness value as better individuals. For these individuals, they used themselves as base vectors to search around themselves. For the other solutions whose evolutionary information was not good enough, they used the central individual as base vectors to update and search around the average individuals. Obviously, compared with the LAPO algorithm, which only searches near the individual itself, the improved update method converged faster. Secondly, compared with LAPO's over-learning mode to the average individual, the proposed method integrated the individual j, the average individual, and the optimal individual, and introduced more combinations to enable the particles to obtain more local information, which was more conducive to maintaining the diversity of the population. Thirdly, compared with the original update method, formula (6) refers to the update strategy of differential evolution algorithm, by adding two differential vectors to control the directive of evolution, avoiding over-learning to a particle and falling into local optimum, and removing the step factor rand before individual j in the original LAPO algorithm, thus avoiding the blindness of random step size, and individual j directly participates in the evolution process, which further accelerated the convergence speed of the algorithm. Figure 2 takes the better individuals as an example to further describe the downward leader's update strategy. Take individual \(i\) as an example, if it is a better one, individual \(i\) adds the difference vector \(X_{best}-X_{i}^{t}\), which is from individual \(X_{i}^{t}\) to the best individual, close to the search area where the optimal individual is located, and then adds the difference vector \(X_{ave}-X_{j}^{t}\) which is from individual \(j\) to the average individual, reach to \(X_{new}^{t}\).