Improved Shuffled Frog Leaping Algorithm Based on
Quantum Rotation Gates
Guo WU
1, Li-guo FANG
1, Jian-jun LI
2and Fan-shuo MENG
1 1Zhengzhou Information Science and Technology Institute, Zhengzhou, Henan, China2Science and Technology on Information Assurance Laboratory, Beijing, China
Keywords: Shuffled frog leaping algorithm, Quantum probability amplitude, Quantum optimization.
Abstract. Aiming at the search speed and accuracy of the shuffled frog leaping algorithm not high, the idea of variation was integrated into the shuffled frog leaping algorithm. A new improved shuffled frog leaping algorithm was proposed which was called quantum frog leaping algorithm. The positions of frog are encoded by the probability amplitudes of quantum bits, the movements of frog are performed by quantum rotation gates, which achieve particles searching. Through the experiments on six standard functions, simulation results show the proposed algorithm has high searching efficiency and precision, Moreover, QSFLA as a promising optimization algorithm has strong convergence and high stability.
Introduction
For years scientists have turned to Nature for inspiration while solving complex problems. Evolutionary algorithms (EAs) are stochastic search methods that mimic the metaphor of natural biological evolution and/or the social behavior of species. The optimized behavior of such species is guided by learning, adaptation and evolution. It is now well established that pure EAs are not well suited to fine tuning search in complex combinatorial spaces and that hybridization with other techniques can greatly improve the efficiency of search [1, 2]. The combination of EAs with local search was named memetic algorithms (MAs) in [3]. The shuffled frog leaping algorithm (SFLA) combines the benefits of the genetic-based memetic algorithms (MAs) and the social behavior-based particle swarm optimization algorithms [4]. In the SFLA, the population consists of a set of frogs (solutions) that is partitioned into subsets referred to as memeplexes. The different memeplexes are considered as different cultures of frogs, each performing a local search [5].
However SFLA has the shortages of premature convergence and poor accuracy. To avoid the shortcomings and improve its performance, many SFLA’s variations are proposed. The attraction-repulsion mechanism is integrated into SFLA to maintain the subpopulation diversity [6]. A new search-acceleration factor was introduced into the formulation of the original SFLA [7] and the factor balances the global and local search by widening the global search at the beginning and then searching deeply around promising solutions. A modified SFLA has a better search performance by the memory of former experience [8,9].
Based on the frame structure of the shuffled frog leaping algorithm, an improved algorithm is proposed based on quantum rotation gate. It uses qubits encoding, and achieves the optimal location of the search by the quantum rotation gate. The simulation results show that the algorithm’s optimization capability and efficiency are better than the shuffled frog leaping algorithm.
Shuffled Frog-leaping Algorithm
algorithm to use response surface information effectively to guide the heuristic search. The random elements ensure the flexibility and robustness of the search pattern.
The SFLA starts with an initial population of "F" frogs created randomly within the feasible space. For S-dimensional problems, each frog i is represented by S variables as Pi=(pi1, pi2, … , piS). The frogs are sorted in a descending order according to their fitness. Then, the entire population is divided into m memeplexes, each containing n frogs (i.e. F=m*n). In this process, the first frog goes to the first memeplex, the second frog goes to the second memeplex, frog m goes to the mth memeplex, and frog m+1 goes to the first memeplex, and so on.
Within each memeplex, the frogs with the best and the worst fitness are identified as Pb and Pw, respectively. Also, the frog with the global best fitness is identified as Pg. Then, during an evolution process, only the frog with the worst fitness in each cycle is improved. Accordingly, the position of the frog with the worst fitness updates its position to catch up with the best frog as follows:
) (
() Pb Pw rand
x
(1)
max max
; x x x
x Pw
Pwnew (2)
Where rand( ) is a random number between 0 and 1; and xmax is the maximum step size of a frog’s position allowed to be updated. If this process produces a better frog (solution), it replaces the worst frog. Otherwise, the calculations in equations (1) are repeated with respect to the global best frog (i.e. Pg replaces Pb). If no improvement becomes possible in this case, then a new solution is randomly generated to replace the worst frog. The calculations then continue for a specific number of iterations.
Improved Shuffled Frog Leaping Algorithm
If the solution of the optimization problem is represented by vector in S dimension space, the optimization problem is represented as min f(x1,x2,...,xs). Where axib , [a,b] is the
definition field of objective function, and S is the solution space dimension. The specific steps are as follows:
Initial Population
In order to ensure the random population initialization process, the frog position is encoded by quantum probability amplitude. It effectively avoids the binary to decimal encoding process. Its coding scheme is:
) sin(
) cos( ... ... ) sin(
) cos( ) sin(
) cos(
2 2
1 1
iS iS
i i
i i i
P
(3) Where ij2rand(), rand() is a random number between 1 and 0, 1iF , 1 jS.
From this code, we can see that each frog occupies the probability amplitude of quantum state 0 and 1 in ergodic space:
)) cos( ),..., cos(
),
(cos( 1 2
1 i i iS
i
P (4)
)) sin( ),..., sin(
),
(sin( 1 2
2 i i iS
i
P (5)
Solution Space Transformation
optimization problem. If a qubit of the frog P is [,]T, its space variable after conversion is: 2 / )] 1 ( ) 1 ( [
1 b a
Xi (6)
2 / )] 1 ( ) 1 ( [
2 b a
Xi (7)
Each frog has two solutions. The probability amplitude of quantum state 0 corresponds to
1 i
X , and the probability amplitude of quantum state 1 corresponds to Xi2.
Frog Status Update
In the improved algorithm, the position of the frog is changed by the quantum rotation gate. The frog's jump in shuffled frog leaping algorithm converts to the change of quantum rotation gate, and the frog position’s change converts to a quantum probability amplitude change. If the optimal location of the optimal frog Pb in the group is the cosine position (Because each frog corresponds to a sinusoidal position and a cosine position, there must be a better location.). So
)) cos( ),..., cos(
),
(cos( b1 b2 bS
Pb (8)
The worst location of the worst frog Pw in the group is:
)) cos( ),..., cos(
),
(cos( w1 w2 wS
Pw (9)
So the frog group update rules divides into the qubit argument increment update and the qubit probability amplitude update:
1) Qubit argument increment update:
rand() (10) Where ) ( 2 ) ( ) ( 2 w b w b w b w b w b w b
2) Qubit probability amplitude update:
) sin( ) cos( ) sin( ) cos( ) cos( ) sin( ) sin( ) cos( sin( ) cos( w w w w new w new w (11) So the two new positions of the frog is:
)) cos(
),..., cos(
),
(cos( 1 1 2 2
1 w w wS S
i
P
)) sin(
),..., sin(
),
(sin( 1 1 2 2
2 w w wS S
i
P
Thus it can be seen that the phase qubit of frog position can be changed by quantum rotating gate, to realize the frog's two position at the same time update. In this way, the search scope of the frog can be increased without changing the number of populations. It can extend the frog search traversal, and improve the efficiency of the optimization algorithm.
Improved Algorithm Description
1) According to the formula (3) F frogs are initialized.
corresponds to two fitness values. Now the frogs are sort by the better one. The global optimum of frog Pg and grouping are record.
3) Each subgroup need Q local search. The local search procedure is shown below:
(a) According to the grouping strategy, the best frog Pb is record, and the worst frog Pw is record too.
(b) The new frog is obtained according to formula (10) and (11). If this process produces a better frog (solution), it replaces the worst frog. Otherwise, the calculations in equations (10) are repeated with respect to the global best frog. If no improvement becomes possible in this case, then a new solution is randomly generated to replace the worst frog.
4) If the G iteration have been completed or the stop condition is met, the search is stopped. Otherwise, continue to the next step
5) Merge all sub groups, return to step 2).
Comparison of Simulation Results
[image:4.612.99.513.355.548.2]Test the performance of intelligent optimization algorithm by benchmark function is one of the most commonly methods. In this paper, 6 benchmark functions are selected to compare the traditional SFLA and the improved algorithm QSFLA. We have compared them with classical test functions, and observed the efficiency difference between them, to verify the function optimization’s convergence efficiency, global optimization ability and multi peak searching ability of QSFLA. The benchmark function is shown in Table 1.
Table 1. Benchmark functions.
Function Formula Range target
Sphere
D
i i x
1
2 [100,100]
0
Rosenbrock [100( )2 ( 1)2] 1
2
1
i
D
i
i
i x x
x [50,50] 0
Griewank cos( ) 1
4000 1
1 1
2
D
i
D
i
i i
i x
x [600,600] 0
Ackley
) (
20 20
)) 2 cos( 1 ( ) 1 ( 2 . 0 (
1
2
D
i D
i
i D x
x D
e e
e
[30,30] 0
Himmelbau (x2 y 11)2 (x y2 7)2 [6,6] 0
Schaffer
D
i
i i i
i x x x
x
1
1 . 0 2
1 2 2
25 . 0 2
1
2 ) (sin(50 ( ) ) 1)
( [100,100] 0
The set of algorithm parameters is: the number of group is 30; the number of frogs in the group is 20; the number of iteration in the group is 25; the number of maximum global iteration is fixed to 500. The dimension of Himmelbau is 2, that of the others is 30. And each function runs 50 times
Function Algorithm Best fitness Mean fitness Std
Sphere SFLA 4.622131e-004 9.867584e-003 1.339615e-002
QSFLA 8.885729e-027 1.332153e-026 1.952562e-027
Rosenbrock SFLA 2.720421e+001 8.510130e+001 7.363603e+001
QSFLA 3.661273e-001 1.719126e+001 1.995680e+001
Griewank SFLA 3.291904e-001 8.137137e-001 2.024844e-001
QSFLA 0 6.351753e-003 1.197139e-002
Ackley SFLA 3.254433e-003 3.208642e-002 8.388328e-002
QSFLA 2.220446e-014 2.469136e-014 2.893369e-015
Himmelbau QSFLA SFLA 0 0 2.231719e-027 3.322682e-029 1.577973e-026 3.769275e-029
Schaffer QSFLA SFLA 4.602170e-001 1.322007e-002 8.054441e+000 5.895712e+000 4.670380e+000 1.020678e+001
As shown in Table 2, the QSFLA is superior to the traditional SFLA in the search for the best accuracy of the six functions. For functions Sphere, Ackley and Griewank, QSFLA’s minimum
achievable accuracy is far higher than the traditional SFLA. And mean and standard deviation are smaller. This shows that the QSFLA is not only able to obtain a higher accuracy of the optimal solution, but also the search is stable. For functions Rosenbrock,Ackley and Schaffer, Although the
minimum value is only a little smaller than the traditional SFLA, the average value is still small, especially the standard deviation is low. QSFLA's search ability for these three functions is weak, but it is still better than the traditional SFLA.
[image:5.612.134.478.342.727.2]
Figure 1. Sphere. Figure 2. Rosenbrock.
Figure 3. Griewank. Figure 4. Ackley.
[image:5.612.141.281.346.720.2]
Figure 1 to figure 6 shows the evolution of the curve of the six functions. It can be seen from the figures that SFLA is better than QSFLA in the initial stage of the search. With the increase of the evolution algebra, the searching ability of SFLA decreased obviously. But QSFLA is still able to find a better position. This shows that the search of QSFLA more detailed. Although the initial search speed is slow, it maintains a relatively stable speed, but also has a stronger ability to find the best.
Conclusions
Improved shuffled frog leaping algorithm is proposed in this paper, using the quantum probability amplitude of frog encoding, to extend the ability to traverse the solution space. And based on the quantum rotation gate, the frog's update make the search finer. These new strategies speed up the search speed and improve the accuracy of the algorithm. The simulation results show that compared to the basic leapfrog algorithm, this algorithm improves the convergence precision and speed. Whether it is a unimodal function or a multimodal function, the algorithm has a good ability to find the best. At the same time, the improved algorithm has simple search mechanism, strong robustness, high practicability, and easy to operate.
Acknowledgments
The authors thank the anonymous reviewers for their useful comments and suggestions.
References
[1] J. Culberson. On the futility of blind search: an algorithmic view of 'no free lunch', Evolutionary Computation Journal, vol. 6 (2), pp.109-128, 1998.
[2] D. Goldberg, S. Voessner. Optimizing global-local search hybrids, Proceedings of the Genetic and Evolutionary Computation Conference (GECCO-99), San Francisco: Morgan Kaufmann Publishers, 1999, pp. 220–228.
[3] P. Moscato. On evolution, search, optimization, GAs and martial arts: toward memetic algorithms, California Inst. Technol., Pasadena, CA, Tech. Rep. Caltech Concurrent Comput. Prog. Rep. 826, 1989.
[4] Kennedy J., Eberhart R. Particle swarm optimization. In: Proceeding of the IEEE international conference on neural networks, pp. 1942–948, 1995.
[5] Eusuff M.M., Lansey K.E. Optimization of water distribution network design using the shuffled frog leaping algorithm. Water Resour Plan Manage [J], 2003, 3, PP: 210-225.
[6] Zhao Peng-jun, Liu San-yang. Shuffled frog leaping algorithm for solving complex functions. Application Research of Computers [J], 2009. 26(7), PP: 2435-2437.
[7] E. Elbeltagi, T. Hegazy, D. Grierson. A modified shuffled frog-leaping optimization algorithm: applications to project management, Structure and Infrastructure Engineering [J], 2007.3(1), PP: 53-60.
[8] Zheng Shi-Lian,Lou Cai-Yi,Yang Xiao-Niu. Cooperative spectrum sensing for cognitive radios based on a modified shuffled frog leaping algorithm. Acta Physica Sinica [J]. 2010.59(5), PP: 3611-3616.