An improved firefly algorithm with dynamic self-adaptive adjustment

The firefly algorithm (FA) is proposed as a heuristic algorithm, inspired by natural phenomena. The FA has attracted a lot of attention due to its effectiveness in dealing with various global optimization problems. However, it could easily fall into a local optimal value or suffer from low accuracy when solving high-dimensional optimization problems. To improve the performance of the FA, this paper adds the self-adaptive logarithmic inertia weight to the updating formula of the FA, and proposes the introduction of a minimum attractiveness of a firefly, which greatly improves the convergence speed and balances the global exploration and local exploitation capabilities of FA. Additionally, a step-size decreasing factor is introduced to dynamically adjust the random step-size term. When the dimension of a search is high, the random step-size becomes very small. This strategy enables the FA to explore solution more accurately. This improved FA (LWFA) was evaluated with ten benchmark test functions under different dimensions (D = 10, 30, and 100) and with standard IEEE CEC 2010 benchmark functions. Simulation results show that the performance of improved FA is superior comparing to the standard FA and other algorithms, i.e., particle swarm optimization, the cuckoo search algorithm, the flower pollination algorithm, the sine cosine algorithm, and other modified FA. The LWFA also has high performance and optimal efficiency for a number of optimization problems.


Introduction
Inspired by various biological systems in nature, many scholars have proposed effective methods that simulate natural evolution to solve complex optimization problems. One of the earliest algorithms was a genetic algorithm proposed by Professor Holland [1]. Researchers then shifted to foraging behaviour of groups of animals, such as the ant colony optimization algorithm (ACO) that simulated the behaviour of ants [2]. Eber proposed particle swarm optimization (PSO) based on bird predation behaviour [3]. In recent years, new heuristic algorithms have been proposed. To name a few, Yang and BED proposed the cuckoo search (CS) algorithm based on the breeding and spawning of cuckoo [4]; The bat algorithm (BA) was proposed based on echolocation behaviour in bats [5]; the whale optimization algorithm (WOA) was inspired by the hunting behaviour of humpback whales [6]; and there is also the grey wolf optimizer algorithm [7], the sine cosine algorithm (SCA) [8], the polar bear optimization algorithm (PBO) [9], etc. More swarm intelligent algorithms were created mainly because of the no free lunch (NFL) theorem [10], which states a single swarm intelligent optimization algorithm cannot solve all optimization problems. The key point of the NFL theorem is that it is meaningless to assess whether an algorithm is good without a real problem, and the performance of an algorithm must be verified by specific problems. Therefore, it is of great significance to study the performance of swarm intelligent algorithms in different application fields [11,12]. The firefly algorithm (FA) was proposed in 2008 by Xinshe Yang, a Cambridge scholar. The algorithm is based on the luminous characteristics and attractive behaviour of individual fireflies [13]. Compared with other intelligent algorithms, the FA has the advantages of having a simple model, a clear concept, few parameters to adjust, and strong searchability. Like other algorithms, however, it could easily fall into local optimum, resulting in slow convergence speed and low convergence accuracy. As a result, many scholars have made improvements to the standard FA. Yang first introduced the Levy flight into the random part of the location updating formula of the FA and developed an FA with Levy flight characteristics [14]. Subsequently, Yang improved the quality of the FA by introducing chaos into the standard FA and increased the accuracy of the standard FA by dynamically adjusting its parameters [15]. Sharma introduced the inertia weight into the FA; this strategy can overcome the tendency of falling into local optima and can achieve a slow convergence for optimization problems [16]. Farahani and other scholars proposed a Gaussian distribution FA, which referred to an adaptive step size and improved the glow worm algorithm by improving the overall position of the FA population through Gaussian distribution [17]. An FA based on parameter adjustment is better than PSO in solving dynamic optimization problems. Sh. M. Farahani and other scholars introduced an automatic learning machine into the standard FA to adjust the algorithm's parameters, so that the algorithm can adjust the parameter values at any time according to the environment [18]. Adiland and other scholars improved the self-adaptation of the search mechanism and parameters of individual fireflies and embedded chaotic mapping to solve a mechanical design optimization problem [19]. Carbas also used the FA to solve a steel construction design problem [20]. Tahereh and other scholars used fuzzy coefficients to adjust the parameters of the FA and balanced the local and global search capabilities of the FA [21]. A number of optimization problems of test functions and engineering optimization problems have been verified for performance of the improved FA [22]. The FA is widely used in many fields, especially in computer and engineering fields, such as routine optimization [23,24], robot path planning [25] and image processing [26][27][28]. Many scholars around the world have conducted in-depth studies on the theory and application of the FA and are continuously expanding its application fields.
To improve the performance of the FA, this paper proposes an improved FA based on selfadaptive inertia weight logarithmic and dynamic step-size adjust factor (LWFA). Self-adaptive logarithmic inertial weight is also introduced in the updating formula. This strategy can effectively balance the exploration and exploitation capabilities and also improve the convergence speed of the algorithm. A step-size adjust factor is also added into the LWFA to randomly change the algorithm's step-size, preventing the FA from falling into a local optimum. Section 2 discusses the standard FA. The proposed LWFA is introduced in Section 3. In Section 4, the complexity analysis and convergence analyses are conducted to calculate the stability and validity of the LWFA. In Section 5, ten benchmark optimization test functions and IEEE CEC2010 test functions are used to evaluate the performance of the proposed algorithm. Experimental function curve results are shown in Section 5. Lastly, the work is summarized in Section 6.

