# Adaptive Parameters for a Modified Comprehensive Learning Particle Swarm Optimizer

Authors: Yu-Jun Zheng; Hai-Feng Ling; Qiu Guan
Journal: Mathematical Problems in Engineering
 (2012)

---

## Abstract

Particle swarm optimization (PSO) is a stochastic optimization method sensitive to parameter settings. The paper presents a modification on the comprehensive learning particle swarm optimizer (CLPSO), which is one of the best performing PSO algorithms. The proposed method introduces a self-adaptive mechanism that dynamically changes the values of key parameters including inertia weight and acceleration coefficient based on evolutionary information of individual particles and the swarm during the search. Numerical experiments demonstrate that our approach with adaptive parameters can provide comparable improvement in performance of solving global optimization problems.


---

## Body

## 1. Introduction

The complexity of many real-world problems has made exact solution methods impractical to solve them within a reasonable amount of time and thus gives rise to various types of nonexact metaheuristic approaches [1–3]. In particular, swarm intelligence methods, which simulate a population of simple individuals evolving their solutions by interacting with one another and with the environment, have shown promising performance on many difficult problems and have become a very active research area in recent years [4–11]. Among these methods, particle swarm optimization (PSO), initially proposed by Kennedy and Eberhart [4], is a population-based global optimization technique that involves algorithmic mechanisms similar to social behavior of bird flocking. The method enables a number of individual solutions, called particles, to move through the solution space and towards the most promising area for optimal solution(s) by stochastic search. Consider a D-dimensional optimization problem as follows:
(1.1)minf(x),x=[x1,x2,…xD]Ts.t.xiL≤xi≤xiU,0<i≤D.In theD-dimensional search space, each particle i of the swarm is associated with a position vector xi=(xi1,xi2,…,xiD) and a velocity vector vi=(vi1,vi2,…,viD), which are iteratively adjusted by learning from a local best pbesti found by the particle itself and a current global best gbest found by the whole swarm:
(1.2)vi(t+1)=vi(t)+c1r1(pbesti(t)-xi(t))+c2r2(gbest(t)-xi(t)),(1.3)xi(t+1)=xi(t)+vi(t+1),
where c1 and c2 are two acceleration constants reflecting the weighting of “cognitive” and “social” learning, respectively, and r1 and r2 are two distinct random numbers in [0,1]. It is recommended that c1=c2=2 since it on average makes the weights for cognitive and social parts both to be 1.To achieve a better balance between the exploration (global search) and exploitation (local search), Shi and Eberhart [12] introduce a parameter named inertia weight w to control velocity, which is currently the most widely used form of velocity update equation in PSO algorithms:
(1.4)vi(t+1)=wvi(t)+c1r1(pbesti(t)-xi(t))+c2r2(gbest(t)-xi(t)).Empirical studies have shown that a large inertia weight facilitates exploration and a small inertia weight one facilitates exploitation and a linear decreasing inertia weight can be effective in improving the algorithm performance:(1.5)w(t)=wmin+tmax-ttmax(wmax-wmin),
where t is the current iteration number, tmax is the maximum number of allowable iterations, and wmax and wmin are the initial value and the final value of inertia weight, respectively. It is suggested that wmax can be set to around 1.2 and wmin around 0.9, which can result in a good algorithm performance and remove the need for velocity limiting.PSO is conceptually simple and easy to implement, and has been proven to be effective in a wide range of optimization problems [13–20]. Furthermore, It can be easily parallelized by concurrently processing multiple particles while sharing the social information [21, 22]. Kwok et al. [23] present an empirical study on the effect of randomness on the control coefficients of PSO, and the results show that the selective and uniformly distributed random coefficients perform better on complicate functions.In recent years, PSO has attracted a high level of interest, and a number of variant PSO methods (e.g., [24–32]) have been proposed to accelerate convergence speed and avoid local optima. In particular, Liang et al. develop a comprehensive learning particle swarm optimizer (CLPSO) [26], which uses all other particles’ historical best information (instead of pbest and gbest) to update a particle’s velocity:
(1.6)vi,d(t)=w(t)vi,d(t)+cri,d(pbestfi(d),d(t)-xi,d(t)),
where pbestfi(d),d can be the dth dimension of any particle’s pbest (including pbesti itself), and particle fi(d) is selected based on a learning probability PCi. The authors suggest a tournament selection procedure that randomly chooses two particles and then select one with the best fitness as the exemplar to learn from for that dimension. Note that CLPSO has only one acceleration coefficient c which is normally set to 1.494, and it limits the inertia weight value in the range of [0.4, 0.9].According to empirical studies [29, 30, 33], CLPSO has been shown to be one of the best performing PSO algorithms, especially for complex multimodal function optimization. In [34] a self-adaptation technique is introduced to adaptively adjust the learning probability, and the historical information is used in the velocity update equation, which effectively improve the performance of CLPSO on single modal problems.Wu et al. [35] adapt the CLPSO algorithm by improving the search behavior to optimize the continuous externality for antenna design. In [36] Li and Tan present a hybrid strategy to combine CLPSO with Broyden-Fletcher-Goldfarb-Shanno (BFGS) method, which defines a local diversity index to indicate whether the swarm enters into an optimality region in a high probability. They apply the method to identify multiple local optima of the generalization bounds of support vector machine parameters and obtain satisfying results. However, to the best of our knowledge, modifications of CLPSO based on adaptive inertia weight and acceleration coefficient have not been reported.In this paper we propose an improved CLPSO algorithm, named CLPSO-AP, by introducing a new adaptive parameter strategy. The algorithm evaluates the evolutionary states of individual particles and the whole swarm, based on which values of inertia weight and acceleration coefficient are dynamically adjusted to search more effectively. Numerical experiments on test functions show that our algorithm can significantly improve the performance of CLPSO.In the rest of the paper, Section2 presents our PSO method with adaptive parameters, Section 3 presents the computational experiments, and Section 4 concludes with discussion.


