# A Survey of Using Swarm Intelligence Algorithms in IoT
## 3 Applications of Swarm Intelligence Algorithms in WSN
### WSN Routing Protocols Based on SI
#### 3.2.3 WSN Routing Protocols Based on ACO  
For the WSN, optimal routing algorithms and routing protocol are the keys to save communication energy and thus prolong the network lifetime. Reference [25] presented a routing algorithm that combines the clustering algorithm, the ACO and mobile sink. The algorithm improves the ACO by optimizing the heuristic factor (visibility) \(\eta_{ij}\), and uses improved ACO to find an optimal sink movement track, communicate with all CHs, and collect data through a single hop close communication. Compared with other ACO-based standard algorithms, this method can extend the network life. It is worth noting that the more nodes there are, the smaller the advantage is. Reference [26] proposed a cross-layer protocol (FAMACROW). This protocol combines the idea of energy-saving hierarchical cluster routing and media access and improve its energy efficiency and network life. In this algorithm, the ACO technology was used to carry out multi-hop routing between clusters from CH to MS, and the fuzzy logic and ACO is used to select CH and route paths between clusters. The reliability of protocols is improved by using link quality indicators to select CH and transfer the probability of routes between clusters. FAMACROW is better than the other unequal clustering routing in terms of throughput, goodput, latency, and the network life. Reference [27] proposed a multi-path routing in WSNs by using the FABC algorithm and the EACO algorithm. The first step is to use the FABC algorithm with the fitness function to find the CH. In the second stage, the proposed new algorithm EACO is adopted to realize multi-path path discovery. The EACO uses an exponential weighted moving average mode control convergence speed of ACO. Compared with other SI+SI algorithms, as the number of rounds increases, FABC+EACO is better in terms of energy consumption and goodput, but the advantage decreases with the increase of nodes. Reference [32] proposed an improved energy-saving routing algorithm based on ACO, considering location information and search direction. The algorithm considers not only the distance from the node to the next node but also the distance from the node to sink. It also specifies the search range and direction (pointing to sink) for the next node. Simulation results showed that this algorithm is significantly better than other algorithms when the distance between the sink and the target region is far away, and the average energy consumption of this algorithm increases slowly with the increase of simulation times. Reference [33] proposed a secure routing protocol based on multi-objective ACO (named SRPMA). The goal of this algorithm is to find better multi-path routing results. The main idea of this algorithm is to introduce Pareto multi-objective optimization strategy into the ACO, and to use the improved ACO to take the residual energy of nodes and the trust value of routing path as the routing optimization targets. Compared with related ACO-based security routing protocols, the SRPMA can achieve better performance in terms of packet loss rate, routing load and average energy consumption under black hole attack. Also, the advantage becomes more evident with the increase of the number of black hole nodes because the SRPMA requires additional routing control packets to maintain the trust model and update the trust values of the nodes. Large-scale WSNs may contain a large amount of sensor nodes distributed into the area of interest [34]. Reference [35] proposed a routing protocol, named CB-RACO in large-scale WSNs, where the ACO and LP are combined. The goal is to keep data transmission at a high level while minimizing energy consumption. Although this protocol divides clusters but is not CH-based, in order to prevent energy consumption too fast, each ant can only live in its own community (cluster activity).