Standard firefly algorithm
The firefly algorithm (FA) was proposed by a Cambridge scholar Xinshe Yang in 2008 [13]. The FA is a random search algorithm based on swarm intelligence that simulates the attraction mechanism between individual fireflies in nature. To idealize certain characteristics of fireflies when constructing mathematical models of FA, the following idealization criteria are used: 1. Fireflies, both male and female, are attracted only by light intensity between groups regardless of gender; 2. The attraction of fireflies to each other is proportional to the brightness of the light; 3. The brightness of fireflies is related to the objective function value that is to be optimized.

Mathematical description and application
In the firefly algorithm, fireflies have a unique lighting mechanism and behavior, and the light they emit can only be perceived by other individual fireflies within a certain range for two reasons: the light intensity I and the distance from the light source r are in inverse proportion, and the light can be absorbed by air. The basic principle of the standard FA is that in a randomly distributed firefly population, fireflies with high brightness attract fireflies with low brightness toward them, and each firefly approach a firefly with high absolute brightness in a solution space, update its position, complete an iteration of positions, and find an optimal position to achieve optimization. The brightness of fireflies is related to the objective function value. If fireflies have higher brightness and better positions, they will attract more fireflies. The brightest fireflies move randomly because they cannot be attracted to any other fireflies. The relationship between fireflies and the objective function value should be established. The absolute brightness of the algorithm is expressed by the objective function value, that is, the absolute brightness I i of a firefly set at the location x t i ðx i1 ; x i2 ; x i3 ; . . . ; x iD Þ is equal to the objective function value at the location x t i , that is Supposing a brighter firefly attracts a firefly with low brightness, the relative brightness between the two fireflies is I ij ðr ij Þ ¼ I i e À gr 2 ij . I i is expressed as the absolute brightness of firefly i; γ is the light absorption coefficient, generally set as a constant; r ij is the cartesian distance from firefly i to firefly j. That is ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi Supposing that the brightness between fireflies is proportional to the attraction, the attrac- β 0 is the largest attraction, and generally β 0 = 1.
The updating formula of the algorithm is as follows: Where, t is the number of iterations, δ i is a random number derived from a uniform distribution, Gaussian distribution, or other distribution, and α is a random term coefficient. The flow chart of the standard firefly algorithm (FA) is shown in the Fig 1:

The proposed firefly algorithm
Due to the shortcomings of the standard FA, Yang optimized a test function with singularities with FA to achieve better optimization performance. The results show that the FA can effectively solve this kind of global optimization problem, and the FA was successfully applied to the global optimization problem of pressure piping design. However, the parameters in the standard FA are set in advance, which will lead to premature convergence of the algorithm, or the algorithm cannot converge due to improper parameter settings. Hence, the standard FA needs to be improved to achieve better optimization performance.

