## 2 Related Work  
The next-generation sensor network [25; 26] is one of the most promising research topics because of its cost, size and robustness for real-time applications, i.e., healthcare, military, agriculture, etc. In such a network, smart sensors are dispersed either in a predefined location or in a random manner. The main aim of such sensors is observing the targeting object and sending the information toward network users for necessary actions. However, smart sensors have very limited capabilities and with time, they degrade the network performance especially in terms of energy and computational power [27; 28; 29]. Furthermore, due to the unpredictable behavior of sensors and some external sources, the conditions of WSNs are changed promptly. Therefore, since the last two decades, many researchers have been trying to propose different solutions for optimizing network performance, authenticity and balancing the network load between large numbers of low-powered sensor nodes. In [30], the authors proposed a topology adaptive spatial clustering (TASC) approach, which aims to assign a weight within a locality of the node. The weighted value is based on some factors, i.e., distance, connectivity and density information. Initially, all nodes determine their weighted value and flood the information to their 2-hop-away neighbors. Based on the highest weighted value, appropriate nodes are selected as cluster heads. The selected cluster heads announce their status in the 2-hop-neighbor and the nodes are grouped towards a particular cluster head. Authors in [31] proposed clustering communication based on a number of neighbors (CNN) for WSNs. The proposed solution is based on determining the number of neighbors, cluster head selection, clusters formation and TDMA scheduling phases. The cluster heads are selected using a random number and each cluster head adjusts their transmission range based on its number of neighbors. In [32], the authors proposed a solution to improve the localization scheme by using k-means and fuzzy-c means algorithms. By these two algorithms, the sink node trains the overall system. All network fields are divided into various clusters based on the Received Signal Strength Interference (RSSI) value. Moreover, all formulated clusters are trained individually to determine the coordinates of sensor nodes. The zone-based energy-efficient routing protocol (ZEEP) is presented in [33] by exploiting a fuzzy system for mobile WSNs. The proposed solution makes use of a fuzzy inference system based on four factors, i.e., energy, distance, density and mobility, to improve data routing. In addition, the proposed solution balances the energy consumption in the network field by selecting an optimal number of cluster heads. The authors in [34] proposed advanced caching for distributing sensor data through programmable nodes, which aims to improve the download latency than the legacy and Internet-based solutions. The proposed solution is based on the virtualization of the deployed network nodes and service modularization using the environment of NetServ. In [35], the authors studied different routing protocols for WSNs that aim to increase energy efficiency and network performance in terms of data latency. Most of the proposed solutions offered minimum energy consumption for WSN applications, however, such a solution unnoticed the optimal routing decisions and lead to degrading data delivery performance. In addition, it is observed that most of the solutions are not appropriate for secure data transmission under the existence of network attacks and are therefore negotiated with network operations. Thus, the knowledge of significant parameters for the formation of network structure and routing protocols is an important factor. A distributed adaptive cooperative routing protocol (DACR) is proposed in [36] using a reinforcement learning mechanism. The proposed solution significantly improves the quality of service (QoS) for low-power sensor networks with improved network lifetime.