Research Article

Cluster Head Selection for the Internet of Things Using a Sandpiper Optimization Algorithm (SOA)

Algorithm 1

CH selection using SOA.
Input: Network population is set of nodes “”.
Output: Best Sandpipers location act as CH.
1: while (true)
2: Initialize search agent and movement of sandpiper .
  //migration phase.
3: Compute and for collision avoidance using Equations (4) and (5).
4: Compute best position of sandpiper using Equation (6).
5: Updating position of the best sandpiper using Equation (8).
  // Attacking phase.
6: Create spiral behavior to attack the prey using Equation (9)-Equation (12).
7: Compute the fitness function Equation (16).
8: if sandpiper reaches its best search agent in the network then.
9:  Best sandpipers act as CH
10: else.
11:  Go to step 1
12: return CH.