Parameter analysis of firefly algorithm
The standard FA updates positions based on the attraction between high-brightness fireflies and low-brightness fireflies. Since the visual range of fireflies is limited, low-brightness fireflies can only find mobile higher brightness fireflies within their visual range. It should be noted that the light absorption coefficient γ is an important parameter affecting the degree of attraction between fireflies. When γ!0, the attraction β!β 0 . The attraction between fireflies will not change with a change in distance, that is to say, a flash firefly can be seen from anywhere. When γ!1, β!0. When the attraction between fireflies is almost zero, individual fireflies move randomly, that is to say, individual fireflies are myopia, which is equivalent to flying in a fog environment; they cannot see each other. The attraction algorithm of fireflies is between these two extremes. When the light absorption coefficient gets a better value (usually 1.0), the distance between two fireflies is the distance that affects the attraction between the two fireflies. If the distance r ij !1 between two fireflies that are attracted to each other, the attraction β!0. Therefore, the basic conditions of the FA in the optimization process are as follows: 1. The distance between attracted low-brightness fireflies and actively high-brightness fireflies should not be too large; 2. There must be a difference in brightness between individual fireflies, with at least one firefly having a higher brightness to attract other fireflies for location updates. There is greater randomness in the distance between individual fireflies that are attracted to each other.

The minimum attraction.
By analysing the parameters of the FA, where the light absorption coefficient γ is too large or where the light absorption coefficient γ is a fixed value, the optimization interval become too large, which will easily result in the attraction between individual fireflies to approach zero and individual fireflies to lose attraction between each other. To avoid the distance between individual fireflies from being too far, the attraction between them may be almost zero. This paper introduces a minimum attraction to improve the standard FA to prevent individual fireflies from randomly moving. At this time, β 0 = 1.0, β min 2[0,1]. So, even if the distance between fireflies is too far, e À gr 2 ij ! 0, the attraction between them can be the β min .
To validate the minimum attraction strategy can solve the shortcomings of the firefly algorithm, some test functions (D = 30) are selected to compare the FA with the algorithm which only obtain the minimum attraction strategy (LWFA-1). The comparison results of best value are shown in Table 1, and this paper also selects two benchmark functions for experiments and draws some conclusions. In the Table 1, the accuracy of the LWFA-1 is greatly reduced. Compared with FA, the LWFA-1 have better performance to solve optimization problems. The comparison results can illustrate the minimum attraction strategy is effect in the LWFA-1. From the Figs 2 and 3, the convergence curve of the FA is basically a straight line and will not change with the increase of iteration times, which indicates that the FA cannot jump out of the local optimal solution. By contrast, converge curve of LWFA-1 is smoother. Therefore, this strategy can help the original firefly algorithm jump out of the local optimal solution and improve the convergence accuracy of the FA.
3.2.2 Self-Adaptive inertia weight based on logarithmic decrement. The setting of inertia weight w can balance the global search ability and local optimization ability to some extent in the iterative process of FA. Initially, the setting of inertia weight is generally linear inertia weight. Based on the motion rule of a firefly in the FA, when a low-brightness firefly is attracted by a brighter individual firefly, the early motion amplitudes of the individual firefly is larger with strong global searchability so that it can enter the process of local optimization at a faster speed. An increase in iteration time helps to bring a firefly closer to the optimal value, and its moving speed should be decreased to improve its local optimization ability and should converge quickly to avoid oscillation state in the vicinity of the optimal value, thus improving the optimization ability of the FA.
As shown in Fig 4, compared with the linear decreasing inertia weight [29], the inertia weight of sinusoidal adjustment strategy [30], and the Gaussian decreasing inertia weight [31], the logarithmic decreasing self-adaptive inertia weight can be rapidly reduced in the early stages of iteration so that the local search stage can be quickly started and the search speed can be increased. Similarly, compared with the Gaussian decreasing strategy of inertia weight, in the late stages of iteration, the value of inertia weight changes more slowly, and individual fireflies can perform local searches to reduce the occurrence of oscillation. However, Gaussian decreasing inertia weight is almost unchanged after 500 iterations. If a firefly at this time falls into local optimum, it cannot easily jump out of the local optimum position. Therefore, the logarithmic self-adaptive inertia weight strategy is more suitable for individual firefly movement in the FA.  In this paper, logarithmic decreasing self-adaptive inertia weight [32] is used to meet the above requirements. The formula of logarithmic decreasing self-adaptive inertia weight is as follows: b is a logarithmic adjustment factor, w 1 is an initial value of inertia weight, w 2 is a final value of inertia weight, t is the current number of iterations, and T is the highest number of iterations.
The variation range of the inertial weight coefficient may have an impact on the result of function optimization. In this paper, by reading literature and simulation experiments, the parameter is set to b = 1.0 w 1 = 0.9 w 2 = 0.4. In this case, the optimize of the firefly algorithm is better.
To prove the inertial weight can also solve the shortcomings of the firefly algorithm, some test functions (D = 30) are selected to compare the FA with the algorithm which only obtain the inertial weight (LWFA-2). The comparison results of best value are shown in Table 2, and this paper also selects two benchmark functions for experiments and draws some conclusions. In the Table 2, compared with FA, the LWFA-2 have better performance to solve optimization problems. From the Figs 5 and 6, the converge curve of LWFA-2 is smoother. Therefore, this strategy also can help the original firefly algorithm jump out of the local optimal solution and improve the convergence accuracy of the FA.
3.2.3 Self-adaptive and dynamic step-size. The random step in the updating formula of the standard FA is generally a random number vector of Gaussian distribution, uniform distribution, or other distribution. Yang introduced a Levy flight into the random part of the updating formula of the FA, which to a certain extent reduces the possibility of individual fireflies falling into local optimal and improves the search performance of the standard FA. At the same time, an increase in the search dimension of an individual firefly decreases the optimization accuracy of the standard FA. For high-dimensional test functions, random turbulence will easily occur and the convergence speed will decrease, and the algorithm cannot converge to an optimal value. Inspired by references [17,33], this paper introduces the step adjustment factor c.
T is the largest iteration, t is the current iteration, D is the dimension of an individual firefly, and θ2[0,1]. In this paper, θ = 0.1. In the operation of the algorithm, the random step size decreases with an increase in the search dimension of an individual firefly or iteration number. This can ensure that the individual firefly's random step size change is small in a high-dimensional environment, and accurate explosion can be in a small range to find the optimal value  The updated formula after improvement is as follows: 6. Update w t c and t. Generally, the stop condition for the iteration in the FA is that the number of iterations reaches a predefined number or that the global optimal result is sought to achieve the required accuracy.
The flow chart of the LWFA is shown in the

