You are on page 1of 3

2016 12th International Conference on Computational Intelligence and Security

Comparisons of Central Force Optimization and Gravitational Search Algorithm

Li Junbing
College of Science
Xian University of Science and technology
Xian, China
e-mail: 82800618@qq.com

AbstractCentral Force Optimization (CFO) and


Gravitational Search Algorithm (GSA) have been used in A. CFO
various fields. This article compared CFO and GSA and Central Force Optimization, CFO, is a new global
exhaustively analyzed the difference. Their performance on optimization algorithm. The principle of its construction is
solving unimodal and multimodal functions is analyzed by a Newtons law of gravitation. More precisely, the main items
series of test functions. Then, conclusions that characteristics are as follows:
of the two methods are made, and technical guidance for the Every particle of matter in the universe attracts every
selection of methods in engineering applications are proposed. other particle with a force that is directly proportional to the
product of the masses of the particles and inversely
Keywords-Central Force Optimization; Gravitational Search
proportional to the square of the distance between them.
Algorithm; Comparison; Benchmark
We define the position of the ith probe by:
I. INTRODUCTION
X i = ( xi1 ," , xid ," , xin ) for i = 1,2," , N , where
With the development of technology and science, many xid presents the position of ith probe in the dth dimension.
real-life optimization problems are becoming ever more At tth generation, we define the force as following:
complex and difficult. In computer science, evolutionary
computation is a subfield of artificial intelligence (more
aid (t ) = G U (M i (t ) M j (t ) )
N
particularly soft computing) that can be defined by the type
of algorithms it is concerned with. These algorithms, called j =1
evolutionary algorithms, are based on adopting Darwinian j i
,
principles, hence the name.
( x dj (t ) xid (t ))
In the practical engineering problems, they are often
transformed the mathematical models. That is global
[M (t ) M (t )]
i j

Rij (t )
optimization problems. These optimization problems are
divided into 2 categories based on the number of global xid (t + 1) = xid (t ) + 0.5aid (t )
optimum: unimodal problems and multi-modal problems. where G is constant and Rij(t) is the distance between i and j
However, every evolutionary algorithm wants to provide the at tth generation, U is the unit step function.
solution on various issues in general. Actually there are In CFO, any probe that flew out of the decision space
different for different problems with their design, principle was returned to the midpoint between its past position and
and operation procedure. Quite naturally, one evolutionary the minimum or maximum value of the coordinate lying
method maybe shows high performance on some problems, outside the allowable range.
and shows poor on other problems.
Central Force Optimization (CFO) and Gravitational B. GSA
Search Algorithm (GSA) are for two pairs of new methods in We define the position of the ith probe by:
global optimization[1,2]. In recent years, CFO and GSA have
aroused extensive attention home and abroad, and have made
X i = ( xi1 ," , xid ," , xin ) for i = 1,2," , N , where
some desirable research results[3-5]. xid presents the position of ith probe in the dth dimension.
In this paper, calculation and analysis performed for
these methods with numerical experiments. Convergence M pi (t ) M aj (t ) d
accuracy and speed of two algorithms tested by unimodal Fijd (t ) = G (t ) ( x j (t ) xid (t ))
benchmarks, and exploration of two algorithms tested by Rij (t ) +
multi-modal benchmarks. where Maj is the fitness of ith probe, G(t) is constant ,  is a
small constant, and Rij(t) is the distance between two probes i
II. CFO AND GSA and j. To give a stochastic characteristic to GSA, it suppose
In this section we give a brief introduction about CFO that the total force that acts on agent i in a dimension d be a
and GSA. randomly weighted sum of dth components of the forces
exerted from other agents:

978-1-5090-4840-3/16 $31.00 2016 IEEE 428


