# Range-Free Localization Approaches Based on Intelligent Swarm Optimization for Internet of Things
## 3 Proposed Localization Algorithms
### CSO Optimization Approach  
Chicken swarm optimization is a biologically inspired heuristic optimization approach that draws inspiration from the collective behavior of chickens. It falls under the category of swarm intelligence algorithms, which are widely used to tackle complex optimization problems by continuously seeking the best solution based on specific quality measures. The CSO approach is based on the principles of self-organization, simplicity, and decentralization. Each member of the swarm represents a potential solution, and adapts its position and behavior to explore the search space. The interactions among swarm members facilitate information sharing, leading to updates in their positions and improvements in their individual and collective performance. This collective intelligence enables CSO to converge toward optimal solutions effectively. Due to its demonstrated effectiveness and competitiveness in various problem domains, CSO has become a favored optimization algorithm. By harnessing the collective behavior of chickens, CSO offers an efficient and adaptable approach to solving complex optimization problems. CSO uses a minimal number of parameters to adjust the particle population to simplify the optimization process. Furthermore, it guarantees efficient memory utilization, as it features low spatial complexity while using small temporary storage. CSO guarantees fast convergence by allowing the most optimistic chicken particles to share their solutions with others, offering an interactive and adaptable approach to interpreting and customizing solutions to specific problem contexts. The diversity of applications is ensured as well, as CSO has proven itself in many different areas. The optimization process of CSO consists of four steps: (i) population initialization, parameter definition, and determining the fitness value of each individual calculation; (ii) sorting individuals by fitness value and determining their identities and subgroups; (iii) iteration of individuals with distinct identities based on different formulas and resorting them at regular intervals based on their new fitness values; (iv) iteration stops when the conditions are met, and the optimal solution is selected from among the population. In the CSO approach, roosters with better fitness values are better able to find food in wider areas. Roosters with the best fitness values can cover a larger distance to find food than those with lower fitness values. The rooster movement function is as follows:  
\[X^{(t+1)}_{(p,\mathcal{A})}=X^{t}_{(p,\mathcal{A})}\times(1+\text{Randn}(0, \sigma^{2})) \tag{24}\]  
\[\sigma^{2}= \begin{cases}1&\text{if }f_{p}\leq f_{k}\\ \exp\Bigl{(}\frac{f_{k}-f_{p}}{|f_{p}|+\epsilon}\Bigr{)}&\text{otherwise}\end{cases}  \quad\text{for }k\in[1,N],\ k\
eq p \tag{25}\]  
where the normal distribution of \(Randn(0,\sigma^{2})\) is around a mean of 0 and standard deviation \(\sigma^{2}\), The index \(k\) refers to the stochastically determined rooster, \(f_{k}\) is the fitness value of the \(k\)-th rooster, and the minimum constant \(\epsilon\) is applied to avoid the zero-division error. The hens follow the roosters as group mates to find food, and can engage in stochastic pilfering of food discovered by the roosters.