1. Introduction
Swarm intelligence (SI) is a subfield of artificial and natural (such as bees, ants, and fish) intelligence that studies how a group of agents might work together by utilizing self-organizing and sequencing. Simple independent agents provide the basis for emerging intelligence. SI contains a typical number of simple agents that interact with each other and their nature [
1]. It is used to solve optimization problems in large search spaces that are challenging for mathematical and conventional computational techniques. Ant Colony Optimization (ACO) [
2], Particle Swarm Optimization (PSO) [
3], Artificial Bee Colony (ABC) [
4], and Bat algorithm [
5,
6] are representative examples.
Particle Swarm Optimization (PSO) is widely used to find approximate solutions to problems of maximizing and minimizing numerical values that are very difficult or impossible. It is used to reduce slow convergence rate and local minima problems [
7]. PSO has different numbers of particles in the population used to find optimal solutions. All particles have current velocity, current position, and personal best (Pbest) out of which the global best (gbest) is selected [
8]. Particles are randomly initialized and used to verify the fitness value of each particle by using the fitness function. The values of velocity and position are updated upon each iteration. PSO Algorithm provides effective parameters to control exploration and exploitation. There are some limitations in standard PSOs such as premature convergence, local search ability, being heavily dependent on parameters settings, and being easily trapped in local optima. Researchers proposed various variants of PSOs such as adaptive parameter setting, mutation strategy [
9], and opposition-based initialization in order to solve these issues. With the advent of PSO, new methods have also been proposed for solving global optimization problems in terms of solutions to the design artificial neural networks (ANNs), evolutionary computing fuzzy systems, evolutionary computing, and evolutionary computing. The PSO algorithm is commonly used to solve data classification problems, cost estimation, agriculture problems, planning, clustering engineering field problems, and real time problems.
In order to find an efficient solution in the current estimate and its corresponding opposite, they are given opposition-based learning (OBL) at the same time. This idea is inspired by real-world opposition objects and applied to an initial population that is randomly generated [
10]. The opposite of each individual in the population participates in the computation of the opposite population. OBL is used to accelerate the search process of some well-known techniques of EC. The idea of OBL is applied in many ECs such as Artificial Neural Networks (ANN) [
11] and Reinforcement Learning (RL) [
12]; and optimization algorithms such as Bat algorithm [
13], Grey Wolf Optimizer (GWO), Genetic Algorithms (GA) [
14], Whale Optimization Algorithm (WOA), Differential Evolution (DE), Grasshopper optimization algorithm (GOA), Harmony Search (HS), and Particle Swarm Optimization (PSO) [
15], etc.
Opposition-based learning is used to find optimal solutions and improve performance toward some optimal solutions. OBL is used in many fields such as the medical field to diagnose disease and the agriculture field to save water crop, to clarify soil, and to schedule agriculture work [
16]. It also worked in the engineering field in terms of training machine tolerance processes and minimizing costs [
17]. Different initialization techniques are used for initializing the initial population of the PSO algorithm. The distribution of random number generation has three main categories: quasi-random sequences [
18], i.e., Sobol, Hamersley, Van der Corput, Halton, and Faure; probability sequences, i.e., Log-normal, Gamma, Beta, and Exponential; and pseudo-random sequences, i.e., Mersenne twister, Linear congruential generator, Multiply-with-carry, Threefry, and Philox [
19]. Pseudo-random number generator (PRNG) is used as an initialization technique because it covers all search spaces. For a globally optimal solution, pseudo-random sequences perform better than quasi random sequences due to its variation in random number generation. We used various PRNG strategies (Mersenne twister, Linear congruential generator, Multiply-with-carry, Threefry, and Philox) for the initialization of the population.
In this paper, we proposed Philox with opposition-based PSO ranked inertia weight (ORIW-PSO-P) and Threefry with opposition-based PSO ranked inertia weight (ORIW-PSO-TF) for enhancing global search ability and balance between exploration and exploitation ability. ORIW-PSO-P and ORIW-PSO-TF combine two effective improvements: Philox and Threefry initialization with opposition-based learning and ranked inertia weight for individual particles. We have proposed the new pseudorandom initialization strategies called Philox and Threefry. PRNG-based Philox and Threefry are used to initialize the initial population, and opposite particles are generated through opposition-based learning. In addition, in this paper, the inertia weights of particles are adjusted by using opposite rank-based inertia weight used to balance exploration and exploitation. Through opposite rank-based inertia weight optimal particles that are close to the optimal position move slowly and fast-moving particles continuing far away from the optimal position of the swarm. At the same time, it enhances local and global search ability. We have compared novel techniques with basic random distribution and pseudo-random sequence families such as Mersenne twister, Linear congruential generator, and Multiply-with-carry sequence on several unimodal and multimodal benchmark functions. The experimental results showed that Philox with opposition-based PSO ranked inertia weight (ORIW-PSO-P) and Threefry with opposition-based PSO ranked inertia weight (ORIW-PSO-TF) outperform the other opposition-based particle swarm optimization algorithm ranked inertia weight (ORIW-PSO), Mersenne twister with opposition-based PSO ranked inertia weight (ORIW-PSO-MT), Linear congruential generator with opposition-based PSO ranked inertia weight (ORIW-PSO-LCG), and Multiply-with-carry with opposition-based PSO ranked inertia weight (ORIW-PSO-MWC). In this work, the design of an algorithm, a critical aspect of the symmetry concept, has been emphasized because it is very important for global optimization.
Therefore, in this paper, we propose a novel pseudo-random initialization strategy (Philox and Threefry) that uses the OBL scheme and opposition rank-based inertia weight scheme in order to overcome the drawbacks of PSO algorithms and help PSO conduct additional explorations in order to accelerate convergence. We used the proposed variants to train artificial neural networks on classification problems. In order to compare the results of the classifiers, fifteen datasets were extracted from the well known UCI repository. The results of the proposed variant are superior when compared to other variants. The main contributions of this paper are as follows:
- (1)
Utilization of pseudo-random sequence Threefry and Philox for the initialization of the population;
- (2)
To increase population diversity, opposition-based learning is used;
- (3)
A novel introduction of opposition-based rank-based inertia weight in order to amplify the execution of standard PSO for the acceleration of convergence speed.
The rest of the paper is organized as follows:
Section 2 outlines a literature review, and the proposed method is provided in
Section 3. Detailed experimental results and discussions on algorithms are reported in
Section 4. Finally, the conclusion is provided in
Section 5.
2. Literature Review
An improved PSO with OBL method by the authors in [
20] is employed in particle Pbest position used to escape the local optima problem. Particles have increased probability in finding opposition to Pbest positions, whereas position is updated with respect to Pbest and velocity. The proposed method was tested on different benchmark functions and achieved better performance than other algorithms. Verma et al. [
21] used an opposition-based technique and dimension-based approach in order to improve standard PSO performance. The initial particles are generated through OBL in order to increase the chance of reaching the optimal solution. Each dimension is taken into consideration one at a time for discovering the global optimal solution. A new variant of PSO called adaptive opposition-based particle swarm optimization (AOPSO) by the authors of [
22] was proposed. Adaptive opposition-based learning (AOBL) is based on quasi-opposite number (QOBL) and quasi-reflection opposite number (QROBL). AOBL has better convergence than compared to OBL. A nonlinear inertia weight is used to balance exploration and exploitation problems. AOPSO algorithm is applied to improve radar network distribution and used to reduce the local minima problem. A modified Particle Swarm optimization on elite opposition-based learning (EOBL) is presented by Xu and Tang [
23] for solving large scale optimization problem. The basic PSO shows some weakness on large scale optimization problem such as slow convergence, low accuracy, and being easily trapped in the local optima; therefore, a new variant was proposed. EOBL is used to generate the initial population in order to increase population diversity. The proposed algorithm shows better performance than many popular algorithms on optimization problems.
Opposition-based learning competitive PSO (OBL-CPSO) [
24] was used for avoiding premature convergence. Two learning mechanisms were engaged including competitive swarm optimization (CSO) and OBL. In each competition, three particles were randomly selected. The best-fit particle is presented as the winner, and it moves directly toward the next iteration. The worst fit particles learn from the winner, and the medium fit particles take OBL and then move to the next iteration with updated velocities and positions. An opposition-based PSO with an adaptive mutation strategy (AMOPSO) was introduced by Dong et al. [
25] in order to overcome premature and low convergence rates. Global adaptive mutation-selection (AMS) and adaptive nonlinear inertia weight (ANIW) strategies are used in it. Adaptive nonlinear inertia was adjusted with an inertia weight to balance local and global searches. The purpose of AMS is to conduct a search around the entire surface of the space in swarm by using adaptive distributed mutation in order to avoid being trapped in the local optima and to improve exploratory ability. In the proposed method [
26], a uniformed opposition-based Particle Swarm Optimization (UOPSO) was used to improve the accuracy and stability of the solution. Population diversity increased through the utilization of OPSO. The velocity factor was replaced with an inertia weight used to increase convergence speed. An adaptive elite mutation selection strategy was used to avoid being trapped in local minima. Experiments show that the proposed algorithm has efficient accuracy and stability for large-scale problems and unimodal and multimodal problems. This paper introduces a newly improved PSO algorithm with two modifications: The first one is generalized opposition-based and the second one consists of a linear decreasing inertia weight [
27]. By using the threshold value, the population is divided into two portions Best and Worst. The opposite particle is generated from the Worst swarm that is combined with the Best swarm. The linear decreasing inertia weight is used to overcome trapping into local minima. Experiment results show the superior performance of the proposed PSO than compared to PSO variants.
The authors implemented a new methodology of the bat algorithm based on the study of the collaboration of the opposite population and dynamic learning (CDLOBA). By using OBL, opposite individuals are generated from the population. It is possible that the new opposite individuals are better, and they are hired to obtain a new and better population by using competitive collaborative strategies [
28]. A new variant of bat algorithm (BA) is called OBMLBA, and it was introduced in [
29] to overcome the local optima problem and to improve convergence speed. In the proposed algorithm, OBL and Lévy Flight Local Search strategy is used on the modified bat algorithm. Levy flight is a local search-based algorithm that prevents becoming stuck in local optima. The Lévy flight Local Search strategy is applied on individuals, and OBL is then applied on it. OBL, when introduced to the bat algorithm, improves convergence and diversity capability. In [
30], the authors presented a new mutation operator and EOBL in order to improve the modified bat algorithm. The Cauchy mutation is described as having a one-dimensional probability density function centered with respect to the original. The proposed invariant provides better convergence speed and diversity of the population. In [
31], the authors proposed the BA based on OBL for the optimal design of circular mutation. In the given variant, the author used the opposition method for the initialization of the population. The opposition technique was used for balancing exploration and exploitation. The proposed approach provides better results than compared to BBO. The authors in [
32] developed a modified bat algorithm (mBA) using EOBL and inertia weight. By using OBL, from the initial population, some of the selected elite individuals are generated with respect to the corresponding opposite individuals in the search space.
Wahab et al. [
33] used a combination of ANN and PSO algorithm to damage identification in structures. This combination was used to overcome the limitations of ANN by applying gradient descent methods used to train the NN and reduces computational time. In order to evaluate the performance of the proposed technique, numerical models and experimental models using different damage conditions are used. ANN-PSO easily identified damaged location structures. The advanced PSO algorithm and Newton’s laws of motion known as centripetal accelerated particle swarm optimization (CAPSO) was presented in [
34] in order to evolve ANN’s learning and accuracy. CAPSO algorithms are used to train the feedforward multi-layer neural network (FFNN) in order to solve the classification problem of the diagnosis of nine medical diseases. The CAPSO algorithm showed superior classification accuracy than compared to most of the famous algorithms with respect to the diagnosis of nine medical diseases. In [
35], the authors introduced the training of Feed Forward Neural Networks (FFNN) with fuzzy adaptive particle swarm optimization (FA-PSO) for two purposes: classification and short term price forecasting (STPF). In the proposed algorithm, the dynamic inertia weight was replaced with inertia weight and avoided being stuck in local minima. FA-PSO was used to tune the weights and biases of the FFNN of the fixed architecture. The proposed algorithm was used to predict various price differences in the Spanish electricity market.
3. Methodology
In this paper, we proposed Philox with opposition-based PSO ranked inertia weight (ORIW-PSO-P) and Threefry with opposition-based PSO ranked inertia weight (ORIW-PSO-TF) algorithms in order to avoid the local optima problem and to create a balance between exploration and exploitation abilities. The proposed technique uses two features in standard particle swarm optimization: The first one is Philox and Threefry initialization techniques with opposition-based learning as an initialization strategy and the second one where the inertia weight is updated with ranked inertia weight for individual particles. Population initialization has been observed to play a vital role in the search process of metaheuristic algorithms. Different initialization techniques are used for initializing the initial population. The initial population has an efficient effect on the PSO algorithm. We used opposition-based learning with PRNG approaches in order to initialize the initial population. We proposed two new initialization strategies for pseudo-random Philox and Threefry.
In the proposed methodology, the main focus is the opposition-based initialization process, e.g., how it is executed and processed and what sort of results can it produce on common and generic functions. Opposition-based initialization is used to generate opposite populations, and the fittest individual is selected for the current population and opposition population. Based on a jumping rate (jumping probability), rather than generating a new population through the evolutionary process, the fittest and opposite populations are determined from the current population as well as from the opposite population. We used a 0.3 Jumping probability for the opposite population. It has to be pointed out here that while accumulating the opposite population for generation jumping, every variable is generated dynamically. These are the lowest and highest values for each variable in the current set, and they are used to compute opposite points instead of using defined boundary intervals. By using variables, we generated opposite points in which (minimum and maximum) values become increasingly smaller than the upper and lower bounds of the search space.
The opposition rank-based inertia weight approach is used to adjust particle inertia weights. It was adjusted on at the base of each particle with respect to the rank of its fitness value. The fittest individuals have minimum inertia weights, which moves slowly than compared to the lowest fittest individual. At the same time, it enhances local and global search abilities. Our proposed methodology is presented in
Figure 1. The proposed algorithm shows efficient performance on several unimodal and multimodal complex benchmark functions.
3.1. Random Number Generators for Initialization
The number occurs in a sequence in such a manner that it is impossible to predict the value on the bases of its past and present values, and the defined set of uniformly distributed numbers is known as Random number. On the basis of the probability density function, it generates a sequence. It is useful in statistical analysis, cryptography, probability theory, and the population initialization of optimization algorithms. Random numbers are generated by using the inbuilt library function
Rand(
xmin,
xmax) by uniform distribution [
36].
3.2. Pseudo-Random Number Generators for Initialization
A pseudo-random number generator (PRNG) is used to generate pseudo random sequences of numbers by using a deterministic algorithm. PRNG generated a numerical sequence resembling the properties of random numbers. It takes the seed value as the starting state, and many numbers can be generated within a short period time in this manner and can be reproduced when required if the seed value is known [
37]. Therefore, the produced numbers are deterministic and efficient. Simulation and modeling applications are good applications of PRNGs where the same sequence can be used repeatedly. PRNG is not applicable in encryption and gambling because the numbers are required to be unpredictable. The pseudo-random number generator is used as an initialization technique because it covers all search spaces [
38]. We used pseudo-random numbers for the initialization of the population that included Mersenne twister, Linear congruential generator, Multiply-with-carry, Threefry and Philox. Threefry and Philox are used for the first time for initialization in particle swarm optimization algorithms, and the show efficient convergence speed.
3.2.1. Mersenne Twisters
The Mersenne twister (MT) is an example of a PRNG that generates a random number by using the twister operation. MT uses the initial seed as input and is applied on the twister operation; however, in simple PRNG, the twister operation is not used [
36]. Mersenne prime 2
19937 − 1 is a base version of MT and is used for general purposes.
3.2.2. Linear Congruential Generator
The linear congruential generator (LCG) is the oldest method and most popular PRNG algorithm. Through modular arithmetic, LCG generates a sequence of numbers that have sufficient randomness. LCG is an algorithm that generates a computed sequence of pseudo-random numbers with a partial discontinuous linear equation [
39].
3.2.3. Multiply-with-Carry
Multiply-with-carry (MWC) uses an initial set of random integers from two to many thousand seed values for generating sequences. The range value of MWC is
to
, and long periods are required for generating a quick random sequence [
40].
3.2.4. Threefry
Bulleted Threefry is based on the existing Threefish algorithm that shows high performance in graphics processing units (GPUs) and supports parallel system [
41]. By using Threefry, we can easily generate a random sequence. Threefry consists of counter-based PRNGs that are derived from Threefish and is used in the Skein hash function. It is available in improved variants that can vary word sizes between 32 and 64 bits.
Threefry’s 32-bit word-size algorithm generates four numbers at a time as follows.
Here,
vi,d into
i, which is the random number obtained during
d; the round
is the key that is applied every fourth round. Each pair is mixed in each S-box by the following function:
where
j = 1, 2.
R is a collection of constants, and << is the bitwise left rotation. The keys
k0, …, 3 create a help key according to
. After this, it rotates the keys according to the following.
The constant used to create the help key k4 purpose is in accordance with the creators in order to ensure that k4 cannot become 0.
3.2.5. Philox
Philox (non-cryptographic) shows high performance in graphic processing units (GPU) and the support parallel system. Philox (P) generates the well-defined random sequence [
41]. Philox consists of counter-based PRNGs that use multiple instructions to scramble bits.
The processor’s word size is W, and the Philox S-box takes two words (
L and
R) from an N words block for W bits, and it is a standard Feistel function.
Philox-2_W-R bijection performs R rounds on a pair of W-bit inputs when N = 2. By using Threefish, the N-word inputs are swapped when N is larger then the P-box block before being imported into the N = 2 Philox S-box and multiplier M. The N = 2 element is constant. The N = 2 key is updated during each cycle based on the Weyl sequence.
3.3. Opposition Rank-Based Inertia Weight
Inertia weight (W) is an important factor in PSO algorithm that is used to balance exploration and exploitation. It is observed that the value of W provides quite good results when taken between 0.4 and 0.9. The previous velocity of a particle is controlled by using inertia weight. Opposition rank-based inertia weight is adjusted with respect to particle inertia weights according to their fitness value. The position of the particle is balanced such that the fittest particles move slowly, and the lowest fittest particle moves fast when compared to the fittest particle. The fittest particle is either current or their opposite. Inertia weight is adjusted on the basis of each particle and on the rank of its fitness value. The inertia weight of each particle is given by the following:
wheres
R(i)(
t) is the fitness rank of particle
i. It is observed that the fittest particles (i.e., rank 1) have minimum inertia weights while the lowest fittest particle is set with the maximum inertia weight, which moves fast. The minimum inertia weight (
Wmin) is set at 0.4, and the maximum inertia weight (
Wmax) is set at 0.9.
3.4. Opposition-Based Learning
The idea of OBL is to work as real-world opposition similarly to how every person has an opposite person regardless of whether he is good or bad. The authors of [
42] have presented a new opposition-based learning (OBL) scheme for machine learning. Let
x be a real number that contains the interval
x ∈ [
a, b] and its opposite number is
x’, which is defined as the following.
Let’s
xi = (
x1,
x2,
x3 …,
xd) be points in the d dimension in the search space with interval
xi belonging to {
ai,
bi}; thus, the opposite point is defined as follows.
The idea of OBL is that allows the given unknown function f(x) to be used with g(x), which is an evaluation function. It is used for initially guessing x and its corresponding opposite point is x’. For g(x) > g(x’), learning continues with x. OBL is used to accelerate the search process of some well-known techniques of EC.
5. Conclusions
PSO is a nature-inspired algorithm that suffers from the problem of pre-mature convergence. Due to this problem, we proposed two newly improved variants of PSO termed as Threefry with opposition-based PSO ranked inertia weight (ORIW-PSO-TF) and Philox with opposition-based PSO ranked inertia weight (ORIW-PSO-P) by incorporating three modifications: Threefry and Philox pseudo sequences are used for initialization; opposition-based learning is used for initialization; and a novel introduction of opposition-based rank-based inertia weight is used to amplify the execution of standard PSO for the acceleration of convergence speed. The finding of the proposed variants is tested on sixteen benchmark functions and tested on the training of ANNs for data classification on real world datasets. The simulation results depict the effectiveness of the proposed variants (ORIW-PSO-TF) and (ORIW-PSO-P). The simulation results depict that the use of the pseudo-random generator family (Philox, Threefry, Mersenne Twister, Linear congruential generator, and Multiply-with-carry) maintains swarm diversity, finds optimal regions of swarm, and improves convergence speed. In this paper, we provided a comprehensive survey of the different PSO initialization opposition-based method on pseudo-random families such as Mersenne Twister (MT), Linear congruential generator (LCG), Multiply-with-carry (MWC), Threefry (TF), Philox (P), and uniform random distribution. The experimental results depict that the ORIW-PSO-P and ORIW-PSO-TF avoided being trapped in local optimal and enhanced convergence accuracy. For future investigations, our target is to research higher-dimensional problems and constrained optimization problems. Additionally, in this study, we have not modified any additional operators of algorithms such as mutation. However, it will be exciting to observe the impact of such operators with respect to low discrepancy sequences. The main purpose of this study also applies to other metaheuristic algorithms that develop future research directions with respect to our investigations.