DOI 10.1109/CIS.2016.103
N B. Test functions
Fi d (t ) = randFijd (t ) , Table represents the test functions used in next
j =1
j i numerical experiment. Dimension n of whole functions is 30.
where randj is a random number in the interval [0,1]. Function 1 and function 2 are unimodal functions. Function
The acceleration of the agent i at tth generation in the 3 and function 4 are multimodal functions. Function 5 and
direction dth is given as follows: function 6 are multimodal functions with fix dimension.
Global optimum location of whole functions is [0]n.
Fi d (t )
a (t ) =
d
i , TABLE II. TEST FUNCTIONS
M ii (t )
Function Region
fiti (t ) max fit j (t )
f1 ( x ) = x
n 2
j{1,", N } [-100,100]n
mi (t ) = , i =1 i

min fit j (t ) max fit j (t ) f 2 ( x) = i =1 | xi | + i =1 | xi |


n n
[-10,10]n
j{1,", N } j{1,", N }
f 3 ( x) = i =1 xi sin | xi |
n
[-500,500]n
mi (t )
M i (t ) = N
.
[
f 4 ( x) = i =1 xi2 10 cos( 2xi ) + 10
n
] [-5.12,5.12]n
m (t )
j =1
j 1
f 5 ( X ) = 4 x12 2.1x14 + x16 + x1 x2 4 x22 + 4 x24 [-5,5]2
Furthermore, the next velocity and position of an agent is 3
2
calculated as follows: 5.1 5 1
f 6 ( X ) = x2 2 x12 + x1 6 + 101 cos x1 + 10
4 8 [-5,10][0,15]
vid (t + 1) = rand i vid (t ) + aid (t ) ,
xid (t + 1) = xid (t ) + vid (t + 1) . C. Comparison of accuracy and velocity convergence
The constant G is calculated as follows: between CFO and GSA
t
In this section, the detailed results of calculation are put
G (t ) = G0 e T
. forward. CFO is a deterministic method, and it only run one
time. GSA is a stochastic method, and it will be run 30 times
C. CFO versus GSA
for every test functions. Table showed the results.
CFO and GSA are evolutionary algorithms, and they are
based on Newtons Law Gravity. The difference between TABLE III. RESULTS OF CFO AND GSA IN SOLVING 6 TEST
them is the primary responsibility in the characteristic. CFO FUNCTIONS

is a deterministic algorithm, and any random parameter does GSA


not use it. GSA is a stochastic algorithm. The calculation of CFO Average Median Average
best-so-far best-so-far mean fitness
force uses the random parameter. The definition of
f1 5.10h10-9 7.30h10-11 7.10h10-11 2.10h10-10
acceleration and velocity is different. In the fundamental f2 9.03h10-4 4.03h10-5 4.07h10-5 6.90h10-5
equations, the definition of mass is different. In CFO, f3 -2.7h103 -2.80h103 -2.60h103 -1.10h103
gravitation constant G is a fix constant, and gravitation f4 16.79 15.32 14.42 15.32
constant G is changing in a linear fashion. f5 -1.0316 -1.0316 -1.0316 -1.0316
f6 0.3979 0.3979 0.3979 0.3979

Following, we will discuss the results of experiments and


III. EXPERIMENTAL RESULTS discuss the difference between CFO and GSA.
A whole comparison was given between CFO and GSA (1). Function 1 and function 2 are unimodal functions. In
in this section. To be fair, whether CFO or GSA, the classical other words, they only have one either global or local
algorithms flow are chosen. minimum. This kind of function will test the convergence
rate of methods. As showed in table , CFO and GSA tend
A. Parameter settings
to stabilize. However, accuracy of convergence of GSA is
Parameter settings of CFO and GSA are as following table. higher than CFO. By the end of operation, the accuracy of
convergence of GSA is an order of magnitude larger than the
TABLE I. PARAMETER SETTINGS OF CFO AND GSA
CFO. That is the rate of convergence of CFO is more slowly
CFO GSA than GSA. Why is there a noticeable difference in the rate of
Population size N=60 N=60 convergence between CFO and GSA? The design idea of
Maximum iteration 500 500 CFO and GSA has a fundamentally different way. CFO
G=2
Gravity constant =2 =20
avoids any randomness to keep determinacy of algorithm.
=2 This maybe reduces the accuracy of convergence to some
extent. On the contrary, there is plenty of random factors in
GSA. For example, the computation of force. This maybe
increases the probability of finding global optimum quickly.

429
(2). Functions 3~6 are complexity multimodal functions. GSA
There are a lot of local minima in the search region. Search N CFO Average Median Average
methods are usually lost in local minima, and they cant find best-so-far best-so-far mean fitness
10 - - - -
global optimum for a limited time. This kind of test function 20 - 16.47 15.99 15.87
focuses on the exploration. As showed in table , results of 30 18.30 16.01 14.93 15.63
CFO or GSA are no different. They have excellent ability to 40 17.98 15.32 14.48 15.63
50 17.01 15.32 14.41 15.33
escape from local optimum, and find global optimum. The 16.79 15.32 14.42 15.32
60
reason is that every agent of CFO or GSA will make the best 70 16.71 15.32 14.41 15.32
of other agents information. This would insure all agents 80 16.24 15.32 14.40 15.32
will be more information sharing. Of course, this technique 90 15.95 15.32 14.40 15.32
also gets its drawbacks. All agents of CFO will trap in the 100 15.66 15.32 14.40 15.32
same basin in risky situations. Premature convergence of If circumstances agree, population size should probably
CFO cant avoid due to lack of random factors. On the define a larger number. The computational complexity of
contrary, GSA can jump out of the local minimus of random two algorithms increases dramatically when the number of
operators. Consequently, in order to complement conceptual population size increases. Many researchers draw
metaphor analysis, many research propose various measures conclusions that the global search ability is not getting a
to enhance exploration between CFO and GSA. substantial increase by an ever-increasing population size
(increases from 100 to 10000). The population size needs to
D. Robustness test between CFO and GSA be trade-off with the computational complexity.
In this section, population size of CFO or GSA is changed
to analyze the impact of algorithms. CFO or GSA have a IV. CONCLUSION
couple of parameters adjust. Population size plays a In recent years, many evolutionary algorithms have been
significant role in evolutionary methods. This section will proposed. Their common character is Swarm Intelligence.
discuss the influence of population size on the algorithms. In this paper, two novel heuristic methods that are CFO and
For simplicitys sake, we only choose test function 4 and 5 to GSA, are discussed. They are based on the same theory - law
testing. The results are shown in table . of universal gravitation. Their rate of convergence and
exploration is discussed by numerical experiments. Although
TABLE IV. RESULTS OF CFO AND GSA IN SOLVING FUNCTION 3
UNDER DIFFERENT POPULATION SIZES
CFO is less than GSA in different indexes. CFO only run
one time it is a deterministic algorithm. GSA often runs
GSA many times to get a better result. We should choose a
N CFO Average Median Average suitable method in the actual problem.
best-so-far best-so-far mean fitness
Population size setting of heuristic methods is of great
10 - - - -
20 - -2.97h103 -3.70h103 -2.10h103
important. But the researchers have found no effective way
30 -2.67h103 -2.80h103 -2.75h103 -1.29h103 to set it. Experience plays a very important role in this
40 -2.69h103 -2.81h103 -2.57h103 -1.14h103 question.
50 -2.69h103 -2.80h103 -2.62h103 -1.11h103
60 -2.70h103 -2.80h103 -2.60h103 -1.10h103 ACKNOWLEDGMENT
70 -2.71h103 -2.80h103 -2.61h103 -1.10h103 This work was supported by Scientific Research Program
80 -2.71h103 -2.80h103 -2.50h103 -1.09h103
Funded by Shaanxi Provincial Education Department
90 -2.72h103 -2.80h103 -2.480h103 -1.04h103
100 -2.72h103 -2.80h103 -2.48h103 -1.08h103
(No.2013JK0583), and Natural Science Basic Research Plan
in Shaanxi Province of China (No.2014JQ1034).
As showed in table and , population size has
significant implications for CFO or GSA. Small population REFERENCES
size behaves differently from larger population size. When [1] R.A. Formato, Central force optimization: a new metaheuristic with
the population size is small, population is harder to perform applications in applied electromagnetics, Progress in
Electromagnetics Research, vol.77, pp. 425491, 2007.
detailed searches in the search region, and population easily
gets into local optimal solution, and may even cause the [2] E. Rashedi, H. Nezamabadi-pour and S. Saryazdi,GSA: A
Gravitational Search Algorithm, vol. 179, pp. 2232-2248, 2009.
failure of algorithms. Either CFO or GSA is failure when
[3] L. Jie, W. Yuping, Central Force Optimization with Self-Adaptive
population size is 10. On the contrary, detailed search will be Control Strategy of Population Size, Journal of Beijin University of
made when population size is larger, and the probability of posts and telecommunications, vol. 38, pp. 15-19, 2015.
jumping out of a local optimum is greatly increased. The [4] L. Jie, W. Yuping, Central force optimization algorithm via
accuracy of global optimum is better when population size is clustering simplex search,Journal of Zhejiang University, vol. 41,
100. pp. 100-105.
[5] L. Jie, W. Yuping, An improved central force optimization based
TABLE V. RESULTS OF CFO AND GSA IN SOLVING FUNCTION 4 on simplex method,Journal of Xidian, vol. 48, pp. 2115-2122.
UNDER DIFFERENT POPULATION SIZES

430

You might also like