The complexity analysis
The complexity of a swarm intelligence algorithm reflects the performance of the algorithm from other different aspects. If the algorithm needs an infinite amount of time to find a global optimal solution, the uptime availability is not included. Therefore, the computational complexity of the algorithm is very significant and crucial. Suppose the population size of the SCA is N, the maximum number of iterations is T, and the dimension of the decision variable is D.
In  N). Therefore, the computational complexity of the LWFA to achieve an optimal particle position is Although the computation complexity of the improved FA (LWFA) is higher than that of the standard FA, both of them are in the same order of magnitude.

The convergence analysis
Convergence analysis is a key factor to evaluate the convergence of swarm intelligence algorithms. As the number of iterations increases, errors between optimal results and theoretical optimal values become minute; eventually, swarm intelligence algorithms approach a fixed value. In the FA, the position update phase of fireflies determines whether the algorithm can converge to a global optimal. Many scholars have used different methods to analyze the convergence of swarm intelligence algorithms. In this paper, the LWFA is analyzed using a second-order nonhomogeneous differential equation.
Using the updating mechanism of the LWFA, we can easily find that the position update of the FA is conducted on a dimension-by-dimensional basis, and each dimension is independent. For the convenience of analysis, this paper simplifies the algorithm by choosing a onedimensional analysis. From the updating formula (8), weight w is the constant coefficient a, β ij is the constant coefficient b, and α � δ ij is the constant coefficient d; x j (t) is the current optimal position of a firefly, denoted as g b , and the optimal location of the next iteration is denoted as p b . Thus, the updating formula (8) is reduced as follows: Formulations (10-11) can be obtained as: Its characteristic equation is λ 2 +(1+r)λ+r =0, Δ = (1+r) 2 −4r = (r−1) 2 �0. Therefore, the convergence process of LWFA needs to consider the following two conditions: 1) When Δ = 0, the characteristic equation has two same real roots, l 1 ¼ l 2 ¼ À ð1þrÞ 2 ¼ À 1, and x(t) = (A 0 +A 1 t)λ t , A 0 , A 1 are undetermined coefficients, the result is calculated as: 2) When Δ>0, the characteristic equation has two different real roots, A 0 , A 1 , and A 2 are undetermined coefficients, and the result is calculated as follows: Based on the convergence analysis, if the LWFA converges iteratively, the following two conditions must be met [34].
➀ If t!1, x(0) has its maximum and tend to finite value.
In the whole iteration process of the improved algorithm, the inertia weight region is between 0.4 and 0.9. Therefore, the range of inertia weight conforms to the convergent domain (−1,2), thus the LWFA can converge to a global optimal solution in the iteration.