## 2. The CLPSO-AP Algorithm

### 2.1. Adaptive Inertia Weight and Acceleration Coefficient

To provide an adaptive parameter strategy, we first need to determine the situation of each particle at each iteration. In this paper, two concepts are used for this purpose. The first one considers whether or not a particlei improves its personal best solution at the tth iteration (in the paper we assume the problem is to minimize the objective function without loss of generality):
(2.1)si(t)={1iff(pbesti(t))<f(pbesti(t-1))0else.And the second considers the particle’s “rate of growth” from the(t-1)th iteration to the tth iteration:
(2.2)γi(t)=f(xi(t))-f(xi(t-1))|xi(t)-xi(t-1)|,
where |xi(t)-xi(t-1)| denotes the Euclidean distance between xi(t) and xi(t-1):
(2.3)|xi(t)-xi(t-1)|=∑k=1D‍(xik(t)-xik(t-1))2.Based on (2.1), we can calculate the percentage of particles that successfully improve their personal better solutions:
(2.4)ρ(t)=∑i=1psi(t)p,
where p is the number of particles in the swarm. This measure has been utilized in [33] and some other evolutionary algorithms such as [37]. Generally, in PSO a high ρ indicates a high probability that the particles have converged to a nonoptimum point or slowly moving toward the optimum, while a low ρ indicates that the particles are oscillating around the optimum without much improvement. Considering role of inertia weight in the convergence behavior of PSO, in the former case the swarm should have a large inertial weight and in the latter case the swarm should have a small inertial weight. Here we use the following nonlinear function to map the values of ρ to w:
(2.5)w(t)=eρ(t)-1.It is easy to derive thatw ranges from about 0.36 to 1. The nonlinear and nonmonotonous change of inertial weight can improve the adaptivity and diversity of the swarm, because the search process of PSO is highly complicated on most problems.Most PSO algorithms use constant acceleration coefficients in (1.4). But it deserves to note that Ratnaweera et al. [38] introduce a time-varying acceleration coefficient strategy where the cognitive coefficient is linearly decreased and the social coefficient is linearly increased. The basic CLPSO also uses a constant acceleration coefficient in (1.6), where c reflects the weighting of stochastic acceleration term that pulls each particle i towards the personal best position of particle fi(d) at each dimension d. Considering the measure defined in (2.2), a large value of γi(t) indicates that at t time, particle i falls rapidly in the search space and gets a considerable improvement on the fitness function; thus it is reasonable to anticipate that the particle may also gain much improvement at least at the next iteration. On the contrary, a small value of γi(t) indicates that particle i progresses slowly and thus needs a large acceleration towards the exemplar.From the previous analysis, we suggest that the acceleration coefficient should be an increasing function ofγi(t)/Γ(t), where Γ(t) is the SRSS of the rates of growth of all the particles in the swarm:
(2.6)Γ(t)=∑j=1p‍(γj(t))2.Based on our empirical tests, we use the following function to map the values ofγi to ci:
(2.7)ci(t)=1.8(1-γi(t)Γ(t)).


### 2.2. The Proposed Algorithm

Using the adaptive parameter strategy described in the previous section, the equation for velocity update for the CLPSO-AP algorithm is(2.8)vi,d(t)=w(t)vi,d(t)+ci(t)ri,d(pbestfi(d),d(t)-xi,d(t)),
where w(t) and ci(t) are calculated based on (2.5) and (2.7), respectively.Now we present the flow of CLPSO-AP algorithm as follows.(1)
Generate a swarm ofp particles with random positions and velocities in the range. Let t=0 and initialize w(t)=1 and each ci(t)=1.(2)
Generate a learning probabilityPCi for each particle based on the following equation suggested in [10]:
(2.9)PCi=0.05+0.45exp(10(i-1)/(p-1))-1exp(10)-1.(3)
Evaluate the fitness of each particle and update itspbest and then select a particle with the best fitness value as gbest.(4)
For each particlei in the swarm do the following.
(4.1)
Ford=1 to D do the next.
(4.1.1)
Generate a random numberrand in the range [0,1].(4.1.2)
Ifrand>PCi, let fi(d)=i.(4.1.3)
Else, randomly choose two other distinct particlesi1 and i2, and select the one with better fitness value as fi(d).(4.1.4)
Update thedth dimension of the particle’s velocity according to (2.8).(4.2)
Update the particle’s position according to (1.3).(4.3)
Calculatesi(t) and ri(t) for the particle according to (2.1) and (2.2), respectively.(5)
Calculatew(t) of the swarm based on (2.4) and (2.5).(6)
CalculateΓ(t) based on (2.5), and then calculate ci(t) for each particle i based on (2.7).(7)
Lett=t+1. If t=tmax or any other termination condition is satisfied, the algorithm stops and returns gbest.(8)
Go to step 3.In Step (7), other termination conditions can be that a required function value is obtained, or all the particles converge to a stable point.


## 2.1. Adaptive Inertia Weight and Acceleration Coefficient

To provide an adaptive parameter strategy, we first need to determine the situation of each particle at each iteration. In this paper, two concepts are used for this purpose. The first one considers whether or not a particlei improves its personal best solution at the tth iteration (in the paper we assume the problem is to minimize the objective function without loss of generality):
(2.1)si(t)={1iff(pbesti(t))<f(pbesti(t-1))0else.And the second considers the particle’s “rate of growth” from the(t-1)th iteration to the tth iteration:
(2.2)γi(t)=f(xi(t))-f(xi(t-1))|xi(t)-xi(t-1)|,
where |xi(t)-xi(t-1)| denotes the Euclidean distance between xi(t) and xi(t-1):
(2.3)|xi(t)-xi(t-1)|=∑k=1D‍(xik(t)-xik(t-1))2.Based on (2.1), we can calculate the percentage of particles that successfully improve their personal better solutions:
(2.4)ρ(t)=∑i=1psi(t)p,
where p is the number of particles in the swarm. This measure has been utilized in [33] and some other evolutionary algorithms such as [37]. Generally, in PSO a high ρ indicates a high probability that the particles have converged to a nonoptimum point or slowly moving toward the optimum, while a low ρ indicates that the particles are oscillating around the optimum without much improvement. Considering role of inertia weight in the convergence behavior of PSO, in the former case the swarm should have a large inertial weight and in the latter case the swarm should have a small inertial weight. Here we use the following nonlinear function to map the values of ρ to w:
(2.5)w(t)=eρ(t)-1.It is easy to derive thatw ranges from about 0.36 to 1. The nonlinear and nonmonotonous change of inertial weight can improve the adaptivity and diversity of the swarm, because the search process of PSO is highly complicated on most problems.Most PSO algorithms use constant acceleration coefficients in (1.4). But it deserves to note that Ratnaweera et al. [38] introduce a time-varying acceleration coefficient strategy where the cognitive coefficient is linearly decreased and the social coefficient is linearly increased. The basic CLPSO also uses a constant acceleration coefficient in (1.6), where c reflects the weighting of stochastic acceleration term that pulls each particle i towards the personal best position of particle fi(d) at each dimension d. Considering the measure defined in (2.2), a large value of γi(t) indicates that at t time, particle i falls rapidly in the search space and gets a considerable improvement on the fitness function; thus it is reasonable to anticipate that the particle may also gain much improvement at least at the next iteration. On the contrary, a small value of γi(t) indicates that particle i progresses slowly and thus needs a large acceleration towards the exemplar.From the previous analysis, we suggest that the acceleration coefficient should be an increasing function ofγi(t)/Γ(t), where Γ(t) is the SRSS of the rates of growth of all the particles in the swarm:
(2.6)Γ(t)=∑j=1p‍(γj(t))2.Based on our empirical tests, we use the following function to map the values ofγi to ci:
(2.7)ci(t)=1.8(1-γi(t)Γ(t)).


## 2.2. The Proposed Algorithm

Using the adaptive parameter strategy described in the previous section, the equation for velocity update for the CLPSO-AP algorithm is(2.8)vi,d(t)=w(t)vi,d(t)+ci(t)ri,d(pbestfi(d),d(t)-xi,d(t)),
where w(t) and ci(t) are calculated based on (2.5) and (2.7), respectively.Now we present the flow of CLPSO-AP algorithm as follows.(1)
Generate a swarm ofp particles with random positions and velocities in the range. Let t=0 and initialize w(t)=1 and each ci(t)=1.(2)
Generate a learning probabilityPCi for each particle based on the following equation suggested in [10]:
(2.9)PCi=0.05+0.45exp(10(i-1)/(p-1))-1exp(10)-1.(3)
Evaluate the fitness of each particle and update itspbest and then select a particle with the best fitness value as gbest.(4)
For each particlei in the swarm do the following.
(4.1)
Ford=1 to D do the next.
(4.1.1)
Generate a random numberrand in the range [0,1].(4.1.2)
Ifrand>PCi, let fi(d)=i.(4.1.3)
Else, randomly choose two other distinct particlesi1 and i2, and select the one with better fitness value as fi(d).(4.1.4)
Update thedth dimension of the particle’s velocity according to (2.8).(4.2)
Update the particle’s position according to (1.3).(4.3)
Calculatesi(t) and ri(t) for the particle according to (2.1) and (2.2), respectively.(5)
Calculatew(t) of the swarm based on (2.4) and (2.5).(6)
CalculateΓ(t) based on (2.5), and then calculate ci(t) for each particle i based on (2.7).(7)
Lett=t+1. If t=tmax or any other termination condition is satisfied, the algorithm stops and returns gbest.(8)
Go to step 3.In Step (7), other termination conditions can be that a required function value is obtained, or all the particles converge to a stable point.


## 3. Numerical Experiments

In order to evaluate the performance of the proposed algorithm, we choose a set of well-known test functions as benchmark problems, the definitions of which are listed in the Appendix section. The search ranges, optimal points and corresponding fitness values, and required accuracies are shown in Table1.Table 1
Detailed information of the test functions used in the paper.
No.
Function
Search range
x
*
f
(
x
*
)
Required accuracy
f
1
Sphere
[
-
100,100
]
D
[
0,0
,
…
,
0
]
0
0.000001
f
2
Rosenbrock
[
-
2.048,2.048
]
D
[
1,1
,
…
,
1
]
0
0.01
f
3
Schwefel
[
-
500,500
]
D
[
420.96,420.96
,
…
,
420.96
]
0
0.01
f
4
Rastrigin
[
-
5.12,5.12
]
D
[
0,0
,
…
,
0
]
0
0.01
f
5
Griewank
[
-
600,600
]
D
[
0,0
,
…
,
0
]
0
0.000001
f
6
Ackley
[
-
32.768,32.768
]
D
[
0,0
,
…
,
0
]
0
0.000001
f
7
Weierstrass
[
-
0.5,0.5
]
D
[
0,0
,
…
,
0
]
0
0.000001We comparatively execute the basic PSO algorithm, CLPSO algorithm, and our CLPSO-AP algorithm on the test functions with 10 and 30 dimensions, where each experiment is run for 40 times. The parameter settings for the algorithms are given in Table2.Table 2
Parameter settings of the algorithms.
Algorithm
Inertial weight
Acceleration coefficient(s)
10D functions
30D functions
p
t
max
p
t
max
PSO
[
0.4,1.2
]
c
1
=
c
2
=
1.49445
10
5000
30
10000
CLPSO
[
0.4,0.9
]
c
=
1.49445
10
5000
30
10000
CLPSO-AP
N/A
N/A
10
5000
30
10000We use the mean best fitness value and the success rate (with respect to the required accuracy shown in Table1) as two criteria for measuring the performance of the algorithms. The experimental results (averaged over 40 runs) of which are presented in Tables 3, 4, 5, and 6 respectively.Table 3
The mean best values obtained by the algorithms for 10D problems.
Function
PSO
CLPSO
CLPSO-AP
Sphere
3.239
E
-
27
8.138
E
-
79
5.479
E
-
96
Rosenbrock
2.172
E
+
00
2.005
E
+
00
1.106
E
+
00
Schwefel
1.048
E
+
03
0
0
Rastrigin
5.774
E
-
01
0
0
Griewank
8.132
E
-
02
1.313
E
-
02
6.467
E
-
03
Ackley
5.951
E
-
15
2.181
E
-
13
4.707
E
-
15
Weierstrass
0
0
0Table 4
The success rates obtained by the algorithms for 10D problems.
Function
PSO
CLPSO
CLPSO-AP
Sphere
100%
100%
100%
Rosenbrock
0
0
10%
Schwefel
5%
100%
100%
Rastrigin
12.5%
100%
100%
Griewank
0
1.75%
75%
Ackley
100%
100%
100%
Weierstrass
100%
100%
100%Table 5
The mean best values obtained by the algorithms for 30-D problems.
Function
PSO
CLPSO
CLPSO-AP
Sphere
4.900
E
-
14
1.077
E
-
57
3.852
E
-
75
Rosenbrock
5.164
E
+
01
2.158
E
+
01
1.954
E
+
01
Schwefel
1.425
E
+
02
7.913
E
+
01
6.883
E
+
01
Rastrigin
4.726
E
+
00
4.974
E
-
02
0
Griewank
2.745
E
-
02
1.616
E
-
10
1.167
E
-
12
Ackley
1.106
E
-
13
6.594
E
-
12
3.242
E
-
14
Weierstrass
1.155
E
-
14
1.155
E
-
14
1.155
E
-
14Table 6
The success rates obtained by the algorithms for 30-D problems.
Function
PSO
CLPSO
CLPSO-AP
Sphere
100%
100%
100%
Rosenbrock
0
0
0
Schwefel
0
50%
55%
Rastrigin
0
95%
100%
Griewank
37.5%
100%
100%
Ackley
100%
100%
100%
Weierstrass
100%
100%
100%As we can see from the experimental results, for all 10D and 30D dimensional problems, CLPSO-AP performs better than CLPSO in terms of both mean best values and success rates. Among the seven test functions, Ackley function is the only one on which CLPSO performs no better than the basic PSO However, CLPSO-AP performs better than basic PSO on both the 10D and 30D Ackley functions, and thus CLPSO-AP also outperforms basic PSO on all benchmark problems. It also deserves to note the 10D Rosenbrock function, for which CLPSO and most of the other PSO variants hardly succeed [26, 39, 40] while our CLPSO-AP algorithm gains a 10% success rate. Except for the 30D Rosenbrock function, CLPSO-AP successfully obtains the global optimum for all the other functions. In summary, our algorithm performs very well and overwhelms the other two algorithms on all of the test problems.


## 4. Conclusion

CLPSO has been shown to be one of the best performing PSO algorithms. The paper proposes a new improved CLPSO algorithm, named CLPSO-AP, which uses evolutionary information of individual particles to dynamically adapt the inertia weight and acceleration coefficient at each iteration. Experimental results on seven test functions show that our algorithm can significantly improve the performance of CLPSO. Ongoing work includes applying our algorithm to intelligent feature selection and lighting control in robotics [41–43] and extending the adaptive strategy to other PSO variants, including those for fuzzy and/or multiobjective problems [44, 45].



---

*Source: 207318-2012-12-20.xml*