# Hybrid Particle Swarm Optimization-Jaya Algorithm for Team Formation
## 5 Improved PSO-Jaya Optimization Algorithm (I-PSO-Jaya)  
The proposed methodology leverages Particle Swarm Optimization (PSO) to tackle the team formation problem of optimizing team composition for efficient communication [25]. This approach involves conducting multiple iterations to arrive at a suitable solution. To refine the solution and enhance team diversity, we introduce an agent-swapping technique: replacing the current agent with another agent possessing similar skills. We optimized the process by integrating the Jaya algorithm and incorporating addition and subtraction operators. Specifically, we utilized the Jaya best-case scenario. We eliminated the worst-case scenario results from our algorithm, resulting in a more accurate estimation of the shortest communication time for the team. The flow chart of our metaheuristic technique's IPSO with Jaya (I-PSO-Jaya) is shown in Figure 3, and the accompanying pseudocode in Algorithm 1 visually represents the algorithm's structure and implementation details. These loops are essential for iterating over the number of particles and the maximum number of iterations, facilitating the algorithm's convergence to an acceptable solution. The velocity and position updates are calculated using equations that combine PSO, MSO, and Jaya elements, synergistically improving the algorithm's ability to explore and exploit the search space effectively. The communication cost serves as the fitness function to evaluate the effectiveness of each team composition. This section will comprehensively demonstrate our technique using a specific case extracted from the ACM dataset. The steps of our Algorithm 1 can be simply stated as follows. **Initialization. ** We generate the initial population \(X^{c}_{i,j}\) in the initialization step. We set the number of particles (\(P\)) and the number of skills (\(S\)). Here, \(i\) represents the dimension of the problem. Each population is generated using a nested loop that iterates from \(j=1\) to \(P\). **Evaluation. ** Next, we compute the fitness function \(f(x_{i})^{c}\) for each particle \(i\) to assess the communication cost and identify the best personal solution \(p^{c}_{\text{best}}\) and the best global solution \(g^{c}_{\text{best}}\) in the population. For the team formation problem, the goal is to minimize \(f(x_{i})\), which is the total communication cost. **Single-point crossover. ** To enhance the solution, we determine the acceptable solution \(x^{c}_{\text{best}}\) and the current solution \(x^{c}\), and then we choose the superior offspring. **Solution update. ** All equations represent the discrete domain by using different operations with modified swap operations. 1. Velocity Update: Use the Particle Update Loop Equation (3) with modified swap operation as follows:  
\(v^{(c+1)}_{i}=v^{(c)}_{i}\oplus\alpha\otimes(p^{c}_{\text{best}}-x^{(c)}_{i} )\oplus\beta\otimes(g^{c}_{\text{best}_{i}}-x^{(c)}_{i})\). Here, \(\alpha\) and \(\beta\) are learning factors, \(p^{c}_{\text{best}_{i}}\) is the best personal solution, and \(g^{c}_{\text{best}_{i}}\) is the best global solution. 2. Position Update: The position of each particle is updated based on the new velocity using Equation (4):  
\(x^{(c+1)}_{i}=x^{(c)}_{i}\oplus v^{(c+1)}_{i}\). 3. Crossover Operation: A crossover operation is performed between the best global solutions, where \(g^{c}_{\text{best}}\) and the current solution \(x^{(c+1)}_{i}\) generate new solutions. 4. Jaya Optimization: The best offspring solution is chosen, and the position is updated using the Jaya optimization Equation (5):  
\(X^{c+1}_{i,j}=X^{c}_{i,j}\oplus r^{c}_{1,j}\otimes\left[X^{c}_{i,\text{best}}- X^{c}_{i,j}\right]-r^{c}_{2,j}\otimes\left[X^{c}_{i,\text{worst}}-X^{c}_{i,j} \right]\;.\)Here, \(r^{c}_{1,j}\) and \(r^{c}_{2,j}\) are random numbers, \(X^{c}_{i,\text{best}}\) is the best solution, and \(X^{c}_{i,\text{worst}}\) is the worst solution. 5. Fitness Evaluation: The fitness of the new solution \(X^{(c+1)}_{i,j}\) is evaluated.