Application of improved firefly algorithm in function optimization
To evaluate whether the improved FA has advantages in various applications, two sets of benchmark test functions, ten classical benchmark functions with different dimensions (D = 10, 30, and 100) and standard IEEE CEC2010 functions have been used. In this paper, PSO, CS SCA, FPA, FA, the other improved FA and the LWFA are respectively used to conduct simulation experiments, and the experimental results are compared. Based on the experimental results, the improved FA in this paper shows good optimization performance in terms of optimization accuracy and convergence speed.

The benchmark test functions set 1
In this section, ten classical benchmark functions are used as test functions to evaluate the performance of the improved FA algorithm [35]. These functions represent different optimization problems. The specific test functions are as follows: 1. Schaffer function: ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi P D i¼1 x i 2 q À 0:5 This function's theoretical optimal value is 0, and the optimal position is at (0,. . .,0). This function is continuous, differentiable, non-separable, non-scalable, and unimodal. 2. Sphere function: This function's minimum value is 0. This function is a classical high-dimensional unimodal function. Its optimal position point (0,. . .,0) is in the center of the brim, and the relative exploration area is very limited. 3. Rastrigin function: This function obtains its optimum value 0 at (0,. . .,0). This function is a multimodal function, which has ten minimum values in solutions. The peak shape of the function fluctuates in volatility. It is rather difficult to explore global search. 4. Griewank function: This function obtains its minimum value 0 at (0,. . .,0). This function is continuous, differentiable, non-separable, scalable, and multimodal. 5. Ackley function: ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi 1 D ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi This function obtains its minimum value 0 at (0,. . .,0). This function is continuous, differentiable, non-separable, scalable, and multimodal. It has several local optimal values in its search space. 6. Sum-Squares function: This function's theoretical optimal value is 0, and its optimal position point is at (0,. . .,0). This function is continuous, differentiable, separable, scalable, and unimodal.

Comparison with other improved firefly algorithms on set 1
In this section, some improved firefly algorithms are selected to prove the optimization ability of LWFA. The results of other improved FA are extracted from the original literatures. The comparison results of LWFA, VVSFA [36], IWFA [37], and CLFA [38] are shown in the Table 3. From the Table 3, the average value is contained. In the same dimension D = 100, the accuracy of LWFA is obviously higher than other improved algorithms. When solve the high dimension optimization problems, compared with other FA, the LWFA can overcome the curse of dimensionality. Therefore, the LWFA is competitive in solving optimization problems.

Comparison with other state-of-art algorithms on set 1
For the ten test functions, f 2 , f 6 , f 8 , f 9 , and f 10 are unimodal functions, and f 1 , f 3 , f 4 , f 5 , and f 7 are multimodal functions. The dimensions of the test functions are set to 10, 30, and 100, respectively. The test results are obtained using PSO, CS algorithm, SCA, FPA, FA, and LWFA. The experimental environment is MATLAB 2014a, the operating system is windows 7 flagship, 4.00 GB of running memory and the processor is Intel (R) Core (TM) i3 -2350M CPU @ 2.30 GHz. The parameters of the six algorithms PSO [33], the CS [34], the FPA [35], the SCA [8], the FA [36], and the LWFA are as shown in Table 4.
To ensure fairness and comparability in the simulation experiments, the same experimental parameters are defined for all the algorithms. Each algorithm will run 30 times to solve each test function, and the test results will be recorded; the optimal solution of the objective function value, the worst solution, the average value, and standard deviation are obtained in this dimension, as shown in Tables 5-7.
Based on Tables 5-7, when D = 10/30/100, the LWFA significantly improves convergence accuracy. For either unimodal functions or multimodal functions that have multiple extreme points, as the dimension increases, the LWFA obtains better optimal performance. When D = 100, the accuracy of LWFA is more than 100 magnitudes higher than when D = 10. The LWFA can also solve optimization problems with a small standard deviation, indicating that the improved algorithm has greater robustness to solve high-dimension problems.
By comparing Tables 5-7, we can find that when D = 10, the LWFA can obtain optimal value 0 for functions f 1 , f 3, and f 4 , while the optimization accuracy of the other four algorithms (PSO, the CS, FPA, and FA) is not high. For functions f 2, f 5 -f 10 , the LWFA proposed in this paper is more accurate than PSO, the CS, and FA in terms of optimal values and standard deviation. The LWFA has higher convergence accuracy than the SCA except for the functions f 2 , f [5][6] . When D = 30, the standard CS is used to solve f 6 and f 10 , and it failed many times in the convergence experiments. Moreover, when D = 100, PSO is unable to solve the convergence problem for the function f 7 . The CS also loses convergence for functions f 3 , f 6 , f 8 , and f 10. When D = 100, the LWFA can quickly reach the optimal value 0 for functions f 1 , f 3 , f 4 , and f 5 . For other functions, the optimization accuracy and stability of PSO, the CS, FPA, and FA is lower than the performance of LWFA proposed in this paper. Particularly, the performance of the SCA decreases rapidly as the dimension increases, but the LWFA has a faster convergence speed and higher accuracy in 30 high-dimensional independent runs (D = 100).

