24.03 08 PDF
24.03 08 PDF
24.03 08 PDF
A Hybrid Modified Whale Optimization Algorithm with Simulated Annealing for Terrorism
Prediction
Ghada M.A. Soliman1*, Tarek H.M. Abou-El-Enien1, Eid Emary2, Motaz M.H. Khorshid1
1
Faculty of Computers & Artificial Intelligence, Cairo University, Giza, Egypt
2
Faculty of Computer Studies, Arab Open University, Cairo, Egypt
https://doi.org/10.18280/isi.240308 ABSTRACT
Received: 1 April 2019 The main purpose of this research is to propose a novel hybrid memetic searching optimization
Accepted: 7 June 2019 algorithm, the proposed algorithm integrates the modified whale optimization algorithms with
simulated annealing algorithm in a novel approach in order to enhance the searching
Keywords: capabilities of the modified whale optimization algorithm with the help of simulated annealing
hybrid algorithms, memetic algorithm, (SA). The proposed algorithm is used to find the minimum feature subset based on hybrid
whale optimization algorithm, feature modified whale optimization algorithms and simulated annealing (WOA2SA, WOA3SA),
selection, spiral path, tournament where SA is embedded into the modified WO algorithms to achieve that good balance between
selection (exploitation) and (exploration) capabilities of the modified algorithms. The resulting memetic
algorithm improve the performance of the general classification tasks and hence had been used
in the prediction of terrorist group (s) which responsible of the terror attacks on Egypt based
on GTD terrorism data. The findings of this research can serve as an alarm tool to minimize
the terrorist attacks on a certain region (country).
281
based on using the highly similarity between the cooling and prey, as well as using the spiral helix shape movement in
freezing way in which a metal cools and freezes into a hunting. The spiral shaped path that explained in the original
minimum energy crystalline structure that is called as "The WO algorithm is follows a logarithmic shape also called
Annealing", and the search for a minimum solution in a more (equiangular spiral) ) but the constant property of this spiral
general system; SA is a basis that allow an optimization function is not realistic for the whales while its movement (the
technique to solve the combinatorial problems as it can deal constant property in which the angle formed by the radial
with other different disciplines problems. SA has a very good vector, this vector is formed from a line between any point
ability to escape from the local optima in which the improving "W" on the spiral toward the center of the spiral is constant )
move will be accepted but the worse one will be accepted as a which is not accurate to represent the whales movement in
solution under determined probability. The probability of reality, and hence we intended in our research in choosing a
accepting the worse solution is calculated by using the more accurate and realistic spiral shape after investigate
Boltzmann probability as follows in Eq. (1). different forms of spiral shaped to simulate the helix-
movement of the whales that enhance the exploitation
−∝⁄
Probability = e T emper (1) capability of humpback whales in the hunting mechanism.
282
3.1 Exploitation phase Archimedes’ Spiral:
⃗⃗⃗⃗⃗⃗⃗⃗ ⃗ . r cos( 2πr) + ⃗⃗⃗⃗⃗⃗⃗
WP (c + 1) = ⃗D WP ∗ (𝑐) (8)
3.1.1 Shrinking encircling a prey
The humpback whales begin to encircle the prey near the
surface of the water as described mathematically by Eq. (2) where
and Eq. (3) and explained in [9, 12, 13].
⃗́ = |W
⃗⃗⃗⃗⃗⃗⃗∗ ⃗⃗⃗⃗⃗
𝐷 P (c) − WP (𝑐) |: is the distance do the whale number
⃗⃗ p (c + 1) = ⃗⃗⃗⃗⃗⃗⃗
⃗W Wp ∗ (c) − ⃗M
⃗⃗ . ⃗D
⃗ (2) j- th whale to the prey (the last obtained best solution), and r
random number in [−1, 1].
D ⃗⃗ . ⃗⃗⃗⃗⃗⃗⃗
⃗⃗ = | N WP ∗ (n) − ⃗⃗⃗⃗⃗
Wp (c)| (3)
The representation of the two hunting mechanisms of the
whales (shrinking encircling and the bubble-net by spiral-
⃗⃗⃗⃗
M = 2 ⃗⃗⃗⃗
M . s − ⃗⃗⃗⃗
M (4) shape path), is by considering a 50 % probability to make the
choice between them in the optimization process as explained
⃗⃗⃗N = 2 s (5) in the Eq. (9).
where: ⃗⃗⃗⃗⃗
WP (c + 1)
⃗⃗⃗⃗⃗⃗
𝑊 ∗ (c) − M. ⃗⃗⃗⃗ D
⃗⃗ if (A < 0.5)
⃗⃗⃗⃗⃗
Wp : The whale's position vector. cos( 2πr)
= ⃗⃗́ .
D + ⃗⃗⃗⃗⃗
W ∗ (c) if (A ≥ 0.5)
⃗⃗⃗⃗⃗⃗⃗
WP ∗ : Represents historically best whales' position (solution) r
obtained so far. ⃗ . r cos( 2πr) + ⃗⃗⃗⃗⃗⃗⃗
⃗D WP ∗ (c)
{
c: indicates current iteration. (9)
⃗⃗⃗⃗
M , ⃗N ⃗ : known as coefficient vectors that are calculated as
in Eq. (4) and Eq. (5) respectively. where: A considered a random number that defined in [0, 1].
⃗⃗⃗⃗ : Called distance control parameter, its values is decreased
M
from 2 till 0 within the iteration number. 3.3 Exploration (diversification)
s ∶ A random vector follows the uniform distribution in the
interval of [0, 1]. The humpback whales can search for the prey via exploring
As explained by Eq. (2) the whales enhance their positions the area globally and to enhance this exploration ability; they
according to the position of the best known solution (optimum based on searching for the prey by a random selected whale to
solution). Whales can be located in the neighborhood of small guide the search which is not depends on the whales' positions
fishes via changing the values of ⃗⃗⃗⃗ M and ⃗N ⃗ vectors; The to each other. This mechanism is completely differs from the
Shrinking encircling behavior of a whale around the prey is exploitation phase in which the whales can enhance and update
achieved according to the decreasing value of M ⃗⃗⃗⃗ in Eq. (4) that their position depending on the best whales' position obtained
explained by Eq. (6) so far, and hence, a vector M can take values "greater than 1"
or "less than −1" is used to allow the whales to move far away
⃗⃗⃗⃗ = 2 − c 2 from the best whale position. The mathematical model for the
M (6)
MaxIn exploration mechanism is as follows in Eq. (10) amd Eq. (11):
where ⃗D
⃗ = |N
⃗⃗⃗⃗ . ⃗⃗⃗⃗⃗⃗
WP random − ⃗⃗⃗⃗⃗⃗
WP | (10)
c: the number of the iteration.
MaxIn: maximum iterations.
⃗⃗⃗⃗
WP (c + 1) = ⃗⃗⃗⃗⃗ ⃗⃗⃗ . D
WP random − M ⃗⃗ (11)
3.1.2 Bubble-net attacking method
To determine the position of neighbor around the whale; the where
distance between a whale position (W ⃗⃗⃗⃗⃗⃗P ) and the best known ⃗⃗⃗⃗⃗⃗
WP random : a random position vector represents a random
⃗⃗⃗⃗⃗⃗⃗∗
whale position obtained so far (WP ) has to be calculated. This chosen humpback whale.
distance is represented by spiral path called hyperbolic The Following steps present the modified whale
(reciprocal) spiral that we based on constructing the spiral path optimization algorithms (WOA2, WOA3). The algorithm
for our modified WO algorithm (WOA2) and Archimedes’ begins with creating and initializing a set of humpback whales
Spiral that we based on in constructing the spiral function for by using the uniform initialization method, then once the
(WOA3). These two spiral functions are illustrated and optimization starts; the position evaluation of these whales are
defined in [15]. done based on the defined fitness. The algorithm continue
proceeding till finds the best whale position around the small
3.2 Mathematical formulation fishes (the prey), the algorithm repeatedly executes the
following steps until the maximum iteration reached.
The Spiral paths equations that represent the humpback
whales movement for WOA2 as explained by Eq. (7) and for Step 1: Update the main algorithm coefficients.
WOA3 defined below in Eq. (8) as follows: Step 2: a random value is generated that used to determine
Hyperbolic Spiral: how the whales updates their position by using either one of
the two mechanisms represented by Eq. (2) or Eq. (11) or
based on the spiral paths explained in Eq. (7) and Eq. (8).
WP (c + 1) = ⃗⃗D́.
cos( 2πr)
⃗⃗⃗⃗⃗⃗⃗⃗ + ⃗⃗⃗⃗⃗⃗⃗
WP ∗ (c) (7)
r
283
Step 3: The solutions (whales' positions) cannot go outside the prediction of terrorist group (s) responsible of the terror attacks
search space. on Egypt. In the resulting memetic hybrid algorithm the SA
Step 4: The algorithm presents the output as the best whale's algorithm is selected due to its high advantage in selection that
position with respect to the prey as an approximation to the embedded into (WOA2) and (WOA3) due to their ability in
global solution. global search to achieve that good balance between
(exploitation) and (exploration) abilities of the two algorithms.
The hybridization between the modified (WOA2 with SA)
4. PROPSED HYBRID MODIFIED WHALE and (WOA3 with SA) based on using the "Tournament
OPTIMIZATION SIMULATED ANNEALING selection methodology" of SA algorithm instead of random
ALGORITHMS (WOA2SA, WOA3SA) selection mechanism in the exploration phase of Modified
algorithms (WOA2) and (WOA3) as showed in Figure 3. The
This section presents the proposed hybrid metaheuristics original WOA as well as the two modified versions (WOA2)
algorithm between the Modified Whale optimization and (WOA3) are using a blind operator to play the role of
algorithms (WOA2, WOA3) with the Simulated Annealing exploration or searching for the small fishes (prey), and hence
(SA). The proposed hybrid model is used to find the minimum we used the tournament selection operator in place of the
feature subset that used then to improve the performance of random search which will be considered a solution as its initial
general classification tasks, and hence can perform the state, and replace the original solution by the enhanced one.
284
Then the Eq. (10) and Eq. (11) will be replaced with the classification process and it passed on multiple steps as
enhanced Eq. (12) and Eq. (13) as follows: explained below:
(1) Data Cleaning: Pre-process data in order to reduce noise
⃗D
⃗ = |N
⃗⃗ ⃗⃗⃗⃗⃗⃗
WP tournament−selection − ⃗⃗⃗⃗⃗
WP | (12) and handle missing values by applying (Litwise-Deletion,
Mode-Imputation) approaches.
⃗⃗⃗⃗⃗ (2) Data transformation (from Categorical into Numeric
WP (c + 1) = ⃗⃗⃗⃗⃗⃗ ⃗⃗⃗ . D
WP tournament−selection − M ⃗⃗ (13)
based on GTD coding system)
(3) The features in our data are classified as (Date, Incident
where location, Location Details, Attack Iinformation, Weapon
⃗⃗⃗⃗⃗⃗
WP 𝒕𝒐𝒖𝒓𝒏𝒂𝒎𝒆𝒏𝒕−𝒔𝒆𝒍𝒆𝒄𝒕𝒊𝒐𝒏 : is a position vector (represents the Information, Target / Victim Information, Casualties &
whale's position) chosen from the tournament selection Consequences) features
process of the SA Algorithm. (4) For the time domain features; we applied a feature
reduction where we transformed the "day, month, and yea"
4.1 Data pre-processing features into an equivalent "day per year, Hijiri day per year,
and an equivalent day per week".
This section explains how the terrorism data has been used (5) For the position or location feature we transformed it
and pre-processed in the proposed prediction model. The used into city-latitude, and city-longitude.
data is real terrorism data and describes the terrorist attacks on (6) Due to the huge number of classes in some features in
Middle East & North Africa especially the attacks that our data; we had to combine the classes in some features into
happened in Egypt (from year 1996 till year 2017) via the groups.
defined fitness function ACC which evaluate the accuracy of The terrorism data on the time period from year 1996 till
the model and explained in Eq. (14). year 2017 has 45 predictors (attributes or features) besides the
The data set derived from the Global Terrorism Database feature "Terrorist group name" which is considered as
(GTD) which is taken from an open source of the National (response class) that we should predict in our research; after
Consortium for the Study of Terrorism and Responses to data-preprocessing steps; the total number of attacks (records)
Terrorism (START) [16]: became 813, the total set of features became 46 features as
The data are required to be prepared for using in the described below in Table 1.
Table 1. Terrorism dataset features for the time period (1996 till 2017) of Egypt
4.2 Fitness function is designed to combine the accuracy of classifier with the
length of feature subset. A fitness function combines both the
Fitness function is important for metaheuristic algorithms, classification error (Classification accuracy) and the number
it is used evaluate the quality of each subset. fitness evaluation of selected features and hence achieve that balance between
285
the classification performance and the reduction size . Table 3. The results of the memetic algorithms with 7 whales
286
system such as a hybridization between a WOA2 or WOA3 [4] Holland, J.H. (1975). Adaptation in Natural and
with the Particle Swarm Optimization algorithm (PSO) and Artificial Systems. Ann Arbor, MI, USA: Michigan Press
SA. University.
[5] Koza, J.R. (1992). Genetic Programming. Cambridge,
Table 4. The results of the memetic algorithms with 10 USA: MIT Press.
whales [6] Colorni, A., Dorigo, M., Maniezzo, V. (1991).
Distributed optimization by ant colonies. In European
Number Conf. on Artificial Life. Elsevier Publishing, pp. 134–
of Exe. 142.
Mean Selected Time [7] Glover, F. (1977). Heuristics for integer programming
Iteration Alg. Fitness ACC. features (Sec.) using surrogate constraints. Decision Sciences, 8: 156-
5o
iterations WOA 0.30643 0.694 17 2.7
166. https://doi: 10.1111/j.1540-5915.1977.tb01074.x
[8] Mirjalili, S. (2015). Moth-flame optimization algorithm:
WOASA 0.30135 0.575 17 137 a novel nature-inspired heuristic paradigm. Elsevier,
WOA2SA 0.28843 0.527 23 143 Knowledge-based Systems, 89: 228-249.
WOA3SA 0.29472 0.511 20 152 https://doi.org/10.1016/j.knosys.2015.07.006
70 [9] Blum, C., Blesa Aguilera, M.J., Roli, A., Sampels, M.
iterations (2008). Hybrid meta-heuristics – an emerging approach
WOA 0.28374 0.715 24 4 to optimization. Volume 114 of Studies in Computational
Intelligence. Springer.
WOASA 0.28852 0.591 14 230
[10] Krasnogor, N., Smith, J. (2005). A tutorial for competent
WOA2SA 0.275 0.556 22 281 memetic algorithms: Model, taxonomy, and design
WOA3SA 0.29582 0.605 23 382 issues. IEEE Transactions on Evolutionary Computation,
100 9(5): 474488. https://doi:10.1109/TEVC.2005.85020
iterations [11] Ingber, L. (1993). Simulated annealing: Practice versus
WOA 0.29404 0.707 17 8 theory. Mathl. Comput. Modelling, 18(11): 29-57.
https:// doi: 10.1016/0895-7177(93)90204-C
WOASA 0.27411 0.605 21 353
[12] Mirjalili, S., Lewis, A. (2016). The whale optimization
WOA2SA 0.26309 0.527 18 363 algorithm. Advances in Engineering Software, 95: 51–67.
WOA3SA 0.27149 0.621 23 332 https://doi.org/10.1016/j.advengsoft.2016.01.008
150 [13] Soliman, G.M.A., Khorshid, M., Abou-El-Enien, T.H.M.
iterations (2016). Modified moth-flame optimization algorithms
WOA 0.29693 0.704 19 8 for terrorism prediction. International Journal of
WOASA 0.2692 0.595 15 823 Application or Innovation in Engineering &
Management, 5(7): 47-596.
WOA2SA 0.29693 0.625 19 775
[14] Soliman, G.M.A., Abou-El-Enien, T.H.M., Emary, E.,
WOA3SA 0.28821 0.538 19 449 Khorshid, M. (2018). A hybrid whale optimization
algorithm with adaptive spiral for terrorism prediction
(the case of Egypt). European Journal of Scientific
REFERENCES Research, 149(2): 165-184.
[15] Bowser, E.A. (1880). An Elementary Treatise on
[1] Kirkpatrick, S., Gelatt, C.D., Vecchi, M.P. (1983). Analytic Geometry: Embracing Plane Geometry and an
Optimization by simulated annealing. Science, Introduction to Geometry of Three Dimensions (4th ed.).
220(4598): 671–680. New York, D. Van Nostrand.
https://doi:10.1126/science.220.4598.671 [16] Global Terrorism Database (GTD). (2009-2018).
[2] Glover, F. (1989). Tabu Search-Part I. ORSA Journal of University of Maryland. National Consortium for the
Computing, 1(3): 190–206. Study of Terrorism and Responses to Terrorism. A
https://doi.org/10.1287/ijoc.1.3.190 Center of Excellence of the U.S. Department of
[3] Lawler, E.L. (1976). Combinatorial Optimization: Homeland Security. University of Maryland, USA.
Networks and Matroids. Holt, Rinehart and Winston,
USA.
287