# Routing Enhancement in MANET Using Particle Swarm Algorithm
## 2 Literature Review  
Particle Swarm Optimization is a search technique that is inspired by flocks of birds. The population-based algorithm was proposed in 1995 by [PERSON] [1]. The traditional PSO algorithm contains many populations of particles, and each of them is a candidate solution. The particle moves in a search space and the position of the particle is adjusted depending on its own experience and other particles' experience. The PSO algorithm aims to balance exploration and exploitation by combining local search techniques with global search techniques. The concept of fitness is used, and potential problem solutions are termed particles. Each particle modifies its search based on both its own experiences and those of its companions. The particle experience is the optimal location that the particle finds; it is represented as \(P_{best}\). The social environment experienced \(G_{best}\) is the location that the particle group determines to be optimal. In each iteration, the particle observes its fitness and the fitness of other particles and tries to imitate the successful particles and move toward them. The position and velocity of particle \(i\) in each iteration are represented in the following equations:  
\[V_{i}(t+1)=W\times V_{i}(t)+C_{1}r_{1}(P_{best(i)}-X_{i(t)})+C_{2}r_{2}(G_{ best}-X_{i(t)}) \tag{1}\]  
\[X_{i(t+1)}=X_{i(t)}+V_{i(t+1)} \tag{2}\]  
where \(V_{i}\) is the current velocity of the particle and \(W\) is the inertia weight; it is a positive constant used to balance the exploration and explosions. The cognitive constant \(C_{1}\) is a positive constant used to weigh the importance of the previous experience of the particle. \(r_{1}\) and \(r_{2}\) are random variables. The social constant \(C_{2}\) weighs the importance of the global learning of the swarm. \(P_{best}\) is the best position of the particle and \(X_{i}\) is the current position of the particle and it must be increased to attract the particle to its best own position. \(G_{best}\) is the global best position of particles. The particles are initially distributed randomly in the search space. The velocity of each particle is a random value at the beginning and is updated using the particle's experience and the experience of other particles. The fitness function is used to examine the quality of each solution. The fitness function can be formed in different ways; one of the approaches is a calculation model based on the problem domain. Most traditional PSOs do not consider important parameters that affect the network performance. Furthermore, designing an effective fitness function is an important aspect of improving the quality of solutions in PSO. The authors of [10] presented a hybrid Extended Particle Swarm Optimization (EPSO) model. The proposed model enhances MANET performance by determining the best node mobility and number of hubs to choose the best path. The proposed model used the EPSO algorithm, which relies on population distribution and a particle searching methodology. The EPSO enhanced the traditional PSO by dividing particles into two groups; this division encourages better exploration and reduces the stagnation of the search space. It reduces the discarded packets and reduces the packet delay. The effectiveness of the EPSO was tested on a very small network (a network with less than 20 nodes), which was insufficient to demonstrate the algorithm's effectiveness. A cross-layer routing protocol that used the PSO algorithm was suggested in [11]. The fitness metrics consider both the success data rate and the remaining energy. The PSO algorithm uses network information to generate the energy-efficient path. It uses the Contention Window measured from the MAC layer. The remaining power adjusts the CW to decrease the energy consumed. However, the proposed algorithm should consider the distance to find the best path. At long transmission distances, the nodes dramatically consume more power.