Experiments and results analysis on set 2
In this section, to further analyze the performance of the improved FA, IEEE CEC2010 functions [39] are used in simulation experiments. PSO, the SCA, the FPA, and the standard FA are used to evaluate the performance of the LWFA. The simulation environment is similar to that of set 1. The parameters of the five algorithms are also shown in Table 4. To realize significant solutions, each function is run 30 times independently, and all the simulation experiments are tested under the same conditions. The solutions of all the algorithms are shown in Table 8. The details of the results-mean and standard deviation are recorded in Table 6. Based on Table 8, it can be easily analyzed that the LWFA outperformed the standard FA. Compared with the other algorithms (PSO, the FPA, FA, and SCA), the im-proved FA achieved superior optimization performance.

Convergence curve analysis
To clearly show the convergence speed and accuracy of the LWFA, this paper will plot the convergence curves of the LWFA and the five other algorithms (PSO, the CS, FPA, SCA, and FA) with D = 10 on ten benchmark functions, as shown in Fig 9. When the dimension D = 30/100, the convergence curve of function f 2 , f 5 , and f 6 are shown in Fig 10. In these graphs, the horizontal axes represent the iteration T = 1000, and the robustness of each algorithm is demonstrated in the vertical axes. Fig 9 shows the performance of the LWFA. The other algorithm (PSO, the CS, FPA, and FA) have similar solutions based on the convergence curves. Compared with the SCA, the LWFA can obtain a higher accuracy for the function f 2 , f 5 , and f 6. However, the performance of the SCA drops rapidly as the dimension increases. Fig 10 shows that the LWFA obtains a higher optimal value than the SCA.
Overall, based on the above comparison results above, we can see that the improved FA proposed in this paper is better than the other algorithms in the same dimension. When the comparison dimension is 30/100, the convergence rate of the LWFA is faster than the other algorithms in the convergence graph of the same function and has a vertical decline state. In different dimensions, the optimization accuracy of PSO, the CS, FPA, SCA, and FA will decrease with an increase in dimension. However, the optimization accuracy of the LWFA also increases gradually and shows good optimization performance for each function with an increase in its dimensions.

Conclusions
In this paper, the biological principle and mathematical description of the standard FA are presented, and the improvement of the FA and the research of its application fields are summarized. To achieve minimum attraction, an FA based on self-adaptive logarithmic inertia weight is proposed. The step adjustment factor is added to the random step term to dynamically adjust the random step, thus greatly improving the optimization performance of the FA. To evaluate the performance of the LWFA, multiple simulation experiments were conducted. In the first experiment set, ten benchmark test functions and IEEE CEC2010 standard test functions are used to compare the performance of state-of-the-art algorithms with that of the LWFA. The comparisons with PSO, the FPA, SCA, and CS show that the improved FA increases the accuracy of the solutions and significantly enhances the robustness of the solutions for the test functions, particularly for high-dimensional test functions. The experimental results in this study have convincingly shown and confirmed that the LWFA achieves high performance in solving optimization problems. The application of the improved FA to real-world engineering problems and multi-objective optimization will be done in future work.